-
Notifications
You must be signed in to change notification settings - Fork 914
[csrng/rtl] Remove three prim_fifo_sync from the data path #28633
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
Conversation
|
Regression results: CSRNG Simulation ResultsTuesday November 04 2025 09:55:03 UTCGitHub Revision:
|
| Stage | Name | Tests | Max Job Runtime | Simulated Time | Passing | Total | Pass Rate |
|---|---|---|---|---|---|---|---|
| V1 | smoke | csrng_smoke | 9.000s | 246.853us | 50 | 50 | 100.00 % |
| V1 | csr_hw_reset | csrng_csr_hw_reset | 2.000s | 233.282us | 5 | 5 | 100.00 % |
| V1 | csr_rw | csrng_csr_rw | 1.000s | 13.902us | 20 | 20 | 100.00 % |
| V1 | csr_bit_bash | csrng_csr_bit_bash | 11.000s | 1.385ms | 5 | 5 | 100.00 % |
| V1 | csr_aliasing | csrng_csr_aliasing | 3.000s | 273.440us | 5 | 5 | 100.00 % |
| V1 | csr_mem_rw_with_rand_reset | csrng_csr_mem_rw_with_rand_reset | 2.000s | 294.328us | 20 | 20 | 100.00 % |
| V1 | regwen_csr_and_corresponding_lockable_csr | csrng_csr_rw | 1.000s | 13.902us | 20 | 20 | 100.00 % |
| csrng_csr_aliasing | 3.000s | 273.440us | 5 | 5 | 100.00 % | ||
| V1 | TOTAL | 105 | 105 | 100.00 % | |||
| V2 | interrupts | csrng_intr | 10.000s | 313.847us | 200 | 200 | 100.00 % |
| V2 | alerts | csrng_alert | 18.000s | 2.210ms | 500 | 500 | 100.00 % |
| V2 | err | csrng_err | 8.000s | 24.949us | 500 | 500 | 100.00 % |
| V2 | cmds | csrng_cmds | 3.167m | 37.836ms | 50 | 50 | 100.00 % |
| V2 | life cycle | csrng_cmds | 3.167m | 37.836ms | 50 | 50 | 100.00 % |
| V2 | stress_all | csrng_stress_all | 8.217m | 84.965ms | 49 | 50 | 98.00 % |
| V2 | intr_test | csrng_intr_test | 1.000s | 14.493us | 50 | 50 | 100.00 % |
| V2 | alert_test | csrng_alert_test | 8.000s | 15.735us | 50 | 50 | 100.00 % |
| V2 | tl_d_oob_addr_access | csrng_tl_errors | 4.000s | 175.366us | 20 | 20 | 100.00 % |
| V2 | tl_d_illegal_access | csrng_tl_errors | 4.000s | 175.366us | 20 | 20 | 100.00 % |
| V2 | tl_d_outstanding_access | csrng_csr_hw_reset | 2.000s | 233.282us | 5 | 5 | 100.00 % |
| csrng_csr_rw | 1.000s | 13.902us | 20 | 20 | 100.00 % | ||
| csrng_csr_aliasing | 3.000s | 273.440us | 5 | 5 | 100.00 % | ||
| csrng_same_csr_outstanding | 2.000s | 104.462us | 20 | 20 | 100.00 % | ||
| V2 | tl_d_partial_access | csrng_csr_hw_reset | 2.000s | 233.282us | 5 | 5 | 100.00 % |
| csrng_csr_rw | 1.000s | 13.902us | 20 | 20 | 100.00 % | ||
| csrng_csr_aliasing | 3.000s | 273.440us | 5 | 5 | 100.00 % | ||
| csrng_same_csr_outstanding | 2.000s | 104.462us | 20 | 20 | 100.00 % | ||
| V2 | TOTAL | 1439 | 1440 | 99.93 % | |||
| V2S | tl_intg_err | csrng_sec_cm | 9.000s | 179.763us | 5 | 5 | 100.00 % |
| csrng_tl_intg_err | 5.000s | 815.392us | 20 | 20 | 100.00 % | ||
| V2S | sec_cm_config_regwen | csrng_regwen | 8.000s | 60.852us | 50 | 50 | 100.00 % |
| csrng_csr_rw | 1.000s | 13.902us | 20 | 20 | 100.00 % | ||
| V2S | sec_cm_config_mubi | csrng_alert | 18.000s | 2.210ms | 500 | 500 | 100.00 % |
| V2S | sec_cm_intersig_mubi | csrng_stress_all | 8.217m | 84.965ms | 49 | 50 | 98.00 % |
| V2S | sec_cm_main_sm_fsm_sparse | csrng_intr | 10.000s | 313.847us | 200 | 200 | 100.00 % |
| csrng_err | 8.000s | 24.949us | 500 | 500 | 100.00 % | ||
| csrng_sec_cm | 9.000s | 179.763us | 5 | 5 | 100.00 % | ||
| V2S | sec_cm_updrsp_fsm_sparse | csrng_intr | 10.000s | 313.847us | 200 | 200 | 100.00 % |
| csrng_err | 8.000s | 24.949us | 500 | 500 | 100.00 % | ||
| csrng_sec_cm | 9.000s | 179.763us | 5 | 5 | 100.00 % | ||
| V2S | sec_cm_update_fsm_sparse | csrng_intr | 10.000s | 313.847us | 200 | 200 | 100.00 % |
| csrng_err | 8.000s | 24.949us | 500 | 500 | 100.00 % | ||
| csrng_sec_cm | 9.000s | 179.763us | 5 | 5 | 100.00 % | ||
| V2S | sec_cm_blk_enc_fsm_sparse | csrng_intr | 10.000s | 313.847us | 200 | 200 | 100.00 % |
| csrng_err | 8.000s | 24.949us | 500 | 500 | 100.00 % | ||
| csrng_sec_cm | 9.000s | 179.763us | 5 | 5 | 100.00 % | ||
| V2S | sec_cm_outblk_fsm_sparse | csrng_intr | 10.000s | 313.847us | 200 | 200 | 100.00 % |
| csrng_err | 8.000s | 24.949us | 500 | 500 | 100.00 % | ||
| csrng_sec_cm | 9.000s | 179.763us | 5 | 5 | 100.00 % | ||
| V2S | sec_cm_gen_cmd_ctr_redun | csrng_intr | 10.000s | 313.847us | 200 | 200 | 100.00 % |
| csrng_err | 8.000s | 24.949us | 500 | 500 | 100.00 % | ||
| csrng_sec_cm | 9.000s | 179.763us | 5 | 5 | 100.00 % | ||
| V2S | sec_cm_drbg_upd_ctr_redun | csrng_intr | 10.000s | 313.847us | 200 | 200 | 100.00 % |
| csrng_err | 8.000s | 24.949us | 500 | 500 | 100.00 % | ||
| csrng_sec_cm | 9.000s | 179.763us | 5 | 5 | 100.00 % | ||
| V2S | sec_cm_drbg_gen_ctr_redun | csrng_intr | 10.000s | 313.847us | 200 | 200 | 100.00 % |
| csrng_err | 8.000s | 24.949us | 500 | 500 | 100.00 % | ||
| csrng_sec_cm | 9.000s | 179.763us | 5 | 5 | 100.00 % | ||
| V2S | sec_cm_ctrl_mubi | csrng_alert | 18.000s | 2.210ms | 500 | 500 | 100.00 % |
| V2S | sec_cm_main_sm_ctr_local_esc | csrng_intr | 10.000s | 313.847us | 200 | 200 | 100.00 % |
| csrng_err | 8.000s | 24.949us | 500 | 500 | 100.00 % | ||
| V2S | sec_cm_constants_lc_gated | csrng_stress_all | 8.217m | 84.965ms | 49 | 50 | 98.00 % |
| V2S | sec_cm_sw_genbits_bus_consistency | csrng_alert | 18.000s | 2.210ms | 500 | 500 | 100.00 % |
| V2S | sec_cm_tile_link_bus_integrity | csrng_tl_intg_err | 5.000s | 815.392us | 20 | 20 | 100.00 % |
| V2S | sec_cm_aes_cipher_fsm_sparse | csrng_intr | 10.000s | 313.847us | 200 | 200 | 100.00 % |
| csrng_err | 8.000s | 24.949us | 500 | 500 | 100.00 % | ||
| csrng_sec_cm | 9.000s | 179.763us | 5 | 5 | 100.00 % | ||
| V2S | sec_cm_aes_cipher_fsm_redun | csrng_intr | 10.000s | 313.847us | 200 | 200 | 100.00 % |
| csrng_err | 8.000s | 24.949us | 500 | 500 | 100.00 % | ||
| V2S | sec_cm_aes_cipher_ctrl_sparse | csrng_intr | 10.000s | 313.847us | 200 | 200 | 100.00 % |
| csrng_err | 8.000s | 24.949us | 500 | 500 | 100.00 % | ||
| V2S | sec_cm_aes_cipher_fsm_local_esc | csrng_intr | 10.000s | 313.847us | 200 | 200 | 100.00 % |
| csrng_err | 8.000s | 24.949us | 500 | 500 | 100.00 % | ||
| V2S | sec_cm_aes_cipher_ctr_redun | csrng_intr | 10.000s | 313.847us | 200 | 200 | 100.00 % |
| csrng_err | 8.000s | 24.949us | 500 | 500 | 100.00 % | ||
| csrng_sec_cm | 9.000s | 179.763us | 5 | 5 | 100.00 % | ||
| V2S | sec_cm_aes_cipher_data_reg_local_esc | csrng_intr | 10.000s | 313.847us | 200 | 200 | 100.00 % |
| csrng_err | 8.000s | 24.949us | 500 | 500 | 100.00 % | ||
| V2S | TOTAL | 75 | 75 | 100.00 % | |||
| V3 | stress_all_with_rand_reset | csrng_stress_all_with_rand_reset | 2.583m | 12.978ms | 10 | 10 | 100.00 % |
| V3 | TOTAL | 10 | 10 | 100.00 % | |||
| TOTAL | 1629 | 1630 | 99.94 % |
Coverage Results
Coverage Dashboard
| Score | Block | Branch | Statement | Expression | Toggle | Fsm | Assertion | CoverGroup |
|---|---|---|---|---|---|---|---|---|
| 97.59 % | 98.76 % | 96.96 % | 99.85 % | 96.77 % | 92.08 % | 100.00 % | 95.53 % | 90.12 % |
Failure Buckets
UVM_ERROR (csrng_scoreboard.sv:166) [scoreboard] Check failed intr_pins[i] === (intr_en[i] & item.d_data[i]) (* [*] vs * [*]) Interrupt_pin: EntropyReqhas 1 failures:- Test csrng_stress_all has 1 failures.
-
42.csrng_stress_all.7201815913989753525406440744181533782652175777971277456600672816489512363970
Line 146, in log /scratch/glaserf/opentitan/scratch/csrng_sfifo_pr/csrng-sim-xcelium/42.csrng_stress_all/latest/run.logUVM_ERROR @ 5722333422 ps: (csrng_scoreboard.sv:166) [uvm_test_top.env.scoreboard] Check failed intr_pins[i] === (intr_en[i] & item.d_data[i]) (0x1 [1] vs 0x0 [0]) Interrupt_pin: EntropyReq UVM_INFO @ 5722333422 ps: (uvm_report_catcher.svh:705) [UVM/REPORT/CATCHER] --- UVM Report catcher Summary ---
-
- Test csrng_stress_all has 1 failures.
INFO: [FlowCfg] [scratch_path]: [csrng] [/scratch/glaserf/opentitan/scratch/csrng_sfifo_pr/csrng-sim-xcelium]
ERROR: [dvsim] Errors were encountered in this run.
[ legend ]: [Q: queued, D: dispatched, P: passed, F: failed, K: killed, T: total]
00:01:04 [ build ]: [Q: 0, D: 0, P: 2, F: 0, K: 0, T: 2] 100%
00:17:11 [ run ]: [Q: 0, D: 0, P: 1629, F: 1, K: 0, T: 1630] 100%
00:17:41 [ cov_merge ]: [Q: 0, D: 0, P: 1, F: 0, K: 0, T: 1] 100%
00:17:45 [ cov_report ]: [Q: 0, D: 0, P: 1, F: 0, K: 0, T: 1] 100%
38adbd4 to
d60af54
Compare
rswarbrick
left a comment
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.
I think there's a nontrivial comment on the first commit, but the later commits basically have comments asking whether you can make it easier for me to review :-) I claim that it's not entirely selfish, because it will also make it easier for future readers to understand the history...
I'm excited by how much can be ripped out though! Very nice!
hw/ip/csrng/rtl/csrng_core.sv
Outdated
| reseed_cnt_reached_q[ai]; | ||
| assign reseed_cnt_reached_d[ai] = (state_db_wr_vld && (state_db_wr_data.inst_id == ai)) ? | ||
| (state_db_wr_data.rs_ctr >= reg2hw.reseed_interval.q) : | ||
| reseed_cnt_reached_q[ai]; |
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: I think this is a character too far in?
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.
Fixed.
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.
I think the alignment is still not right for that last line.
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.
Gnah, ofc you are right. Third time's the charm, I guess :(
| This bit will stay set until the next reset. | ||
| ''' | ||
| } | ||
| { bits: "7", |
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.
If it's easy, I'd consider splitting this commit in two, where the first part removes the FIFO (and wires zero to this error signal) and the second part removes the register field. I think the result would probably be a lot easier to follow.
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.
Unfortunately, splitting this up would be quite a bit of work, as this affects in total six commits in this and the follow-up PR (which would then become twelve or 13 commits, given your suggestion of splitting one of them into three). Apart from this, I would like to keep the regfile changes together with the rtl and dv changes in a single commit for each FIFO, respectively, for the following reasons:
- Doing otherwise would break consistency with the already merged [csrng/rtl] Remove four prim_fifo_sync from the data path #28428
- Splitting the changes up would make the commits not self-contained anymore, which they currently are. We'd introduce commits to master where the documentation claims a register field and associated functionality that is not there. IIRC that goes against the contribution guidelines.
Of course, please let me know if you feel strongly that the split up would be necessary.
| This bit will stay set until the next reset. | ||
| ''' | ||
| } | ||
| { bits: "3", |
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.
A bit like with the previous commit, can this one be split as well? Here, it would be in three parts. I think the SFIFO_RCSTATE_ERR field could be removed as a later commit (and driven with zero beforehand). Similarly, I think DRBG_CMD_SM_ERR be added as a first commit (driven with zero). That way, all the "register shuffling cruft" gets separated from the real work.
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.
Please see my reply to your question in the previous commit which should (hopefully, at least 😊) address all comments that request the split-out of the regfile changes.
| This bit will stay set until the next reset. | ||
| ''' | ||
| } | ||
| { bits: "4", |
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.
I realise that I'm repeating myself (sorry!), but I think it would make sense to split this commit into two pieces: the first one would remove the fifo and wire zero into the error field; the second would remove the field.
vogelpi
left a comment
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.
I've reviewed the first commits and will continue later. Thanks for the PR @glaserf !
vogelpi
left a comment
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.
I've now also reviewed the final two commits and I have some more questions. But this looks good to me in general.
d60af54 to
eb2a9f2
Compare
glaserf
left a comment
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 @rswarbrick and @vogelpi for the swift and thorough reviews! I have addressed your comments in individual replies and pushed the appropriate changes.
@rswarbrick I addressed your comments about splitting up the commits in a reply to one of them, I hope that is okay.
hw/ip/csrng/rtl/csrng_core.sv
Outdated
| reseed_cnt_reached_q[ai]; | ||
| assign reseed_cnt_reached_d[ai] = (state_db_wr_vld && (state_db_wr_data.inst_id == ai)) ? | ||
| (state_db_wr_data.rs_ctr >= reg2hw.reseed_interval.q) : | ||
| reseed_cnt_reached_q[ai]; |
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.
Fixed.
| This bit will stay set until the next reset. | ||
| ''' | ||
| } | ||
| { bits: "7", |
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.
Unfortunately, splitting this up would be quite a bit of work, as this affects in total six commits in this and the follow-up PR (which would then become twelve or 13 commits, given your suggestion of splitting one of them into three). Apart from this, I would like to keep the regfile changes together with the rtl and dv changes in a single commit for each FIFO, respectively, for the following reasons:
- Doing otherwise would break consistency with the already merged [csrng/rtl] Remove four prim_fifo_sync from the data path #28428
- Splitting the changes up would make the commits not self-contained anymore, which they currently are. We'd introduce commits to master where the documentation claims a register field and associated functionality that is not there. IIRC that goes against the contribution guidelines.
Of course, please let me know if you feel strongly that the split up would be necessary.
d16ce56 to
205519d
Compare
vogelpi
left a comment
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 addressing my comments, this looks good to me!
|
CHANGE AUTHORIZED: hw/ip/csrng/data/csrng.hjson This PR modifies the RTL of CSRNG to remove more area and simplify the design. The changes are part of a bigger restructuring effort which has been discussed in multiple WG meetings. The pass rate and coverage remain above the V2(S) thresholds. This is fine. |
marnovandermaas
left a comment
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.
Some small comments from my side.
hw/ip/csrng/rtl/csrng_core.sv
Outdated
| reseed_cnt_reached_q[ai]; | ||
| assign reseed_cnt_reached_d[ai] = (state_db_wr_vld && (state_db_wr_data.inst_id == ai)) ? | ||
| (state_db_wr_data.rs_ctr >= reg2hw.reseed_interval.q) : | ||
| reseed_cnt_reached_q[ai]; |
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.
I think the alignment is still not right for that last line.
hw/ip/csrng/rtl/csrng_core.sv
Outdated
| logic unused_state_db_inst_state; | ||
|
|
||
| assign unused_err_code_test_bit = (|err_code_test_bit[19:16]) || (|err_code_test_bit[27:26]) || | ||
| assign unused_err_code_test_bit = err_code_test_bit[27] || (|err_code_test_bit[19:16]) || |
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.
What bout 26?
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 Marno, I will carefully check again if I made a mistake here. It's quite a pain to keep track of these unused bits and in addition there was one bit wrong in there right from the start (before I started the refactoring efforts at all), but I forgot which one it exactly was.
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.
So it turns out, it was indeed err_code_test_bit[26] that is (and always was) indeed used and therefore does not belong here in the unused bits list.
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.
This is what I've noticed as well when reviewing this.
hw/ip/csrng/rtl/csrng_core.sv
Outdated
| err_code_test_bit[8] || (|err_code_test_bit[6:5]) || | ||
| err_code_test_bit[2]; | ||
| assign unused_enable_fo = cs_enable_fo[10] || (|cs_enable_fo[8:7]) || cs_enable_fo[4]; | ||
| assign unused_enable_fo = cs_enable_fo[42] || cs_enable_fo[10] || (|cs_enable_fo[8:7]) || |
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.
Why is 42 added here?
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.
Because it is not used anymore, see this line (I hope the link works after rebase -i, it was on line 1126 of the old state.
hw/ip/csrng/rtl/csrng_core.sv
Outdated
| err_code_test_bit[8] || (|err_code_test_bit[6:5]) || | ||
| err_code_test_bit[2]; | ||
| assign unused_enable_fo = cs_enable_fo[42] || cs_enable_fo[10] || (|cs_enable_fo[8:7]) || | ||
| cs_enable_fo[4]; | ||
| (|err_code_test_bit[8:5]) || err_code_test_bit[2]; | ||
| assign unused_enable_fo = cs_enable_fo[42] || (|cs_enable_fo[10:7]) || cs_enable_fo[4]; |
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.
I think some of these changes crept into the previous commit unintentionally.
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.
Hm no, this is fine I think: This commit makes
err_code_test_bit[7]cs_enable_fo[9]
unused, which is what the diff should add to the respective unused-signals.
|
+1 fr DV changes. |
Replace the toggle-style state db arbitration by a simple valid-based scheme that leverages the fact that the ctr_drbg_gen and ctr_drbg_cmd units cannot deadlock or starve each other. Signed-off-by: Florian Glaser <[email protected]>
This removal requires slight adaptions to the handshaking done with block_encrypt as well as the removal of a complex SVA from the tb. No functional or timing impact; the response data from block_encrypt even still feed into registers. Signed-off-by: Florian Glaser <[email protected]>
This commit removes another large FIFO from the data path, measuring about 6kGE. Since the data path bifurcates in ctr_drbg_cmd for all commands that require processing by ctr_drbg_upd, a simple FSM is now required to orchestrate handshaking between the upstream requester, ctr_drbg_upd and the keyvrc FIFO. This step hence also requires the testing of the added sparse-encoded FSM in dv, documentation of this SEC.CM, and a corresponding bit in the ERR_CODE register. Signed-off-by: Florian Glaser <[email protected]>
This commit removes the last FIFO from the ctr_drbg_cmd module. Since the request and response ready signals are now in many cases asserted in the same cycle, slight adaptions to the main FSM are also necessary. Signed-off-by: Florian Glaser <[email protected]>
205519d to
936df49
Compare
glaserf
left a comment
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 @marnovandermaas and @rswarbrick for your feedback. I hopefully have now addressed all your points. Please have another look :)
hw/ip/csrng/rtl/csrng_core.sv
Outdated
| logic unused_state_db_inst_state; | ||
|
|
||
| assign unused_err_code_test_bit = (|err_code_test_bit[19:16]) || (|err_code_test_bit[27:26]) || | ||
| assign unused_err_code_test_bit = err_code_test_bit[27] || (|err_code_test_bit[19:16]) || |
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.
So it turns out, it was indeed err_code_test_bit[26] that is (and always was) indeed used and therefore does not belong here in the unused bits list.
hw/ip/csrng/rtl/csrng_core.sv
Outdated
| err_code_test_bit[8] || (|err_code_test_bit[6:5]) || | ||
| err_code_test_bit[2]; | ||
| assign unused_enable_fo = cs_enable_fo[10] || (|cs_enable_fo[8:7]) || cs_enable_fo[4]; | ||
| assign unused_enable_fo = cs_enable_fo[42] || cs_enable_fo[10] || (|cs_enable_fo[8:7]) || |
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.
Because it is not used anymore, see this line (I hope the link works after rebase -i, it was on line 1126 of the old state.
hw/ip/csrng/rtl/csrng_core.sv
Outdated
| err_code_test_bit[8] || (|err_code_test_bit[6:5]) || | ||
| err_code_test_bit[2]; | ||
| assign unused_enable_fo = cs_enable_fo[42] || cs_enable_fo[10] || (|cs_enable_fo[8:7]) || | ||
| cs_enable_fo[4]; | ||
| (|err_code_test_bit[8:5]) || err_code_test_bit[2]; | ||
| assign unused_enable_fo = cs_enable_fo[42] || (|cs_enable_fo[10:7]) || cs_enable_fo[4]; |
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.
Hm no, this is fine I think: This commit makes
err_code_test_bit[7]cs_enable_fo[9]
unused, which is what the diff should add to the respective unused-signals.
| This bit will stay set until the next reset. | ||
| ''' | ||
| } | ||
| { bits: "3", |
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.
Please see my reply to your question in the previous commit which should (hopefully, at least 😊) address all comments that request the split-out of the regfile changes.
hw/ip/csrng/rtl/csrng_core.sv
Outdated
| reseed_cnt_reached_q[ai]; | ||
| assign reseed_cnt_reached_d[ai] = (state_db_wr_vld && (state_db_wr_data.inst_id == ai)) ? | ||
| (state_db_wr_data.rs_ctr >= reg2hw.reseed_interval.q) : | ||
| reseed_cnt_reached_q[ai]; |
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.
Gnah, ofc you are right. Third time's the charm, I guess :(
|
CHANGE AUTHORIZED: hw/ip/csrng/data/csrng.hjson This PR modifies the RTL of CSRNG to remove more area and simplify the design. The changes are part of a bigger restructuring effort which has been discussed in multiple WG meetings. The pass rate and coverage remain above the V2(S) thresholds. This is fine. |
Follow-up of #28428; removes three more FIFOs which together measure about 13kGE. Apart from everything mentioned in #28428, removal of the affected FIFOs required the following changes:
cmd_rspchannel being ready before signaling thecmd_reqas ready.Part of #28153.