Upload
kowsick-prasad-k
View
240
Download
9
Embed Size (px)
DESCRIPTION
more about code coverage
Citation preview
Code Coverage and Advanced Verification Management
Test Plan
Assertions
Transaction Level Stimulus
Self-Checking Testbenches
Randomized Stimulus
Functional Coverage
Code Coverage
The Seven Steps to Fast Lab Debug
Test Plan
Assertions
Transaction Level Stimulus
Self-Checking Testbenches
Randomized Stimulus
Functional Coverage
Code Coverage
The Seven Steps to Fast Lab Debug
Test Plan
Assertions
Transaction Level Stimulus
Self-Checking Testbenches
Randomized Stimulus
Functional Coverage
Code Coverage
Code Coverage
Five Kinds of Code Coverage
1. Statement Coverage
2. Branch Coverage
3. Condition Coverage
4. Expression Coverage
5. Finite State Machine (FSM) Coverage
Mnemonic
Some
Beer
For
Extra
Courage
Running Code Coverage +cover arguments
— s Statement— b Branch— c Condition— e Expression— f Finite State Machine
-coverage option
+cover=sbfec Mnemonic
Some
Beer
For
Extra
Courage
Running Coverage
Compile DUT with +cover option
Compile Testbench without coverage
Simulate with –coverage option
Demo: Running Coverage
Compile DUT with coverage.
Compile test bench without coverage.
Compile test without coverage
Simulate with no optimization and with coverage
ModelSim switches to the coverage layout
Instance coverage
Missing coverageDetails of
Misses
CoverageStats
SourceCode View
Statement Coverage
Demo Statement Coverage
Select DUT to See Statement Coverage
Expand source windowto see missing coverage
Browse Missing Coverage
Demo Branch Coverage
Branch Stats
Missing Branches
Branch Details
Miss Information
This branch was never taken
Condition & Expression Coverage
UDP vs. FEC Expression Coverage
OUT = A OR B
UDP Says Three Input Combinations
A B OUT0 0 01 X 1X 1 11 1 1
Rows are Unique Inputs
OUT = A OR B
FEC Says Four Input Combinations
A B OUT0 0 01 0 1
Rows are # of ways each input can affect the outputs
OUT = A OR B
A B OUT0 0 00 1 1
Demo: Expression and Condition Coverage
UDP and FEC Coverage
Press F5 For Details
MissedUDP or FEC
Coverage
UDP Details
FEC DetailsWe missed one!
Finite State Machine Coverage
Demo: FSM Coverage
FSMStatistics
Missed States
Missed State DetailsExpand to see
State Machine
Missed State
Creating Exclusions
Complete Code Coverage
Create Exclusions in the GUI
Create Exclusions in Scripts
Create Exclusions in Source Code
Unified Coverage Management
CodeCoverage
FunctionalCoverage
AssertionEngine
0-inFormal
UserCoverage
TestSpecific
Test
Plan
UCDB
RD
/ WR
RD
/ WR
API
R
D / W
RR
D / W
R A
PI
Native UCDB Generation
HTML Export
Test Ranking
Test Associated Merging
Test Plan Tracking & Analysis
UCDB BrowserOpen Read And Write API, ‘C’ Functions & CLI
Collects coverage data from all verification engines Open API for tools to read and write
UCDB Demo
Source and Test Bench
Tests UCDB Output
Source and Test Bench
Testplan to UCDB
Testplan
Script to Run Tests
Test List
Coverage Goals
Create XML Test Plan
Test Bench ScriptCompile DUT and Test Bench
Read test modules out of “Tests” then compile and simulate.
Store Coverage and Debug information from each test
Report Results
Tests
Test Running
Testing cache hits
UCDB Directory Contains Coverage
Open Verification Browser
Import Test Plan XML
Add Result UCDB Files from UCDB Directory
Merge the coverage results from all the tests with the test plan to
see that we’ve covered the complete plan
Merge the coverage results from all the tests with the test plan to
see that we’ve covered the complete plan. GREEN is good.
We have 100% coverage in the types of coverage we used
Notice that we’ve run all the tests in the plan.
Rank the tests to see which give the most coverage
You only need two tests to fully cover the design
Create HTML Report for all merged coverage data
Name the directory that will hold index.html
All UCDB Commands are scriptable. This script
captures all test data and creates HTML Report
http://supportnet.mentor.com/
http://communities.mentor.com/
ModelSim® SE User’s Manual
ModelSim® SE User’s Manual