diff options
author | David Shah <davey1576@gmail.com> | 2017-11-20 09:51:03 +0000 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2017-11-20 09:51:19 +0000 |
commit | 9184fbdf404c0e94326919c92a27d3292994cdf1 (patch) | |
tree | b94fdbf6f316b9758e8afd848d8c900343469f07 /examples/up5k_mac16/Makefile | |
parent | da7a2a9d0db95d6a172286eaddd6e930a27ea752 (diff) | |
download | icestorm-9184fbdf404c0e94326919c92a27d3292994cdf1.tar.gz icestorm-9184fbdf404c0e94326919c92a27d3292994cdf1.tar.bz2 icestorm-9184fbdf404c0e94326919c92a27d3292994cdf1.zip |
Tidy up 5k examples
Diffstat (limited to 'examples/up5k_mac16/Makefile')
-rw-r--r-- | examples/up5k_mac16/Makefile | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/examples/up5k_mac16/Makefile b/examples/up5k_mac16/Makefile new file mode 100644 index 0000000..06c9ed7 --- /dev/null +++ b/examples/up5k_mac16/Makefile @@ -0,0 +1,36 @@ +PROJ = mac16 +PIN_DEF = mac16.pcf +DEVICE = up5k + +ARACHNE = arachne-pnr +ARACHNE_ARGS = +ICEPACK = icepack +ICETIME = icetime +ICEPROG = iceprog + +all: $(PROJ).bin + +%.blif: %.v + yosys -p 'synth_ice40 -top top -blif $@' $< + +%.asc: $(PIN_DEF) %.blif + $(ARACHNE) $(ARACHNE_ARGS) -d $(subst up,,$(subst hx,,$(subst lp,,$(DEVICE)))) -o $@ -p $^ + +%.bin: %.asc + $(ICEPACK) $< $@ + +%.rpt: %.asc + $(ICETIME) -d $(DEVICE) -mtr $@ $< + +prog: $(PROJ).bin + $(ICEPROG) -S $< + +sudo-prog: $(PROJ).bin + @echo 'Executing prog as root!!!' + sudo $(ICEPROG) -S $< + +clean: + rm -f $(PROJ).blif $(PROJ).asc $(PROJ).rpt $(PROJ).bin + +.SECONDARY: +.PHONY: all prog clean |