How to generate coverage in VCS (SNPS) , QUESTA and NC
MODELSIM or QUESTA:
STEP1: Compile your design files with your selected coverage
QuestaSim > vlog +cover -f design_file_list +cover [=s b c e f t x] Enable code coverage metrics by specifying one or more of the characters:
s - Statement
b - Branch
c - Condition
e - Expression
f - Fsm
t - Toggle
x - Extended toggle
Note: If no character is specified, sbceft is the default.
STEP2: Simulate with the coverage option
QuestaSim > vsim -coverage file_testbench.v
and the run -all
OR,
You can enable it using GUI Mode also.
Go to Compile > Compile Options and select the Coverage tab.Another option is,you have to just right-click on your design file at "Project" and choose "Properties". Now, you can see coverage tab. After running the simulation and you will be able to see the coverage tabs for analysis.
If you are running regression and you have to save the coverage report of the first test (UCDB file) and merge to the next UCDB of the next test till the regression finishes.And finally you will be able to the see total Code Coverage.
vsim -c -do "coverage save -onexit .ucdb ; run -all;exit" -coverage -voptargs="+cover=bcfst"
Here we tell vsim to 1. Enable code coverage (-coverage),
2. The types of coverage to collect (via -voptargs=+cover= bcefst").
3. To produce a coverage database file on the exit of simulation (do "coverage save -onexit coverage.ucdb)
4. Continue the step1 and Step2 till the regression ends
STEP3:
Further if you have multiple coverage databases, you can merge them into a single database by using:
vcover merge .ucdb .ucdb ... .ucdb .ucdb
The finally you can generate a HTML report:
vcover report -html -htmldir -verbose -threshL 50 -threshH 90 <ucdbFileResult>.ucdb
NC SIM ncverilog +nccoverage+all +nccov58 +nccovworkdir+cov_work +nclexpragma +nccovtest+ +nccovoverwrite +nccovdut+worklib.dut_top -T test_top.sv
1. For switching coverage ON : Use +nccovfile+dut_cov.txt while compiling. //*********************dut_cov.txt****************//
select_coverage -all -module top
.......
select_functional
select_fsm
//************************************************//
Note : During simulation use : covoverwrite -covtest mycov.cov
2. To view coverage:
iccr -keywords+detail iccr1.cmd OR
iccr -keywords+summary iccr2.cmd OR
iccr -keywords+dontmerge iccr3.cmd
//********************* iccr1.cmd **********************//
merge cov_work/design/test* -output merged_dir
reset_coverage
load_test cov_work/design/merged_dir report_detail -instance -betsafd -cgopt top... > detail.rpt
//********************* iccr2.cmd **********************//
merge cov_work/design/test* -output merged_dir
reset_coverage
load_test cov_work/design/merged_dir report_summary -instance -cgopt top... > summary.rpt
//********************* iccr3.cmd **********************// load_test cov_work/design/*
report_summary -instance -cgopt top... > summary.rpt
VCS
1. To generate functional coverage
% urg -dir simv.vdb
2. To generate code coverage
% vcs -cm_pp -cm_dir simv.cm -cm_name XXX -cm_report summary Nguồn: Genk.vn
Bạn Có Đam Mê Với Thiết Kế Vi Mạch - Muốn Có Mức Lương 1000 USD
Bạn Chưa Biết Phải Gửi Gắm Ước Mơ Của Mình Nơi Đâu
Hãy Đến Với Nghành Vi Mạch Tại SEMICON
Hotline: 0972.800.931 - 0938.838.404 (Ms Hồng)