From e6d8ed799255194599973a078b0fd50d27482891 Mon Sep 17 00:00:00 2001 From: Alex Forencich Date: Wed, 25 Jan 2023 19:10:09 -0800 Subject: [PATCH 1/2] Update CI configuration Signed-off-by: Alex Forencich --- .github/workflows/regression-tests.yml | 8 ++++---- tox.ini | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/regression-tests.yml b/.github/workflows/regression-tests.yml index d7688d46a..bd104f64f 100644 --- a/.github/workflows/regression-tests.yml +++ b/.github/workflows/regression-tests.yml @@ -9,14 +9,14 @@ jobs: strategy: matrix: - python-version: [3.9] + python-version: ["3.10"] group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} @@ -30,4 +30,4 @@ jobs: pip install tox tox-gh-actions - name: Test with tox - run: tox -- --splits 10 --group ${{ matrix.group }} + run: tox -- -n auto --verbose --splits 10 --group ${{ matrix.group }} diff --git a/tox.ini b/tox.ini index a1f6a3e40..fe68aa7a1 100644 --- a/tox.ini +++ b/tox.ini @@ -7,21 +7,21 @@ requires = virtualenv >= 16.1 [gh-actions] python = - 3.9: py3 + 3.10: py3 [testenv] deps = - pytest == 7.1.3 - pytest-xdist == 2.5.0 + pytest == 7.2.1 + pytest-xdist == 3.1.0 pytest-split == 0.8.0 - cocotb == 1.7.0 + cocotb == 1.7.2 cocotb-bus == 0.2.1 - cocotb-test == 0.2.2 - cocotbext-axi == 0.1.18 + cocotb-test == 0.2.4 + cocotbext-axi == 0.1.20 jinja2 == 3.1.2 commands = - pytest -n auto {posargs} + pytest {posargs:-n auto --verbose} # pytest configuration [pytest] From b81e323a6d4aa65c5f7508842b4d2cc6c7d05703 Mon Sep 17 00:00:00 2001 From: Alex Forencich Date: Sun, 29 Jan 2023 20:53:11 -0800 Subject: [PATCH 2/2] Rework parameter handling in testbench makefiles Signed-off-by: Alex Forencich --- tb/axis_adapter/Makefile | 26 +----------- tb/axis_arb_mux/Makefile | 30 +------------- tb/axis_async_fifo/Makefile | 40 +----------------- tb/axis_async_fifo_adapter/Makefile | 44 +------------------- tb/axis_broadcast/Makefile | 22 +--------- tb/axis_cobs_decode/Makefile | 4 +- tb/axis_cobs_encode/Makefile | 4 +- tb/axis_demux/Makefile | 24 +---------- tb/axis_fifo/Makefile | 40 +----------------- tb/axis_fifo_adapter/Makefile | 44 +------------------- tb/axis_frame_length_adjust/Makefile | 22 +--------- tb/axis_frame_length_adjust_fifo/Makefile | 26 +----------- tb/axis_mux/Makefile | 20 +-------- tb/axis_pipeline_fifo/Makefile | 24 +---------- tb/axis_pipeline_register/Makefile | 26 +----------- tb/axis_ram_switch/Makefile | 50 +---------------------- tb/axis_rate_limit/Makefile | 22 +--------- tb/axis_register/Makefile | 24 +---------- tb/axis_srl_fifo/Makefile | 22 +--------- tb/axis_srl_register/Makefile | 22 +--------- tb/axis_switch/Makefile | 32 +-------------- 21 files changed, 42 insertions(+), 526 deletions(-) diff --git a/tb/axis_adapter/Makefile b/tb/axis_adapter/Makefile index 621657d76..9f9110dca 100644 --- a/tb/axis_adapter/Makefile +++ b/tb/axis_adapter/Makefile @@ -49,18 +49,7 @@ export PARAM_USER_WIDTH ?= 1 ifeq ($(SIM), icarus) PLUSARGS += -fst - COMPILE_ARGS += -P $(TOPLEVEL).S_DATA_WIDTH=$(PARAM_S_DATA_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).S_KEEP_ENABLE=$(PARAM_S_KEEP_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).S_KEEP_WIDTH=$(PARAM_S_KEEP_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).M_DATA_WIDTH=$(PARAM_M_DATA_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).M_KEEP_ENABLE=$(PARAM_M_KEEP_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).M_KEEP_WIDTH=$(PARAM_M_KEEP_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).ID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).USER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_WIDTH=$(PARAM_USER_WIDTH) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-P $(TOPLEVEL).$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) VERILOG_SOURCES += iverilog_dump.v @@ -69,18 +58,7 @@ ifeq ($(SIM), icarus) else ifeq ($(SIM), verilator) COMPILE_ARGS += -Wno-SELRANGE -Wno-WIDTH - COMPILE_ARGS += -GS_DATA_WIDTH=$(PARAM_S_DATA_WIDTH) - COMPILE_ARGS += -GS_KEEP_ENABLE=$(PARAM_S_KEEP_ENABLE) - COMPILE_ARGS += -GS_KEEP_WIDTH=$(PARAM_S_KEEP_WIDTH) - COMPILE_ARGS += -GM_DATA_WIDTH=$(PARAM_M_DATA_WIDTH) - COMPILE_ARGS += -GM_KEEP_ENABLE=$(PARAM_M_KEEP_ENABLE) - COMPILE_ARGS += -GM_KEEP_WIDTH=$(PARAM_M_KEEP_WIDTH) - COMPILE_ARGS += -GID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -GID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -GDEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -GDEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -GUSER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -GUSER_WIDTH=$(PARAM_USER_WIDTH) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-G$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) COMPILE_ARGS += --trace-fst diff --git a/tb/axis_arb_mux/Makefile b/tb/axis_arb_mux/Makefile index 936f22b1c..194d8975e 100644 --- a/tb/axis_arb_mux/Makefile +++ b/tb/axis_arb_mux/Makefile @@ -56,20 +56,7 @@ export PARAM_ARB_LSB_HIGH_PRIORITY ?= 1 ifeq ($(SIM), icarus) PLUSARGS += -fst - COMPILE_ARGS += -P $(TOPLEVEL).DATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).ID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).M_ID_WIDTH=$(PARAM_M_ID_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).S_ID_WIDTH=$(PARAM_S_ID_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).USER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).LAST_ENABLE=$(PARAM_LAST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).UPDATE_TID=$(PARAM_UPDATE_TID) - COMPILE_ARGS += -P $(TOPLEVEL).ARB_TYPE_ROUND_ROBIN=$(PARAM_ARB_TYPE_ROUND_ROBIN) - COMPILE_ARGS += -P $(TOPLEVEL).ARB_LSB_HIGH_PRIORITY=$(PARAM_ARB_LSB_HIGH_PRIORITY) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-P $(TOPLEVEL).$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) VERILOG_SOURCES += iverilog_dump.v @@ -78,20 +65,7 @@ ifeq ($(SIM), icarus) else ifeq ($(SIM), verilator) COMPILE_ARGS += -Wno-SELRANGE -Wno-WIDTH - COMPILE_ARGS += -GDATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -GKEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -GKEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -GID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -GM_ID_WIDTH=$(PARAM_M_ID_WIDTH) - COMPILE_ARGS += -GS_ID_WIDTH=$(PARAM_S_ID_WIDTH) - COMPILE_ARGS += -GDEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -GDEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -GUSER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -GUSER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -GLAST_ENABLE=$(PARAM_LAST_ENABLE) - COMPILE_ARGS += -GUPDATE_TID=$(PARAM_UPDATE_TID) - COMPILE_ARGS += -GARB_TYPE_ROUND_ROBIN=$(PARAM_ARB_TYPE_ROUND_ROBIN) - COMPILE_ARGS += -GARB_LSB_HIGH_PRIORITY=$(PARAM_ARB_LSB_HIGH_PRIORITY) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-G$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) COMPILE_ARGS += --trace-fst diff --git a/tb/axis_async_fifo/Makefile b/tb/axis_async_fifo/Makefile index 1b871e0e2..792f5532c 100644 --- a/tb/axis_async_fifo/Makefile +++ b/tb/axis_async_fifo/Makefile @@ -55,25 +55,7 @@ export PARAM_DROP_WHEN_FULL ?= 0 ifeq ($(SIM), icarus) PLUSARGS += -fst - COMPILE_ARGS += -P $(TOPLEVEL).DEPTH=$(PARAM_DEPTH) - COMPILE_ARGS += -P $(TOPLEVEL).DATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).LAST_ENABLE=$(PARAM_LAST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).USER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).RAM_PIPELINE=$(PARAM_RAM_PIPELINE) - COMPILE_ARGS += -P $(TOPLEVEL).OUTPUT_FIFO_ENABLE=$(PARAM_OUTPUT_FIFO_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).FRAME_FIFO=$(PARAM_FRAME_FIFO) - COMPILE_ARGS += -P $(TOPLEVEL).USER_BAD_FRAME_VALUE=$(PARAM_USER_BAD_FRAME_VALUE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_BAD_FRAME_MASK=$(PARAM_USER_BAD_FRAME_MASK) - COMPILE_ARGS += -P $(TOPLEVEL).DROP_OVERSIZE_FRAME=$(PARAM_DROP_OVERSIZE_FRAME) - COMPILE_ARGS += -P $(TOPLEVEL).DROP_BAD_FRAME=$(PARAM_DROP_BAD_FRAME) - COMPILE_ARGS += -P $(TOPLEVEL).DROP_WHEN_FULL=$(PARAM_DROP_WHEN_FULL) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-P $(TOPLEVEL).$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) VERILOG_SOURCES += iverilog_dump.v @@ -82,25 +64,7 @@ ifeq ($(SIM), icarus) else ifeq ($(SIM), verilator) COMPILE_ARGS += -Wno-SELRANGE -Wno-WIDTH - COMPILE_ARGS += -GDEPTH=$(PARAM_DEPTH) - COMPILE_ARGS += -GDATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -GKEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -GKEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -GLAST_ENABLE=$(PARAM_LAST_ENABLE) - COMPILE_ARGS += -GID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -GID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -GDEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -GDEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -GUSER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -GUSER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -GRAM_PIPELINE=$(PARAM_RAM_PIPELINE) - COMPILE_ARGS += -GOUTPUT_FIFO_ENABLE=$(PARAM_OUTPUT_FIFO_ENABLE) - COMPILE_ARGS += -GFRAME_FIFO=$(PARAM_FRAME_FIFO) - COMPILE_ARGS += -GUSER_BAD_FRAME_VALUE=$(PARAM_USER_BAD_FRAME_VALUE) - COMPILE_ARGS += -GUSER_BAD_FRAME_MASK=$(PARAM_USER_BAD_FRAME_MASK) - COMPILE_ARGS += -GDROP_OVERSIZE_FRAME=$(PARAM_DROP_OVERSIZE_FRAME) - COMPILE_ARGS += -GDROP_BAD_FRAME=$(PARAM_DROP_BAD_FRAME) - COMPILE_ARGS += -GDROP_WHEN_FULL=$(PARAM_DROP_WHEN_FULL) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-G$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) COMPILE_ARGS += --trace-fst diff --git a/tb/axis_async_fifo_adapter/Makefile b/tb/axis_async_fifo_adapter/Makefile index 7f4ba7431..7c7d65f93 100644 --- a/tb/axis_async_fifo_adapter/Makefile +++ b/tb/axis_async_fifo_adapter/Makefile @@ -60,27 +60,7 @@ export PARAM_DROP_WHEN_FULL ?= 0 ifeq ($(SIM), icarus) PLUSARGS += -fst - COMPILE_ARGS += -P $(TOPLEVEL).DEPTH=$(PARAM_DEPTH) - COMPILE_ARGS += -P $(TOPLEVEL).S_DATA_WIDTH=$(PARAM_S_DATA_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).S_KEEP_ENABLE=$(PARAM_S_KEEP_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).S_KEEP_WIDTH=$(PARAM_S_KEEP_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).M_DATA_WIDTH=$(PARAM_M_DATA_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).M_KEEP_ENABLE=$(PARAM_M_KEEP_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).M_KEEP_WIDTH=$(PARAM_M_KEEP_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).ID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).USER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).RAM_PIPELINE=$(PARAM_RAM_PIPELINE) - COMPILE_ARGS += -P $(TOPLEVEL).OUTPUT_FIFO_ENABLE=$(PARAM_OUTPUT_FIFO_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).FRAME_FIFO=$(PARAM_FRAME_FIFO) - COMPILE_ARGS += -P $(TOPLEVEL).USER_BAD_FRAME_VALUE=$(PARAM_USER_BAD_FRAME_VALUE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_BAD_FRAME_MASK=$(PARAM_USER_BAD_FRAME_MASK) - COMPILE_ARGS += -P $(TOPLEVEL).DROP_OVERSIZE_FRAME=$(PARAM_DROP_OVERSIZE_FRAME) - COMPILE_ARGS += -P $(TOPLEVEL).DROP_BAD_FRAME=$(PARAM_DROP_BAD_FRAME) - COMPILE_ARGS += -P $(TOPLEVEL).DROP_WHEN_FULL=$(PARAM_DROP_WHEN_FULL) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-P $(TOPLEVEL).$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) VERILOG_SOURCES += iverilog_dump.v @@ -89,27 +69,7 @@ ifeq ($(SIM), icarus) else ifeq ($(SIM), verilator) COMPILE_ARGS += -Wno-SELRANGE -Wno-WIDTH - COMPILE_ARGS += -GDEPTH=$(PARAM_DEPTH) - COMPILE_ARGS += -GS_DATA_WIDTH=$(PARAM_S_DATA_WIDTH) - COMPILE_ARGS += -GS_KEEP_ENABLE=$(PARAM_S_KEEP_ENABLE) - COMPILE_ARGS += -GS_KEEP_WIDTH=$(PARAM_S_KEEP_WIDTH) - COMPILE_ARGS += -GM_DATA_WIDTH=$(PARAM_M_DATA_WIDTH) - COMPILE_ARGS += -GM_KEEP_ENABLE=$(PARAM_M_KEEP_ENABLE) - COMPILE_ARGS += -GM_KEEP_WIDTH=$(PARAM_M_KEEP_WIDTH) - COMPILE_ARGS += -GID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -GID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -GDEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -GDEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -GUSER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -GUSER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -GRAM_PIPELINE=$(PARAM_RAM_PIPELINE) - COMPILE_ARGS += -GOUTPUT_FIFO_ENABLE=$(PARAM_OUTPUT_FIFO_ENABLE) - COMPILE_ARGS += -GFRAME_FIFO=$(PARAM_FRAME_FIFO) - COMPILE_ARGS += -GUSER_BAD_FRAME_VALUE=$(PARAM_USER_BAD_FRAME_VALUE) - COMPILE_ARGS += -GUSER_BAD_FRAME_MASK=$(PARAM_USER_BAD_FRAME_MASK) - COMPILE_ARGS += -GDROP_OVERSIZE_FRAME=$(PARAM_DROP_OVERSIZE_FRAME) - COMPILE_ARGS += -GDROP_BAD_FRAME=$(PARAM_DROP_BAD_FRAME) - COMPILE_ARGS += -GDROP_WHEN_FULL=$(PARAM_DROP_WHEN_FULL) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-G$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) COMPILE_ARGS += --trace-fst diff --git a/tb/axis_broadcast/Makefile b/tb/axis_broadcast/Makefile index 7b66215cd..afef17eca 100644 --- a/tb/axis_broadcast/Makefile +++ b/tb/axis_broadcast/Makefile @@ -50,16 +50,7 @@ export PARAM_USER_WIDTH ?= 1 ifeq ($(SIM), icarus) PLUSARGS += -fst - COMPILE_ARGS += -P $(TOPLEVEL).DATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).LAST_ENABLE=$(PARAM_LAST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).USER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_WIDTH=$(PARAM_USER_WIDTH) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-P $(TOPLEVEL).$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) VERILOG_SOURCES += iverilog_dump.v @@ -68,16 +59,7 @@ ifeq ($(SIM), icarus) else ifeq ($(SIM), verilator) COMPILE_ARGS += -Wno-SELRANGE -Wno-WIDTH - COMPILE_ARGS += -GDATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -GKEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -GKEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -GLAST_ENABLE=$(PARAM_LAST_ENABLE) - COMPILE_ARGS += -GID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -GID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -GDEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -GDEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -GUSER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -GUSER_WIDTH=$(PARAM_USER_WIDTH) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-G$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) COMPILE_ARGS += --trace-fst diff --git a/tb/axis_cobs_decode/Makefile b/tb/axis_cobs_decode/Makefile index 713851756..535c69dbe 100644 --- a/tb/axis_cobs_decode/Makefile +++ b/tb/axis_cobs_decode/Makefile @@ -37,7 +37,7 @@ VERILOG_SOURCES += ../../rtl/$(DUT).v ifeq ($(SIM), icarus) PLUSARGS += -fst - #COMPILE_ARGS += -P $(TOPLEVEL).APPEND_ZERO=$(PARAM_APPEND_ZERO) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-P $(TOPLEVEL).$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) VERILOG_SOURCES += iverilog_dump.v @@ -46,7 +46,7 @@ ifeq ($(SIM), icarus) else ifeq ($(SIM), verilator) COMPILE_ARGS += -Wno-SELRANGE -Wno-WIDTH - #COMPILE_ARGS += -GAPPEND_ZERO=$(PARAM_APPEND_ZERO) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-G$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) COMPILE_ARGS += --trace-fst diff --git a/tb/axis_cobs_encode/Makefile b/tb/axis_cobs_encode/Makefile index f52acd1c3..e0b47bc58 100644 --- a/tb/axis_cobs_encode/Makefile +++ b/tb/axis_cobs_encode/Makefile @@ -38,7 +38,7 @@ export PARAM_APPEND_ZERO ?= 0 ifeq ($(SIM), icarus) PLUSARGS += -fst - COMPILE_ARGS += -P $(TOPLEVEL).APPEND_ZERO=$(PARAM_APPEND_ZERO) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-P $(TOPLEVEL).$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) VERILOG_SOURCES += iverilog_dump.v @@ -47,7 +47,7 @@ ifeq ($(SIM), icarus) else ifeq ($(SIM), verilator) COMPILE_ARGS += -Wno-SELRANGE -Wno-WIDTH - COMPILE_ARGS += -GAPPEND_ZERO=$(PARAM_APPEND_ZERO) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-G$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) COMPILE_ARGS += --trace-fst diff --git a/tb/axis_demux/Makefile b/tb/axis_demux/Makefile index 8822019d2..1a304bffc 100644 --- a/tb/axis_demux/Makefile +++ b/tb/axis_demux/Makefile @@ -51,17 +51,7 @@ export PARAM_TDEST_ROUTE ?= 1 ifeq ($(SIM), icarus) PLUSARGS += -fst - COMPILE_ARGS += -P $(TOPLEVEL).DATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).ID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).S_DEST_WIDTH=$(PARAM_S_DEST_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).M_DEST_WIDTH=$(PARAM_M_DEST_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).USER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).TDEST_ROUTE=$(PARAM_TDEST_ROUTE) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-P $(TOPLEVEL).$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) VERILOG_SOURCES += iverilog_dump.v @@ -70,17 +60,7 @@ ifeq ($(SIM), icarus) else ifeq ($(SIM), verilator) COMPILE_ARGS += -Wno-SELRANGE -Wno-WIDTH - COMPILE_ARGS += -GDATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -GKEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -GKEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -GID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -GID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -GDEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -GS_DEST_WIDTH=$(PARAM_S_DEST_WIDTH) - COMPILE_ARGS += -GM_DEST_WIDTH=$(PARAM_M_DEST_WIDTH) - COMPILE_ARGS += -GUSER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -GUSER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -GTDEST_ROUTE=$(PARAM_TDEST_ROUTE) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-G$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) COMPILE_ARGS += --trace-fst diff --git a/tb/axis_fifo/Makefile b/tb/axis_fifo/Makefile index b9efb186a..cd64ead7e 100644 --- a/tb/axis_fifo/Makefile +++ b/tb/axis_fifo/Makefile @@ -55,25 +55,7 @@ export PARAM_DROP_WHEN_FULL ?= 0 ifeq ($(SIM), icarus) PLUSARGS += -fst - COMPILE_ARGS += -P $(TOPLEVEL).DEPTH=$(PARAM_DEPTH) - COMPILE_ARGS += -P $(TOPLEVEL).DATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).LAST_ENABLE=$(PARAM_LAST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).USER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).RAM_PIPELINE=$(PARAM_RAM_PIPELINE) - COMPILE_ARGS += -P $(TOPLEVEL).OUTPUT_FIFO_ENABLE=$(PARAM_OUTPUT_FIFO_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).FRAME_FIFO=$(PARAM_FRAME_FIFO) - COMPILE_ARGS += -P $(TOPLEVEL).USER_BAD_FRAME_VALUE=$(PARAM_USER_BAD_FRAME_VALUE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_BAD_FRAME_MASK=$(PARAM_USER_BAD_FRAME_MASK) - COMPILE_ARGS += -P $(TOPLEVEL).DROP_OVERSIZE_FRAME=$(PARAM_DROP_OVERSIZE_FRAME) - COMPILE_ARGS += -P $(TOPLEVEL).DROP_BAD_FRAME=$(PARAM_DROP_BAD_FRAME) - COMPILE_ARGS += -P $(TOPLEVEL).DROP_WHEN_FULL=$(PARAM_DROP_WHEN_FULL) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-P $(TOPLEVEL).$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) VERILOG_SOURCES += iverilog_dump.v @@ -82,25 +64,7 @@ ifeq ($(SIM), icarus) else ifeq ($(SIM), verilator) COMPILE_ARGS += -Wno-SELRANGE -Wno-WIDTH - COMPILE_ARGS += -GDEPTH=$(PARAM_DEPTH) - COMPILE_ARGS += -GDATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -GKEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -GKEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -GLAST_ENABLE=$(PARAM_LAST_ENABLE) - COMPILE_ARGS += -GID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -GID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -GDEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -GDEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -GUSER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -GUSER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -GRAM_PIPELINE=$(PARAM_RAM_PIPELINE) - COMPILE_ARGS += -GOUTPUT_FIFO_ENABLE=$(PARAM_OUTPUT_FIFO_ENABLE) - COMPILE_ARGS += -GFRAME_FIFO=$(PARAM_FRAME_FIFO) - COMPILE_ARGS += -GUSER_BAD_FRAME_VALUE=$(PARAM_USER_BAD_FRAME_VALUE) - COMPILE_ARGS += -GUSER_BAD_FRAME_MASK=$(PARAM_USER_BAD_FRAME_MASK) - COMPILE_ARGS += -GDROP_OVERSIZE_FRAME=$(PARAM_DROP_OVERSIZE_FRAME) - COMPILE_ARGS += -GDROP_BAD_FRAME=$(PARAM_DROP_BAD_FRAME) - COMPILE_ARGS += -GDROP_WHEN_FULL=$(PARAM_DROP_WHEN_FULL) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-G$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) COMPILE_ARGS += --trace-fst diff --git a/tb/axis_fifo_adapter/Makefile b/tb/axis_fifo_adapter/Makefile index c6957a5f6..bda1e8c98 100644 --- a/tb/axis_fifo_adapter/Makefile +++ b/tb/axis_fifo_adapter/Makefile @@ -60,27 +60,7 @@ export PARAM_DROP_WHEN_FULL ?= 0 ifeq ($(SIM), icarus) PLUSARGS += -fst - COMPILE_ARGS += -P $(TOPLEVEL).DEPTH=$(PARAM_DEPTH) - COMPILE_ARGS += -P $(TOPLEVEL).S_DATA_WIDTH=$(PARAM_S_DATA_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).S_KEEP_ENABLE=$(PARAM_S_KEEP_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).S_KEEP_WIDTH=$(PARAM_S_KEEP_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).M_DATA_WIDTH=$(PARAM_M_DATA_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).M_KEEP_ENABLE=$(PARAM_M_KEEP_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).M_KEEP_WIDTH=$(PARAM_M_KEEP_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).ID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).USER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).RAM_PIPELINE=$(PARAM_RAM_PIPELINE) - COMPILE_ARGS += -P $(TOPLEVEL).OUTPUT_FIFO_ENABLE=$(PARAM_OUTPUT_FIFO_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).FRAME_FIFO=$(PARAM_FRAME_FIFO) - COMPILE_ARGS += -P $(TOPLEVEL).USER_BAD_FRAME_VALUE=$(PARAM_USER_BAD_FRAME_VALUE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_BAD_FRAME_MASK=$(PARAM_USER_BAD_FRAME_MASK) - COMPILE_ARGS += -P $(TOPLEVEL).DROP_OVERSIZE_FRAME=$(PARAM_DROP_OVERSIZE_FRAME) - COMPILE_ARGS += -P $(TOPLEVEL).DROP_BAD_FRAME=$(PARAM_DROP_BAD_FRAME) - COMPILE_ARGS += -P $(TOPLEVEL).DROP_WHEN_FULL=$(PARAM_DROP_WHEN_FULL) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-P $(TOPLEVEL).$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) VERILOG_SOURCES += iverilog_dump.v @@ -89,27 +69,7 @@ ifeq ($(SIM), icarus) else ifeq ($(SIM), verilator) COMPILE_ARGS += -Wno-SELRANGE -Wno-WIDTH - COMPILE_ARGS += -GDEPTH=$(PARAM_DEPTH) - COMPILE_ARGS += -GS_DATA_WIDTH=$(PARAM_S_DATA_WIDTH) - COMPILE_ARGS += -GS_KEEP_ENABLE=$(PARAM_S_KEEP_ENABLE) - COMPILE_ARGS += -GS_KEEP_WIDTH=$(PARAM_S_KEEP_WIDTH) - COMPILE_ARGS += -GM_DATA_WIDTH=$(PARAM_M_DATA_WIDTH) - COMPILE_ARGS += -GM_KEEP_ENABLE=$(PARAM_M_KEEP_ENABLE) - COMPILE_ARGS += -GM_KEEP_WIDTH=$(PARAM_M_KEEP_WIDTH) - COMPILE_ARGS += -GID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -GID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -GDEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -GDEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -GUSER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -GUSER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -GRAM_PIPELINE=$(PARAM_RAM_PIPELINE) - COMPILE_ARGS += -GOUTPUT_FIFO_ENABLE=$(PARAM_OUTPUT_FIFO_ENABLE) - COMPILE_ARGS += -GFRAME_FIFO=$(PARAM_FRAME_FIFO) - COMPILE_ARGS += -GUSER_BAD_FRAME_VALUE=$(PARAM_USER_BAD_FRAME_VALUE) - COMPILE_ARGS += -GUSER_BAD_FRAME_MASK=$(PARAM_USER_BAD_FRAME_MASK) - COMPILE_ARGS += -GDROP_OVERSIZE_FRAME=$(PARAM_DROP_OVERSIZE_FRAME) - COMPILE_ARGS += -GDROP_BAD_FRAME=$(PARAM_DROP_BAD_FRAME) - COMPILE_ARGS += -GDROP_WHEN_FULL=$(PARAM_DROP_WHEN_FULL) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-G$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) COMPILE_ARGS += --trace-fst diff --git a/tb/axis_frame_length_adjust/Makefile b/tb/axis_frame_length_adjust/Makefile index abe6052c3..60983e25a 100644 --- a/tb/axis_frame_length_adjust/Makefile +++ b/tb/axis_frame_length_adjust/Makefile @@ -46,16 +46,7 @@ export PARAM_LEN_WIDTH ?= 16 ifeq ($(SIM), icarus) PLUSARGS += -fst - COMPILE_ARGS += -P $(TOPLEVEL).DATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).ID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).USER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).LEN_WIDTH=$(PARAM_LEN_WIDTH) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-P $(TOPLEVEL).$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) VERILOG_SOURCES += iverilog_dump.v @@ -64,16 +55,7 @@ ifeq ($(SIM), icarus) else ifeq ($(SIM), verilator) COMPILE_ARGS += -Wno-SELRANGE -Wno-WIDTH - COMPILE_ARGS += -GDATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -GKEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -GKEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -GID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -GID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -GDEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -GDEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -GUSER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -GUSER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -GLEN_WIDTH=$(PARAM_LEN_WIDTH) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-G$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) COMPILE_ARGS += --trace-fst diff --git a/tb/axis_frame_length_adjust_fifo/Makefile b/tb/axis_frame_length_adjust_fifo/Makefile index 59b5d822c..aac62b210 100644 --- a/tb/axis_frame_length_adjust_fifo/Makefile +++ b/tb/axis_frame_length_adjust_fifo/Makefile @@ -50,18 +50,7 @@ export PARAM_HEADER_FIFO_DEPTH ?= 8 ifeq ($(SIM), icarus) PLUSARGS += -fst - COMPILE_ARGS += -P $(TOPLEVEL).DATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).ID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).USER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).LEN_WIDTH=$(PARAM_LEN_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).FRAME_FIFO_DEPTH=$(PARAM_FRAME_FIFO_DEPTH) - COMPILE_ARGS += -P $(TOPLEVEL).HEADER_FIFO_DEPTH=$(PARAM_HEADER_FIFO_DEPTH) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-P $(TOPLEVEL).$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) VERILOG_SOURCES += iverilog_dump.v @@ -70,18 +59,7 @@ ifeq ($(SIM), icarus) else ifeq ($(SIM), verilator) COMPILE_ARGS += -Wno-SELRANGE -Wno-WIDTH - COMPILE_ARGS += -GDATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -GKEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -GKEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -GID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -GID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -GDEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -GDEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -GUSER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -GUSER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -GLEN_WIDTH=$(PARAM_LEN_WIDTH) - COMPILE_ARGS += -GFRAME_FIFO_DEPTH=$(PARAM_FRAME_FIFO_DEPTH) - COMPILE_ARGS += -GHEADER_FIFO_DEPTH=$(PARAM_HEADER_FIFO_DEPTH) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-G$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) COMPILE_ARGS += --trace-fst diff --git a/tb/axis_mux/Makefile b/tb/axis_mux/Makefile index 247a0784c..c5d945d34 100644 --- a/tb/axis_mux/Makefile +++ b/tb/axis_mux/Makefile @@ -49,15 +49,7 @@ export PARAM_USER_WIDTH ?= 1 ifeq ($(SIM), icarus) PLUSARGS += -fst - COMPILE_ARGS += -P $(TOPLEVEL).DATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).ID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).USER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_WIDTH=$(PARAM_USER_WIDTH) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-P $(TOPLEVEL).$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) VERILOG_SOURCES += iverilog_dump.v @@ -66,15 +58,7 @@ ifeq ($(SIM), icarus) else ifeq ($(SIM), verilator) COMPILE_ARGS += -Wno-SELRANGE -Wno-WIDTH - COMPILE_ARGS += -GDATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -GKEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -GKEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -GID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -GID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -GDEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -GDEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -GUSER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -GUSER_WIDTH=$(PARAM_USER_WIDTH) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-G$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) COMPILE_ARGS += --trace-fst diff --git a/tb/axis_pipeline_fifo/Makefile b/tb/axis_pipeline_fifo/Makefile index a356a55e1..f60a41da1 100644 --- a/tb/axis_pipeline_fifo/Makefile +++ b/tb/axis_pipeline_fifo/Makefile @@ -47,17 +47,7 @@ export PARAM_LENGTH ?= 2 ifeq ($(SIM), icarus) PLUSARGS += -fst - COMPILE_ARGS += -P $(TOPLEVEL).DATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).LAST_ENABLE=$(PARAM_LAST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).USER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).LENGTH=$(PARAM_LENGTH) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-P $(TOPLEVEL).$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) VERILOG_SOURCES += iverilog_dump.v @@ -66,17 +56,7 @@ ifeq ($(SIM), icarus) else ifeq ($(SIM), verilator) COMPILE_ARGS += -Wno-SELRANGE -Wno-WIDTH - COMPILE_ARGS += -GDATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -GKEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -GKEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -GLAST_ENABLE=$(PARAM_LAST_ENABLE) - COMPILE_ARGS += -GID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -GID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -GDEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -GDEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -GUSER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -GUSER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -GLENGTH=$(PARAM_LENGTH) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-G$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) COMPILE_ARGS += --trace-fst diff --git a/tb/axis_pipeline_register/Makefile b/tb/axis_pipeline_register/Makefile index 13e6e6cf5..a36c6995e 100644 --- a/tb/axis_pipeline_register/Makefile +++ b/tb/axis_pipeline_register/Makefile @@ -49,18 +49,7 @@ export PARAM_LENGTH ?= 2 ifeq ($(SIM), icarus) PLUSARGS += -fst - COMPILE_ARGS += -P $(TOPLEVEL).DATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).LAST_ENABLE=$(PARAM_LAST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).USER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).REG_TYPE=$(PARAM_REG_TYPE) - COMPILE_ARGS += -P $(TOPLEVEL).LENGTH=$(PARAM_LENGTH) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-P $(TOPLEVEL).$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) VERILOG_SOURCES += iverilog_dump.v @@ -69,18 +58,7 @@ ifeq ($(SIM), icarus) else ifeq ($(SIM), verilator) COMPILE_ARGS += -Wno-SELRANGE -Wno-WIDTH - COMPILE_ARGS += -GDATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -GKEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -GKEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -GLAST_ENABLE=$(PARAM_LAST_ENABLE) - COMPILE_ARGS += -GID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -GID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -GDEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -GDEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -GUSER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -GUSER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -GREG_TYPE=$(PARAM_REG_TYPE) - COMPILE_ARGS += -GLENGTH=$(PARAM_LENGTH) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-G$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) COMPILE_ARGS += --trace-fst diff --git a/tb/axis_ram_switch/Makefile b/tb/axis_ram_switch/Makefile index 6b07dabe7..674c2bed2 100644 --- a/tb/axis_ram_switch/Makefile +++ b/tb/axis_ram_switch/Makefile @@ -68,30 +68,7 @@ export PARAM_RAM_PIPELINE ?= 2 ifeq ($(SIM), icarus) PLUSARGS += -fst - COMPILE_ARGS += -P $(TOPLEVEL).FIFO_DEPTH=$(PARAM_FIFO_DEPTH) - COMPILE_ARGS += -P $(TOPLEVEL).CMD_FIFO_DEPTH=$(PARAM_CMD_FIFO_DEPTH) - COMPILE_ARGS += -P $(TOPLEVEL).SPEEDUP=$(PARAM_SPEEDUP) - COMPILE_ARGS += -P $(TOPLEVEL).S_DATA_WIDTH=$(PARAM_S_DATA_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).S_KEEP_ENABLE=$(PARAM_S_KEEP_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).S_KEEP_WIDTH=$(PARAM_S_KEEP_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).M_DATA_WIDTH=$(PARAM_M_DATA_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).M_KEEP_ENABLE=$(PARAM_M_KEEP_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).M_KEEP_WIDTH=$(PARAM_M_KEEP_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).ID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).S_ID_WIDTH=$(PARAM_S_ID_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).M_ID_WIDTH=$(PARAM_M_ID_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).S_DEST_WIDTH=$(PARAM_S_DEST_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).M_DEST_WIDTH=$(PARAM_M_DEST_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).USER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).USER_BAD_FRAME_VALUE=$(PARAM_USER_BAD_FRAME_VALUE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_BAD_FRAME_MASK=$(PARAM_USER_BAD_FRAME_MASK) - COMPILE_ARGS += -P $(TOPLEVEL).DROP_BAD_FRAME=$(PARAM_DROP_BAD_FRAME) - COMPILE_ARGS += -P $(TOPLEVEL).DROP_WHEN_FULL=$(PARAM_DROP_WHEN_FULL) - COMPILE_ARGS += -P $(TOPLEVEL).UPDATE_TID=$(PARAM_UPDATE_TID) - COMPILE_ARGS += -P $(TOPLEVEL).ARB_TYPE_ROUND_ROBIN=$(PARAM_ARB_TYPE_ROUND_ROBIN) - COMPILE_ARGS += -P $(TOPLEVEL).ARB_LSB_HIGH_PRIORITY=$(PARAM_ARB_LSB_HIGH_PRIORITY) - COMPILE_ARGS += -P $(TOPLEVEL).RAM_PIPELINE=$(PARAM_RAM_PIPELINE) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-P $(TOPLEVEL).$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) VERILOG_SOURCES += iverilog_dump.v @@ -100,30 +77,7 @@ ifeq ($(SIM), icarus) else ifeq ($(SIM), verilator) COMPILE_ARGS += -Wno-SELRANGE -Wno-WIDTH - COMPILE_ARGS += -GFIFO_DEPTH=$(PARAM_FIFO_DEPTH) - COMPILE_ARGS += -GCMD_FIFO_DEPTH=$(PARAM_CMD_FIFO_DEPTH) - COMPILE_ARGS += -GSPEEDUP=$(PARAM_SPEEDUP) - COMPILE_ARGS += -GS_DATA_WIDTH=$(PARAM_S_DATA_WIDTH) - COMPILE_ARGS += -GS_KEEP_ENABLE=$(PARAM_S_KEEP_ENABLE) - COMPILE_ARGS += -GS_KEEP_WIDTH=$(PARAM_S_KEEP_WIDTH) - COMPILE_ARGS += -GM_DATA_WIDTH=$(PARAM_M_DATA_WIDTH) - COMPILE_ARGS += -GM_KEEP_ENABLE=$(PARAM_M_KEEP_ENABLE) - COMPILE_ARGS += -GM_KEEP_WIDTH=$(PARAM_M_KEEP_WIDTH) - COMPILE_ARGS += -GID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -GS_ID_WIDTH=$(PARAM_S_ID_WIDTH) - COMPILE_ARGS += -GM_ID_WIDTH=$(PARAM_M_ID_WIDTH) - COMPILE_ARGS += -GS_DEST_WIDTH=$(PARAM_S_DEST_WIDTH) - COMPILE_ARGS += -GM_DEST_WIDTH=$(PARAM_M_DEST_WIDTH) - COMPILE_ARGS += -GUSER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -GUSER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -GUSER_BAD_FRAME_VALUE=$(PARAM_USER_BAD_FRAME_VALUE) - COMPILE_ARGS += -GUSER_BAD_FRAME_MASK=$(PARAM_USER_BAD_FRAME_MASK) - COMPILE_ARGS += -GDROP_BAD_FRAME=$(PARAM_DROP_BAD_FRAME) - COMPILE_ARGS += -GDROP_WHEN_FULL=$(PARAM_DROP_WHEN_FULL) - COMPILE_ARGS += -GUPDATE_TID=$(PARAM_UPDATE_TID) - COMPILE_ARGS += -GARB_TYPE_ROUND_ROBIN=$(PARAM_ARB_TYPE_ROUND_ROBIN) - COMPILE_ARGS += -GARB_LSB_HIGH_PRIORITY=$(PARAM_ARB_LSB_HIGH_PRIORITY) - COMPILE_ARGS += -GRAM_PIPELINE=$(PARAM_RAM_PIPELINE) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-G$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) COMPILE_ARGS += --trace-fst diff --git a/tb/axis_rate_limit/Makefile b/tb/axis_rate_limit/Makefile index 002d611ce..858372c43 100644 --- a/tb/axis_rate_limit/Makefile +++ b/tb/axis_rate_limit/Makefile @@ -46,16 +46,7 @@ export PARAM_USER_WIDTH ?= 1 ifeq ($(SIM), icarus) PLUSARGS += -fst - COMPILE_ARGS += -P $(TOPLEVEL).DATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).LAST_ENABLE=$(PARAM_LAST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).USER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_WIDTH=$(PARAM_USER_WIDTH) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-P $(TOPLEVEL).$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) VERILOG_SOURCES += iverilog_dump.v @@ -64,16 +55,7 @@ ifeq ($(SIM), icarus) else ifeq ($(SIM), verilator) COMPILE_ARGS += -Wno-SELRANGE -Wno-WIDTH - COMPILE_ARGS += -GDATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -GKEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -GKEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -GLAST_ENABLE=$(PARAM_LAST_ENABLE) - COMPILE_ARGS += -GID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -GID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -GDEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -GDEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -GUSER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -GUSER_WIDTH=$(PARAM_USER_WIDTH) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-G$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) COMPILE_ARGS += --trace-fst diff --git a/tb/axis_register/Makefile b/tb/axis_register/Makefile index 0a2e2e9de..9015a57c9 100644 --- a/tb/axis_register/Makefile +++ b/tb/axis_register/Makefile @@ -47,17 +47,7 @@ export PARAM_REG_TYPE ?= 2 ifeq ($(SIM), icarus) PLUSARGS += -fst - COMPILE_ARGS += -P $(TOPLEVEL).DATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).LAST_ENABLE=$(PARAM_LAST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).USER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).REG_TYPE=$(PARAM_REG_TYPE) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-P $(TOPLEVEL).$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) VERILOG_SOURCES += iverilog_dump.v @@ -66,17 +56,7 @@ ifeq ($(SIM), icarus) else ifeq ($(SIM), verilator) COMPILE_ARGS += -Wno-SELRANGE -Wno-WIDTH - COMPILE_ARGS += -GDATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -GKEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -GKEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -GLAST_ENABLE=$(PARAM_LAST_ENABLE) - COMPILE_ARGS += -GID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -GID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -GDEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -GDEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -GUSER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -GUSER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -GREG_TYPE=$(PARAM_REG_TYPE) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-G$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) COMPILE_ARGS += --trace-fst diff --git a/tb/axis_srl_fifo/Makefile b/tb/axis_srl_fifo/Makefile index 43b43716c..2d25adf0d 100644 --- a/tb/axis_srl_fifo/Makefile +++ b/tb/axis_srl_fifo/Makefile @@ -46,16 +46,7 @@ export PARAM_USER_WIDTH ?= 1 ifeq ($(SIM), icarus) PLUSARGS += -fst - COMPILE_ARGS += -P $(TOPLEVEL).DEPTH=$(PARAM_DEPTH) - COMPILE_ARGS += -P $(TOPLEVEL).DATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).ID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).USER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_WIDTH=$(PARAM_USER_WIDTH) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-P $(TOPLEVEL).$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) VERILOG_SOURCES += iverilog_dump.v @@ -64,16 +55,7 @@ ifeq ($(SIM), icarus) else ifeq ($(SIM), verilator) COMPILE_ARGS += -Wno-SELRANGE -Wno-WIDTH - COMPILE_ARGS += -GDEPTH=$(PARAM_DEPTH) - COMPILE_ARGS += -GDATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -GKEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -GKEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -GID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -GID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -GDEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -GDEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -GUSER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -GUSER_WIDTH=$(PARAM_USER_WIDTH) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-G$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) COMPILE_ARGS += --trace-fst diff --git a/tb/axis_srl_register/Makefile b/tb/axis_srl_register/Makefile index d7c66b764..7a6e63cf1 100644 --- a/tb/axis_srl_register/Makefile +++ b/tb/axis_srl_register/Makefile @@ -46,16 +46,7 @@ export PARAM_USER_WIDTH ?= 1 ifeq ($(SIM), icarus) PLUSARGS += -fst - COMPILE_ARGS += -P $(TOPLEVEL).DATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).LAST_ENABLE=$(PARAM_LAST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).ID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).DEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).USER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_WIDTH=$(PARAM_USER_WIDTH) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-P $(TOPLEVEL).$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) VERILOG_SOURCES += iverilog_dump.v @@ -64,16 +55,7 @@ ifeq ($(SIM), icarus) else ifeq ($(SIM), verilator) COMPILE_ARGS += -Wno-SELRANGE -Wno-WIDTH - COMPILE_ARGS += -GDATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -GKEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -GKEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -GLAST_ENABLE=$(PARAM_LAST_ENABLE) - COMPILE_ARGS += -GID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -GID_WIDTH=$(PARAM_ID_WIDTH) - COMPILE_ARGS += -GDEST_ENABLE=$(PARAM_DEST_ENABLE) - COMPILE_ARGS += -GDEST_WIDTH=$(PARAM_DEST_WIDTH) - COMPILE_ARGS += -GUSER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -GUSER_WIDTH=$(PARAM_USER_WIDTH) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-G$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) COMPILE_ARGS += --trace-fst diff --git a/tb/axis_switch/Makefile b/tb/axis_switch/Makefile index a59fb3dbe..229f5f8c8 100644 --- a/tb/axis_switch/Makefile +++ b/tb/axis_switch/Makefile @@ -59,21 +59,7 @@ export PARAM_ARB_LSB_HIGH_PRIORITY ?= 1 ifeq ($(SIM), icarus) PLUSARGS += -fst - COMPILE_ARGS += -P $(TOPLEVEL).DATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).KEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).ID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).S_ID_WIDTH=$(PARAM_S_ID_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).M_ID_WIDTH=$(PARAM_M_ID_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).S_DEST_WIDTH=$(PARAM_S_DEST_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).M_DEST_WIDTH=$(PARAM_M_DEST_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).USER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -P $(TOPLEVEL).USER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -P $(TOPLEVEL).UPDATE_TID=$(PARAM_UPDATE_TID) - COMPILE_ARGS += -P $(TOPLEVEL).S_REG_TYPE=$(PARAM_S_REG_TYPE) - COMPILE_ARGS += -P $(TOPLEVEL).M_REG_TYPE=$(PARAM_M_REG_TYPE) - COMPILE_ARGS += -P $(TOPLEVEL).ARB_TYPE_ROUND_ROBIN=$(PARAM_ARB_TYPE_ROUND_ROBIN) - COMPILE_ARGS += -P $(TOPLEVEL).ARB_LSB_HIGH_PRIORITY=$(PARAM_ARB_LSB_HIGH_PRIORITY) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-P $(TOPLEVEL).$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) VERILOG_SOURCES += iverilog_dump.v @@ -82,21 +68,7 @@ ifeq ($(SIM), icarus) else ifeq ($(SIM), verilator) COMPILE_ARGS += -Wno-SELRANGE -Wno-WIDTH - COMPILE_ARGS += -GDATA_WIDTH=$(PARAM_DATA_WIDTH) - COMPILE_ARGS += -GKEEP_ENABLE=$(PARAM_KEEP_ENABLE) - COMPILE_ARGS += -GKEEP_WIDTH=$(PARAM_KEEP_WIDTH) - COMPILE_ARGS += -GID_ENABLE=$(PARAM_ID_ENABLE) - COMPILE_ARGS += -GS_ID_WIDTH=$(PARAM_S_ID_WIDTH) - COMPILE_ARGS += -GM_ID_WIDTH=$(PARAM_M_ID_WIDTH) - COMPILE_ARGS += -GS_DEST_WIDTH=$(PARAM_S_DEST_WIDTH) - COMPILE_ARGS += -GM_DEST_WIDTH=$(PARAM_M_DEST_WIDTH) - COMPILE_ARGS += -GUSER_ENABLE=$(PARAM_USER_ENABLE) - COMPILE_ARGS += -GUSER_WIDTH=$(PARAM_USER_WIDTH) - COMPILE_ARGS += -GUPDATE_TID=$(PARAM_UPDATE_TID) - COMPILE_ARGS += -GS_REG_TYPE=$(PARAM_S_REG_TYPE) - COMPILE_ARGS += -GM_REG_TYPE=$(PARAM_M_REG_TYPE) - COMPILE_ARGS += -GARB_TYPE_ROUND_ROBIN=$(PARAM_ARB_TYPE_ROUND_ROBIN) - COMPILE_ARGS += -GARB_LSB_HIGH_PRIORITY=$(PARAM_ARB_LSB_HIGH_PRIORITY) + COMPILE_ARGS += $(foreach v,$(filter PARAM_%,$(.VARIABLES)),-G$(subst PARAM_,,$(v))=$($(v))) ifeq ($(WAVES), 1) COMPILE_ARGS += --trace-fst