aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-05-25 12:53:21 +0200
committerClifford Wolf <clifford@clifford.at>2018-05-25 12:53:21 +0200
commit247a19dd589d065db5ed19a1b7d251ea3a2a16a1 (patch)
tree76edd750cbc3b7e5e2e461f732f71065110f1cbe /Makefile
parent147da6432ab8f7cffd0c1ad7e832105953ce7394 (diff)
downloadpicorv32-247a19dd589d065db5ed19a1b7d251ea3a2a16a1.tar.gz
picorv32-247a19dd589d065db5ed19a1b7d251ea3a2a16a1.zip
Add "make test_verilator"
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index bdfcffc..7beffd8 100644
--- a/Makefile
+++ b/Makefile
@@ -43,6 +43,9 @@ test_axi: testbench.vvp firmware/firmware.hex
test_synth: testbench_synth.vvp firmware/firmware.hex
vvp -N $<
+test_verilator: testbench_verilator firmware/firmware.hex
+ ./testbench_verilator
+
testbench.vvp: testbench.v picorv32.v
iverilog -o $@ $(subst C,-DCOMPRESSED_ISA,$(COMPRESSED_ISA)) $^
chmod -x $@
@@ -67,6 +70,11 @@ testbench_synth.vvp: testbench.v synth.v
iverilog -o $@ -DSYNTH_TEST $^
chmod -x $@
+testbench_verilator: testbench.v picorv32.v
+ verilator -Wno-lint -Wno-MULTIDRIVEN -trace --top-module picorv32_wrapper --cc testbench.v picorv32.v --exe testbench.cc $(subst C,-DCOMPRESSED_ISA,$(COMPRESSED_ISA))
+ $(MAKE) -C obj_dir -f Vpicorv32_wrapper.mk
+ cp obj_dir/Vpicorv32_wrapper testbench_verilator
+
check: check-yices
check-%: check.smt2