From b0573427d75a75434007ed4b573919e616faabc7 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Sat, 28 Dec 2024 22:54:27 +0100 Subject: [PATCH] fix: rx, tx disabling --- hdl_spi/src/spi_master_ctrl.vhd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hdl_spi/src/spi_master_ctrl.vhd b/hdl_spi/src/spi_master_ctrl.vhd index 45e8710..ed84ddb 100644 --- a/hdl_spi/src/spi_master_ctrl.vhd +++ b/hdl_spi/src/spi_master_ctrl.vhd @@ -243,7 +243,7 @@ begin -- architecture a1 if tx_en_i = '0' then next_tx_state <= IDLE; - tx_got_data <= not rx_block; -- simulate always receiving new data + tx_got_data <= not rx_block and tx_valid_i; -- simulate always receiving new data end if; end process tx_state; @@ -258,6 +258,7 @@ begin -- architecture a1 case curr_rx_state is when IDLE => next_rx_state <= RX_INVALID_DATA; + rx_block <= '0'; when RX_GOT_DATA => rx_valid_o <= '1'; if rx_ready_i = '1' or tx_got_data = '1' then -- 2.48.1