Skip to content

Commit c1067ab

Browse files
committed
[keymgr[_dpe],rtl] use prim_const in key manager
The seeds in keymgr and keymgr_dpe were constructed with a constant assignment to a prim_sec_anchor_buf. To be able to change these seeds by a metal fix, a prim_sec_anchor_buf is used instead. Signed-off-by: Michael Gautschi <[email protected]>
1 parent bcc4c2d commit c1067ab

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

hw/ip/keymgr/rtl/keymgr.sv

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -107,19 +107,21 @@ module keymgr
107107
seed_t kmac_seed;
108108
seed_t none_seed;
109109

110-
prim_sec_anchor_buf #(
111-
.Width(TotalSeedWidth)
112-
) u_seed_anchor (
113-
.in_i({RndCnstRevisionSeed,
114-
RndCnstCreatorIdentitySeed,
115-
RndCnstOwnerIntIdentitySeed,
116-
RndCnstOwnerIdentitySeed,
117-
RndCnstSoftOutputSeed,
118-
RndCnstHardOutputSeed,
119-
RndCnstAesSeed,
120-
RndCnstOtbnSeed,
121-
RndCnstKmacSeed,
122-
RndCnstNoneSeed}),
110+
localparam logic [TotalSeedWidth-1:0] RndConstSeed = {RndCnstRevisionSeed,
111+
RndCnstCreatorIdentitySeed,
112+
RndCnstOwnerIntIdentitySeed,
113+
RndCnstOwnerIdentitySeed,
114+
RndCnstSoftOutputSeed,
115+
RndCnstHardOutputSeed,
116+
RndCnstAesSeed,
117+
RndCnstOtbnSeed,
118+
RndCnstKmacSeed,
119+
RndCnstNoneSeed};
120+
121+
prim_sec_anchor_const #(
122+
.Width(TotalSeedWidth),
123+
.ConstVal(RndConstSeed)
124+
) u_seed_anchor_const (
123125
.out_o({revision_seed,
124126
creator_identity_seed,
125127
owner_int_identity_seed,

hw/ip/keymgr_dpe/rtl/keymgr_dpe.sv

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -94,27 +94,25 @@ module keymgr_dpe
9494
seed_t kmac_seed;
9595
seed_t none_seed;
9696

97-
prim_sec_anchor_buf #(
98-
.Width(TotalSeedWidth)
99-
) u_seed_anchor (
100-
.in_i({
101-
RndCnstRevisionSeed,
102-
RndCnstSoftOutputSeed,
103-
RndCnstHardOutputSeed,
104-
RndCnstAesSeed,
105-
RndCnstOtbnSeed,
106-
RndCnstKmacSeed,
107-
RndCnstNoneSeed
108-
}),
109-
.out_o({
110-
revision_seed,
111-
soft_output_seed,
112-
hard_output_seed,
113-
aes_seed,
114-
otbn_seed,
115-
kmac_seed,
116-
none_seed
117-
})
97+
localparam logic [TotalSeedWidth-1:0] RndConstSeed = {RndCnstRevisionSeed,
98+
RndCnstSoftOutputSeed,
99+
RndCnstHardOutputSeed,
100+
RndCnstAesSeed,
101+
RndCnstOtbnSeed,
102+
RndCnstKmacSeed,
103+
RndCnstNoneSeed};
104+
105+
prim_sec_anchor_const #(
106+
.Width(TotalSeedWidth),
107+
.ConstVal(RndConstSeed)
108+
) u_seed_anchor_const (
109+
.out_o({revision_seed,
110+
soft_output_seed,
111+
hard_output_seed,
112+
aes_seed,
113+
otbn_seed,
114+
kmac_seed,
115+
none_seed})
118116
);
119117

120118
// Register module

0 commit comments

Comments
 (0)