背景:vcs 小白在完成makefile脚本编写后,使用指令make comp 编译后,直接运行了代码。
导致在正经指定测试用例运行,设置运行参数设置不正确。make simulate指令作废。
原因:在comp阶段使用了 -R 导致设置参数后直接运行。
改正:删除 -R ,剩余脚本只完成编译。
TEST = spi_reg_test
VERBO = UVM_LOW
OUTPUT_DIR = ./logs
TB_TEST_ID+= ${TEST}
TEST_LOG = ${OUTPUT_DIR}/${TB_TEST_ID}
VPD = +vpdfile+$(TEST_LOG)/${TB_TEST_ID}.vpd
SEED =$(shell date + %s)
COV_OPTS = -cm line+fsm+tgl+cond+branch
UVM_DBG = +UVM_CONFIG_TRACE
VCS = vcs -full64 -cpp g++-4.8 -cc gcc-4.8 -LDFLAGS -Wl,-no-as-needed \
-f filelist.f \
+incdir+$(AGENTS)/apb_agent $(AGENTS)/apb_agent/apb_agent_pkg.sv\
+incdir+$(AGENTS)/spi_agent $(AGENTS)/spi_agent/spi_agent_pkg.sv\
+incdir+../uvm_register_model ../uvm_register_model/spi_reg_pkg.sv\
$(AGENTS)/apb_agent/apb_if.sv \
$(AGENTS)/spi_agent/spi_if.sv \
../tb/intr_if.sv \
+incdir+../env ../env/spi_env_pkg.sv\
+incdir+../sequences ../sequences/spi_bus_sequence_lib_pkg.sv\
+incdir+../sequences ../sequences/spi_sequence_lib_pkg.sv\
+incdir+../sequences ../sequences/spi_virtual_seq_lib_pkg.sv\
+incdir+../test ../test/spi_test_lib_pkg.sv\
+incdir+$(RTL)/spi/rtl/verilog ../tb/top_tb.sv\
${COV_OPTS}\
-timescale=1ns/1ns \
-full64 \
-R \
-debug_acc+all \
+define+FSDB \
-fsdb \
-lca -kdb \
-ntb_opts uvm-1.1 \
-sverilog \
+v2k
comp:
${VCS}
simulate:
./simv +UVM_TESTNAME=${TEST} +UVM_VERBOSITY=${VERBO} \
${COV_OPTS} ${VPD} ${UVM_DBG} \
+ntb_random_seed=$(SEED) \
-cm_name ${TEST} \
-l ${TEST_LOG}/${TEST}.log
vcs_wave:
./simv -gui
vcs_cov:
dve -full64 -cov -dir simv.vdb&
urg:
urg -dir simv.vdb -dbname total_cov &
firefox urgReport
verdi:
verdi -ssf top_tb.fsdb &
verdi_cov:
verdi -full64 -cov -cov_dir simv.vdb &
clean:
rm -rf csrc verdiLog simv.daidir \
novas.* \
vc_hdrs.h \
simv \
*.key \
*.fsdb \
*.log \
inter.vpd \
DVEfiles \
*.fsdb.* \
ucli.key \
total_cov.vdb \