DAI Comparescan User's Guide
Interfacing DAI Comparescan to Your Verilog Simulator


Next Prev Top Contents Index Home Page Send Feedback

Overview
About DAI Signalscan Turbo (SST) Files
Producing SST Files from Your Simulator
Linking DAI Signalscan PLI Routines with Verilog-XL (2.0 or later)
Linking DAI Signalscan PLI Routines with Chronologic VCS
Linking DAI Signalscan PLI Routines with FrontLine PureSpeed
Linking DAI Signalscan PLI Routines with Fintronic FinSim
Signalscan PLI System Task Examples
Simple Example
Wrap Size Example
Specific Scopes Example
Limiting Depth of Recording Example
Recording Fan-in Example
Design Acceleration PLI System Tasks
$recordfile
$recordvars
$recordon and $recordoff
$recordfilecopy
$recordfilechange
$recordclose
$recordabort
$signalscan
$signalscankill
$signalscanabort


Interfacing DAI Comparescan to Your Verilog Simulator

Overview


The easiest method of using DAI products with your Verilog simulator is simply to have the simulator create a dump file in its native format (VCD). The Verilog System Task $dumpvars, described in your simulator documentation, may be used to create VCD files. DAI Signalscan and DAI Comparesca can convert VCD files to SST files automatically. However, in this mode of operation, you are restricted by the limitation of the VCD file format and you can't use DAI Signalscan Pro for interactive source debugging code.

About DAI Signalscan Turbo (SST) Files

To answer many of the known limitations of VCD files, Design Acceleration created the SST file. It has numerous advantages over VCD files, some of which are listed below:

1. Compact, binary database

2. Super high performance and capacity

3. Full logic strength information

4. Full hierarchical signal driver information to aid in fan-in debugging

5. Flexible System Tasks, which allow the user to dynamically choose or change what information is recorded in any simulation.

Producing SST Files from Your Simulator

Verilog simulators have a standard way of linking external C routines into the simulator called PLI. The DAI Signalscan SST interface is simply a set of C PLI routines that are linked into your simulator before you simulate. In some cases, you will end up with a new simulator, as with Verilog-XL; in other cases, you simply compile the routines on a design-by-design basis, as with Chronologic VCS. To produce SST files you must do the following:

1. Link the DAI Signalscan PLI routines into your simulator.

2. Add the DAI Signalscan $recordvars; System Task to your design.

Linking DAI Signalscan PLI Routines with Verilog-XL (2.0 or later)


To link DAI Signalscan PLI routines with Verilog-XL, do the following:

1. Locate the files record-xl.o (or record-xl.a) and veriuser.c, included in the DAI Signalscan distribution.

2. Run the Verilog-XL simulation build script "vconfig". Check with your CAD administrator if you can't find it.

3. When asked for the path of the veriuser.c file, enter the path of the veriuser.c file included in the DAI Signalscan distribution, obtained in step 1.

4. When asked for the names of other files to be linked in, enter the path of the record-xl.o file included in the DAI Signalscan distribution, obtained in step 1.

5. Run the script created by the vconfig program. (If the default name was used, simply type cr_vlog.) If warning messages are displayed, the path names entered in steps 3 and 4 may be incorrect. Check the paths and rerun vconfig. If the script was successful, a new Verilog executable should be created in the current directory.

Linking DAI Signalscan PLI Routines with Chronologic VCS


When you compile a simulation, use a statement such as:

vcs design.v -o design.vcs -line +cli+3 \

-P record.tab record-lcb.o -lX11
 
Command line OptionsDescription
-lineTurns line debugging on
+cli+3Enables variable forcing and time breakpoints
-P record.tabSpecifies the system task "table" file
record-lcb.oThe actual PLI routines (record-lcb.a if not SunOS)

The files record.tab and record-lcb.o (or record-lcb.a) are included in the DAI Signalscan distribution. The record.tab file is a system task "table" file. record-lcb.o specifies system tasks to be linked into the simulator. If another table file is already being used, the record.tab file may be merged with the existing table file so that only one table file must be specified.

