Skip to content

Commit

Permalink
tinytapeout: linting with verilator, resolving warnings (some remain)
Browse files Browse the repository at this point in the history
  • Loading branch information
sylefeb committed Sep 10, 2024
1 parent 7eaa46c commit 5fc2c0a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
7 changes: 2 additions & 5 deletions frameworks/boards/tinytapeout/tinytapeout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 10 additions & 1 deletion frameworks/boards/tinytapeout/tinytapeout.v
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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;

Expand Down

0 comments on commit 5fc2c0a

Please sign in to comment.