mirror of
https://github.com/SikongJueluo/Mini-Nav.git
synced 2026-07-13 04:25:32 +08:00
- Make cam_read_noise a pass-through module, removing all noise injection logic - Switch write noise to use noise_mask_bernoulli instead of noise_mask_grouped - Add state machine to cam_write_noise for mask generation timing - Remove noise_mask_grouped.sv (no longer needed) - Remove read noise parameters from cam_noisy and cam_top - Update simulation and benchmark code to reflect read noise removal - Sync documentation to reflect Phase 2 architecture
64 lines
1.7 KiB
Makefile
64 lines
1.7 KiB
Makefile
ifndef SIM_ROOT
|
|
$(error SIM_ROOT must be set before including mk/cocotb-common.mk)
|
|
endif
|
|
|
|
ifndef RTL_ROOT
|
|
$(error RTL_ROOT must be set before including mk/cocotb-common.mk)
|
|
endif
|
|
|
|
ifndef TOPLEVEL
|
|
$(error TOPLEVEL must be set before including mk/cocotb-common.mk)
|
|
endif
|
|
|
|
ifndef COCOTB_TEST_MODULES
|
|
$(error COCOTB_TEST_MODULES must be set before including mk/cocotb-common.mk)
|
|
endif
|
|
|
|
ifndef VERILOG_SOURCES
|
|
$(error VERILOG_SOURCES must be set before including mk/cocotb-common.mk)
|
|
endif
|
|
|
|
SIM ?= verilator
|
|
TOPLEVEL_LANG ?= verilog
|
|
|
|
NUM_ROWS ?= 4096
|
|
HASH_BITS ?= 512
|
|
LANES ?= 8
|
|
TOPK_K ?= 4
|
|
|
|
EXTRA_ARGS += +define+NUM_ROWS=$(NUM_ROWS) +define+HASH_BITS=$(HASH_BITS) +define+LANES=$(LANES) +define+TOPK_K=$(TOPK_K)
|
|
EXTRA_ARGS += --trace --trace-fst --trace-structs
|
|
|
|
COMPILE_ARGS += -Wall -Wno-fatal
|
|
COMPILE_ARGS += -I$(RTL_ROOT) -I$(RTL_ROOT)/core -I$(RTL_ROOT)/noise -I$(RTL_ROOT)/random
|
|
COMPILE_ARGS += +define+SIM_DEBUG
|
|
COMPILE_ARGS += $(EXTRA_DEFINES)
|
|
|
|
WRITE_NOISE_EN ?= $(NOISE_EN)
|
|
WRITE_NOISE_RATE_NUM ?= $(NOISE_RATE_NUM)
|
|
WRITE_NOISE_RATE_DEN ?= $(NOISE_RATE_DEN)
|
|
|
|
ifneq ($(strip $(WRITE_NOISE_EN)),)
|
|
COMPILE_ARGS += -GWRITE_NOISE_EN=$(WRITE_NOISE_EN)
|
|
endif
|
|
ifneq ($(strip $(WRITE_NOISE_RATE_NUM)),)
|
|
COMPILE_ARGS += -GWRITE_NOISE_RATE_NUM=$(WRITE_NOISE_RATE_NUM)
|
|
endif
|
|
ifneq ($(strip $(WRITE_NOISE_RATE_DEN)),)
|
|
COMPILE_ARGS += -GWRITE_NOISE_RATE_DEN=$(WRITE_NOISE_RATE_DEN)
|
|
endif
|
|
|
|
export PYTHONPATH := $(SIM_ROOT):$(PYTHONPATH)
|
|
export QUIET ?= 1
|
|
export VERBOSE ?= 0
|
|
export COCOTB_LOG_LEVEL ?= INFO
|
|
export PYTHONWARNINGS ?= ignore::pytest.PytestDeprecationWarning
|
|
|
|
SUPPRESS_VERILATOR_WARNINGS ?= 0
|
|
ifeq ($(SUPPRESS_VERILATOR_WARNINGS),1)
|
|
COMPILE_ARGS += -Wno-WIDTHEXPAND
|
|
COMPILE_ARGS += -Wno-UNOPTFLAT
|
|
endif
|
|
|
|
include $(shell cocotb-config --makefiles)/Makefile.sim
|