You may now add DAI Signalscan PLI System Tasks to your design files, as shown below:

module record;

initial begin

$recordfile("test.sst");//default="verilog.sst"

$recordvars;

end

endmodule

Linking DAI Signalscan PLI Routines with FrontLine PureSpeed


To link DAI Signalscan PLI routines with FrontLine PureSpeed, do the following:

1. Locate the files record-lcb.o (or record-lcb.a) and veriuser.c, included in the DAI Signalscan distribution.

2. Please refer to Section 6.9, "Linking the User PLI Application with Compiled PureSpeed Models", in the PureSpeed's User Manual for further instructions.

Linking DAI Signalscan PLI Routines with Fintronic FinSim


To link DAI Signalscan PLI routines with FrontLine PureSpeed, do the following:

1. Locate the files record-lcb.o (or record-lcb.a) and veriuser.c, included in the DAI Signalscan distribution.

2. Please refer to Section 16.3 and 16.4, "Running FinSim with DAI Signalscan under Unix" and "Running FinSim with DAI Signalscan under Windows 95/Windows NT" respectively, in the FinSim 4.3 Simulation Environment User Guide for instructions.

Signalscan PLI System Task Examples


Simple Example

The following is the most basic recording session. The file created is named verilog.sst, all variables are recorded, and NO fan-in information is recorded (no primitives or drivers).

module record;

initial begin

$recordvars;

end

endmodule

Wrap Size Example

This is the same as the basic example above, but with a user-specified file name and a wrap size of 20 megabytes. The transition data in the file will be limited to 20 megabytes, with new data replacing older data if necessary.

module record;

initial begin

$recordfile("test.sst","wrapsize=20M");

$recordvars;

end

endmodule

Specific Scopes Example

This is the same as the basic example, but ONLY specific variables and scopes are recorded. In this case, only one specific variable and all variables in the scope module2 are recorded. Note that wildcards (e.g., s*) are not permitted. Variables are nets, registers, integers, time, reals, and named events. Scopes are modules, tasks, functions, and named blocks.

module record;

initial begin

$recordvars(top.middle.clock,module2);

end

endmodule

Limiting Depth of Recording Example

This is the same as the basic example, but recording all variables three levels deep or less in the hierarchy. The default depth is 0, which means that there is no limit.

module record;

initial begin

$recordvars("depth=3");

end

endmodule

Recording Fan-in Example

This is the same as the basic example but with fan-in information recorded to allow backtracing with the Trace Browser and the Add Trace command.

module record;

initial begin

$recordvars("primitives","drivers");

end

endmodule;

Multiple Variables and Scopes Example

This is a more complex example showing how to apply multiple constraints to multiple variables and scopes. In this example, the first $recordvars records three levels of variables within scope top.mod1 and all variables within top.mod2. The second $recordvars records driver information for variables in mod1 and no driver information for variables in mod2. Note that all options apply to all variables specified later in that $recordvars task unless overridden.

module record;

initial begin

$recordfile("mydesign.sst", "wrapsize=20M");

$recordvars("depth=3", top.mod1,"depth=0", top.mod2);

$recordvars("drivers",mod1,"nodrivers",mod2);

end

endmodule

Recordon and Recordoff Example

In this example, the $recordoff and $recordon tasks are used to record variables only for a small portion of the total simulation time. The initial state is $recordon.

module record;

initial begin

$recordvars;

$recordoff;

end

endmodule

module top;

reg clock;

initial begin

#0 clock=0;

#100 clock=1;

#100 clock=1;

#100 clock=0;$recordon;

#100 clock=1;

#100 clock=0;

#100 clock=1;$recordoff;

#100 clock=0;

#100 clock=1;

end

endmodule

Snapshot Example

In this example the $recordfilecopy task is used to make a "snapshot" of live data for later use. The original default file, verilog.sst file, will be overwritten after the $reset.

module top;

reg clock,a,out,sin;

initial begin

$recordvars;

#0 a = 0;clock=0;out=0;sin=0;

#100 clock=1;

#100 clock=1;

