From e194505a8cbe4f0c199abab40c64131647cb23cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Stensg=C3=A5rd?= Date: Thu, 10 Apr 2025 19:57:00 +0200 Subject: top --- Makefile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1afafb7 --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +TOP = top + +all: check top.bin + +check: + verilator --lint-only --top $(TOP) top.v + +clean: + rm -f top.asc top.bin top.json + +load: all + iceprog top.bin + +.PHONY: all check clean load + +top.asc: top.json top.pcf + nextpnr-ice40 --hx1k --package tq144 --json top.json --pcf top.pcf --asc top.asc --top $(TOP) + +top.bin: top.asc + icepack top.asc top.bin + +top.json: top.v + yosys -q -p "synth_ice40 -json top.json -top $(TOP)" top.v -- cgit v1.2.3