fix(mlkem): verilator lint fixes — BLKLOOPINIT and UNUSEDSIGNAL

ntt_core.v / poly_mul_sync.v: <= → = in array for loops
mlkem_top.v / sha3_top.v: UNUSEDSIGNAL → UNUSED

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-07-08 03:36:52 +08:00
parent 1b494fe44d
commit b003fc057f
4 changed files with 7 additions and 7 deletions

View File

@@ -147,7 +147,7 @@ module ntt_core (
valid_o_r <= 1'b0; valid_o_r <= 1'b0;
scale_valid_i <= 1'b0; scale_valid_i <= 1'b0;
scale_a_i <= 12'd0; scale_a_i <= 12'd0;
for (ci = 0; ci < N; ci = ci + 1) cr[ci] <= 12'd0; for (ci = 0; ci < N; ci = ci + 1) cr[ci] = 12'd0;
end else begin end else begin
state <= next_state; state <= next_state;
scale_valid_i <= 1'b0; scale_valid_i <= 1'b0;

View File

@@ -136,8 +136,8 @@ module poly_mul_sync (
c0_reg <= 12'd0; c0_reg <= 12'd0;
c1_reg <= 12'd0; c1_reg <= 12'd0;
for (i = 0; i < 256; i = i + 1) begin for (i = 0; i < 256; i = i + 1) begin
mem_A[i] <= 12'd0; mem_A[i] = 12'd0;
mem_B[i] <= 12'd0; mem_B[i] = 12'd0;
end end
end else begin end else begin
state <= next_state; state <= next_state;

View File

@@ -104,10 +104,10 @@ module sha3_top (
// Keccak core // Keccak core
// ================================================================ // ================================================================
wire kc_valid_i; wire kc_valid_i;
/* verilator lint_off UNUSEDSIGNAL */ /* verilator lint_off UNUSED */
wire [1599:0] kc_state_o; wire [1599:0] kc_state_o;
wire kc_ready_o; wire kc_ready_o;
/* verilator lint_on UNUSEDSIGNAL */ /* verilator lint_on UNUSED */
wire kc_valid_o; wire kc_valid_o;
// XOR the incoming block into the low 1088 bits (rate) of the state. // XOR the incoming block into the low 1088 bits (rate) of the state.

View File

@@ -563,9 +563,9 @@ module mlkem_top #(
// per-consumer drives toward the core // per-consumer drives toward the core
wire [1599:0] sha3_kc_state_i, snt_kc_state_i, cbd_kc_state_i; wire [1599:0] sha3_kc_state_i, snt_kc_state_i, cbd_kc_state_i;
wire sha3_kc_valid_i, snt_kc_valid_i, cbd_kc_valid_i; wire sha3_kc_valid_i, snt_kc_valid_i, cbd_kc_valid_i;
/* verilator lint_off UNUSEDSIGNAL */ /* verilator lint_off UNUSED */
wire sha3_kc_ready_i, snt_kc_ready_i, cbd_kc_ready_i; // all 1'b1 wire sha3_kc_ready_i, snt_kc_ready_i, cbd_kc_ready_i; // all 1'b1
/* verilator lint_on UNUSEDSIGNAL */ /* verilator lint_on UNUSED */
// phase selects (mutually exclusive). Encaps adds ST_ENC_H/G (sha3), // phase selects (mutually exclusive). Encaps adds ST_ENC_H/G (sha3),
// ST_ENC_A (snt), ST_ENC_C (cbd). // ST_ENC_A (snt), ST_ENC_C (cbd).