feat(sim): add CAM performance sweep test infrastructure

- hw/sim/tests/test_cam_perf.py: new cocotb perf test with bounded wait helpers
- scripts/sweep_cam_perf.py: sweep data model, matrix, and make command builders  
- tests/test_sweep_cam_perf.py: unit tests for sweep helpers
- tests/conftest.py: pytest path configuration for scripts package
- hw/sim/Makefile: deterministic noise params override for perf test compatibility
This commit is contained in:
2026-05-15 18:43:25 +08:00
parent 24b8750f0f
commit 2e0e36eea5
5 changed files with 1396 additions and 0 deletions

View File

@@ -27,6 +27,18 @@ READ_NOISE_RATE_NUM ?=
READ_NOISE_RATE_DEN ?=
READ_NOISE_BITS ?=
# Perf-test compatibility override: when running cam_perf, force deterministic
# noise parameters so noise_mask_grouped.sv elaborates correctly for perf
# sweep HASH_BITS values (64, 128, 192, 256, 320, 384, 448, 512 — all
# divisible by 64 such that HASH_BITS / NOISE_BITS == 64 in the RTL).
# This is a testbench parameter, not a hardware performance/resource claim.
ifeq ($(COCOTB_TEST_MODULES),tests.test_cam_perf)
WRITE_NOISE_EN := 0
READ_NOISE_EN := 0
WRITE_NOISE_BITS := $(shell echo $$(( $(HASH_BITS) / 64 )))
READ_NOISE_BITS := $(shell echo $$(( $(HASH_BITS) / 64 )))
endif
ifneq ($(strip $(WRITE_NOISE_EN)),)
COMPILE_ARGS += -GWRITE_NOISE_EN=$(WRITE_NOISE_EN)
endif