13.07.2015 Views

Spec-based verification: A new method for functional ... - Cadence

Spec-based verification: A new method for functional ... - Cadence

Spec-based verification: A new method for functional ... - Cadence

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The relative inefficiency with which today’s <strong>verification</strong> environments accommodate midstream specchanges also poses a serious problem. Since most <strong>verification</strong> environments are an ad hoc collection ofHDL code, C code, a variety of legacy software, and <strong>new</strong>ly acquired products, a single change in thedesign can cause a ripple of required changes throughout the environment, eating up time and addingsubstantial risk.Perhaps the most frustrating problem facing design and <strong>verification</strong> engineers is the lack of effectivemetrics to measure the progress of <strong>verification</strong>. Indirect metrics, such as toggle testing or code coverage,indicate if all flip-flops toggled or all lines of code were executed, but they do not give any indication ofwhat <strong>functional</strong>ity was verified. For example, they do not indicate if a processor executed all possiblecombinations of consecutive instructions. There is simply no correspondence between any of these metricsand coverage of the <strong>functional</strong> test plan. As a result, the <strong>verification</strong> engineer is never really sure whethera sufficient amount of <strong>verification</strong> has been per<strong>for</strong>med.TEST METHODOLOGIESDETERMINISTICThe oldest and most common test <strong>method</strong>ology, still used today, is deterministic testing. These tests aredeveloped manually and normally correspond directly to the <strong>functional</strong> test plan. Engineers often usedeterministic tests to exercise corner cases — specific sequences that cause the device to enter extremeoperational modes. Usually these tests are checked manually. However, with some additionalprogramming the designer can create self-checking deterministic tests.Although deterministic testing offers the <strong>verification</strong> engineer precise control by providing access tohard-to-reach corner cases, it has several drawbacks. Generating deterministic tests is a time-consuming,manual programming ef<strong>for</strong>t. Although simple tests can be written in minutes, the more complex onescan take days to write and debug. For example, to test a corner case requiring that two asynchronousdata streams reach a specific point at exactly the same time, the <strong>verification</strong> engineer might have toresort to trial-and-error <strong>method</strong>s: running the test, seeing how far off it is, correcting it, and trying again.Moreover, midstream changes to the design’s temporal behavior may <strong>for</strong>ce the engineer to go throughthis process repeatedly. And when this test is completed, the corner case is tested through only onepossible path.An average project normally develops several hundreds of deterministic tests, which can easily consumeseveral months to create. Checking deterministic tests also consumes considerable time and resources,whether it is per<strong>for</strong>med manually or written into the test.PRE-RUN GENERATIONPre-run generation is a <strong>new</strong>er <strong>method</strong>ology <strong>for</strong> generating tests. It addresses some of the productivityproblems associated with deterministic testing by automating the test generation process. C or C++programs (and sometimes even VHDL and Verilog, despite the lack of good software constructs) areusually used to create the tests prior to simulation. The programs read in a parameter/directives filethat controls the generation of the test. Often these files contain simple weighting systems to directthe random selection of inputs.The generator normally outputs the test into a file, which is then read by the simulator and stored inmemory. The simulator reads the next entry whenever it’s prepared to inject the next set of inputs.Although pre-run generation provides much higher throughput than deterministic testing, it is difficultto control. The parameters are static and do not provide much flexibility. Also, most generators of thistype don’t allow <strong>for</strong> interdependencies between data streams — each data stream is generatedindependently. This can cause the generator to generate unlikely or even illegal tests.Reaching corner cases using pre-run generation is nearly impossible. The engineer has very little controlover the sequences generated. This makes it difficult to <strong>for</strong>ce the occurrence of specific combinations.As such, pre-run generation makes a suitable complement to deterministic testing, but cannot replace it.3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!