Skip to content

Conversation

@vogelpi
Copy link
Contributor

@vogelpi vogelpi commented Feb 25, 2025

When using .set() method of the uvm_reg_field base class (this only updates the desired value in the abstraction class) followed by a csr_update() call (this updates the DUT in case the desired value doesn't match the mirrored value), we also need to explicitly update the mirrored value. This can happen either by using the .predict() method, or by calling csr_rd() or csr_wr(). This commit adds missing calls to the .predict() method were required.

Without these calls, the mirrored values can get out of sync and since in some cases we use the mirrored value to decide whether we need to update register values, the DUT and the DV environment can get out of sync.

When using .set() method of the uvm_reg_field base class (this only
updates the desired value in the abstraction class) followed by a
csr_update() call (this updates the DUT in case the desired value
doesn't match the mirrored value), we also need to explicitly update
the mirrored value. This can happen either by using the .predict()
method, or by calling csr_rd() or csr_wr(). This commit adds missing
calls to the .predict() method were required.

Without these calls, the mirrored values can get out of sync and since
in some cases we use the mirrored value to decide whether we need to
update register values, the DUT and the DV environment can get out of
sync.

Signed-off-by: Pirmin Vogel <[email protected]>
@vogelpi vogelpi requested a review from a team as a code owner February 25, 2025 23:12
@vogelpi vogelpi requested review from hcallahan-lowrisc and rswarbrick and removed request for a team February 25, 2025 23:12
Copy link
Contributor

@rswarbrick rswarbrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems rather strange to me. Doesn't aes_scoreboard::process_tl_access do the prediction anyway? (I think it should be aes_scoreboard.sv:259)

@vogelpi
Copy link
Contributor Author

vogelpi commented Feb 27, 2025

This seems rather strange to me. Doesn't aes_scoreboard::process_tl_access do the prediction anyway? (I think it should be aes_scoreboard.sv:259)

Thanks for the feedback @rswarbrick , this explains why we haven't seen issues with this in many tests. @nasahlpa ran into this issue in a test that disables the scoreboard.

@rswarbrick
Copy link
Contributor

Ahah! :-D Is there anything in this PR that needs to land then?

@vogelpi
Copy link
Contributor Author

vogelpi commented Feb 6, 2026

I am closing this PR as it's getting superseded by #29276.

@vogelpi vogelpi closed this Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants