From 745625c8b633c1b0db285cc89791f44c731b3be0 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 16 Jan 2018 21:07:45 +0100 Subject: It works --- fpga-toolchain/experiments/Makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 fpga-toolchain/experiments/Makefile (limited to 'fpga-toolchain/experiments/Makefile') diff --git a/fpga-toolchain/experiments/Makefile b/fpga-toolchain/experiments/Makefile new file mode 100644 index 0000000..4f906f7 --- /dev/null +++ b/fpga-toolchain/experiments/Makefile @@ -0,0 +1,26 @@ +# Project setup +PROJ = blinky +BUILD = ./build +DEVICE = 8k +FOOTPRINT = ct256 + +# Files +FILES = top.v + +.PHONY: all clean burn + +all: + # if build folder doesn't exist, create it + mkdir -p $(BUILD) + # synthesize using Yosys + yosys -p "synth_ice40 -top top -blif $(BUILD)/$(PROJ).blif" $(FILES) + # Place and route using arachne + arachne-pnr -d $(DEVICE) -P $(FOOTPRINT) -o $(BUILD)/$(PROJ).asc -p pinmap.pcf $(BUILD)/$(PROJ).blif + # Convert to bitstream using IcePack + icepack $(BUILD)/$(PROJ).asc $(BUILD)/$(PROJ).bin + +burn: + iceprog $(BUILD)/$(PROJ).bin + +clean: + rm build/* -- cgit v1.2.3