From 0397477f313c0540603f1954ade4dfec3015ca1e Mon Sep 17 00:00:00 2001 From: Michael Schaffner Date: Fri, 27 Oct 2023 17:31:14 -0700 Subject: [PATCH] [otp_ctrl/lint] Correct lint error Signed-off-by: Michael Schaffner --- hw/ip/otp_ctrl/data/otp_ctrl_part_pkg.sv.tpl | 6 ++---- hw/ip/otp_ctrl/rtl/otp_ctrl_part_pkg.sv | 5 ++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/hw/ip/otp_ctrl/data/otp_ctrl_part_pkg.sv.tpl b/hw/ip/otp_ctrl/data/otp_ctrl_part_pkg.sv.tpl index 7e3524dcbdc4b..a3c2ed54f2a15 100644 --- a/hw/ip/otp_ctrl/data/otp_ctrl_part_pkg.sv.tpl +++ b/hw/ip/otp_ctrl/data/otp_ctrl_part_pkg.sv.tpl @@ -226,10 +226,10 @@ 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"]) @@ -237,8 +237,6 @@ package otp_ctrl_part_pkg; %>\ % 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; diff --git a/hw/ip/otp_ctrl/rtl/otp_ctrl_part_pkg.sv b/hw/ip/otp_ctrl/rtl/otp_ctrl_part_pkg.sv index 53e40d9e42c82..21d898e188c89 100644 --- a/hw/ip/otp_ctrl/rtl/otp_ctrl_part_pkg.sv +++ b/hw/ip/otp_ctrl/rtl/otp_ctrl_part_pkg.sv @@ -392,10 +392,10 @@ 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]; @@ -403,7 +403,6 @@ package otp_ctrl_part_pkg; 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