diff options
Diffstat (limited to 'mictoled/Makefile')
| -rw-r--r-- | mictoled/Makefile | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mictoled/Makefile b/mictoled/Makefile new file mode 100644 index 0000000..ecba897 --- /dev/null +++ b/mictoled/Makefile @@ -0,0 +1,29 @@ +# Project setup +PROJ = mictoled +DEVICE = 8k + +FILES = $(PROJ).v + +.PHONY: $(PROJ) clean burn sim + +$(PROJ): + # synthesize using Yosys + yosys -p "synth_ice40 -top $(PROJ) -json $(PROJ).json" $(FILES) + # Place and route using nextpnr + nextpnr-ice40 -r --hx8k --json $(PROJ).json --package cb132 --asc $(PROJ).asc --opt-timing --pcf iceFUN.pcf + + # Convert to bitstream using IcePack + icepack $(PROJ).asc $(PROJ).bin + +burn: + iceFUNprog $(PROJ).bin + +sim: + iverilog -o $(PROJ)_tb $(PROJ)_tb.v $(PROJ).v + vvp $(PROJ)_tb + +wave: + gtkwave $(PROJ)_tb.vcd wave.gtkw + +clean: + rm -f *.asc *.bin *blif *.vcd $(PROG).json $(PROJ)_tb |
