* [nvdla] initial nvdla integration * [nvdla] add firesim configs * [nvdla] re-add accidentally deleted line * [nvdla] works on master with small * [nvdla] use master branch of nvdla * [nvdla] remove extra sources * [nvdla] bump * [nvdla + ariane] bump and use insert-includes for pre-processing * [nvdla] add ci | remove target configs in FireChip | update naming * [nvdla] bump nvdla | fix ci run-tests error * [nvdla] re-enable PCWM-L error | fix/update makefile(s) * [nvdla] bump nvdla fragments in FireChip * [misc] bump tutorial patches * [chipyard] remove extra import * [nvdla] bump nvdla for pbus [ci skip] * [nvdla] update firemarshal and add nvdla workload * [nvdla] bump nvdla-workload * [nvdla] bump hw * [docs] add basic documentation * [docs] adjustments to documentation * [misc] update docs | bump firesim with recipe * [misc] disable error on warnings in verilator | bump number width to match RC * [docs] fix doc build error * [verilator] move no fail on warning to be global * [ci skip] [nvdla] bump submodule urls * [misc] move firesim specific configs into nvdla dir [ci skip] * [nvdla] fix run-tests in ci * update RC configs | bump marshal | bump nvdla-workload * [nvdla] bump nvdla-workload [ci skip] * add topology mixin to nvdla configs * update tutorial patches
113 lines
4.3 KiB
Makefile
113 lines
4.3 KiB
Makefile
#########################################################################################
|
|
# vcs makefile
|
|
#########################################################################################
|
|
|
|
#########################################################################################
|
|
# general path variables
|
|
#########################################################################################
|
|
base_dir=$(abspath ../..)
|
|
sim_dir=$(abspath .)
|
|
|
|
#########################################################################################
|
|
# include shared variables
|
|
#########################################################################################
|
|
include $(base_dir)/variables.mk
|
|
|
|
#########################################################################################
|
|
# name of simulator (used to generate *.f arguments file)
|
|
#########################################################################################
|
|
sim_name = vcs
|
|
|
|
#########################################################################################
|
|
# vcs simulator types and rules
|
|
#########################################################################################
|
|
sim_prefix = simv
|
|
sim = $(sim_dir)/$(sim_prefix)-$(MODEL_PACKAGE)-$(CONFIG)
|
|
sim_debug = $(sim_dir)/$(sim_prefix)-$(MODEL_PACKAGE)-$(CONFIG)-debug
|
|
|
|
PERMISSIVE_ON=+permissive
|
|
PERMISSIVE_OFF=+permissive-off
|
|
|
|
WAVEFORM_FLAG=+vcdplusfile=$(sim_out_name).vpd
|
|
|
|
.PHONY: default debug
|
|
default: $(sim)
|
|
debug: $(sim_debug)
|
|
|
|
#########################################################################################
|
|
# import other necessary rules and variables
|
|
#########################################################################################
|
|
include $(base_dir)/common.mk
|
|
|
|
#########################################################################################
|
|
# vcs binary and arguments
|
|
#########################################################################################
|
|
VCS = vcs -full64
|
|
|
|
VCS_CC_OPTS = \
|
|
-CC "-I$(VCS_HOME)/include" \
|
|
-CC "-I$(RISCV)/include" \
|
|
-CC "-I$(dramsim_dir)" \
|
|
-CC "-std=c++11" \
|
|
$(dramsim_lib) \
|
|
$(RISCV)/lib/libfesvr.a \
|
|
-CC "$(EXTRA_SIM_CC_FLAGS)"
|
|
|
|
VCS_NONCC_OPTS = \
|
|
+lint=all,noVCDE,noONGS,noUI \
|
|
-timescale=1ns/1ps \
|
|
-quiet \
|
|
-q \
|
|
+rad \
|
|
+vcs+lic+wait \
|
|
+vc+list \
|
|
-error=noZMMCM \
|
|
-error=PCWM-L \
|
|
-sverilog +systemverilogext+.sv+.svi+.svh+.svt -assert svaext +libext+.sv \
|
|
+v2k +verilog2001ext+.v95+.vt+.vp +libext+.v \
|
|
+incdir+$(build_dir) \
|
|
-f $(sim_common_files) \
|
|
$(sim_vsrcs)
|
|
|
|
VCS_DEFINES = \
|
|
+define+VCS \
|
|
+define+CLOCK_PERIOD=1.0 \
|
|
+define+PRINTF_COND=$(TB).printf_cond \
|
|
+define+STOP_COND=!$(TB).reset \
|
|
+define+RANDOMIZE_MEM_INIT \
|
|
+define+RANDOMIZE_REG_INIT \
|
|
+define+RANDOMIZE_GARBAGE_ASSIGN \
|
|
+define+RANDOMIZE_INVALID_ASSIGN
|
|
|
|
VCS_OPTS = -notice -line $(VCS_CC_OPTS) $(VCS_NONCC_OPTS) $(VCS_DEFINES) $(EXTRA_SIM_SOURCES)
|
|
|
|
#########################################################################################
|
|
# vcs simulator rules
|
|
#########################################################################################
|
|
$(sim): $(sim_vsrcs) $(sim_common_files) $(dramsim_lib) $(EXTRA_SIM_REQS)
|
|
rm -rf csrc && $(VCS) $(VCS_OPTS) -o $@ \
|
|
-debug_pp
|
|
|
|
$(sim_debug): $(sim_vsrcs) $(sim_common_files) $(dramsim_lib) $(EXTRA_SIM_REQS)
|
|
rm -rf csrc && $(VCS) $(VCS_OPTS) -o $@ \
|
|
+define+DEBUG \
|
|
-debug_pp
|
|
|
|
#########################################################################################
|
|
# create a vcs vpd rule
|
|
#########################################################################################
|
|
.PRECIOUS: $(output_dir)/%.vpd %.vpd
|
|
$(output_dir)/%.vpd: $(output_dir)/% $(sim_debug)
|
|
(set -o pipefail && $(sim_debug) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(VERBOSE_FLAGS) +vcdplusfile=$@ $(PERMISSIVE_OFF) $< </dev/null 2> >(spike-dasm > $<.out) | tee $<.log)
|
|
|
|
$(output_dir)/none.vpd: $(sim_debug)
|
|
mkdir -p $(output_dir)
|
|
(set -o pipefail && $(sim_debug) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(VERBOSE_FLAGS) +vcdplusfile=$@ $(PERMISSIVE_OFF) none </dev/null 2> >(spike-dasm > $(output_dir)/none.out) | tee $(output_dir)/none.log)
|
|
|
|
#########################################################################################
|
|
# general cleanup rule
|
|
#########################################################################################
|
|
.PHONY: clean
|
|
clean:
|
|
rm -rf $(gen_dir) csrc $(sim_prefix)-* ucli.key vc_hdrs.h
|