[rom_ctrl,dv] Connect the block-level rom_ctrl env to chip tb - #30851
[rom_ctrl,dv] Connect the block-level rom_ctrl env to chip tb#30851rswarbrick wants to merge 6 commits into
Conversation
8c28dd5 to
21143c8
Compare
7b0e836 to
456f855
Compare
063cdfe to
9a5f9fd
Compare
vogelpi
left a comment
There was a problem hiding this comment.
Thanks @rswarbrick , this looks good to me!
I've also reviewed and approved the PR this one here relies on (where you simplify the backdoor utils).
One thing I don't yet understand is: where do you tell the KMAC HWIP to abort the hashing when you skip the ROM verification in the middle? Or does the mechanism work by not even forward anything to the KMAC HWIP in case the plusarg is set? I guess this would also work and would be even simpler.
9a5f9fd to
94c9d90
Compare
|
The communication with KMAC works by |
This doesn't do anything interesting unless you want to configure activity of an environment which itself contains agents. Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
94c9d90 to
d28e3bb
Compare
|
Force-push fixes the chip-level build. I'd changed a bound interface in #30985 to require a parameter. A good idea! But I'd forgotten to update this PR to match. |
|
Hmm. I'm not quite sure why the chip-level tests are failing with this PR. Switching back to draft while I debug things properly. |
Thanks for explaining @rswarbrick , this makes a lot of sense! |
d28e3bb to
207ad5d
Compare
Gah. The problem is that I hadn't adjusted this PR to match the more sensible behaviour in #31006. Now fixed, I think. |
|
Force-push fixes various bits of untidiness (in part inspired by code I think the problem is that the bound-in scoreboard is incorrectly Changes since the last version:
|
207ad5d to
6ef7caf
Compare
The is_tl_access_mapped_addr function is designed to tell the scoreboard whether an address is actually mapped to something in the block. This works by asking a uvm_reg_map to look up the address. *This* only works with the root map, because UVM doesn't pass the addresses to child maps when setting everything up. It matters for a chip-level simulation with a block-level scoreboard sitting inside it. In this case, "block" might be the block's uvm_reg_block, and block.get_default_map() will return that block's local map, rather than the chip-level one. One example of this going wrong the is is_tl_access_mapped_addr function. Without using the root map, the scoreboard will conclude that the address is unmapped, and will expect a TileLink error in the response. Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
If get_reg_by_addr fails to find a register, it returns a null result. The `downcast macro will perfectly happily cast it to a null handle for an arbitrary type. Unpack things more carefully and also give a more helpful message if either of the following casts fails. Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
The cip_base_scoreboard::check_alert_triggered task worked by counting cycles an cfg.clk_rst_vif. This is ok... as long as the alert interface is running that fast. When trying verticular reuse, I've just found that rom_ctrl gets run with a slower alert interface than the main clock for rom_ctrl. This was then causing timeouts in checks like "If an alert should have been triggered, wait up to 10 cycles": the ten cycles were waiting on the fast clock and the actual alert trigger was running on the slower one. The "alert_due_to_ping" mechanism still looks a bit strange in this task, but that's a matter for a follow-up commit. Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
In case this is seeing vertical reuse, we need to look up registers through the root map. Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
Getting this to work took quite a lot of other changes but this (finally) builds and runs a test successfully. Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
6ef7caf to
3a4231c
Compare
|
Well, that was tricky! I think the force-push that I have just done should fix things. Changes:
I'm going to leave this PR in draft and split out the register lookup changes and timing calculation fix into two separate PRs that can land first. This has been rather difficult! |

This PR is in draft because it has the following dependencies:
These were actually written as part of getting this PR to work properly, but I think it probably makes sense to review them separately first.
After they have been merged and this PR is rebased, just two commits will remain. The first (defining "set_is_active") is general and pretty trivial. The final commit includes the environment in the top-level testbench and isn't actually all that big: +159/-9.