2016-01-31 12:01:18 +01:00
|
|
|
PROJ = example
|
|
|
|
|
PIN_DEF = iceblink.pcf
|
2016-02-01 23:32:03 +01:00
|
|
|
DEVICE = hx1k
|
2016-01-31 12:01:18 +01:00
|
|
|
|
2016-02-01 23:32:03 +01:00
|
|
|
all: $(PROJ).rpt $(PROJ).bin
|
2016-01-31 12:01:18 +01:00
|
|
|
|
|
|
|
|
%.blif: %.v
|
|
|
|
|
yosys -p 'synth_ice40 -top top -blif $@' $<
|
|
|
|
|
|
|
|
|
|
%.asc: $(PIN_DEF) %.blif
|
2016-02-01 23:32:03 +01:00
|
|
|
arachne-pnr -d $(subst hx,,$(subst lp,,$(DEVICE))) -o $@ -p $^ -P vq100
|
2016-01-31 12:01:18 +01:00
|
|
|
|
|
|
|
|
%.bin: %.asc
|
|
|
|
|
icepack $< $@
|
|
|
|
|
|
2016-02-01 23:32:03 +01:00
|
|
|
%.rpt: %.asc
|
|
|
|
|
icetime -d $(DEVICE) -mtr $@ $<
|
|
|
|
|
|
2016-01-31 12:01:18 +01:00
|
|
|
prog: $(PROJ).bin
|
|
|
|
|
iCEburn.py -e -v -w $<
|
|
|
|
|
|
|
|
|
|
sudo-prog: $(PROJ).bin
|
|
|
|
|
@echo 'Executing prog as root!!!'
|
|
|
|
|
iCEburn.py -e -v -w $<
|
|
|
|
|
|
|
|
|
|
clean:
|
2017-04-23 16:00:41 +02:00
|
|
|
rm -f $(PROJ).blif $(PROJ).asc $(PROJ).rpt $(PROJ).bin
|
2016-01-31 12:01:18 +01:00
|
|
|
|
|
|
|
|
.PHONY: all prog clean
|