mirror of https://github.com/YosysHQ/icestorm.git
31 lines
514 B
Makefile
31 lines
514 B
Makefile
PROJ = example
|
|
PIN_DEF = hx8kboard.pcf
|
|
DEVICE = hx8k
|
|
|
|
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
|