Skip to content

Commit 04d7b4d

Browse files
committed
Rework passing configuration to tests
Signed-off-by: Jan Malek <[email protected]>
1 parent 255136d commit 04d7b4d

File tree

10 files changed

+16
-17
lines changed

10 files changed

+16
-17
lines changed

Makefile

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,30 +96,25 @@ build-verilator:
9696
#
9797
# Tests
9898
#
99-
test: config ## Run single module test (use `TEST=<test_name>` flag)
99+
test: ## Run single module test (use `TEST=<test_name>` flag)
100100
cd $(COCOTB_VERIF_DIR) && $(PYTHON) -m nox -R -s $(TEST)_verify --no-venv --forcecolor
101101

102102
tests-axi: ## Run all verification/cocotb/* RTL tests for AXI bus configuration without coverage
103-
$(MAKE) config CFG_NAME=axi
104-
cd $(COCOTB_VERIF_DIR) && $(PYTHON) -m nox -R -t "axi" --no-venv --forcecolor
103+
cd $(COCOTB_VERIF_DIR) && CFG_NAME=axi $(PYTHON) -m nox -R -t "axi" --no-venv --forcecolor
105104

106105
tests-axi-ff: ## Run all verification/cocotb/* RTL tests for AXI bus configuration without coverage (input FF enabled)
107-
$(MAKE) config CFG_NAME=axi_ff
108-
cd $(COCOTB_VERIF_DIR) && $(PYTHON) -m nox -R -t "axi" --no-venv --forcecolor -- +MinSystemClockFrequency=200.0
106+
cd $(COCOTB_VERIF_DIR) && CFG_NAME=axi_ff $(PYTHON) -m nox -R -t "axi" --no-venv --forcecolor -- +MinSystemClockFrequency=200.0
109107

110108
tests-ahb: ## Run all verification/cocotb/* RTL tests for AHB bus configuration without coverage
111-
$(MAKE) config CFG_NAME=ahb
112-
cd $(COCOTB_VERIF_DIR) && $(PYTHON) -m nox -R -t "ahb" --no-venv --forcecolor
109+
cd $(COCOTB_VERIF_DIR) && CFG_NAME=ahb $(PYTHON) -m nox -R -t "ahb" --no-venv --forcecolor
113110

114111
tests-ahb-ff: ## Run all verification/cocotb/* RTL tests for AHB bus configuration without coverage (input FF enabled)
115-
$(MAKE) config CFG_NAME=ahb_ff
116-
cd $(COCOTB_VERIF_DIR) && $(PYTHON) -m nox -R -t "ahb" --no-venv --forcecolor -- +MinSystemClockFrequency=200.0
112+
cd $(COCOTB_VERIF_DIR) && CFG_NAME=ahb_ff $(PYTHON) -m nox -R -t "ahb" --no-venv --forcecolor -- +MinSystemClockFrequency=200.0
117113

118114
tests: tests-axi tests-ahb ## Run all verification/cocotb/* RTL tests fro AHB and AXI bus configurations without coverage
119115

120116
tests-i2c: ## Run all I2C tests without coverage
121-
$(MAKE) config CFG_NAME=ahb
122-
cd $(COCOTB_VERIF_DIR) && $(PYTHON) -m nox -R -t "i2c" --no-venv --forcecolor
117+
cd $(COCOTB_VERIF_DIR) && CFG_NAME=ahb $(PYTHON) -m nox -R -t "i2c" --no-venv --forcecolor
123118

124119
# TODO: Enable full coverage flow
125120
tests-coverage: ## Run all verification/block/* RTL tests with coverage

verification/cocotb/block/ahb_if/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ override PLUSARGS := $(strip +FrontendBusInterface=AHB $(PLUSARGS))
1414

1515
MODULE ?= $(subst $(space),$(comma),$(subst .py,,$(TEST_FILES)))
1616
TOPLEVEL = ahb_if_wrapper
17-
CFG_NAME = ahb
17+
override CFG_NAME = ahb
1818

1919
VERILOG_SOURCES = \
2020
$(CALIPTRA_ROOT)/src/libs/rtl/ahb_defines_pkg.sv \

verification/cocotb/block/axi_adapter/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ override PLUSARGS := $(strip +FrontendBusInterface=AXI $(PLUSARGS))
1414

