From bc31dd00337a1e15a9649f1a002e250876e3519f Mon Sep 17 00:00:00 2001 From: Alexis Hovorka Date: Fri, 28 Oct 2022 16:18:24 -0600 Subject: [fix] Small optimization --- spi_controller.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spi_controller.v b/spi_controller.v index 33ad80a..09ddb86 100644 --- a/spi_controller.v +++ b/spi_controller.v @@ -47,7 +47,7 @@ module spi_controller o_data <= 8'h00; state <= 4'h0; - end else if (state) begin + end else if (busy) begin state <= state - 4'h1; if (~state[0]) shift_o <= shifted_o; if ( state[0]) shift_i <= shifted_i; -- cgit v1.2.3-54-g00ecf