Pass MODEL variable to emulator.cc
This enables hot-swapping of the top-level test harness by specifying `MODEL=MyTestHarness` when building the emulator.
This commit is contained in:
parent
fd39eadcd6
commit
c61714a465
@ -155,7 +155,7 @@ done_processing:
|
|||||||
srand48(random_seed);
|
srand48(random_seed);
|
||||||
|
|
||||||
Verilated::randReset(2);
|
Verilated::randReset(2);
|
||||||
VTestHarness *tile = new VTestHarness;
|
TEST_HARNESS *tile = new TEST_HARNESS;
|
||||||
|
|
||||||
#if VM_TRACE
|
#if VM_TRACE
|
||||||
Verilated::traceEverOn(true); // Verilator must compute traced signals
|
Verilated::traceEverOn(true); // Verilator must compute traced signals
|
||||||
|
@ -57,7 +57,7 @@ VERILATOR_FLAGS := --top-module $(MODEL) \
|
|||||||
--output-split 20000 \
|
--output-split 20000 \
|
||||||
-Wno-STMTDLY --x-assign unique \
|
-Wno-STMTDLY --x-assign unique \
|
||||||
-I$(base_dir)/vsrc \
|
-I$(base_dir)/vsrc \
|
||||||
-O3 -CFLAGS "$(CXXFLAGS) -DVERILATOR -include $(base_dir)/csrc/verilator.h"
|
-O3 -CFLAGS "$(CXXFLAGS) -DVERILATOR -DTEST_HARNESS=V$(MODEL) -include $(base_dir)/csrc/verilator.h"
|
||||||
cppfiles = $(addprefix $(base_dir)/csrc/, $(addsuffix .cc, $(CXXSRCS)))
|
cppfiles = $(addprefix $(base_dir)/csrc/, $(addsuffix .cc, $(CXXSRCS)))
|
||||||
headers = $(wildcard $(base_dir)/csrc/*.h)
|
headers = $(wildcard $(base_dir)/csrc/*.h)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user