Files
Mini-Nav/hw/sim/tests/modules/result_serializer/Makefile
SikongJueluo e4cbb5e30d feat(hw/rtl): implement full Top-K CAM search pipeline with serial result output
- 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
2026-05-19 22:43:21 +08:00

30 lines
963 B
Makefile

SIM_ROOT := $(abspath ../../..)
RTL_ROOT := $(abspath $(SIM_ROOT)/../rtl)
include $(SIM_ROOT)/mk/rtl-sources.mk
TOPLEVEL := result_serializer
COCOTB_TEST_MODULES := tests.modules.result_serializer.test_result_serializer
VERILOG_SOURCES := $(RTL_ROOT)/core/result_serializer.sv
# 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=serializer_handles_k1
# Also remove variant build directories on clean.
clean::
rm -rf sim_build/k_1