@@ -126,21 +126,24 @@ module rom_ctrl
126126 // set 4 or 5 byte enables (4 for 32bit, 5 for 39bit)!
127127 localparam int NumBytes = (DataWidth + 7 ) / 8 ;
128128
129+ // ROM ctrl operates on unshared data and and accepts digest responses immediately.
129130 // SEC_CM: MEM.DIGEST
130- assign kmac_data_o = '{ valid : kmac_rom_vld_outer,
131- data : kmac_rom_data,
131+ assign kmac_data_o = '{ req_valid : kmac_rom_vld_outer,
132+ data_s0 : kmac_rom_data,
133+ data_s1 : '0 ,
132134 strb : kmac_pkg :: MsgStrbW'({ NumBytes{ 1'b1 }} ),
133- last : kmac_rom_last_outer} ;
135+ req_last : kmac_rom_last_outer,
136+ rsp_ready : 1'b1 } ;
134137
135- assign kmac_rom_rdy_outer = kmac_data_i.ready ;
136- assign kmac_done = kmac_data_i.done ;
137- assign kmac_digest = kmac_data_i.digest_share0 [255 : 0 ] ^ kmac_data_i.digest_share1 [255 : 0 ];
138+ assign kmac_rom_rdy_outer = kmac_data_i.req_ready ;
139+ assign kmac_done = kmac_data_i.rsp_valid ;
140+ assign kmac_digest = kmac_data_i.digest_s0 [255 : 0 ] ^ kmac_data_i.digest_s1 [255 : 0 ];
138141 assign kmac_err = kmac_data_i.error;
139142
140143 logic unused_kmac_digest;
141144 assign unused_kmac_digest = ^{
142- kmac_data_i.digest_share0 [kmac_pkg :: AppDigestW- 1 : 256 ],
143- kmac_data_i.digest_share1 [kmac_pkg :: AppDigestW- 1 : 256 ]
145+ kmac_data_i.digest_s0 [kmac_pkg :: AppDigestW- 1 : 256 ],
146+ kmac_data_i.digest_s1 [kmac_pkg :: AppDigestW- 1 : 256 ]
144147 } ;
145148
146149 end : gen_kmac_scramble_enabled
@@ -161,6 +164,10 @@ module rom_ctrl
161164
162165 end : gen_kmac_scramble_disabled
163166
167+ // A static KMAC interface has no finish response.
168+ logic unused_kmac_finish_rsp;
169+ assign unused_kmac_finish_rsp = kmac_data_i.rsp_finish;
170+
164171 // TL interface ==============================================================
165172 // This buffer ensures that when we calculate bus_rom_prince_index by snooping on
166173 // rom_tl_i, we get a value that's buffered from the thing that goes into both the ECC
@@ -556,17 +563,18 @@ module rom_ctrl
556563 `ASSERT_KNOWN_IF (KeymgrDataODataKnown_A, keymgr_data_o, keymgr_data_o.valid)
557564
558565 // The valid signal for kmac_data_o should always be known when out of reset. The rest of the
559- // struct (data, strb and last ) should be known whenever the valid signal is true.
560- `ASSERT_KNOWN (KmacDataOValidKnown_A, kmac_data_o.valid )
561- `ASSERT_KNOWN_IF (KmacDataODataKnown_A, kmac_data_o, kmac_data_o.valid )
566+ // struct (data, strb and req_last ) should be known whenever the valid signal is true.
567+ `ASSERT_KNOWN (KmacDataOValidKnown_A, kmac_data_o.req_valid )
568+ `ASSERT_KNOWN_IF (KmacDataODataKnown_A, kmac_data_o, kmac_data_o.req_valid )
562569
563- // Check that kmac_data_o.last is "telling the truth": kmac_data_o.valid should drop on the cycle
564- // after the word that it decorates is transferred.
570+ // Check that kmac_data_o.req_last is "telling the truth": kmac_data_o.rsp_valid should drop on
571+ // the cycle after the word that it decorates is transferred.
565572 `ASSERT (KmacLastTrue_A,
566- kmac_data_o.valid && kmac_data_i.ready && kmac_data_o.last | => ! kmac_data_o.valid)
573+ kmac_data_o.req_valid && kmac_data_i.req_ready && kmac_data_o.req_last
574+ | => ! kmac_data_o.req_valid)
567575
568576 // Check that pwrmgr_data_o.good is stable when kmac_data_o.valid is asserted
569- `ASSERT (StabilityChkKmac_A, kmac_data_o.valid && $past (kmac_data_o.valid )
577+ `ASSERT (StabilityChkKmac_A, kmac_data_o.req_valid && $past (kmac_data_o.req_valid )
570578 | - > $stable (pwrmgr_data_o.good))
571579
572580 // Check that pwrmgr_data_o.good is stable when keymgr_data_o.valid is asserted
0 commit comments