mirror of
https://github.com/SikongJueluo/Mini-Nav.git
synced 2026-07-12 20:15:31 +08:00
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:
5
hw/.gitignore
vendored
5
hw/.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
sim/sim_build
|
||||
sim/results.xml
|
||||
**/sim_build/
|
||||
**/results.xml
|
||||
*.fst
|
||||
|
||||
@@ -7,7 +7,7 @@ module cam_top #(
|
||||
parameter int WRITE_NOISE_RATE_DEN = 100,
|
||||
parameter int WRITE_NOISE_BITS = 8,
|
||||
parameter logic [63:0] WRITE_NOISE_SEED = 64'hB504_F32D_B504_F32D,
|
||||
parameter bit READ_NOISE_EN = 1'b0,
|
||||
parameter bit READ_NOISE_EN = 1'b1,
|
||||
parameter int READ_NOISE_RATE_NUM = 1,
|
||||
parameter int READ_NOISE_RATE_DEN = 100,
|
||||
parameter int READ_NOISE_BITS = 8,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user