mirror of
https://github.com/SikongJueluo/Mini-Nav.git
synced 2026-07-13 04:25:32 +08:00
- Split monolithic hw/sim/Makefile into modular include files (mk/cocotb-common.mk, mk/rtl-sources.mk) - Add per-module test Makefiles (cam_core_banked, cam_read_noise, cam_write_noise, match_engine_pipeline, perf, top) - Add missing simulation tools (yosys, graphviz, xdot) to devenv.nix - Fix path handling in sweep_noise.py and test modules to be HASH_BITS-aware
42 lines
1.0 KiB
Makefile
42 lines
1.0 KiB
Makefile
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-%)
|
|
|
|
help:
|
|
@echo "Available hw/sim targets:"
|
|
@echo " make test-model"
|
|
@echo " make test-top"
|
|
@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 test-modules
|
|
|
|
test-top:
|
|
$(MAKE) -C tests/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:
|
|
uv run pytest tests/model -q
|
|
|
|
test-perf:
|
|
$(MAKE) -C tests/perf
|
|
|
|
clean:
|
|
$(MAKE) -C tests/top clean
|
|
@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
|