Transaction Debugging with Discovery Visualization Environment (DVE) Part-1
Posted by JL Gray on February 25th, 2011
Asif Jafri, Verilab Inc., Austin, TX
The art of verification has evolved dramatically over the last decade. What used to be a very simple verilog testbench which could not possibly cover the vast solution space has evolved into the current monstrosity (Random testbenches) which is a very powerful tool, but the complexity to debug has gone up exponentially.
VMM has introduced various debug constructs to aid in the debug of the design as well as the test environment such as:
• Messaging: Report regular, debug, or error information.
• Recording: Transaction and components have built-in recording facilities that enable transaction and environment debugging.
Today I want to spend some time looking at DVE as a powerful debug tool in our tool box.
To start things off lets look at some simple calls used to invoke dumping waves.
1) $vcdpluson() : This call is used to start dumping design signals into a .vpd (VCD plus) format. “vpd” is a proprietary Synopsys format (binary, highly compressed) that is generated by vcs, which solves the issue of generating excessively large .vcd (IEEE standard) format files.
Eg:
initial
begin
$vcdpluson();
end
When compiling, specify -debug_pp (for post process debug), -debug (for interactive debug), -debug_all (for interactive debug with line stepping and breakpoints) to enable VCS Dumping.
The code snippets shown above will generate waves of all design signals for viewing in the DVE waveform viewer. You can also use the UCLI (unified command line interface) command ‘dump’ for dumping design signals interactively or in scripts.
Won’t it be great if we can also view dynamic variables as waveforms?
2) $tblog() system task is used for recording dynamic (or static) data and simple messages. No additional environment setup is required. $tblog() has to be called in the testbench where you want to record a message or a variable. The next example shows how to record a message in the send_packet task of a transactor.
// Foo transactor
task send_packet();
int id; // local variable
…
$tblog(-1, “Sending packet”); // record all local and class variables
…
cnt = cnt + 1; // cnt is a class variable
if (cnt < 50)
$tblog(0, “Count is less than 50”, cnt, id); // record variable cnt and id
endtask: send_packet
Along with the message and variable values, $tblog automatically records the time and the call stack. To view these messages and variables in the waveform viewer select a recording from transaction browser and add it as a waveform.
The figure below shows how a message is displayed in a DVE waveform window.
Another useful tool for transaction debugging is using the $msglog task which will be discussed in the next article “Hyperlink….”.








