diff --git a/projects/ad9265_fmc/common/ad9265_spi.v b/projects/ad9265_fmc/common/ad9265_spi.v index bb3cd59e2..6e1242802 100644 --- a/projects/ad9265_fmc/common/ad9265_spi.v +++ b/projects/ad9265_fmc/common/ad9265_spi.v @@ -78,7 +78,7 @@ module ad9265_spi ( spi_count <= 6'd0; spi_rd_wr_n <= 1'd0; end else begin - spi_count <= spi_count + 1'b1; + spi_count <= (spi_count < 6'h3f) ? spi_count + 1'b1 : spi_count; if (spi_count == 6'd0) begin spi_rd_wr_n <= spi_mosi; end diff --git a/projects/ad9434_fmc/common/ad9434_spi.v b/projects/ad9434_fmc/common/ad9434_spi.v index 9b419b4b6..f2de32a10 100644 --- a/projects/ad9434_fmc/common/ad9434_spi.v +++ b/projects/ad9434_fmc/common/ad9434_spi.v @@ -79,7 +79,7 @@ module ad9434_spi ( spi_count <= 6'd0; spi_rd_wr_n <= 1'd0; end else begin - spi_count <= spi_count + 1'b1; + spi_count <= (spi_count < 6'h3f) ? spi_count + 1'b1 : spi_count; if (spi_count == 6'd0) begin spi_rd_wr_n <= spi_mosi; end diff --git a/projects/ad9467_fmc/common/ad9467_spi.v b/projects/ad9467_fmc/common/ad9467_spi.v index ec8768afd..322cf4656 100644 --- a/projects/ad9467_fmc/common/ad9467_spi.v +++ b/projects/ad9467_fmc/common/ad9467_spi.v @@ -78,7 +78,7 @@ module ad9467_spi ( spi_count <= 6'd0; spi_rd_wr_n <= 1'd0; end else begin - spi_count <= spi_count + 1'b1; + spi_count <= (spi_count < 6'h3f) ? spi_count + 1'b1 : spi_count; if (spi_count == 6'd0) begin spi_rd_wr_n <= spi_mosi; end diff --git a/projects/daq1/common/daq1_spi.v b/projects/daq1/common/daq1_spi.v index 4153f67bf..16c953374 100644 --- a/projects/daq1/common/daq1_spi.v +++ b/projects/daq1/common/daq1_spi.v @@ -78,7 +78,7 @@ module daq1_spi ( spi_count <= 6'd0; spi_rd_wr_n <= 1'd0; end else begin - spi_count <= spi_count + 1'b1; + spi_count <= (spi_count < 6'h3f) ? spi_count + 1'b1 : spi_count; if (spi_count == 6'd0) begin spi_rd_wr_n <= spi_mosi; end diff --git a/projects/daq2/common/daq2_spi.v b/projects/daq2/common/daq2_spi.v index b04c2581c..279199128 100644 --- a/projects/daq2/common/daq2_spi.v +++ b/projects/daq2/common/daq2_spi.v @@ -81,7 +81,7 @@ module daq2_spi ( spi_count <= 6'd0; spi_rd_wr_n <= 1'd0; end else begin - spi_count <= (spi_count < 6'h17) ? spi_count + 1'b1 : spi_count; + spi_count <= (spi_count < 6'h3f) ? spi_count + 1'b1 : spi_count; if (spi_count == 6'd0) begin spi_rd_wr_n <= spi_mosi; end diff --git a/projects/daq3/common/daq3_spi.v b/projects/daq3/common/daq3_spi.v index 591a33e1c..afbc05eca 100644 --- a/projects/daq3/common/daq3_spi.v +++ b/projects/daq3/common/daq3_spi.v @@ -81,7 +81,7 @@ module daq3_spi ( spi_count <= 6'd0; spi_rd_wr_n <= 1'd0; end else begin - spi_count <= spi_count + 1'b1; + spi_count <= (spi_count < 6'h3f) ? spi_count + 1'b1 : spi_count; if (spi_count == 6'd0) begin spi_rd_wr_n <= spi_mosi; end diff --git a/projects/fmcadc2/common/fmcadc2_spi.v b/projects/fmcadc2/common/fmcadc2_spi.v index 6434eef4f..3e2e0186c 100644 --- a/projects/fmcadc2/common/fmcadc2_spi.v +++ b/projects/fmcadc2/common/fmcadc2_spi.v @@ -90,7 +90,7 @@ module fmcadc2_spi ( spi_count <= 6'd0; spi_rd_wr_n <= 1'd0; end else begin - spi_count <= spi_count + 1'b1; + spi_count <= (spi_count < 6'h3f) ? spi_count + 1'b1 : spi_count; if (spi_count == 6'd0) begin spi_rd_wr_n <= spi_mosi; end diff --git a/projects/fmcadc4/common/fmcadc4_spi.v b/projects/fmcadc4/common/fmcadc4_spi.v index 48ca69d38..1491d99f8 100644 --- a/projects/fmcadc4/common/fmcadc4_spi.v +++ b/projects/fmcadc4/common/fmcadc4_spi.v @@ -78,7 +78,7 @@ module fmcadc4_spi ( spi_count <= 6'd0; spi_rd_wr_n <= 1'd0; end else begin - spi_count <= spi_count + 1'b1; + spi_count <= (spi_count < 6'h3f) ? spi_count + 1'b1 : spi_count; if (spi_count == 6'd0) begin spi_rd_wr_n <= spi_mosi; end diff --git a/projects/fmcadc5/common/fmcadc5_spi.v b/projects/fmcadc5/common/fmcadc5_spi.v index 0c7689d97..575557c3b 100644 --- a/projects/fmcadc5/common/fmcadc5_spi.v +++ b/projects/fmcadc5/common/fmcadc5_spi.v @@ -83,7 +83,7 @@ module fmcadc5_spi ( spi_count <= 6'd0; spi_rd_wr_n <= 1'd0; end else begin - spi_count <= spi_count + 1'b1; + spi_count <= (spi_count < 6'h3f) ? spi_count + 1'b1 : spi_count; if (spi_count == 6'd0) begin spi_rd_wr_n <= spi_mosi; end diff --git a/projects/fmcomms6/common/fmcomms6_spi.v b/projects/fmcomms6/common/fmcomms6_spi.v index f831fec2e..bc1fd2cd1 100644 --- a/projects/fmcomms6/common/fmcomms6_spi.v +++ b/projects/fmcomms6/common/fmcomms6_spi.v @@ -78,7 +78,7 @@ module fmcomms6_spi ( spi_count <= 6'd0; spi_rd_wr_n <= 1'd0; end else begin - spi_count <= spi_count + 1'b1; + spi_count <= (spi_count < 6'h3f) ? spi_count + 1'b1 : spi_count; if (spi_count == 6'd0) begin spi_rd_wr_n <= spi_mosi; end diff --git a/projects/fmcomms7/common/fmcomms7_spi.v b/projects/fmcomms7/common/fmcomms7_spi.v index 048f5c013..56a5fd557 100644 --- a/projects/fmcomms7/common/fmcomms7_spi.v +++ b/projects/fmcomms7/common/fmcomms7_spi.v @@ -81,7 +81,7 @@ module fmcomms7_spi ( spi_count <= 6'd0; spi_rd_wr_n <= 1'd0; end else begin - spi_count <= spi_count + 1'b1; + spi_count <= (spi_count < 6'h3f) ? spi_count + 1'b1 : spi_count; if (spi_count == 6'd0) begin spi_rd_wr_n <= spi_mosi; end diff --git a/projects/usdrx1/common/usdrx1_spi.v b/projects/usdrx1/common/usdrx1_spi.v index dc0a600b9..4c49e975d 100644 --- a/projects/usdrx1/common/usdrx1_spi.v +++ b/projects/usdrx1/common/usdrx1_spi.v @@ -87,7 +87,7 @@ module usdrx1_spi ( spi_count <= 6'd0; spi_rd_wr_n <= 1'd0; end else begin - spi_count <= spi_count + 1'b1; + spi_count <= (spi_count < 6'h3f) ? spi_count + 1'b1 : spi_count; if (spi_count == 6'd0) begin spi_rd_wr_n <= spi_mosi; end