From d533c4ba01df1b44a90f5874eab0ee29a81f239d Mon Sep 17 00:00:00 2001 From: Laez Barbosa Date: Thu, 12 Dec 2024 17:29:38 -0300 Subject: [PATCH] fix transfer_done condition for non-echo_sclk cases Signed-off-by: Laez Barbosa --- library/spi_engine/spi_engine_execution/spi_engine_execution.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/spi_engine/spi_engine_execution/spi_engine_execution.v b/library/spi_engine/spi_engine_execution/spi_engine_execution.v index 0533de8021..a741ec209f 100644 --- a/library/spi_engine/spi_engine_execution/spi_engine_execution.v +++ b/library/spi_engine/spi_engine_execution/spi_engine_execution.v @@ -436,7 +436,7 @@ module spi_engine_execution #( if (ECHO_SCLK) begin transfer_done <= echo_last_bit && last_transfer; end else begin - transfer_done <= (wait_for_io && io_ready1 && last_transfer) || (!wait_for_io && transfer_active && end_of_word && (last_transfer || !io_ready2)); // same conditions that make (!transfer_active && !wait_for_io) + transfer_done <= (wait_for_io && io_ready1 && last_transfer) || (!wait_for_io && transfer_active && end_of_word && last_transfer ); // same conditions that make (!transfer_active && !wait_for_io) end end end