Makefile 907 Bytes
Newer Older
lwc-tester committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38


VERILOG = ../../../Murax.v toplevel.v ../../../src/drygascon128.v

generate :
	(cd ../../..; sbt "runMain vexriscv.demo.MuraxHex")

../../../Murax.v :
	(cd ../../..; sbt "runMain vexriscv.demo.MuraxHex")

../../../Murax.v*.bin:

bin/toplevel.blif : ${VERILOG} ../../../Murax.v*.bin
	mkdir -p bin
	rm -f Murax.v*.bin
	cp ../../../Murax.v*.bin . | true
	yosys -v3 -p "synth_ice40 -top toplevel -blif bin/toplevel.blif" ${VERILOG}

bin/toplevel.asc : toplevel.pcf bin/toplevel.blif
	arachne-pnr -p toplevel.pcf -d 8k --max-passes 600 -P ct256 bin/toplevel.blif -o bin/toplevel.asc

bin/toplevel.bin : bin/toplevel.asc
	icepack bin/toplevel.asc bin/toplevel.bin

compile : bin/toplevel.bin

time: bin/toplevel.bin
	icetime -tmd hx8k bin/toplevel.asc

prog : bin/toplevel.bin
	iceprog -S bin/toplevel.bin

sudo-prog : bin/toplevel.bin
	sudo iceprog -S bin/toplevel.bin

clean :
	rm -rf bin
	rm -f Murax.v*.bin