Home Tips AutoDup: Create Test Variants Quickly (Free Utility)

Search

AutoDup: Create Test Variants Quickly (Free Utility) PDF Print E-mail
User Rating: / 24
PoorBest 
Thursday, 01 April 2010 15:12

Coverage driven verification has a big advantage – you can write a single test, and let run it several times with random seeds. Each run will generate a slightly different scenario – depending on the nature of the constraints you provided. I’ve talked about the pros and cons of excessive use of coverage driven methods here and here. Anyway, sometimes you just want to take an existing test and quickly create a number of variants off of it to make a small regression suite (that you might even throw away later on). For example – you could have a basic test that does some CPU writes and then drives random frames. During configuration you write to a register that sets the FIFO level and you want to have 10 different tests, each writes a different value to this register.

Autodup is a neat utility can help you do that. What it does is stupidly simple, but it can still save you a bit of copy/paste headache.

 

Let’s see how it works. Here’s an excerpt from the test you want to duplicate (fifo_lvl.sv):

 

…
cpu_xactor.write_register(FIFO_LEVEL,30);
...

 

Now you want to have 10 different tests, each writes a different value to that register. No problem! Use the magic pattern:

…
cpu_xactor.write_register(FIFO_LEVEL,__AUTODUP{10,20,30,40,50,60,70,80,90,100});

...

 

Now run the utility:

% ./autodup fifo_level.sv

 

And voila! You get 10 different tests:

In fifo_level_10.sv you’ll have: cpu_xactor.write_register(FIFO_LEVEL,10);

In fifo_level_20.sv you’ll have: cpu_xactor.write_register(FIFO_LEVEL,20);

And so on…

 

Here’s another example:

 

Add the following magic pattern in fifo_level.sv:

…
if (something) __AUTODUP{func1(),func2(),x=y,$finish};

...

 

Use the –i option now to get friendly file names:

% ./autodup fifo_level.sv -i

 

And Voila:

fifo_level_1.sv: if (something) func1();

fifo_level_2.sv: if (something) func2();

fifo_level_3.sv: if (something) x=y;

fifo_level_4.sv: if (something) $finish;

 

To download Autodup simply click on the attachment below. After you download, please run %./autodup -help to get started, it's very easy.
If you encounter any problems or bugs, please let us know so we can get it fixed for you.

Attachments:
FileDescriptionFile size
Download this file (autodup.txt)AutoDupCreate test variants automatically3 Kb
 
More articles :

» Plug, Play and Reuse!

Time to talk about module-to-system reuse, a very important topic. If you plan your verification environment properly (using one of the common methodologies in the market today or your own) you’ll be able to easily build a system level...

» To Do List 2010

Introducing Philip Americus - a new guest blogger here on Think Verification. Phil is an ASIC veteran who's worked with every phase of ASIC design - from initial concept to tapeout, with an emphasis on verification, including management of both HW...

» VMM Hackers Guide - Default Behavior For Your BFM

Here's a short tutorial on how to implement a default behavior for your BFM using VMM. Some protocols require constant activity on their interface even when you don't have any data to transmit. This means you must have a mechanism that drives idle...

» The Miracle Of Verification

Is verification really a miracle and verifiers have ceased to be engineers? Not too long ago I wrote an about some common myths in Verification. Today I would like to talk about a bigger myth which I like to call the "Verification Miracle Myth"....

» Another Step Forward For VMM

While the move from 1.0 to 1.1 and its later flavors did not involve a major paradigm shift, VMM1.2 (beta) introduces several fundamentally new concepts that you should be aware of. Some of the new concepts are the natural result of an evolving...

Add comment


Security code
Refresh

Copyright © 2012 Think Verification - Tips & Insights on ASIC Verification. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.