From 5fc2c0a85b1d9d2f7ca586f2e2b9d4df870f0a20 Mon Sep 17 00:00:00 2001 From: Sylvain Lefebvre Date: Tue, 10 Sep 2024 08:46:09 +0200 Subject: [PATCH] tinytapeout: linting with verilator, resolving warnings (some remain) --- frameworks/boards/tinytapeout/tinytapeout.sh | 7 ++----- frameworks/boards/tinytapeout/tinytapeout.v | 11 ++++++++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/frameworks/boards/tinytapeout/tinytapeout.sh b/frameworks/boards/tinytapeout/tinytapeout.sh index ecc6e846..f0d71a84 100755 --- a/frameworks/boards/tinytapeout/tinytapeout.sh +++ b/frameworks/boards/tinytapeout/tinytapeout.sh @@ -44,14 +44,11 @@ if [[ ! -z "${NO_BUILD}" ]]; then exit fi -yosys -l yosys.log -p "read_verilog -sv build.v" -p "synth_ice40 -relut -top ${SILICE_TOP} -json build.json" -# nextpnr-ice40 --force --hx1k --json build.json --pcf $BOARD_DIR/icestick.pcf --asc build.asc --package tq144 --freq 12 +# yosys -l yosys.log -p "read_verilog -sv build.v" -p "synth_ice40 -relut -top ${SILICE_TOP} -json build.json" -# icepack -s build.asc build.bin +verilator --lint-only -Wall build.v if [[ ! -z "${NO_PROGRAM}" ]]; then echo "Skipping prog." exit fi - -# iceprog build.bin diff --git a/frameworks/boards/tinytapeout/tinytapeout.v b/frameworks/boards/tinytapeout/tinytapeout.v index 6bcfaa2b..55379503 100644 --- a/frameworks/boards/tinytapeout/tinytapeout.v +++ b/frameworks/boards/tinytapeout/tinytapeout.v @@ -31,6 +31,9 @@ module %TOP_NAME% ( rst_n_q <= rst_n; end + wire __unused_out_done; + wire __unused_out_clock; + M_main main( .in_ui(ui_in), @@ -42,9 +45,15 @@ module %TOP_NAME% ( .in_run(1'b1), .reset(~rst_n_q), - .clock(clk) + .clock(clk), + + .out_done (__unused_out_done), + .out_clock(__unused_out_clock) ); + // prevents warning + wire _unused = &{ena}; + // vvvvv inputs when in reset to allow PMOD external takeover // assign uio_oe = rst_n ? {1'b1,1'b1,main_uio_oe[3],main_uio_oe[2],1'b1,main_uio_oe[1],main_uio_oe[0],1'b1} : 8'h00;