From 6b8dc6f3371e6eb60fd8a14f6ffe3eb77d9fee4e Mon Sep 17 00:00:00 2001 From: Kelvin Ly Date: Wed, 22 Jan 2020 07:47:22 -0500 Subject: [PATCH] Add a check to make sure driver enable is set --- rtl/tb/drv8353_spi_tb.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtl/tb/drv8353_spi_tb.v b/rtl/tb/drv8353_spi_tb.v index fe9487c..7b18e27 100644 --- a/rtl/tb/drv8353_spi_tb.v +++ b/rtl/tb/drv8353_spi_tb.v @@ -83,7 +83,7 @@ always @(posedge drv_cs_n) begin end always @(negedge drv_sck) begin - if (spi_active) begin + if (drv_en & spi_active) begin cfg[cfg_num] <= cfg[cfg_num] << 1 | drv_sdi; bit_count <= bit_count + 1; end @@ -116,7 +116,7 @@ initial begin $dumpvars; for (i = 0; i < 5; i += 1) cfg[i] = 0; - // TODO cycle the module long enough to get all the configuration bits + // cycle the module long enough to get all the configuration bits // written out, and check to see if it worked correctly i = 0;