New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DV/HMAC] hmac support config blocking and wr key #1023
Conversation
89d10ce
to
a87041d
Compare
@@ -88,12 +88,40 @@ class hmac_base_vseq extends cip_base_vseq #(.CFG_T (hmac_env_cfg) | |||
cfg_interrupts(.interrupts(interrupts), .enable(1'b1)); | |||
endtask | |||
|
|||
virtual task write_rand_config_and_key(bit do_wr_config, bit do_wr_key); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe we can call it like write_discarded_config_and_key, so that we know the task just do some dummy writes. Same for write_rand_config and write_rand_key
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion, makes sense and updated!
@@ -184,6 +212,8 @@ class hmac_base_vseq extends cip_base_vseq #(.CFG_T (hmac_env_cfg) | |||
if (ral.cfg.sha_en.get_mirrored_value()) begin | |||
if (!do_back_pressure) check_status_intr_fifo_full(); | |||
else clear_intr_fifo_full(); | |||
// randomly change key, config regs during msg wr, should trigger error or be discarded | |||
write_rand_config_and_key($urandom_range(0, 20) == 0, $urandom_range(0, 20) == 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can add some delay before write_rand_config_and_key or do it in the task
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, that sounds right, thanks for the reminder.
a87041d
to
729267e
Compare
hw/ip/hmac/dv/env/hmac_scoreboard.sv
Outdated
// will gate the write process with wr_cnt_updated signal if user uses non-blocking mode | ||
forever @(hmac_wr_cnt) begin | ||
wr_cnt_updated = 0; | ||
cfg.clk_rst_vif.wait_clks(HMAC_WR_WORD_CYCLE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as discussed, looks like we can move this wait to line 246, then we can remove this loop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion to simply the code. Updated as you mentioned.
aba2ff6
to
e798d1d
Compare
Support config blocking during msg_wr: during valid msg_wr, if trying to update the config register, it will be discarded Support err code when wr_key during msg_wr Separate hmac_wr_cnt in tl_process because it uses wait function Signed-off-by: Cindy Chen <chencindy@google.com>
e798d1d
to
5bac94b
Compare
This PR supports the changes in #1014
Support config blocking during msg_wr: during valid msg_wr, if trying to
update the config register, it will be discarded
Support err code when wr_key during msg_wr
Signed-off-by: Cindy Chen chencindy@google.com