1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
| RTL= ../rtl/counter.v
work= work #library name
COVOP= -coveropt 3 +cover +acc
SVTB1= ../env/counter_if.sv ../env/counter_assertion.sv ../env/top.sv
INC = +incdir+../env +incdir+../test
SVTB2 = ../env/counter_pkg.sv
TEST = ../test/test.sv
VSIMOPT= -coverage -novopt -sva -sv_seed 2475652473 work.top
VSIMCOV= coverage save -onexit -assert -directive -cvg -codeAll counter_cov
VSIMBATCH= -c -do "$(VSIMCOV); run -all; exit"
VSIMBATCH1 = -c -do "coverage save -onexit -assert -directive -cvg -codeAll counter_cov1;run -all;exit"
VSIMBATCH2 = -c -do "coverage save -onexit -assert -directive -cvg -codeAll counter_cov2;run -all;exit"
html:
firefox covhtmlreport/pages/__frametop.htm
sv_cmp:
vlib $(work)
vmap work $(work)
vlog -work $(work) $(COVOP) $(RTL) $(SVTB2) $(SVTB1) $(INC) #$(TEST)
run_sim:
vsim $(VSIMBATCH1) $(VSIMOPT) -l test1_sim.log +TEST1 +nowarn3829
vcover report -html counter_cov1
run_testg:
vsim -novopt -sva -sv_seed random work.top +TEST1
clear
clean:
rm -rf modelsim.* transcript* vlog.* work vsim.wlf counter_cov* fcover* covhtml* vcover* *.log
clear
TC2:
vsim $(VSIMBATCH2) -coverage -novopt -sva -sv_seed 598761566 -l test2_sim.log work.top +TEST2
vcover report -html counter_cov2
report:
vcover merge counter_cov counter_cov1 counter_cov2 #counter_cov3 counter_cov4 counter_cov5 counter_cov6 counter_cov7
vcover report -html counter_cov
regress: clean run_test TC2 report html
gui:
vsim $(VSIMOPT) -l test1_sim.log +TEST1 +nowarn3829
run_gui: sv_cmp gui
run_test: clean sv_cmp run_sim
|