STEP1: Compile Your Design Files With Your Selected Coverage
STEP1: Compile Your Design Files With Your Selected Coverage
STEP1: Compile Your Design Files With Your Selected Coverage
MODELSIM or QUESTA:
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 <TESTSET_CODE_COVER>.ucdb ; run
-all;exit" -coverage -voptargs="+cover=bcfst" <otherOptions> <TOP>
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 <ucdbFile1>.ucdb <ucdbFile2>.ucdb ... <ucdbFileN>.ucdb
<ucdbFileResult>.ucdb