Module_51
Module_51
Module_51
By
Dr. Parameshwara M. C.
Associate Professor & HoD, Department of ECE,
Vemana Institute of Technology, Koramangala,
Bengaluru-560034
20
Functional Coverage: Coverage Types
Code coverage
Code coverage measures how thoroughly your tests exercised the “implementation” of the
design specification, and not the verification plan.
• Line Coverage :how many lines of code have been executed.
• Path Coverage :which paths through the code and expressions have been executed.
• Toggle Coverage :which single-bit variables have had the values 0 or 1.
• FSM Coverage :which states and transitions in a state machine have been visited.
Functional coverage
• The goal of verification is to ensure that a design behaves correctly in its real
environment.
• Functional coverage is tied to the design intent and is sometimes called “specification
coverage”.
• Consider what happens if a block of code is missing from the design. Code coverage cannot
catch this mistake, but functional coverage can. 21
Functional Coverage: Coverage Types
Bug rate
• It is an indirect way to measure coverage.
• It is based on the rate at which fresh bugs are found.
• You can keep track of how many bugs you found each week, over the life of a project.