[otp_ctrl] Fix rma valid signal
This PR fixes #7294 in both DV and RTL.
Signed-off-by: Cindy Chen <chencindy@opentitan.org>
diff --git a/hw/ip/otp_ctrl/dv/env/otp_ctrl_scoreboard.sv b/hw/ip/otp_ctrl/dv/env/otp_ctrl_scoreboard.sv
index f4f3fce..5ad0568 100644
--- a/hw/ip/otp_ctrl/dv/env/otp_ctrl_scoreboard.sv
+++ b/hw/ip/otp_ctrl/dv/env/otp_ctrl_scoreboard.sv
@@ -154,8 +154,7 @@
// locked.
exp_lc_data.secrets_valid = get_otp_digest_val(Secret2Idx) ? On : Off;
exp_lc_data.test_tokens_valid = get_otp_digest_val(Secret0Idx) ? On : Off;
- // TODO: should this be secret2. Issue filed: #7294.
- exp_lc_data.rma_token_valid = get_otp_digest_val(Secret0Idx) ? On : Off;
+ exp_lc_data.rma_token_valid = get_otp_digest_val(Secret2Idx) ? On : Off;
// LC output is depend on LC partitions value.
exp_lc_data.count = otp_lc_data[0 +: LcCountWidth];
diff --git a/hw/ip/otp_ctrl/rtl/otp_ctrl.sv b/hw/ip/otp_ctrl/rtl/otp_ctrl.sv
index 090df36..e6444aa 100644
--- a/hw/ip/otp_ctrl/rtl/otp_ctrl.sv
+++ b/hw/ip/otp_ctrl/rtl/otp_ctrl.sv
@@ -1179,7 +1179,7 @@
// The test tokens have been provisioned.
assign test_tokens_valid = (part_digest[Secret0Idx] != '0) ? lc_ctrl_pkg::On : lc_ctrl_pkg::Off;
// The rma token has been provisioned.
- assign rma_token_valid = (part_digest[Secret0Idx] != '0) ? lc_ctrl_pkg::On : lc_ctrl_pkg::Off;
+ assign rma_token_valid = (part_digest[Secret2Idx] != '0) ? lc_ctrl_pkg::On : lc_ctrl_pkg::Off;
// The device is personalized if the root key has been provisioned and locked.
assign secrets_valid = (part_digest[Secret2Idx] != '0) ? lc_ctrl_pkg::On : lc_ctrl_pkg::Off;