[mem_bkdr_if] update OTP/chip tb
this commit updates the OTP and chip testbenches to use the
SecdedHamming_22_16 parameter when initializing ECC in the OTP's
mem_bkdr_if, as OTP memory is 16-bits wide.
Signed-off-by: Udi Jonnalagadda <udij@google.com>
diff --git a/hw/ip/otp_ctrl/dv/env/otp_ctrl_env_pkg.sv b/hw/ip/otp_ctrl/dv/env/otp_ctrl_env_pkg.sv
index ab62320..705a76c 100644
--- a/hw/ip/otp_ctrl/dv/env/otp_ctrl_env_pkg.sv
+++ b/hw/ip/otp_ctrl/dv/env/otp_ctrl_env_pkg.sv
@@ -159,7 +159,7 @@
OtpMacroAlert
} otp_alert_e;
- typedef virtual mem_bkdr_if #(.MEM_ECC(1)) mem_bkdr_vif;
+ typedef virtual mem_bkdr_if #(.MEM_ECC(prim_secded_pkg::SecdedHamming_22_16)) mem_bkdr_vif;
typedef virtual otp_ctrl_if otp_ctrl_vif;
parameter otp_err_code_e OTP_TERMINAL_ERRS[3] = {OtpMacroEccUncorrError,
diff --git a/hw/ip/otp_ctrl/dv/tb.sv b/hw/ip/otp_ctrl/dv/tb.sv
index dbbe571..322be04 100644
--- a/hw/ip/otp_ctrl/dv/tb.sv
+++ b/hw/ip/otp_ctrl/dv/tb.sv
@@ -149,7 +149,8 @@
assign interrupts[OtpOperationDone] = intr_otp_operation_done;
assign interrupts[OtpErr] = intr_otp_error;
- bind `OTP_CTRL_MEM_HIER mem_bkdr_if #(.MEM_ECC(1)) mem_bkdr_if();
+ bind `OTP_CTRL_MEM_HIER mem_bkdr_if #(.MEM_ECC(prim_secded_pkg::SecdedHamming_22_16))
+ mem_bkdr_if();
initial begin
// These SVA checks the lc_escalate_en is either Off or On, we will use more than these
diff --git a/hw/top_earlgrey/dv/env/chip_env_pkg.sv b/hw/top_earlgrey/dv/env/chip_env_pkg.sv
index 3b99f0d..033a3b1 100644
--- a/hw/top_earlgrey/dv/env/chip_env_pkg.sv
+++ b/hw/top_earlgrey/dv/env/chip_env_pkg.sv
@@ -48,7 +48,7 @@
// backdoors
typedef virtual mem_bkdr_if mem_bkdr_vif;
typedef virtual mem_bkdr_if #(.MEM_PARITY(1)) parity_mem_bkdr_vif;
- typedef virtual mem_bkdr_if #(.MEM_ECC(1)) ecc_mem_bkdr_vif;
+ typedef virtual mem_bkdr_if #(.MEM_ECC(prim_secded_pkg::SecdedHamming_22_16)) ecc_mem_bkdr_vif;
// Types of memories in the chip.
typedef enum {
diff --git a/hw/top_earlgrey/dv/tb/tb.sv b/hw/top_earlgrey/dv/tb/tb.sv
index 2d750b2..c4ced54 100644
--- a/hw/top_earlgrey/dv/tb/tb.sv
+++ b/hw/top_earlgrey/dv/tb/tb.sv
@@ -84,7 +84,7 @@
bind `FLASH1_MEM_HIER mem_bkdr_if flash1_mem_bkdr_if();
bind `FLASH0_INFO_HIER mem_bkdr_if flash0_info_bkdr_if();
bind `FLASH1_INFO_HIER mem_bkdr_if flash1_info_bkdr_if();
- bind `OTP_MEM_HIER mem_bkdr_if #(.MEM_ECC(1)) otp_bkdr_if();
+ bind `OTP_MEM_HIER mem_bkdr_if #(.MEM_ECC(prim_secded_pkg::SecdedHamming_22_16)) otp_bkdr_if();
// TODO: the external clk is currently not connected.
// We will need to feed this in via a muxed pin, once that function implemented.