refactor(cam): rename read-noise path to read-pass-through and reorganize test module structure

- Rename `read_noise` scenarios and noise_mode to `read_pass_through` across
  run_cam_correctness.py, test_run_cam_correctness.py, and Makefiles
- Update RTL comment in match_engine_pipeline.sv to reflect pass-through behavior
- Move unit-level cocotb tests from `tests.test_*` flat namespace to
  `tests.modules.*` and `tests.top.*` subdirectory layout, matching actual
  Makefile paths (hw/sim/tests/modules/..., hw/sim/tests/top/...)
- Remove redundant dual-noise subtarget from read_noise/Makefile
- Update help text and docs to reflect read-path pass-through semantics
- Add .codegraph to .gitignore
This commit is contained in:
2026-05-27 13:53:36 +08:00
parent 8b4d4c1b57
commit d6e1b9d8ba
9 changed files with 72 additions and 85 deletions

View File

@@ -7,11 +7,11 @@ TOP_CONFIGS := no_noise write_noise read_noise
help:
@echo "Available hw/sim targets:"
@echo " make test-model"
@echo " make test-top # 默认运行所有顶层噪声配置"
@echo " make test-top-all # 运行所有顶层噪声配置"
@echo " make test-top # 默认运行所有顶层配置"
@echo " make test-top-all # 运行所有顶层配置"
@echo " make test-top-no_noise # 无噪声集成测试"
@echo " make test-top-write_noise # 写入噪声集成测试"
@echo " make test-top-read_noise # 读取噪声集成测试"
@echo " make test-top-read_noise # 读取路径 pass-through 集成测试"
@echo " make test-module MODULE=cam_core_banked"
@echo " make test-modules"
@echo " make test-perf"

View File

@@ -52,7 +52,7 @@ async def read_noise_disabled_forwards_hashes_after_one_stage(dut):
@cocotb.test()
async def read_noise_enabled_still_forwards_hashes_unmodified(dut):
"""With READ_NOISE_EN=1, the pass-through still forwards hashes unmodified."""
"""The read path pass-through forwards hashes unmodified."""
cocotb.start_soon(Clock(dut.clk, 10, unit="ns").start())
await reset_read_noise(dut)

View File

@@ -6,17 +6,10 @@ TOPLEVEL := cam_top
COCOTB_TEST_MODULES := tests.top.read_noise.test_read_noise
VERILOG_SOURCES := $(RTL_CAM_TOP)
# 读取噪声开启Phase 2 后为 pass-through,写入噪声默认关闭
# 读取路径 pass-through 配置,写入噪声默认关闭
WRITE_NOISE_EN := 0
include $(SIM_ROOT)/mk/cocotb-common.mk
# ── 写入+读取双重噪声子目标 ─────────────────────────────────────────
.PHONY: test-with-write-noise
test-with-write-noise:
$(MAKE) -B -f Makefile results.xml WRITE_NOISE_EN=1 \
COCOTB_TEST_FILTER=read_noise_model_match
clean::
rm -rf sim_build