#100 clock=1;

#100 clock=0;

#100 clock=0;$recordfilecopy("copy.sst");

#100 clock=1;

#100 $reset;

end

endmodule

Design Acceleration PLI System Tasks


The PLI system tasks that are available are described in this section. These tasks are:

$recordfile


The $recordfile task sets the name of the SST file to be used when variables are recorded with the $recordvars task. The syntax is shown below:

$recordfile(<filename> [, <options>] ...)

<filename> is the name of the SST file. It may be a string, enclosed in double quotes, or the name of a variable containing the file name. Although not required, an extension of .sst is recommended to identify the file as an SST file. If incremental file options are specified, <filename> is the name of the final merged file, if any, and incremental files will contain a sequence number inserted before the file name suffix (if any). The default file name is verilog.sst.

The filename may be followed by a list of options. Each option is a string, enclosed in double quotes, or a variable containing the option string. Available options are described below:

"wrapsize=<size>"

The transition data in the SST file "wraps" when it reaches the specified size, so that only this amount of data is kept in the file. <size> is a number followed by B, K, M, or G to specify bytes, kilobytes, megabytes, or gigabytes, or by no letter to use the default of megabytes. This option limits the size of the transition data, and does not affect the space used by other information such as scope and variable names. When the transition data begins to occupy more than its allotted maximum, the oldest transitions are overwritten by newer transitions. However, transitions are written to the file in blocks of about four to five megabytes, when possible, and the maximum size may be increased if it is below this amount. It is recommended that the maximum size be at least ten megabytes, if specified.

"incsize=<size>"

A new incremental SST file is started when the current file grows beyond the specified size. <size> is a number followed by B, K, M, or G to specify bytes, kilobytes, megabytes, or gigabytes, or by no letter to use the default of megabytes.

"inctime=<simtime>"

A new incremental SST file is started when the current file contains the specified amount of simulation time. <simtime> is a number followed by a time unit such as ps, or a number in the current time scale otherwise.

"inccpu=<cputime>"

A new incremental SST file is started when the specified amount of CPU time has been used by the simulator since the current file was opened. <cputime> is a number followed by one of the units s (seconds), m (minutes), h (hours), or d (days), or just a number in seconds.

"incfiles=<count>"

A maximum of <count> complete incremental files will be kept. When more than this number of complete incremental files have been written, the oldest files will be automatically deleted. The default is "incfiles=0". Zero is a special value which indicates that all incremental files will be kept.

"nosummary"

Disable writing of the summary file. By default, a summary file will be written if and only if the incsize, inctime, or inccpu options are used to write an incremental file.

"summary"

"summary=<summary-filename>"

A summary file will be written with the default name, or with the name specified. The default name is the name of the merged SST file, with the final suffix (if any) removed, and .sum appended.

"nomerge"

Do not automatically merge incremental SST files when the simulation is complete, or when $recordclose is used. The incremental files may be used individually to view only a portion of the total simulation time, or they may be merged later.

"merge"

Automatically merge incremental SST files into one larger SST file when the simulation is complete, or when $recordclose is used. After the incremental files are successfully merged, the incremental files are automatically removed. This is the default.

"nosequence"

Do not save sequence information in the SST file. This is the default.

"sequence"

Save sequence information in the SST file. This information is used to record the sequence in which events occurred, and allows the use of the sequence time and multivalue indication options in DAI Signalscan.

$recordfile is optional, but if used it must be placed before the first $recordvars. The $recordfile task only sets the defaults to be used when a file is created by $recordvars, and does not create the file itself.

$recordvars


The $recordvars task is used in place of $dumpvars to record variables to an SST file instead of a VCD file. Only one SST file may be written at a time, but additional variables may be recorded to the file at any time by using $recordvars again. The syntax is shown below:

$recordvars[(<options>...)];

Options are expressed as strings (characters enclosed in double quotes). Options apply to all following variables and scopes in the call, or to the default scopes if none are specified. Available options are described below:

"depth=n"