1515
MODULE ?= $(subst $(space),$(comma),$(subst .py,,$(TEST_FILES)))
1616
TOPLEVEL = axi_adapter_wrapper
17+
override CFG_NAME = axi
1718

1819
VERILOG_SOURCES = \
1920
$(CALIPTRA_ROOT)/src/caliptra_prim/rtl/caliptra_prim_pkg.sv \

verification/cocotb/block/axi_adapter_id_filter/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ override PLUSARGS := $(strip +FrontendBusInterface=AXI $(PLUSARGS))
1414

1515
MODULE ?= $(subst $(space),$(comma),$(subst .py,,$(TEST_FILES)))
1616
TOPLEVEL = axi_adapter_wrapper
17-
CFG_NAME = axi
18-
CFG_FILE = $(TEST_DIR)/i3c_cfg.yaml
17+
override CFG_NAME = axi
18+
override CFG_FILE = $(TEST_DIR)/i3c_cfg.yaml
1919

2020
VERILOG_SOURCES = \
2121
$(CALIPTRA_ROOT)/src/caliptra_prim/rtl/caliptra_prim_pkg.sv \

verification/cocotb/block/hci_queues_ahb/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ TEST_FILES = $(sort $(wildcard test_*.py))
1111

1212
MODULE ?= $(subst $(space),$(comma),$(subst .py,,$(TEST_FILES)))
1313
TOPLEVEL = hci_queues_wrapper
14-
CFG_NAME = ahb
14+
override CFG_NAME = ahb
1515

1616
# Set appropriate bus interface via Cocotb's PLUSARGS:
1717
override PLUSARGS := $(strip +FrontendBusInterface=AHB $(PLUSARGS))

verification/cocotb/block/hci_queues_axi/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ TEST_FILES = $(sort $(wildcard test_*.py))
1111

1212
MODULE ?= $(subst $(space),$(comma),$(subst .py,,$(TEST_FILES)))
1313
TOPLEVEL = hci_queues_wrapper
14+
override CFG_NAME = axi
1415

1516
# Set appropriate bus interface via Cocotb's PLUSARGS:
1617
override PLUSARGS := $(strip +FrontendBusInterface=AXI $(PLUSARGS))

verification/cocotb/block/tti_queues_ahb/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ TEST_FILES = $(sort $(wildcard test_*.py))
1111

1212
MODULE ?= $(subst $(space),$(comma),$(subst .py,,$(TEST_FILES)))
1313
TOPLEVEL = hci_queues_wrapper
14+
override CFG_NAME = ahb
1415

1516
# Set appropriate bus interface via Cocotb's PLUSARGS:
1617
override PLUSARGS := $(strip +FrontendBusInterface=AHB $(PLUSARGS))

verification/cocotb/block/tti_queues_axi/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ TEST_FILES = $(sort $(wildcard test_*.py))
1111

1212
MODULE ?= $(subst $(space),$(comma),$(subst .py,,$(TEST_FILES)))
1313
TOPLEVEL = hci_queues_wrapper
14+
override CFG_NAME = axi
1415

1516
# Set appropriate bus interface via Cocotb's PLUSARGS:
1617
override PLUSARGS := $(strip +FrontendBusInterface=AXI $(PLUSARGS))

verification/cocotb/top/i3c_ahb/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ TEST_FILES = $(sort $(wildcard test_*.py))
1212

1313
MODULE ?= $(subst $(space),$(comma),$(subst .py,,$(TEST_FILES)))
1414
TOPLEVEL = i3c_test_wrapper
15-
CFG_NAME = ahb
15+
override CFG_NAME = ahb
1616

1717
# Set appropriate bus interface via Cocotb's PLUSARGS:
1818
override PLUSARGS := $(strip +FrontendBusInterface=AHB $(PLUSARGS))

verification/cocotb/top/i3c_axi/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ TEST_FILES = $(sort $(wildcard test_*.py))
1212

1313
MODULE ?= $(subst $(space),$(comma),$(subst .py,,$(TEST_FILES)))
1414
TOPLEVEL = i3c_test_wrapper
15-
CFG_NAME = axi_bypass
15+
override CFG_NAME = axi_bypass
1616

1717
# Set appropriate bus interface via Cocotb's PLUSARGS:
1818
override PLUSARGS := $(strip +FrontendBusInterface=AXI $(PLUSARGS))

0 commit comments

Comments
 (0)