@@ -7,7 +7,6 @@ interface keymgr_dpe_if(input clk, input rst_n);
77
88 import uvm_pkg :: * ;
99 import keymgr_dpe_env_pkg :: * ;
10- import keymgr_dpe_reg_pkg :: NumRomDigestInputs;
1110
1211 // Represents the keymgr_dpe sideload state for each sideload interface.
1312 //
@@ -16,13 +15,13 @@ interface keymgr_dpe_if(input clk, input rst_n);
1615 // Status can't be directly changed from SideLoadClear to SideLoadAvail.
1716 // When status is SideLoadClear due to SIDELOAD_CLEAR programmed, need to write CSR to 0 to reset
1817 // it so that status is changed to SideLoadNotAvail, then we may set it to SideLoadAvail again
19- lc_ctrl_pkg :: lc_tx_t keymgr_dpe_en;
20- lc_ctrl_pkg :: lc_keymgr_div_t keymgr_dpe_div;
21- keymgr_dpe_pkg :: keymgr_dpe_device_id_t otp_device_id;
22- keymgr_dpe_pkg :: keymgr_dpe_creator_root_key_t creator_root_key;
23- keymgr_dpe_pkg :: keymgr_dpe_creator_seed_t creator_seed;
24- keymgr_dpe_pkg :: keymgr_dpe_owner_seed_t owner_seed;
25- rom_ctrl_pkg :: keymgr_data_t[NumRomDigestInputs - 1 : 0 ] rom_digests;
18+ lc_ctrl_pkg :: lc_tx_t keymgr_dpe_en;
19+ lc_ctrl_pkg :: lc_keymgr_div_t keymgr_dpe_div;
20+ keymgr_dpe_pkg :: keymgr_dpe_device_id_t otp_device_id;
21+ keymgr_dpe_pkg :: keymgr_dpe_creator_root_key_t creator_root_key;
22+ keymgr_dpe_pkg :: keymgr_dpe_creator_seed_t creator_seed;
23+ keymgr_dpe_pkg :: keymgr_dpe_owner_seed_t owner_seed;
24+ rom_ctrl_pkg :: keymgr_data_t[DvNumRomDigestInputs - 1 : 0 ] rom_digests;
2625
2726 keymgr_pkg :: hw_key_req_t kmac_key;
2827 keymgr_pkg :: hw_key_req_t aes_key;
@@ -103,7 +102,7 @@ interface keymgr_dpe_if(input clk, input rst_n);
103102
104103 // assigned from the keymgr_dpe.keymgr_dpe_ctrl.key_slots_q signal, which should hold the
105104 // current value of the keyslots in the dut.
106- keymgr_dpe_pkg :: keymgr_dpe_slot_t [keymgr_dpe_pkg :: DpeNumSlots - 1 : 0 ] internal_key_slots;
105+ keymgr_dpe_pkg :: keymgr_dpe_slot_t [DvNumInstHwSlot - 1 : 0 ] internal_key_slots;
107106
108107 task automatic init (bit rand_otp_key, bit invalid_otp_key);
109108 // Keymgr_dpe only latches OTP key once, so this scb does not support change OTP key on the
@@ -115,7 +114,7 @@ interface keymgr_dpe_if(input clk, input rst_n);
115114 keymgr_dpe_en = lc_ctrl_pkg :: On;
116115 keymgr_dpe_div = 64'h5CFBD765CE33F34E ;
117116 otp_device_id = 'hF0F0 ;
118- for (int i = 0 ; i < NumRomDigestInputs ; ++ i) begin
117+ for (int i = 0 ; i < DvNumRomDigestInputs ; ++ i) begin
119118 rom_digests[i].data = 256'hA20A046CF42E6EAC560A3F82BFA76285B5C1D4AEA7C915E49A32D1C89BE0F507 ;
120119 rom_digests[i].valid = '1 ;
121120 end
@@ -193,14 +192,14 @@ interface keymgr_dpe_if(input clk, input rst_n);
193192 // as a set of flags / counters.
194193 bit bad_keymgr_dpe_div = 1'b0 ;
195194 bit bad_otp_device_id = 1'b0 ;
196- bit [NumRomDigestInputs - 1 : 0 ] bad_rom_data = '0 , bad_rom_valid = '0 ;
195+ bit [DvNumRomDigestInputs - 1 : 0 ] bad_rom_data = '0 , bad_rom_valid = '0 ;
197196
198197 repeat (num_invalid_input) begin
199198 randcase
200199 1 : bad_keymgr_dpe_div = 1'b1 ;
201200 1 : bad_otp_device_id = 1'b1 ;
202- 1 : bad_rom_data[$urandom % NumRomDigestInputs ] = 1'b1 ;
203- 1 : bad_rom_valid[$urandom % NumRomDigestInputs ] = 1'b1 ;
201+ 1 : bad_rom_data[$urandom % DvNumRomDigestInputs ] = 1'b1 ;
202+ 1 : bad_rom_valid[$urandom % DvNumRomDigestInputs ] = 1'b1 ;
204203 endcase
205204 end
206205
@@ -221,7 +220,7 @@ interface keymgr_dpe_if(input clk, input rst_n);
221220
222221 // rom_digests
223222 begin
224- for (int i = 0 ; i < NumRomDigestInputs ; i++ )
223+ for (int i = 0 ; i < DvNumRomDigestInputs ; i++ )
225224 fork
226225 automatic int local_i = i;
227226 # ($urandom_range (1000 , 0 ) * 1ns );
@@ -239,8 +238,8 @@ interface keymgr_dpe_if(input clk, input rst_n);
239238 function automatic void compare_internal_key_slot (
240239 keymgr_dpe_pkg :: keymgr_dpe_slot_t dst_key_slot,
241240 keymgr_dpe_pkg :: keymgr_dpe_slot_t src_key_slot,
242- keymgr_dpe_pkg :: keymgr_dpe_slot_idx_e dst_slot_index,
243- keymgr_dpe_pkg :: keymgr_dpe_slot_idx_e src_slot_index,
241+ dv_keymgr_dpe_slot_idx_e dst_slot_index,
242+ dv_keymgr_dpe_slot_idx_e src_slot_index,
244243 bit check_parent_retained
245244 );
246245 `DV_CHECK_EQ (dst_key_slot, internal_key_slots[dst_slot_index],
0 commit comments