[dv] Look up more registers through a root map - #31017
Open
rswarbrick wants to merge 3 commits into
Open
Conversation
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cip_base_scoreboard. This is needed for vertical re-use, because the block-level scoreboard will be using auvm_reg_mapfrom that block'suvm_reg_block. That won't be the root map, so looking up registers by address doesn't work.is_tl_csr_write_size_gte_csr_widthwas called with an address that didn't have an associated register. Now, things behave a little more predictably.rom_ctrl_scoreboard(because that is the block that I am trying to reuse vertically).These changes were found when trying to get #30851 to work properly, and these should be reviewed/merged before that PR.