diff --git a/lint/verilator_waiver.vlt b/lint/verilator_waiver.vlt index 8049d659..9dbcb2b9 100644 --- a/lint/verilator_waiver.vlt +++ b/lint/verilator_waiver.vlt @@ -162,3 +162,9 @@ lint_off -rule UNOPTFLAT -file "*/rtl/ibex_cs_registers.sv" -match "*ibex_core.c // Temporary waivers until OpenTitan primitives are lint-clean // https://github.com/lowRISC/opentitan/issues/2313 lint_off -file "*/lowrisc_prim_*/rtl/*.sv" + +// Signal unoptimizable: Feedback to clock or circular logic: +// We use 2D packed arrays to hold data and keys for multpile cipher iterations: +// data_states[i][:] is used to generate data_states[i+1][:] but there is no cicular logic. +lint_off -rule UNOPTFLAT -file "*/rtl/gift_middle_rounds.sv" -match "*ibex_core.g_pa.pointer_authentication_i.gift_i.gift_middle_rounds_i.data_states*" +lint_off -rule UNOPTFLAT -file "*/rtl/gift_middle_rounds.sv" -match "*ibex_core.g_pa.pointer_authentication_i.gift_i.gift_middle_rounds_i.key_states*" diff --git a/rtl/gift_middle_rounds.sv b/rtl/gift_middle_rounds.sv index 312c9154..458f8b52 100644 --- a/rtl/gift_middle_rounds.sv +++ b/rtl/gift_middle_rounds.sv @@ -2,8 +2,6 @@ // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-License-Identifier: Apache-2.0 -import gift_pkg::*; - module gift_middle_rounds ( // Data and key coming directly from the cipher input @@ -14,12 +12,13 @@ module gift_middle_rounds ( input logic [63:0] state_data_i, input logic [127:0] state_key_i, - input round_index_e round_base_i, + input gift_pkg::round_index_e round_base_i, output logic [63:0] data_o, output logic [127:0] key_o ); + import gift_pkg::*; // Internal signals diff --git a/rtl/gift_round.sv b/rtl/gift_round.sv index f9d9bb3a..6f29a703 100644 --- a/rtl/gift_round.sv +++ b/rtl/gift_round.sv @@ -17,6 +17,10 @@ module gift_round ( logic [63:0] data_after_permut; logic [63:0] data_after_key; + // Avoid lint warning + logic [63:0] unused_data_after_permut; + logic [63:0] unused_data_after_key; + gift_update_key i_gift_update_key ( .key_i(key_i), .key_o(key_o) @@ -59,4 +63,8 @@ module gift_round ( assign data_o = data_state; + // Avoid lint warning + assign unused_data_after_permut = data_after_permut; + assign unused_data_after_key = data_after_key; + endmodule