From 410c279396e764f18d9110b8079272e43e4d931c Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Sun, 8 Dec 2024 01:55:15 -0800 Subject: [PATCH] add --define support to verilator --- sim/verilator/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sim/verilator/Makefile b/sim/verilator/Makefile index 666516c2d..ecb6b5f42 100644 --- a/sim/verilator/Makefile +++ b/sim/verilator/Makefile @@ -13,6 +13,7 @@ VERILATOR_DIR=${WALLY}/sim/verilator SOURCE=${WALLY}/config/shared/*.vh ${WALLY}/config/${WALLYCONF} ${WALLY}/config/deriv/${WALLYCONF} ${WALLY}/src/cvw.sv ${WALLY}/testbench/*.sv ${WALLY}/testbench/common/*.sv ${WALLY}/src/*/*.sv ${WALLY}/src/*/*/*.sv PLUS_ARGS= PARAM_ARGS= +DEFINE_ARGS= EXPANDED_PARAM_ARGS:=$(patsubst %,-G%,$(PARAM_ARGS)) WALLYCONF?=rv64gc @@ -63,6 +64,7 @@ $(WORKDIR)/V${TESTBENCH}: $(DEPENDENCIES) --top-module ${TESTBENCH} --relative-includes \ $(INCLUDE_PATH) \ ${WRAPPER} \ + ${DEFINE_ARGS} \ ${EXPANDED_PARAM_ARGS} \ $(SOURCES) @@ -75,6 +77,7 @@ obj_dir_profiling/V${TESTBENCH}_$(WALLYCONF): $(DEPENDENCIES) --top-module ${TESTBENCH} --relative-includes \ $(INCLUDE_PATH) \ ${WRAPPER} \ + ${DEFINE_ARGS} \ ${EXPANDED_PARAM_ARGS} \ $(SOURCES)