mirror of
https://github.com/SikongJueluo/Mini-Nav.git
synced 2026-07-12 20:15:31 +08:00
- Emit rd_valid_o for exactly one combinational cycle before waiting for read response, ensuring the read-noise PRNG advances once per batch issue - Fix query handshake: wait for query_ready before asserting query_valid to avoid valid&&ready handshake drops on clock edges - Add dynamic timeout estimation in test utilities based on DUT parameters - Update test-top Makefile to run all noise configurations by default - Remove uv run prefix from cocotb-config Makefile invocation
54 lines
1.7 KiB
Makefile
54 lines
1.7 KiB
Makefile
PYTHON ?= python
|
|
MODULE_TESTS := cam_core_banked candidate_fifo match_engine_pipeline cam_write_noise cam_read_noise popcount_pipeline topk_tracker result_serializer
|
|
TOP_CONFIGS := no_noise write_noise read_noise
|
|
|
|
.PHONY: help test-all test-top test-top-all test-modules test-module test-model test-perf clean $(MODULE_TESTS:%=test-module-%) $(TOP_CONFIGS:%=test-top-%)
|
|
|
|
help:
|
|
@echo "Available hw/sim targets:"
|
|
@echo " make test-model"
|
|
@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-module MODULE=cam_core_banked"
|
|
@echo " make test-modules"
|
|
@echo " make test-perf"
|
|
@echo " make test-all"
|
|
@echo " make clean"
|
|
|
|
test-all: test-model test-top-all test-modules
|
|
|
|
test-top: test-top-all
|
|
|
|
test-top-all: $(TOP_CONFIGS:%=test-top-%)
|
|
|
|
$(TOP_CONFIGS:%=test-top-%):
|
|
$(MAKE) -C tests/top/$(@:test-top-%=%)
|
|
|
|
test-modules: $(MODULE_TESTS:%=test-module-%)
|
|
|
|
test-module:
|
|
@test -n "$(MODULE)" || (echo "Usage: make test-module MODULE=<name>"; exit 2)
|
|
$(MAKE) -C tests/modules/$(MODULE)
|
|
|
|
$(MODULE_TESTS:%=test-module-%):
|
|
$(MAKE) -C tests/modules/$(@:test-module-%=%)
|
|
|
|
test-model:
|
|
env -u PYTHONPATH -u PYTHONHOME $(PYTHON) -m pytest tests/model -q
|
|
|
|
test-perf:
|
|
$(MAKE) -C tests/perf
|
|
|
|
clean:
|
|
@for config in $(TOP_CONFIGS); do \
|
|
$(MAKE) -C tests/top/$$config clean || exit $$?; \
|
|
done
|
|
@for module in $(MODULE_TESTS); do \
|
|
$(MAKE) -C tests/modules/$$module clean || exit $$?; \
|
|
done
|
|
$(MAKE) -C tests/perf clean
|
|
rm -rf .pytest_cache tests/model/.pytest_cache
|