aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/benchmark/Makefile
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-07-25 13:28:12 +0200
committerClifford Wolf <clifford@clifford.at>2018-07-25 13:28:12 +0200
commit5db4a3e8b0a7c5b5270b014d73c52185fec71b52 (patch)
treedc1bd00be741c616085b14ebdb2b8bd1beda4e6f /ice40/benchmark/Makefile
parentf3dab003e7b9a417a490f341f7e4dd28d7417caf (diff)
downloadnextpnr-5db4a3e8b0a7c5b5270b014d73c52185fec71b52.tar.gz
nextpnr-5db4a3e8b0a7c5b5270b014d73c52185fec71b52.tar.bz2
nextpnr-5db4a3e8b0a7c5b5270b014d73c52185fec71b52.zip
Add ice40/benchmark/
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'ice40/benchmark/Makefile')
-rw-r--r--ice40/benchmark/Makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/ice40/benchmark/Makefile b/ice40/benchmark/Makefile
new file mode 100644
index 00000000..38cc2b0d
--- /dev/null
+++ b/ice40/benchmark/Makefile
@@ -0,0 +1,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' $^