[keymgr,lint] Make some implicit widenings explicit
This silences lint warnings from Verilator
Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
diff --git a/hw/ip/keymgr/rtl/keymgr_ctrl.sv b/hw/ip/keymgr/rtl/keymgr_ctrl.sv
index a65dd5e..30bea9c 100644
--- a/hw/ip/keymgr/rtl/keymgr_ctrl.sv
+++ b/hw/ip/keymgr/rtl/keymgr_ctrl.sv
@@ -488,7 +488,7 @@
// when mask population is complete, xor the root_key into the zero share
// if in the future the root key is updated to 2 shares, it will direclty overwrite
// the values here
- if (cnt == EntropyRounds-1) begin
+ if (int'(cnt) == EntropyRounds-1) begin
random_ack = 1'b1;
state_d = StCtrlRootKey;
end
diff --git a/hw/ip/keymgr/rtl/keymgr_op_state_ctrl.sv b/hw/ip/keymgr/rtl/keymgr_op_state_ctrl.sv
index 635ee0d..42c6f14 100644
--- a/hw/ip/keymgr/rtl/keymgr_op_state_ctrl.sv
+++ b/hw/ip/keymgr/rtl/keymgr_op_state_ctrl.sv
@@ -72,10 +72,10 @@
StAdv: begin
adv_en_o = 1'b1;
- if (kmac_done_i && (cnt_i == CDIs-1)) begin
+ if (kmac_done_i && (int'(cnt_i) == CDIs-1)) begin
op_ack_o = 1'b1;
state_d = StIdle;
- end else if (kmac_done_i && (cnt_i < CDIs-1)) begin
+ end else if (kmac_done_i && (int'(cnt_i) < CDIs-1)) begin
op_update_o = 1'b1;
state_d = StAdvAck;
end