[spi_device/lint] Fix unused assignments and remove waivers
Signed-off-by: Michael Schaffner <msf@google.com>
diff --git a/hw/ip/spi_device/lint/spi_device.waiver b/hw/ip/spi_device/lint/spi_device.waiver
index 75b7626..7902c77 100644
--- a/hw/ip/spi_device/lint/spi_device.waiver
+++ b/hw/ip/spi_device/lint/spi_device.waiver
@@ -122,15 +122,6 @@
waive -rules {NOT_USED NOT_READ} -location {spi_device.sv} \
-regexp {'sub_(sram|p2s)_.*\[1\]' is not (used|read)} \
-comment "CmdParse does not have SRAM intf"
-waive -rules {INPUT_NOT_READ HIER_BRANCH_NOT_READ} -location {spi_cmdparse.sv} \
- -regexp {'cmd_info_i\[0:15\].*' is not read} \
- -comment "Cmdparse uses opcode only"
-waive -rules {INPUT_NOT_READ HIER_BRANCH_NOT_READ} -location {spi_cmdparse.sv} \
- -regexp {'cmd_info_i\[11:15\]\.opcode' is not read} \
- -comment "Upper 5 slots are for passthrough only"
-waive -rules {INPUT_NOT_READ} -location {spi_cmdparse.sv} \
- -regexp {'cmd_info_i\[15:11\]' is not read} \
- -comment "Upper 5 slots are for the passthrough logic"
#### SRAM mux
#### SRAM has unpacked array to mux/demux. Waive one bit unpacked array
diff --git a/hw/ip/spi_device/rtl/spi_cmdparse.sv b/hw/ip/spi_device/rtl/spi_cmdparse.sv
index 76ad1cd..8212e26 100644
--- a/hw/ip/spi_device/rtl/spi_cmdparse.sv
+++ b/hw/ip/spi_device/rtl/spi_cmdparse.sv
@@ -64,7 +64,7 @@
// among the command slots, Passthrough related slots are not used. So tie them down here.
logic unused_cmdinfo;
- assign unused_cmdinfo = &{1'b0,
+ assign unused_cmdinfo = ^{
cmd_info_i[CmdInfoPassthroughEnd:CmdInfoPassthroughStart]};
// Only opcode in the cmd_info is used. Tie the rest of the members.
@@ -72,13 +72,13 @@
always_comb begin
unused_cmdinfo_members = 1'b 0;
for (int unsigned i = 0 ; i <= CmdInfoPassthroughEnd ; i++) begin
- unused_cmdinfo_members &= &{ cmd_info_i[i].addr_4b_affected,
+ unused_cmdinfo_members ^= ^{ cmd_info_i[i].addr_4b_affected,
cmd_info_i[i].addr_en,
cmd_info_i[i].addr_swap_en,
cmd_info_i[i].dummy_en,
- &cmd_info_i[i].dummy_size,
+ ^cmd_info_i[i].dummy_size,
cmd_info_i[i].payload_dir,
- &cmd_info_i[i].payload_en};
+ ^cmd_info_i[i].payload_en};
end
end
@@ -87,7 +87,7 @@
always_comb begin
unused_cmdinfo_opcode = 1'b 0;
for (int unsigned i = CmdInfoPassthroughStart ; i <= CmdInfoPassthroughEnd ; i++) begin
- unused_cmdinfo_opcode &= &cmd_info_i[i].opcode;
+ unused_cmdinfo_opcode ^= ^cmd_info_i[i].opcode;
end
end