mirror of https://github.com/YosysHQ/icestorm.git
32 lines
544 B
Makefile
32 lines
544 B
Makefile
PROJ = example
|
|
PIN_DEF = icezum.pcf
|
|
DEVICE = hx1k
|
|
PACKAGE = tq144
|
|
|
|
all: $(PROJ).rpt $(PROJ).bin
|
|
|
|
%.json: %.v
|
|
yosys -p 'synth_ice40 -top top -json $@' $<
|
|
|
|
%.asc: $(PIN_DEF) %.json
|
|
nextpnr-ice40 --$(DEVICE) --package $(PACKAGE) --asc $@ --pcf $< --json $*.json
|
|
|
|
%.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).json $(PROJ).asc $(PROJ).rpt $(PROJ).bin
|
|
|
|
.SECONDARY:
|
|
.PHONY: all prog clean
|