aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/benchmark/Makefile
blob: 38cc2b0db0a74427fcc0b64e92e91920f8919c27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
reports::

define mkreport
reports:: report_a$1.txt report_n$1.txt

report_a$1.txt: hx8kdemo_a$1.asc
	icetime -m -r report_a$1.txt -d hx8k hx8kdemo_a$1.asc

report_n$1.txt: hx8kdemo_n$1.asc
	icetime -m -r report_n$1.txt -d hx8k hx8kdemo_n$1.asc

hx8kdemo_a$1.asc: hx8kdemo.blif
	arachne-pnr -d 8k -p hx8kdemo.pcf -o hx8kdemo_a$1.asc -s $1 hx8kdemo.blif

hx8kdemo_n$1.asc: hx8kdemo.json
	nextpnr-ice40 --asc hx8kdemo_n$1.asc --json hx8kdemo.json --pcf hx8kdemo.pcf --hx8k --seed $1
endef

$(foreach i,1 2 3 4 5 6 7 8,$(eval $(call mkreport,$(i))))

hx8kdemo.blif: hx8kdemo.json
hx8kdemo.json: hx8kdemo.v spimemio.v simpleuart.v picosoc.v picorv32.v
	yosys -ql hx8kdemo.log -p 'synth_ice40 -top hx8kdemo -blif hx8kdemo.blif -json hx8kdemo.json' $^