Authors:
- Gaurav Kumar Verma - Mentor Graphics
- Doug Warmke - Mentor Graphics
Abstract:
Technology advances allows for the creation of larger and more complex designs. This poses new challenges, including efforts to balance verification completeness with minimization of overall verification effort and cycle time. It is practically impossible to enumerate all of the conditions and states to do an exhaustive test. Therefore, it is imperative to use well defined criteria to measure and check when the verification is sufficiently complete and meets a reasonable quality threshold. Code coverage is a popular measure of design quality. This paper focuses on expression coverage, which is one of the most complex and least understood types of code coverage, and discusses 'Rapid Expression Coverage' (REC), which is a new metric for expression coverage, while comparing it with some popular metrics being used to evaluate expression coverage in the industry today. Even though this paper describes REC in context of code coverage of designs, these same techniques could also be applied to coverage tools for software languages like C, C++, or Java.
Introduction:
Code coverage is a popular measure of design quality and verification completeness. It has low setup cost and analysis is straightforward, which makes it a high ROI component of most modern verification methodologies. Expression coverage is one of the most complex and least understood types of code coverage. The main question verification engineers need to answer regarding expression coverage is:
"There are 2N possible input vectors for my N-input expression. I saw a subset of this large number during simulation. How well is my expression tested?"
A variety of metrics are available to help answer this question. Metrics distill the data to a meaningful numeric value that can be analyzed and improved. There are brute force metrics like the sum-of-products and truth table analysis. These require a large number of test vectors for the expression to be covered. Then there are smarter metrics like Focused Expression Coverage, which is a form of Modified Condition/Decision Coverage (MC/DC). These metrics allow an expression to be fully covered with just 2xN input vectors. Most expression coverage metrics are based on truth table implementations, and therefore suffer from capacity limitations due to exponential complexity.
REC is based on partitioning an expression into sub-expressions to derive non-masking conditions, while operating at linear complexity and providing MC/DC-compliant results. This allows any arbitrarily large expression to be considered for coverage, while providing simple and easy to understand reports.
The basis of REC is that an expression input must not be masked by the values of other inputs at the time of coverage collection. For example, 'b' must be '1' while measuring the coverage of 'a' in 'a && b'. If 'b' is 0, the result of the expression gets fixed to '0' and the value of 'a' is not of any significance. The '1' state of 'b' is called its non-masking state, and the associated condition is called the non-masking condition.
As REC collects coverage, it ensures that the input being covered has taken both '0' and '1' states while an appropriate non-masking condition is satisfied. An expression is considered covered when all its inputs have been independently covered.
The following sections go into the details of partitioning an expression to derive non-masking conditions, the effect of short-circuiting, considerations for duplicate input terminals, inverting vs. non-inverting input modes, and uni-modal versus bi-modal expression considerations.
The results of performance benchmarks show REC has higher performance with similar level of comprehensiveness in expression coverage as compared to existing implementations. These results are presented towards the end of the paper.
View & Download:
Read the entire Supercharge Your Verification Using Rapid Expression Coverage as the Basis of a MC/DC-Compliant Coverage Methodology technical paper.
Source:
DVCon 2014
|