allow MODEL to be something other than TestHarness
This commit is contained in:
parent
8550582f84
commit
bf253aaa97
@ -65,7 +65,7 @@ int main(int argc, char** argv)
|
||||
srand48(random_seed);
|
||||
|
||||
Verilated::randReset(2);
|
||||
VTestHarness *tile = new VTestHarness;
|
||||
MODEL *tile = new MODEL;
|
||||
|
||||
#if VM_TRACE
|
||||
Verilated::traceEverOn(true); // Verilator must compute traced signals
|
||||
|
@ -54,7 +54,7 @@ VERILATOR_FLAGS := --top-module $(MODEL) \
|
||||
+define+STOP_COND=\$$c\(\"done_reset\"\) --assert \
|
||||
-Wno-STMTDLY --x-assign unique \
|
||||
-I$(base_dir)/vsrc \
|
||||
-O3 -CFLAGS "$(CXXFLAGS) -DVERILATOR -include $(base_dir)/csrc/verilator.h"
|
||||
-O3 -CFLAGS "$(CXXFLAGS) -DVERILATOR -include $(base_dir)/csrc/verilator.h -DMODEL=V$(MODEL)"
|
||||
cppfiles = $(addprefix $(base_dir)/csrc/, $(addsuffix .cc, $(CXXSRCS)))
|
||||
headers = $(wildcard $(base_dir)/csrc/*.h)
|
||||
|
||||
|
@ -51,6 +51,7 @@ VCS_OPTS = -notice -line +lint=all,noVCDE,noONGS,noUI -error=PCWM-L -timescale=1
|
||||
$(RISCV)/lib/libfesvr.so \
|
||||
-sverilog \
|
||||
+incdir+$(generated_dir) \
|
||||
+define+MODEL=$(MODEL) \
|
||||
+define+CLOCK_PERIOD=1.0 $(sim_vsrcs) $(sim_csrcs) \
|
||||
+define+PRINTF_COND=$(TB).printf_cond \
|
||||
+define+STOP_COND=!$(TB).reset \
|
||||
|
@ -87,7 +87,7 @@ module TestDriver;
|
||||
end
|
||||
end
|
||||
|
||||
TestHarness testHarness(
|
||||
`MODEL testHarness(
|
||||
.clk(clk),
|
||||
.reset(reset),
|
||||
.io_success(success)
|
||||
|
Loading…
Reference in New Issue
Block a user