feat(sim): enable read noise by default and improve test infrastructure

- Set READ_NOISE_EN=1 as default in cam_top.sv
- Wire READ_NOISE_* parameters to NOISE_* makefile variables in cocotb-common.mk
- Add PYTHON env variable support in Makefile for test invocation
- Update .gitignore with glob patterns (**/sim_build/, **/results.xml, *.fst)
- Add justfile recipe for remote cam-test-top execution
This commit is contained in:
2026-05-16 20:44:47 +08:00
parent e7765cdb76
commit e8c890a69f
5 changed files with 14 additions and 8 deletions

View File

@@ -1,3 +1,4 @@
PYTHON ?= python
MODULE_TESTS := cam_core_banked match_engine_pipeline cam_write_noise cam_read_noise
.PHONY: help test-all test-top test-modules test-module test-model test-perf clean $(MODULE_TESTS:%=test-module-%)
@@ -27,7 +28,7 @@ $(MODULE_TESTS:%=test-module-%):
$(MAKE) -C tests/modules/$(@:test-module-%=%)
test-model:
uv run pytest tests/model -q
env -u PYTHONPATH -u PYTHONHOME $(PYTHON) -m pytest tests/model -q
test-perf:
$(MAKE) -C tests/perf

View File

@@ -37,10 +37,10 @@ WRITE_NOISE_EN ?= $(NOISE_EN)
WRITE_NOISE_RATE_NUM ?= $(NOISE_RATE_NUM)
WRITE_NOISE_RATE_DEN ?= $(NOISE_RATE_DEN)
WRITE_NOISE_BITS ?= $(NOISE_BITS)
READ_NOISE_EN ?=
READ_NOISE_RATE_NUM ?=
READ_NOISE_RATE_DEN ?=
READ_NOISE_BITS ?=
READ_NOISE_EN ?= $(NOISE_EN)
READ_NOISE_RATE_NUM ?= $(NOISE_RATE_NUM)
READ_NOISE_RATE_DEN ?= $(NOISE_RATE_DEN)
READ_NOISE_BITS ?= $(NOISE_BITS)
ifneq ($(strip $(WRITE_NOISE_EN)),)
COMPILE_ARGS += -GWRITE_NOISE_EN=$(WRITE_NOISE_EN)