Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

#Makefile for UVM Testbench

RTL = ../rtl/*
INC = +incdir+../master +incdir+../read +incdir+../top +incdir+../tb
SVTB = ../env/updown_top.sv
SVTB1 = ../test/test.sv
work = work
VSIMOPT= -novopt -sva -sv_seed random -l s.log work.top
VSIMBATCH1 = -c -do "coverage save -onexit -assert -directive -cvg -codeAll
mem_cov1;run -all;exit"
VSIMBATCH2 = -c -do "coverage save -onexit -assert -directive -cvg -codeAll
mem_cov2;run -all;exit"
VSIMBATCH3 = -c -do "coverage save -onexit -assert -directive -cvg -codeAll
mem_cov3;run -all;exit"

html:
C:/"Program Files (x86)"/"Mozilla Firefox"/firefox.exe
covhtmlreport/index.html &

lib:
vlib $(work)
vmap work $(work)

sv_cmp: lib comp0

run_sim:
vsim $(VSIMOPT) $(VSIMBATCH1)
vcover report -html mem_cov1

gui14:
vsim $(VSIMOPT) -coverage +UVM_OBJECTION_TRACE +UVM_TESTNAME=test14
+UVM_VERBOSITY=UVM_MEDIUM #The Default Verbosity is medium
vcover report -html mem_cov1

gui16:
vsim $(VSIMOPT) -coverage +UVM_OBJECTION_TRACE +UVM_TESTNAME=test16
+UVM_VERBOSITY=UVM_MEDIUM #The Default Verbosity is medium
vcover report -html mem_cov2

gui63:
vsim $(VSIMOPT) -coverage +UVM_OBJECTION_TRACE +UVM_TESTNAME=test63
+UVM_VERBOSITY=UVM_MEDIUM #The Default Verbosity is medium
vcover report -html mem_cov3

comp0:
vlog -work $(work) $(RTL) $(INC) $(SVTB1) $(SVTB)

run_gui14: clean lib comp0 gui14

run_gui16: clean lib comp0 gui16

run_gui63: clean lib comp0 gui63

run_batch: clean lib comp0 run_sim

run_test14: clean lib comp0


vsim $(VSIMBATCH1) +UVM_OBJECTION_TRACE +UVM_TESTNAME=base_test
+UVM_VERBOSITY=UVM_MEDIUM -coverage -l test14.log -sva -sv_seed random -novopt
work.top
vcover report -html mem_cov1
run_test16:
vsim $(VSIMBATCH2) +UVM_OBJECTION_TRACE +UVM_TESTNAME=test16
+UVM_VERBOSITY=UVM_MEDIUM -coverage -l test16.log -sva -sv_seed random -novopt
work.top
vcover report -html mem_cov2

run_test63:
vsim $(VSIMBATCH3) +UVM_OBJECTION_TRACE +UVM_TESTNAME=test63
+UVM_VERBOSITY=UVM_MEDIUM -coverage -l test63.log -sva -sv_seed random -novopt
work.top
vcover report -html mem_cov3

clean:
del /Q modelsim.* transcript* *log* vsim.wlf fcover* covhtml* mem_cov*
rm -rf work
clear
report:
vcover merge mem_cover mem_cov1 mem_cov2 mem_cov3 mem_cov4 mem_cov5 mem_cov6
mem_cov7 mem_cov8
vcover report -html mem_cover

regress: clean run_test14 run_test16 run_test63 report html

You might also like