mirror of
https://github.com/SikongJueluo/Mini-Nav.git
synced 2026-07-12 20:15:31 +08:00
- add TOPK_K, FIFO_DEPTH, RESULT_SERIAL parameters to cam_params - add candidate_fifo: synchronous ready/valid FIFO for (row, score) candidates - add topk_tracker: tracks top-K candidates with clear/ready handshake - add result_serializer: serializes packed Top-K array into rank-ordered stream - refactor match_engine_pipeline from 4-state to 8-state Top-K pipeline - extend cam_top with serial Top-K interface (result_rank/row/score/last) - add backward-compatible top1_index/top1_score aliases from rank-0 beat - add comprehensive tests for all new modules
30 lines
985 B
Makefile
30 lines
985 B
Makefile
SIM_ROOT := $(abspath ../../..)
|
|
RTL_ROOT := $(abspath $(SIM_ROOT)/../rtl)
|
|
include $(SIM_ROOT)/mk/rtl-sources.mk
|
|
|
|
TOPLEVEL := match_engine_pipeline
|
|
COCOTB_TEST_MODULES := tests.modules.match_engine_pipeline.test_match_engine_pipeline
|
|
VERILOG_SOURCES := $(RTL_MATCH_ENGINE)
|
|
|
|
# Allow override from command line (e.g. make TOPK_K=1)
|
|
TOPK_K ?= 4
|
|
EXTRA_ARGS += +define+TOPK_K=$(TOPK_K)
|
|
export TOPK_K
|
|
|
|
# Parameter-specific build directory so K variants never collide.
|
|
SIM_BUILD := sim_build/k_$(TOPK_K)
|
|
|
|
include $(SIM_ROOT)/mk/cocotb-common.mk
|
|
|
|
# ── K-specific test targets ──────────────────────────────────────────────
|
|
# Recompile with K=1 and filter to the K=1 test.
|
|
.PHONY: test-k1
|
|
|
|
test-k1:
|
|
$(MAKE) -B -f Makefile results.xml TOPK_K=1 \
|
|
COCOTB_TEST_FILTER=match_engine_topk_k1
|
|
|
|
# Also remove all module-local build artifacts, including legacy and variant dirs.
|
|
clean::
|
|
rm -rf sim_build
|