When a scope is specified (see below), all scopes within the scope are recursively recorded. This option sets a limit, n, to the depth of this recursion. For example, if n=1, no child scopes are automatically included. The default is "depth=0". Zero is a special value indicating no recursion limit.

"nodrivers"

"drivers"

These options indicate that drivers are not to be recorded or are to be recorded, respectively. The default is "nodrivers".

When "drivers" is specified, all variables that are recorded will also have their drivers recorded, if they have more than one driver. In this context, a driver is an output terminal of a primitive. DAI Signalscan can use this information to trace back signal states in gate-level designs.

"noprimitives"

"primitives"

These options indicate that primitives are not to be recorded or are to be recorded, respectively. The default is "noprimitives". When "primitives" is specified, all scopes that are recorded will have their primitives recorded in addition to their variables. DAI Signalscan can use this information to trace back signal states in gate-level designs.

"nocells"

"cells"

The "nocells" option indicates that variables within a cell, and all scopes below the cell, are not to be recorded. The default is "cells", which causes these variables to be recorded like any other variables. By default, modules defined in a library are cells and other modules are not cells. A non-library module can be defined as a cell using the Verilog "celldefine" directive.

"noports"

"ports"

The "ports" option, which is the default, causes a small amount of port connectivity information to be recorded for each recorded module. The "noports" option disables this, and is used primarily to work around a simulator defect that affects some designs. If the "noports" option is used, DAI Signalscan will not display ports in different colors, the Trace Browser will not display port connectivity, and Add Trace and Add Module Inputs commands will not display ports.

variables

Variables listed as arguments are recorded in the SST file. A variable may be a net, register, integer, time, real, or named event. For example: top.control.q0.

scopes

When a scope argument is listed, all variables within the scope are recorded in the SST file. In addition, variables in all child scopes will be included recursively (see the description of the dept h option above). A scope may be a module, task, function, or named block. For example: top.control.

If no variables or scopes are specified in a $recordvars call, the default of all top level modules is used. This will have the effect of recording all variables, unless the depth option is used. In many cases, this default is sufficient. An example of this usage is shown below:

module record;

initial $recordvars;

endmodule

In the above example, a separate module is used to invoke the $recordvars task. Alternatively, $recordvars could be placed in an initial block within some other module. A more complex example, which sets the file name and maximum transition data size as well as recording a number of variables and scopes with various options, is shown below:

module record;

initial begin

$recordfile("mydesign.sst", "wrapsize=20M");

$recordvars("depth=3", "drivers", top.a, "nodrivers", top.b);

$recordvars("depth=4", top.control);

$recordvars(top.io.mux1.q0, top.io.mux2.q0);

end

endmodule

$recordon and $recordoff


The $recordon and $recordoff tasks are used to turn recording on or off, respectively. These tasks take no parameters. At the beginning of the simulation, recording is on for the first SST file opened. In addition, when an SST file is closed or aborted, recording is reset to on for the next SST file. Recording may be turned off for uninteresting periods of time during a simulation.

Variable transitions will not be recorded during the period where recording is off. This allows these parts of the simulation to be run at maximum speed, and can also save on disk space. All recorded variables will be updated to their current values when recording is turned back on. Recording may be turned off and on any number of times during the simulation.

$recordfilecopy


The $recordfilecopy task is used to create a complete static copy of the currently open SST file in its current state. Because transitions are buffered before being written to the SST file, and because indexes and other important information are not written to the SST file until it is closed, an SST file cannot be opened in noninteractive mode while it is still open for writing. However, using this task, a copy of the file containing all of the required information may be created, and that file may be opened before the original file is closed. This task may also be used to create a snapshot of the simulation at the current simulation time. The copy is not updated with new transitions after it is created.

The name of the new file may be specified as an optional argument. It may be a string enclosed in double quotes, or the name of a variable containing the file name. The default file name is the name of the original file with a dash and a sequence number appended before the file name suffix (if any).

