Thursday 10 March 2011

Verification Principles: Summary from OVM Cookbook. Chapter 1:Part 1

General principles of verification to establish a framework for designing a testbenches based on two questions - Does it works? And Are we done?
Does It Work?
Each design will have its own set of does-it- work questions whose role is to determine functional correctness of the design. Functional correctness questions ask whether the device behaves properly in specific situations. We derive these questions directly from the design intent, and we use them to express design intent in a testbench.
And then we formulate the entire question so that they can be answered yes or no. At the end of the day, a design either works or not depends on question than you answered. Keep in mind that more specific questions tell you more about the machinery.
As is often the case, it is not practical to enumerate every single does-it-work question. To verify that every word in a 1 Mb memory can be written to and read from, it is neither practical nor necessary to write one million questions
Number
Does-It-Work Questions
1
Does a packet arriving at the input port addressed to output port 0 arrive at port 0?
2
Does a packet arriving at the input port addressed to output port 1 arrive at port 1?
3
Does a packet arriving at the input port addressed to output port 2 arrive at port 2?
4
Does a packet arriving at the input port addressed to output port 3 arrive at port 3?

Are We Done?
To determine the answer to Are we done?, we need to know if we have answered enough of the does-it-work questions to claim that we have sufficiently verified the design. We begin this task by prioritizing all the does- it-work questions across two axes:

Easy to answer
Hard to answer
Most critical functionality
No-brainer.
Get to work!
Least critical functionality
Probably can omit.
Don’t waste the time

Are-we-done questions are also called functional coverage questions, questions that relate to whether the design is sufficiently covered by the test suite in terms of design function. As with does-it-work questions, we can also decompose functional coverage questions into more detailed questions. And just like functional correctness questions, functional coverage questions must also be answerable in terms of yes or no.
In summary, the art of building a testbench begins with a test plan. The test plan begins with a carefully thought out set of does-it-work and are-we-done questions.