summaryrefslogtreecommitdiffstats
path: root/music/fpga4fun/music_box/Makefile
diff options
context:
space:
mode:
authorHirosh Dabui <hirosh@dabui.de>2020-02-11 20:15:16 +0100
committerHirosh Dabui <hirosh@dabui.de>2020-02-12 00:10:35 +0100
commitbb6be8d6bf84071ad04247163932fecff500367e (patch)
treec19bd7534e29d89b120c910d598910399bdc7b95 /music/fpga4fun/music_box/Makefile
parentf7210f49f67444b135ddc6e92da67fc533abba44 (diff)
downloadiceFUN-bb6be8d6bf84071ad04247163932fecff500367e.tar.gz
iceFUN-bb6be8d6bf84071ad04247163932fecff500367e.tar.bz2
iceFUN-bb6be8d6bf84071ad04247163932fecff500367e.zip
ported fpga fun music examples to iceFun. iceFun has built-in speakers.
Diffstat (limited to 'music/fpga4fun/music_box/Makefile')
-rw-r--r--music/fpga4fun/music_box/Makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/music/fpga4fun/music_box/Makefile b/music/fpga4fun/music_box/Makefile
new file mode 100644
index 0000000..52d9869
--- /dev/null
+++ b/music/fpga4fun/music_box/Makefile
@@ -0,0 +1,21 @@
+# Project setup
+PROJ = top
+
+# Files
+FILES = top.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 -f *.asc *.bin *.blif *.json