Normally, all of the transitions in the original file, plus any buffered transitions not yet written to the original file, are copied to the new file. All indices and other information are also written to the new file, and it is closed. Because buffered transitions are copied in addition to transitions already in the original file, the number of transitions in the new file may slightly exceed the maximum specified for the original file, if any. However, the second argument to $recordfilecopy may specify a maximum size for the transition data in the new file, in megabytes. If specified, this maximum should be at least 10 megabytes. Of course, if the maximum is much larger than the amount of transition data in the original file, the actual size of the transition data will be the size of the transition data in the original file plus the size of the buffered transition data.

$recordfilechange


The $recordfilechange task may be used when the incremental file options of $recordfile have been used. This task will cause a new incremental file to be started immediately, and is useful for making incremental files that start at a particular point in the simulation.

The name of the new incremental file may be specified as an optional argument. If no name is specified, the next name in the file name sequence is used.

$recordclose


The $recordclose task is used to close a currently open SST file. This task takes no parameters. Any open SST file is closed automatically on exit, so this task is necessary only if multiple SST files are to be generated. Note, however, that before opening another SST file with the $recordvars task, the $recordfile task should be used to set a file name for the new file. Otherwise the same file name would be used, and the previous SST file would be overwritten. The $recordclose task may also be used as an alternative to the $recordoff task, when used to stop recording at some point before the end of the simulation.

$recordabort


The $recordabort task is used to abort recording to an SST file that is no longer wanted. This task takes no parameters. Any buffered information not yet written to the SST file will be discarded, and the incomplete file will be deleted. Any current interactive connection to DAI Signalscan will also be aborted.

A $reset (on simulators supporting $reset) will perform an automatic $recordabort. If you want to reset the simulation but keep any partial SST file, use the $recordclose task or the $recordfilecopy task before the $reset. Since $reset will also reset the SST file name to the default, be sure to use the $recordfile task after the $reset task to select a new file name, if necessary, to avoid overwriting a previous SST file.

$signalscan


The $signalscan task is used to interactively view simulation results while the simulation is running. It is most often placed in an initial block, next to $recordvars, to execute DAI Signalscan at the beginning of the simulation. An example is shown below:

module record;

initial begin

$recordvars;

$signalscan;

end

endmodule

When the $signalscan task is called, DAI Signalscan will be executed on the system where the simulator is running. The PATH environment variable is used to find the DAI Signalscan executable, which must be named "signalscan", and the DISPLAY environment variable is used to determine where the windows should be displayed. Arguments may be passed to the DAI Signalscan program by specifying them as a single parameter to the $signalscan task. The parameter may be a string, enclosed in double quotes, or a variable containing the list of arguments. For instance, this may be used to load a Do-File or another SST file to be used with the data from the simulation.

For example:

$signalscan("-do mydesign.do");

All variables being recorded to the SST file will be available for viewing. Conversely, a variable must be recorded in the SST file in order to view it with DAI Signalscan. This means that there must be at least one call to $recordvars in order for $signalscan to be useful.

There may only be one interactive DAI Signalscan connection at a time for each simulation. If you exit DAI Signalscan or the simulator, or use the $signalscankill, $signalscanabort, $recordclose, $recordabort, or $reset tasks, the interactive connection will be closed. The $signalscan task may then be used again to start a new interactive connection.

$signalscankill


The $signalscankill task is used to kill DAI Signalscan from the simulator. This task takes no parameters. It may be used only when DAI Signalscan was started using the $signalscan task. After using $signalscankill, $signalscan may be used again to re-execute DAI Signalscan. This is useful if you wish to re-execute DAI Signalscan, possibly with different arguments.

$signalscanabort


The $signalscanabort task is used to abort any current interactive connection with DAI Signalscan, initiated with the $signalscan task. It takes no parameters. After using this task, DAI Signalscan will still be running, but it will not be able to retrieve any additional variables or simulation data. The $signalscan task may then be used again to re-execute DAI Signalscan. This is useful if you wish to re-execute DAI Signalscan, possibly with different arguments.



Next Prev Top Contents Index Home Page Send Feedback

DAI Comparescan User's Guide - Generated 26 FEB 1997
©Copyright 1997 Design Acceleration, Inc. All rights reserved