2015-12-28 16:53:48 +01:00
|
|
|
PROJ = example
|
|
|
|
|
PIN_DEF = hx8kboard.pcf
|
|
|
|
|
DEVICE = 8k
|
2015-12-08 12:54:20 +01:00
|
|
|
|
2015-12-28 16:53:48 +01:00
|
|
|
all: $(PROJ).bin
|
2015-12-08 12:54:20 +01:00
|
|
|
|
2015-12-28 16:53:48 +01:00
|
|
|
%.blif: %.v
|
|
|
|
|
yosys -p 'synth_ice40 -top top -blif $@' $<
|
2015-12-08 12:54:20 +01:00
|
|
|
|
2015-12-28 16:53:48 +01:00
|
|
|
%.txt: $(PIN_DEF) %.blif
|
|
|
|
|
arachne-pnr -d $(DEVICE) -o $@ -p $^
|
|
|
|
|
|
|
|
|
|
%.bin: %.txt
|
|
|
|
|
icepack $< $@
|
2015-12-08 12:54:20 +01:00
|
|
|
|
|
|
|
|
prog:
|
2015-12-28 16:53:48 +01:00
|
|
|
iceprog $(PROJ).bin
|
2015-12-08 12:54:20 +01:00
|
|
|
|
|
|
|
|
clean:
|
2015-12-28 16:53:48 +01:00
|
|
|
rm -f *.blif *.txt *.bin
|
2015-12-08 12:54:20 +01:00
|
|
|
|
|
|
|
|
.PHONY: all prog clean
|