Skip to content

Commit 79804ad

Browse files
committed
[otp_ctrl,rtl] use prim_const in otp_ctrl
The constant keys and digests in otp_ctrl were implemented with prim_sec_anchor_bufs. The new prim_sec_anchor_const module is used instead to create constants that are modifiable by a metal fix. Signed-off-by: Michael Gautschi <[email protected]>
1 parent bcc4c2d commit 79804ad

File tree

3 files changed

+36
-36
lines changed

3 files changed

+36
-36
lines changed

hw/ip_templates/otp_ctrl/rtl/otp_ctrl_scrmbl.sv

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -109,26 +109,26 @@ module otp_ctrl_scrmbl
109109
digest_iv_array_t rnd_cnst_digest_iv_anchor;
110110

111111
for (genvar i = 0; i < NumScrmblKeys; i++) begin : gen_anchor_keys
112-
prim_sec_anchor_buf #(
113-
.Width(ScrmblKeyWidth)
114-
) u_key_anchor_buf (
115-
.in_i(RndCnstKey[i]),
112+
prim_sec_anchor_const #(
113+
.Width(ScrmblKeyWidth),
114+
.ConstVal(RndCnstKey[i])
115+
) u_key_anchor_const (
116116
.out_o(rnd_cnst_key_anchor[i])
117117
);
118118
end
119119

120120
for (genvar i = 0; i < NumDigestSets; i++) begin : gen_anchor_digests
121-
prim_sec_anchor_buf #(
122-
.Width(ScrmblKeyWidth)
123-
) u_const_anchor_buf (
124-
.in_i(RndCnstDigestConst[i]),
121+
prim_sec_anchor_const #(
122+
.Width(ScrmblKeyWidth),
123+
.ConstVal(RndCnstDigestConst[i])
124+
) u_digest_anchor_const (
125125
.out_o(rnd_cnst_digest_anchor[i])
126126
);
127127

128-
prim_sec_anchor_buf #(
129-
.Width(ScrmblBlockWidth)
130-
) u_iv_anchor_buf (
131-
.in_i(RndCnstDigestIV[i]),
128+
prim_sec_anchor_const #(
129+
.Width(ScrmblBlockWidth),
130+
.ConstVal(RndCnstDigestIV[i])
131+
) u_iv_anchor_const (
132132
.out_o(rnd_cnst_digest_iv_anchor[i])
133133
);
134134
end

hw/top_darjeeling/ip_autogen/otp_ctrl/rtl/otp_ctrl_scrmbl.sv

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -109,26 +109,26 @@ module otp_ctrl_scrmbl
109109
digest_iv_array_t rnd_cnst_digest_iv_anchor;
110110

111111
for (genvar i = 0; i < NumScrmblKeys; i++) begin : gen_anchor_keys
112-
prim_sec_anchor_buf #(
113-
.Width(ScrmblKeyWidth)
114-
) u_key_anchor_buf (
115-
.in_i(RndCnstKey[i]),
112+
prim_sec_anchor_const #(
113+
.Width(ScrmblKeyWidth),
114+
.ConstVal(RndCnstKey[i])
115+
) u_key_anchor_const (
116116
.out_o(rnd_cnst_key_anchor[i])
117117
);
118118
end
119119

120120
for (genvar i = 0; i < NumDigestSets; i++) begin : gen_anchor_digests
121-
prim_sec_anchor_buf #(
122-
.Width(ScrmblKeyWidth)
123-
) u_const_anchor_buf (
124-
.in_i(RndCnstDigestConst[i]),
121+
prim_sec_anchor_const #(
122+
.Width(ScrmblKeyWidth),
123+
.ConstVal(RndCnstDigestConst[i])
124+
) u_digest_anchor_const (
125125
.out_o(rnd_cnst_digest_anchor[i])
126126
);
127127

128-
prim_sec_anchor_buf #(
129-
.Width(ScrmblBlockWidth)
130-
) u_iv_anchor_buf (
131-
.in_i(RndCnstDigestIV[i]),
128+
prim_sec_anchor_const #(
129+
.Width(ScrmblBlockWidth),
130+
.ConstVal(RndCnstDigestIV[i])
131+
) u_iv_anchor_const (
132132
.out_o(rnd_cnst_digest_iv_anchor[i])
133133
);
134134
end

hw/top_earlgrey/ip_autogen/otp_ctrl/rtl/otp_ctrl_scrmbl.sv

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -109,26 +109,26 @@ module otp_ctrl_scrmbl
109109
digest_iv_array_t rnd_cnst_digest_iv_anchor;
110110

111111
for (genvar i = 0; i < NumScrmblKeys; i++) begin : gen_anchor_keys
112-
prim_sec_anchor_buf #(
113-
.Width(ScrmblKeyWidth)
114-
) u_key_anchor_buf (
115-
.in_i(RndCnstKey[i]),
112+
prim_sec_anchor_const #(
113+
.Width(ScrmblKeyWidth),
114+
.ConstVal(RndCnstKey[i])
115+
) u_key_anchor_const (
116116
.out_o(rnd_cnst_key_anchor[i])
117117
);
118118
end
119119

120120
for (genvar i = 0; i < NumDigestSets; i++) begin : gen_anchor_digests
121-
prim_sec_anchor_buf #(
122-
.Width(ScrmblKeyWidth)
123-
) u_const_anchor_buf (
124-
.in_i(RndCnstDigestConst[i]),
121+
prim_sec_anchor_const #(
122+
.Width(ScrmblKeyWidth),
123+
.ConstVal(RndCnstDigestConst[i])
124+
) u_digest_anchor_const (
125125
.out_o(rnd_cnst_digest_anchor[i])
126126
);
127127

128-
prim_sec_anchor_buf #(
129-
.Width(ScrmblBlockWidth)
130-
) u_iv_anchor_buf (
131-
.in_i(RndCnstDigestIV[i]),
128+
prim_sec_anchor_const #(
129+
.Width(ScrmblBlockWidth),
130+
.ConstVal(RndCnstDigestIV[i])
131+
) u_iv_anchor_const (
132132
.out_o(rnd_cnst_digest_iv_anchor[i])
133133
);
134134
end

0 commit comments

Comments
 (0)