Skip to content

Commit

Permalink
[otp_ctrl/lint] Correct lint error
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Schaffner <[email protected]>
  • Loading branch information
msfschaffner committed Jan 25, 2024
1 parent 37cbc50 commit 0397477
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 2 additions & 4 deletions hw/ip/otp_ctrl/data/otp_ctrl_part_pkg.sv.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -226,19 +226,17 @@ package otp_ctrl_part_pkg;

function automatic otp_ctrl_core_hw2reg_t named_reg_assign(
logic [NumPart-1:0][ScrmblBlockWidth-1:0] part_digest);
logic unused;
otp_ctrl_core_hw2reg_t hw2reg;
logic unused_sigs;
unused_sigs = ^part_digest;
hw2reg = '0;
unused = 1'b0;
% for k, part in enumerate(otp_mmap.config["partitions"]):
<%
part_name = Name.from_snake_case(part["name"])
part_name_camel = part_name.as_camel_case()
%>\
% if part["sw_digest"] or part["hw_digest"]:
hw2reg.${part["name"].lower()}_digest = part_digest[${part_name_camel}Idx];
% else:
unused ^= ^part_digest[${part_name_camel}Idx];
% endif
% endfor
return hw2reg;
Expand Down
5 changes: 2 additions & 3 deletions hw/ip/otp_ctrl/rtl/otp_ctrl_part_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -392,18 +392,17 @@ package otp_ctrl_part_pkg;

function automatic otp_ctrl_core_hw2reg_t named_reg_assign(
logic [NumPart-1:0][ScrmblBlockWidth-1:0] part_digest);
logic unused;
otp_ctrl_core_hw2reg_t hw2reg;
logic unused_sigs;
unused_sigs = ^part_digest;
hw2reg = '0;
unused = 1'b0;
hw2reg.vendor_test_digest = part_digest[VendorTestIdx];
hw2reg.creator_sw_cfg_digest = part_digest[CreatorSwCfgIdx];
hw2reg.owner_sw_cfg_digest = part_digest[OwnerSwCfgIdx];
hw2reg.hw_cfg0_digest = part_digest[HwCfg0Idx];
hw2reg.secret0_digest = part_digest[Secret0Idx];
hw2reg.secret1_digest = part_digest[Secret1Idx];
hw2reg.secret2_digest = part_digest[Secret2Idx];
unused ^= ^part_digest[LifeCycleIdx];
return hw2reg;
endfunction : named_reg_assign

Expand Down

0 comments on commit 0397477

Please sign in to comment.