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
33 lines
1.1 KiB
Makefile
33 lines
1.1 KiB
Makefile
SIM_ROOT := $(abspath ../../..)
|
|
RTL_ROOT := $(abspath $(SIM_ROOT)/../rtl)
|
|
include $(SIM_ROOT)/mk/rtl-sources.mk
|
|
|
|
TOPLEVEL := candidate_fifo
|
|
COCOTB_TEST_MODULES := tests.modules.candidate_fifo.test_candidate_fifo
|
|
VERILOG_SOURCES := $(RTL_ROOT)/core/candidate_fifo.sv
|
|
|
|
# Allow override from command line (e.g. make FIFO_DEPTH=10)
|
|
FIFO_DEPTH ?= 16
|
|
EXTRA_ARGS += +define+FIFO_DEPTH=$(FIFO_DEPTH)
|
|
|
|
# Parameter-specific build directory so depth variants never collide.
|
|
SIM_BUILD := sim_build/fifo_depth_$(FIFO_DEPTH)
|
|
|
|
include $(SIM_ROOT)/mk/cocotb-common.mk
|
|
|
|
# ── Depth-specific test targets ──────────────────────────────────────────
|
|
# Recompile with a non-default DEPTH and filter to the relevant test(s).
|
|
.PHONY: test-depth-10 test-depth-1
|
|
|
|
test-depth-10:
|
|
$(MAKE) -B -f Makefile results.xml FIFO_DEPTH=10 \
|
|
COCOTB_TEST_FILTER=non_power_of_two
|
|
|
|
test-depth-1:
|
|
$(MAKE) -B -f Makefile results.xml FIFO_DEPTH=1 \
|
|
COCOTB_TEST_FILTER=depth_one
|
|
|
|
# Also remove variant build directories on clean.
|
|
clean::
|
|
rm -rf sim_build/fifo_depth_10 sim_build/fifo_depth_1
|