summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 607aa6a..f558ca1 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,9 @@ MAKEFLAGS += --no-builtin-rules
MAKEFLAGS += --no-builtin-variables
.SUFFIXES:
-all: led.fs
+PROGRAM ?= led
+
+all: $(PROGRAM).fs
tangnano9k.cst:
wget https://github.com/YosysHQ/apicula/raw/refs/heads/master/examples/tangnano9k.cst || \
@@ -20,7 +22,9 @@ tangnano9k.cst:
|| \
nextpnr-gowin --json $< --write $@ \
--device GW1NR-LV9QN88PC6/I5 --family GW1N-9C \
- --cst tangnano9k.cst
+ --cst tangnano9k.cst \
+ --placed-svg $*.plc.svg \
+ --routed-svg $*.rt.svg
%.fs: %.pnr.json
gowin_pack -d GW1N-9C -o $@ $<
@@ -30,3 +34,6 @@ flash: led.fs
clean:
rm -rf *.json *.fs *.svg *.log
+
+led.fs: clkdiv.v
+