Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Code Coverage and Functional Coverage

Status
Not open for further replies.

M.Mata

Newbie level 2
Joined
Aug 10, 2018
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
16
Hi all,

What are the differences between Code Coverage and Functional Coverage?

And, are there any EDA tools that you would recommend that use both coverage?
 

If you dont have a mentor login:
Code coverage is a measure of how many lines of code have been exercised in your design. This can usually be captured by the simulator
Functional coverage is a measure of whether the design has met the design requirements. This has to be defined by the user and may be have to be measured over many individual tests.
 

If you dont have a mentor login:
Code coverage is a measure of how many lines of code have been exercised in your design.

That is incorrect. Line coverage is only one of the many types of code coverage. There is also fsm coverage, expression coverage, block coverage...
 

Your code could consist of a fsm which may contain a
>> when x =>

This particular section of the code may never execute. With line coverage/fsm coverage or whatever... you're looking at the code that is exercised during the simulation. If you provide a sequence of events that may or may not exercise the above example.

Whereas functional coverage is often associated with achieving a task. Does my calculator calculate x + y? answer yes/no. The fact that there may be thousands of lines that do not get executed is irrelevant.

If you want to thoroughly test your code you may be interested in tools like Mentors questasim qverify. This verification tool provides an application called autochecker, which will simulate all aspects of the code to see if errors exist. Even cases where you have a fsm where certain states will never get implemented. It will flag up instances where you may have no transition to a state, because you don't have an assignment. etc. These are the certain parts of your code that you'll never get with your functional test, because you can pass your functional test without ever needing to transition to sate x.
 

Essentially, code coverage provides an indication of how much code has been exercised by your testbenches.

For functional coverage, think of it like this, the whole goal of a design is to produce intended functionality for some purpose. Functional coverage basically answers the question: does your device do everything it's supposed to?

Functional coverage is an indication of the number of requirements successfully implemented by your design. The requirements are verified through hardware testing and simulation testbenches.
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top