Beruflich Dokumente
Kultur Dokumente
Table Of Contents
Code Coverage Tutorial .................................................................................................................. 1
Introduction .................................................................................................................................. 1
Loading Sample Design............................................................................................................... 1
Code Coverage Setup ................................................................................................................. 2
Checking Results ......................................................................................................................... 3
Conclusion ................................................................................................................................... 5
Checking Results
When simulation is complete, you can then invoke the Code Coverage Viewer from the Tools
menu and view the results generated by Code Coverage.
6. Selecting Code Coverage brings up the Code Coverage Viewer window. In this window,
choose Open (Ctrl+O) from the File menu or click the Open File icon. This window allows you to
find and point to the file containing the Code Coverage data that will be displayed in the Code
Coverage Viewer window.
Line
Displays the line numbers of the source code.
Count
Displays an execution count for each line of the HDL code. If a number of lines has been
collapsed with - sign, the Count Column displays the total for all collapsed lines. If a line
contains more than one executable statement, the count number is followed by an
asterisk. Moving the mouse pointer over that line displays a tooltip with execution counts
for each statement
BC
Displays Branch Coverage data for the IF or CASE construct.
When the source code contains the IF construct then the BC column displays the number
of conditions that evaluated to True (e.g. 3t) and the number of conditions that evaluated
to False (e.g. 4f) during the simulation. True (t) means that the condition in the selected if
branch was met and this branch was executed. False (f) means that the condition in the if
branch was not met and the elsif or else branches were executed instead. The total
number of executions is displayed in the Count column.
When the source code contains the CASE construct then the BC column displays the
number of when branches that covered all explicitly listed choices and the total number of
branches within the construct.
By selecting the Details tab in the right pane, you can see details in the form of graphical charts
describing the Code Coverage results of your project.
Conclusion
Code/Branch Coverage is a very powerful debugging tool that provides designers an efficient
analysis of the currently used testbench. This tool can decrease the time required for verification
and optimize the development process by showing users if they still need to develop their tests
and which part of the design needs to be tested.
Thank you for using Active-HDL!