From 247a19dd589d065db5ed19a1b7d251ea3a2a16a1 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Fri, 25 May 2018 12:53:21 +0200 Subject: [PATCH] Add "make test_verilator" Signed-off-by: Clifford Wolf --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) 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