finish reconstruction and pass simulation

This commit is contained in:
SikongJueluo
2024-06-28 19:38:36 +08:00
parent 85910958f9
commit c527835ff6
7 changed files with 372 additions and 310 deletions

View File

@@ -37,7 +37,7 @@ VERILATOR_FLAGS += -sc --exe
# Generate makefile dependencies (not shown as complicates the Makefile)
#VERILATOR_FLAGS += -MMD
# Optimize
# VERILATOR_FLAGS += -x-assign fast
VERILATOR_FLAGS += -x-assign fast
# Warn abount lint issues; may not want this on less solid designs
VERILATOR_FLAGS += -Wall
# Make waveforms
@@ -45,7 +45,7 @@ VERILATOR_FLAGS += --trace
# Check SystemVerilog assertions
VERILATOR_FLAGS += --assert
# Enable multithreading
# VERILATOR_FLAGS += --threads 4
VERILATOR_FLAGS += --threads 14
# Generate coverage analysis
# VERILATOR_FLAGS += --coverage
# Run Verilator in debug mode
@@ -56,7 +56,7 @@ VERILATOR_FLAGS += --assert
TOP_MODULE = isp
VERILATOR_FLAGS += -top $(TOP_MODULE)
# Input files for Verilator
VERILATOR_INPUT = ../isp.v *.cpp ../Demosaic/demosaic2.v ../Crop/*.v ../FIFO/*.v ../Merge/*.v ../RAM/*.v
VERILATOR_INPUT = ../isp.v *.cpp ../Demosaic/Demosaic2.v ../Crop/*.v ../ColorBlender/*.v ../RAM/*.v
# Check if SC exists via a verilator call (empty if not)
SYSTEMC_EXISTS := $(shell $(VERILATOR) --get-supported SYSTEMC)
@@ -64,15 +64,16 @@ SYSTEMC_EXISTS := $(shell $(VERILATOR) --get-supported SYSTEMC)
######################################################################
ifneq ($(SYSTEMC_EXISTS),)
default: run
default: build run
else
default: nosc
endif
run:
@echo
@echo "-- Verilator tracing example"
lint:
@echo "-- Verilator lint check ----"
$(VERILATOR) -sc --lint-only $(VERILATOR_INPUT)
build:
@echo
@echo "-- VERILATE ----------------"
$(VERILATOR) $(VERILATOR_FLAGS) $(VERILATOR_INPUT)
@@ -86,17 +87,21 @@ run:
# 3. Or, call a submakefile where we can override the rules ourselves:
$(MAKE) -j -C obj_dir -f V$(TOP_MODULE).mk
run:
@echo
@echo "-- RUN ---------------------"
# @rm -rf logs
# @mkdir -p logs
# obj_dir/V$(TOP_MODULE) +trace
obj_dir/V$(TOP_MODULE)
# @echo
# @echo "-- COVERAGE ----------------"
# @rm -rf logs/annotated
# $(VERILATOR_COVERAGE) --annotate logs/annotated logs/coverage.dat
# @echo
# @echo "-- COVERAGE ----------------"
# @rm -rf logs/annotated
# $(VERILATOR_COVERAGE) --annotate logs/annotated logs/coverage.dat
@echo "-- FINISH ------------------"
trace:
@rm -rf logs
@mkdir -p logs
obj_dir/V$(TOP_MODULE) +trace
@echo
@echo "-- DONE --------------------"