Skip to content

[dv][kmac] Integrate KMAC Block-level DV from OpenTitan#650

Open
tchilikov-semify wants to merge 5 commits into
lowRISC:mainfrom
tchilikov-semify:kmac
Open

[dv][kmac] Integrate KMAC Block-level DV from OpenTitan#650
tchilikov-semify wants to merge 5 commits into
lowRISC:mainfrom
tchilikov-semify:kmac

Conversation

@tchilikov-semify

Copy link
Copy Markdown
Collaborator

KMAC sanity regression can be ran with:

dvsim hw/vendor/lowrisc_ip/ip/kmac/dv/kmac_unmasked_sim_cfg.hjson -i nightly -r 1 --tool xcelium

@tchilikov-semify

Copy link
Copy Markdown
Collaborator Author

Implements #430

@martin-velay martin-velay left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for this PR Christian. I have some comments, but you've done a good job!

function new(string name = "app_cg");
app_cg = new(name);
app_cfg_reg_cg = new(name);
app_cfg_reg_cg = new({name, "_cfg_reg"});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why this change? Is it to avoid having 2 times the same name? If yes, that's probably something we should fix upstream too?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

That's right - the issue here is that theres duplicate naming for different coverage properties. In the upstream where vcs was used this wasn't an issue it seems, but xcelium throws an error. this change makes it so the different properties have unique names. Youre right that this should probably be changes upstream for compatibility across simulators.

if (common_seq_type inside {"shadow_reg_errors", "shadow_reg_errors_with_csr_rw"}) begin
csr_excl_item csr_excl = ral.get_excl_item();
// Shadow storage fatal error might cause req to drop without ack.
`ifdef KMAC_MASKING

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should avoid the ifdef as much as possible (at least on the DV side). And I think we already have the material to do so in the cfg class. Could you try this instead and remove the +define+KMAC_MASKING?

if (cfg.enable_masking) begin
  $assertoff(0, "tb.dut.gen_entropy...SyncReqAckHoldReq");
  $assertoff(0, "tb.dut.gen_entropy...SyncReqAckAckNeedsReq");
end

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good catch, I didn't notice that this already exists. Will update it to use the cfg class instead of a macro

`uvm_object_new

virtual function void disable_asserts();
`ifdef KMAC_MASKING

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same here

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