mirror of https://github.com/YosysHQ/icestorm.git
Merge pull request #18 from esden/flex_example_make
[examples] Made the example Makefiles easier to reuse.
This commit is contained in:
commit
51067aff52
|
|
@ -1,18 +1,26 @@
|
|||
all: example.bin
|
||||
PROJ = example
|
||||
PIN_DEF = hx8kboard.pcf
|
||||
DEVICE = 8k
|
||||
|
||||
example.blif: example.v
|
||||
yosys -p 'synth_ice40 -top top -blif example.blif' example.v
|
||||
all: $(PROJ).bin
|
||||
|
||||
example.txt: example.blif hx8kboard.pcf
|
||||
arachne-pnr -d 8k -o example.txt -p hx8kboard.pcf example.blif
|
||||
%.blif: %.v
|
||||
yosys -p 'synth_ice40 -top top -blif $@' $<
|
||||
|
||||
example.bin: example.txt
|
||||
icepack example.txt example.bin
|
||||
%.txt: $(PIN_DEF) %.blif
|
||||
arachne-pnr -d $(DEVICE) -o $@ -p $^
|
||||
|
||||
prog:
|
||||
iceprog example.bin
|
||||
%.bin: %.txt
|
||||
icepack $< $@
|
||||
|
||||
prog: $(PROJ).bin
|
||||
iceprog $<
|
||||
|
||||
sudo-prog: $(PROJ).bin
|
||||
@echo 'Executing prog as root!!!'
|
||||
sudo iceprog $<
|
||||
|
||||
clean:
|
||||
rm -f example.blif example.txt example.bin
|
||||
rm -f $(PROJ).blif $(PROJ).txt $(PROJ).bin
|
||||
|
||||
.PHONY: all prog clean
|
||||
|
|
|
|||
|
|
@ -1,18 +1,26 @@
|
|||
all: example.bin
|
||||
PROJ = example
|
||||
PIN_DEF = icestick.pcf
|
||||
DEVICE = 1k
|
||||
|
||||
example.blif: example.v
|
||||
yosys -p 'synth_ice40 -top top -blif example.blif' example.v
|
||||
all: $(PROJ).bin
|
||||
|
||||
example.txt: example.blif icestick.pcf
|
||||
arachne-pnr -d 1k -o example.txt -p icestick.pcf example.blif
|
||||
%.blif: %.v
|
||||
yosys -p 'synth_ice40 -top top -blif $@' $<
|
||||
|
||||
example.bin: example.txt
|
||||
icepack example.txt example.bin
|
||||
%.txt: $(PIN_DEF) %.blif
|
||||
arachne-pnr -d $(DEVICE) -o $@ -p $^
|
||||
|
||||
prog:
|
||||
iceprog example.bin
|
||||
%.bin: %.txt
|
||||
icepack $< $@
|
||||
|
||||
prog: $(PROJ).bin
|
||||
iceprog $<
|
||||
|
||||
sudo-prog: $(PROJ).bin
|
||||
@echo 'Executing prog as root!!!'
|
||||
iceprog $<
|
||||
|
||||
clean:
|
||||
rm -f example.blif example.txt example.bin
|
||||
rm -f $(PROJ).blif $(PROJ).txt $(PROJ).bin
|
||||
|
||||
.PHONY: all prog clean
|
||||
|
|
|
|||
Loading…
Reference in New Issue