summaryrefslogtreecommitdiffstats
path: root/music/fpga4fun/high_speed_pursuit/Makefile
blob: 52d9869afdb2e15c67c3354c03c32b2e2337f9c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Project setup
PROJ = top

# Files
FILES = top.v

.PHONY: iceFUN clean burn

iceFUN:
	# synthesize using Yosys
	yosys -p "synth_ice40 -top top -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

clean:
	rm -f *.asc *.bin *.blif *.json