Hit Count

Tuesday, April 13, 2010

Code Coverage & Functional Coverage

Code Coverage & Functional Coverage matrix can help to answer the question when verification is complete.(Verification completeness will depend on other parameters like bug rates,reviews, and other considerations as well.)

For example design having A,B,sel as input and Out as Output having functionality of +,-,/,* depending on sel line.

Assume the verification is only using code coverage which is indicating that line out = A*B is not covered in the code coverage.Now lets say one applies stimulus so that sel is for * operation.So now this is covered and my code coverage is 100 % Branch,Line,Toggle,Expression. Can I say verification is complete ?

No not yet. When coverage is 100 % it means whatever code has been written by designer is covered 100%. What if designer has missed to code functionality for example designer , lets say missed to implement division. In this case if verification engineer is only relying on coverage matrix he will not be able to capture the bug that designer has not implemented division functionality.

In concept Functional coverage ensures that all functionality has been implemented OR not. Code coverage also helps to identify missed scenario and hence possible bugs for example fifo_full signal is only covered 50 % (0 to 1 transition ) means that either there is no stimulus to that generates 1 to 0 transition OR fifo_full logic is written incorrectly in design such that it never generates transition from 1 to 0.

1 comment:

  1. Hi Jigar,

    Can it be sign-off criteria for verification that both code and functional coverage are 100 percent.
    Please help.

    Sunil Sharma.