aboutsummaryrefslogtreecommitdiffstats
path: root/examples/icezum/Makefile
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2016-12-29 13:46:20 +0100
committerClifford Wolf <clifford@clifford.at>2016-12-29 13:47:36 +0100
commit47d28bff1206fb007238b16fe4ad9fea76970002 (patch)
tree25ebfec188a9e4ebb8af3a7e0e53efaa64835300 /examples/icezum/Makefile
parent7d8337a138fef3417b9f41cc6635c9562f4d9b4a (diff)
downloadicestorm-47d28bff1206fb007238b16fe4ad9fea76970002.tar.gz
icestorm-47d28bff1206fb007238b16fe4ad9fea76970002.tar.bz2
icestorm-47d28bff1206fb007238b16fe4ad9fea76970002.zip
Added iCEZUM example
Diffstat (limited to 'examples/icezum/Makefile')
-rw-r--r--examples/icezum/Makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/examples/icezum/Makefile b/examples/icezum/Makefile
new file mode 100644
index 0000000..cad44d2
--- /dev/null
+++ b/examples/icezum/Makefile
@@ -0,0 +1,30 @@
+PROJ = example
+PIN_DEF = icezum.pcf
+DEVICE = hx1k
+
+all: $(PROJ).rpt $(PROJ).bin
+
+%.blif: %.v
+ yosys -p 'synth_ice40 -top top -blif $@' $<
+
+%.asc: $(PIN_DEF) %.blif
+ arachne-pnr -d $(subst hx,,$(subst lp,,$(DEVICE))) -o $@ -p $^
+
+%.bin: %.asc
+ icepack $< $@
+
+%.rpt: %.asc
+ icetime -d $(DEVICE) -mtr $@ $<
+
+prog: $(PROJ).bin
+ iceprog $<
+
+sudo-prog: $(PROJ).bin
+ @echo 'Executing prog as root!!!'
+ sudo iceprog $<
+
+clean:
+ rm -f $(PROJ).blif $(PROJ).asc $(PROJ).rpt $(PROJ).bin
+
+.SECONDARY:
+.PHONY: all prog clean