From d9e77c52bebe175f17fa65e13c2a96a3b0709746 Mon Sep 17 00:00:00 2001 From: Sebastian Holzapfel Date: Wed, 12 Jun 2024 16:21:04 +0200 Subject: [PATCH] gateware: switch from clk_fs to strobe on all boards. verify ecpix also works --- gateware/boards/colorlight_i5/sysmgr.v | 9 --------- gateware/boards/ecpix5/sysmgr.v | 9 --------- gateware/boards/gatemate_evb/sysmgr.v | 9 --------- gateware/boards/pico_ice/sysmgr.v | 9 --------- gateware/cores/digital_echo.sv | 2 +- gateware/scripts/verilator_lint.sh | 2 +- 6 files changed, 2 insertions(+), 38 deletions(-) diff --git a/gateware/boards/colorlight_i5/sysmgr.v b/gateware/boards/colorlight_i5/sysmgr.v index fd194ba..40418ba 100644 --- a/gateware/boards/colorlight_i5/sysmgr.v +++ b/gateware/boards/colorlight_i5/sysmgr.v @@ -5,7 +5,6 @@ module sysmgr ( input wire clk_in, input wire rst_in, output wire clk_256fs, - output wire clk_fs, output wire rst_out ); @@ -15,12 +14,10 @@ wire pll_reset; wire rst_i; reg [7:0] rst_cnt; -reg [7:0] clkdiv; assign pll_reset = rst_in; assign rst_i = ~rst_cnt[7]; assign rst_out = rst_i; -assign clk_fs = clkdiv[7]; `ifndef VERILATOR_LINT_ONLY @@ -75,10 +72,4 @@ always @(posedge clk_in) else if (~rst_cnt[7]) rst_cnt <= rst_cnt + 1; -always @(posedge clk_256fs) - if (rst_i) - clkdiv <= 8'h00; - else - clkdiv <= clkdiv + 1; - endmodule // sysmgr diff --git a/gateware/boards/ecpix5/sysmgr.v b/gateware/boards/ecpix5/sysmgr.v index c9c3340..02954ef 100644 --- a/gateware/boards/ecpix5/sysmgr.v +++ b/gateware/boards/ecpix5/sysmgr.v @@ -5,7 +5,6 @@ module sysmgr ( input wire clk_in, input wire rst_in, output wire clk_256fs, - output wire clk_fs, output wire rst_out ); @@ -15,12 +14,10 @@ wire pll_reset; wire rst_i; reg [7:0] rst_cnt; -reg [7:0] clkdiv; assign rst_i = ~rst_cnt[7]; assign rst_out = rst_i; assign pll_reset = rst_in; -assign clk_fs = clkdiv[7]; `ifndef VERILATOR_LINT_ONLY @@ -71,10 +68,4 @@ always @(posedge clk_in) else if (~rst_cnt[7]) rst_cnt <= rst_cnt + 1; -always @(posedge clk_256fs) - if (rst_i) - clkdiv <= 8'h00; - else - clkdiv <= clkdiv + 1; - endmodule // sysmgr diff --git a/gateware/boards/gatemate_evb/sysmgr.v b/gateware/boards/gatemate_evb/sysmgr.v index 1117e04..7615e0e 100644 --- a/gateware/boards/gatemate_evb/sysmgr.v +++ b/gateware/boards/gatemate_evb/sysmgr.v @@ -4,7 +4,6 @@ module sysmgr ( input wire clk_in, input wire rst_in, output wire clk_256fs, - output wire clk_fs, output wire rst_out ); @@ -14,12 +13,10 @@ wire pll_reset; wire rst_i; reg [7:0] rst_cnt; -reg [7:0] clkdiv; assign pll_reset = rst_in; assign rst_i = ~rst_cnt[7]; assign rst_out = rst_i; -assign clk_fs = clkdiv[7]; `ifndef VERILATOR_LINT_ONLY @@ -46,10 +43,4 @@ always @(posedge clk_in) else if (~rst_cnt[7]) rst_cnt <= rst_cnt + 1; -always @(posedge clk_256fs) - if (rst_i) - clkdiv <= 8'h00; - else - clkdiv <= clkdiv + 1; - endmodule // sysmgr diff --git a/gateware/boards/pico_ice/sysmgr.v b/gateware/boards/pico_ice/sysmgr.v index 83cbeed..09a6b57 100644 --- a/gateware/boards/pico_ice/sysmgr.v +++ b/gateware/boards/pico_ice/sysmgr.v @@ -3,7 +3,6 @@ module sysmgr ( input wire rst_in, output wire clk_256fs, - output wire clk_fs, output wire rst_out ); @@ -11,10 +10,8 @@ module sysmgr ( wire rst_i; reg [7:0] rst_cnt = 8'h80; - reg [7:0] clkdiv; assign clk_256fs = clk_12m; - assign clk_fs = clkdiv[7]; assign rst_i = rst_cnt[7]; `ifndef VERILATOR_LINT_ONLY @@ -35,12 +32,6 @@ module sysmgr ( else if (rst_cnt[7]) rst_cnt <= rst_cnt + 1; - always @(posedge clk_256fs) - if (rst_i) - clkdiv <= 8'h00; - else - clkdiv <= clkdiv + 1; - `ifndef VERILATOR_LINT_ONLY SB_GB rst_gbuf_I ( .USER_SIGNAL_TO_GLOBAL_BUFFER(rst_i), diff --git a/gateware/cores/digital_echo.sv b/gateware/cores/digital_echo.sv index ad1e217..80d650d 100644 --- a/gateware/cores/digital_echo.sv +++ b/gateware/cores/digital_echo.sv @@ -10,7 +10,7 @@ module digital_echo #( parameter W = 16, // Length of the echo buffers in samples. - parameter ECHO_LEN = 4096, + parameter ECHO_LEN = 4096 )( input rst, input clk, diff --git a/gateware/scripts/verilator_lint.sh b/gateware/scripts/verilator_lint.sh index 2c63734..5416ee1 100755 --- a/gateware/scripts/verilator_lint.sh +++ b/gateware/scripts/verilator_lint.sh @@ -56,6 +56,6 @@ verilator --lint-only cores/util/filter/karlsen_lpf.sv verilator --lint-only cores/util/filter/karlsen_lpf_pipelined.sv verilator --lint-only -Icores -Icores/util/filter filter.sv verilator --lint-only -Icores -Icores/util pitch_shift.sv -verilator --lint-only -Icores -Icores/util stereo_echo.sv +verilator --lint-only -Icores -Icores/util digital_echo.sv verilator --lint-only -Icores -Icores/util dc_block.sv verilator --lint-only -Icores -Icores/util wavetable_osc.sv