Skip to content

Commit

Permalink
Correct tx watermark check
Browse files Browse the repository at this point in the history
Typo in tx watermark logic; was using rx config in equality test.
  • Loading branch information
alees24 committed Oct 17, 2024
1 parent 07f7948 commit bea9896
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rtl/ip/spi/rtl/spi.sv
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ module spi import spi_reg_pkg::*; #(
else rx_fifo_ge_watermark = |(rx_fifo_depth_w >> reg2hw.control.rx_watermark.q);
end
// Rx FIFO level at or below programmed watermark (1,2,4,8,16)
assign tx_fifo_le_watermark = (tx_fifo_depth_w == (8'h1 << reg2hw.control.rx_watermark.q)) ||
assign tx_fifo_le_watermark = (tx_fifo_depth_w == (8'h1 << reg2hw.control.tx_watermark.q)) ||
~|(tx_fifo_depth_w >> reg2hw.control.tx_watermark.q);

assign spi_data_in_valid = reg2hw.control.tx_enable.q ? tx_fifo_rvalid : 1'b1;
Expand Down

0 comments on commit bea9896

Please sign in to comment.