summaryrefslogtreecommitdiffstats
path: root/leds/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'leds/Makefile')
-rw-r--r--leds/Makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/leds/Makefile b/leds/Makefile
new file mode 100644
index 0000000..428f691
--- /dev/null
+++ b/leds/Makefile
@@ -0,0 +1,22 @@
+# Project setup
+PROJ = leds
+
+# Files
+FILES = leds.v
+
+.PHONY: iceFUN clean burn
+
+iceFUN:
+ # synthesize using Yosys
+ yosys -p "synth_ice40 -top top -json $(PROJ).json" $(FILES)
+ # Place and route using nextpnr
+ nextpnr-ice40 -r --hx8k --json $(PROJ).json --package cb132 --asc $(PROJ).asc --opt-timing --pcf iceFUN.pcf
+
+ # Convert to bitstream using IcePack
+ icepack $(PROJ).asc $(PROJ).bin
+
+burn:
+ iceFUNprog $(PROJ).bin
+
+clean:
+ rm *.asc *.bin *blif