Simulation Output

Controlling how simulation results are reported to the screen or file.

Overview

SIMIC creates several simulation output files. The textual simulation reports described here are organized in a tabular format whose content and form are, to a large extent, user-controllable. The output's destination can be the terminal (or log file in batch mode), via the PRINT (PR) run command, and/or a file, via the WRITE (WR) run command.

Since options common to the two commands are identical, sample usage is illustrated for only one of the commands, PRINT. Substituting the command verb "WRITE" invokes the identical option for this command. Options specific to only one of the commands are explicitly stated.

Even though the PRINT and WRITE options are identical, the two commands are totally independent. The signals reported, the output format, and the report times are unique to each command; nothing specified for one applies to the other.

Each section of this chapter describes an individual PRINT or WRITE option and illustrates its usage. While isolated here for descriptive purposes, any of these options may be combined in the same command, if desired.

Organization Of The Output

Figure 6 illustrates a sample file created by the WRITE command. In general, the output generated by the PRINT or WRITE command contains:

  1. A time/date/version stamp – This is only for WRITE output. It consists of a single line REMARK that contains the time, date and SIMIC version that created the file.
  2. A simulation options header – This consists of a number of REMARK lines that describe the options selected for simulation.
  3. A signal name header – This consists of a number of COMMENT lines that contain the names of the signals to be reported, as requested by the user, in vertical columns directly above their respective simulation values.
  4. The simulation output – Contains a record for each time that output occurs during simulation. Each record contains the current simulation time and test, separated by a 'T" and suffixed with a ":", followed by the current values of the requested signals.
Remark= 'Write' Created by SIMIC 1.00.00 on 4/23/91 14:37:53
Remark= Options: (Fault Free simulation)
Remark=	Pattern stimuli, Near Filter, Spike Propagation
Remark=	Stable Before Decay, Dynamic Delay
C=	INNNN
C=	N1234
C=	I
C=	T
0 T	1: 0ZZZZ
0 T	2: 11ZZZ
1 T	2: 11HZH
2 T	2: 11HHH
0 T	3: 0CCCC
5 T	3: 0ZZZZ
0 T	4: 11ZZZ

Figure 6 Sample File Created by the WRITE Command

Specifying The File Name For The WRITE Command

By default, the extension of the file created by the WRITE command is wrt, and its name is the default name specified by the DEFINE FILE command. The FILE (FI) keyword can be used to explicitly specify this file's name:

WRITE FILE=<file name>

where <file name> is the name of the file to be written to.

Specifying What To Output

Selecting Signals to Output

Signals are selected with the LIST (LI) keyword-field. Two forms of this keyword are supported.

The first, more common, form is:

PRINT LIST=<signals and format options>

This form specifies the signals (and formatting options) that should be output. A signal can be specified more than once. For example:

PRINT LIST=a,b,c,a

would output the signals a, b, c, and then a again in the tabular output.

The options for formatting the table are:

  1. Inserting one or more blank vertical columns between signals. This is accomplished by entering an asterisk (*) for each blank column.
  2. Forcing a new row in the table. This is accomplished by entering a pound sign (#) at the desired point. Note that if more than one # is used consecutively, then a blank row will be output.

Signals must be separated by any combination of whitespace characters or commas, no delimiting characters are needed for the formatting characters.

For example:

PRINT LIST=u v,*w**x#y

will cause the simulation output to consist of the value of signal u, followed by the value of v, followed by a blank column, followed by the value of w, followed by two blank columns, followed by the value of x. The value of signal y will be output at the first position of the next line.

Like most other keywords, the LIST keyword is "sticky"; any signal specified will continue to be reported until explicitly removed.

For example, if the command:

PRINT LIST=a,b,c,a

is followed by:

PRINT LIST=d*e

then, the two commands are equivalent to the single command:

PRINT LIST=a,b,c,a,d*e

Removing signals from the list is accomplished with the no prefix. For example:

NO PRINT LIST=a,b

causes the first specification of signal a, and signal b, to be removed, and its cumulative effect would be equivalent the single command:

PRINT LIST=c,a,d*e

The second form of the LIST keyword is:

PRINT LIST:

which specifies that SIMIC should output the values of all signals, each time output is requested. Since the amount of data could be voluminous, SIMIC generates a dump format, which reduces the output by:

  1. Not printing the names of the signals in the header. Instead, the signals are arranged alphanumerically, according to their order in the SYMBOL section of the listing file, which can be created during circuit compilation.
  2. Displaying the signals in groups of 5 with an intervening space. This simplifies coordinating the values with the corresponding signal positions.

This form is rarely used, but it can be helpful when tracing an X value to it's source.

Using the LIST: form with the no prefix:

NO PRINT LIST:

cancels reporting of all signal values.

Signal Specification Options

As described above, the LIST keyword accepts a list of signals. This is also true for the LIST keyword associated with other commands. Except where noted in this Guide, the LIST keyword of each command will accept:

  1. Signal names
  2. Meta-words specifying primary signal values:
    • &INPUTS – specifies "all primary inputs"
    • &OUTPUTS – specifies "all primary outputs"
    • &BUSSES – specifies "all primary busses"
    • &BUSINS – specifies "the stimulus values at all primary busses" which may differ from the values of &BUSSES (the latter being the wire-tied result of primary stimulus values and internally-driven values)
  3. Wildcard specification of the form <prefix>(), which represents "all signal names beginning with <prefix>" (for example, A.B.() specifies "all signals whose names begin with A.B.")
  4. Factored specification of the form <prefix>(<suffix1>, …, <suffixn>), which represents the signals <prefix><suffix1>, …, <prefix><suffixn>
    (for example, ab(cd, ef, gh) specifies abcd, abef, and abgh)
  5. Vector aliases defined in a DEFINE command (see Specifying Signal Groups and Output Radix Format in this chapter)
  6. Alternative specification of each signal in the form <partname>.<n>, where <partname> is the instance name of the part generating the signal, and <n> is the signal's output number (e.g., if the signal is the fourth output of this element, then <n> would be 4).

Controlling Column Width

SIMIC, by default, assumes an 80 column output device. If the space required to output the requested signal values (including blank columns) exceeds this limit, then SIMIC will output the signals in groups of 5 with one intervening space. If a 132 column output device is available, the column limit can be changed to 132 with the EXPAND (EX) keyword:

PRINT EXPAND:

As described previously, using the pound sign (#) to force multi-line tabular format is another way to stay within the set column limit. To defeat all column checking, specify the value INFINITE (I):

PRINT EXPAND=INFINITE

Suppressing Header Output

The simulation header, consisting of the simulation options and signal names, can be suppressed with the HEADER (HE) keyword option. This may be desirable during an interactive debugging session with short, multiple runs. It helps reduces the size of the output. The command:

NO PRINT HEADER:

disables the header output, and the command:

PRINT HEADER:

enables it.

Suppressing Test Number

When waveform stimuli are used, the test number field of the simulation output can be suppressed to simplify comparisons with other simulator output. This is done with the TNUM (TN) keyword option:

NO PRINT TNUM:

The test field can be restored with the command:

PRINT TNUM:

If test information is suppressed, each output line will contain the time, followed by a colon, followed by the requested signal values.

Specifying When to Output

The keyword options described in this section control when SIMIC should output simulation values. They are independent of each other; enabling one option does not disable another. Like many other options, they are "sticky"; once specified, the options remain in effect until explicitly changed.

Requesting Output at Stable Points

The default output operation for SIMIC is to output the requested simulation values each time the circuit becomes stable. The PSTEP (PS) keyword option can be used to control frequency of this output, or inhibit it. The following command specifies that output at every <s>-th stable point, where <s> is an integer:

PRINT PSTEP=<s>

To turn off all output based on attaining a stable state:

NO PRINT PSTEP:

Requesting Time-Periodic Output

Output can be requested at specified time intervals using the TSTEP (TS) keyword. The command:

PRINT TSTEP=<t>

will cause an output to occur every <t> simulation time-units, where <t> is an integer.

Once the circuit state has stabilized, output is suspended until the next input event occurs to eliminate repetitive identical reports. Output suspension can be disabled by prefixing the time-step specification with a plus ("+") sign. For example:

PRINT TSTEP=+100

produces output every 100 time-units, even when the circuit state is stable.

Once enabled, the no prefix can be used to suppress time-periodic output:

NO PRINT TSTEP:

It is also possible to skew (offset) the first TSTEP output. This is done with the BEGIN (BE) keyword option. This command has the form:

PRINT BEGIN=<b>

where <b> is an integer specifying the time offset to the first output. This option can useful when emulating a point strobe with waveform or timing generator stimuli.

To remove the offset, a value of 0 is specified:

PRINT BEGIN=0

Requesting Output Based On Activity

One of the most commonly used options is to select signals that trigger simulation output. The only restriction is that the trigger signals must be among those chosen for output.

Activity-based output is enabled with the CHANGE (CH) keyword option.

The command:

PRINT CHANGE:

specifies that output should occur whenever any signal on the current output list changes state. Particular trigger signals can be specified with the command:

PRINT CHANGE=<signal list>

where <signal list> is a list of the triggering signals. Subsequently, the command:

NO PRINT CHANGE:

would disable all activity-based output, and

NO PRINT CHANGE=<signal list>

would inhibit the specified signals in <signal list> from functioning as triggers.

Restricting the Output to Specified Tests/Time

Output can be restricted to certain tests (for patterns) or time (for waveforms) intervals with the PRANGE (PR) keyword option. PRANGE is described in Restricting Simulation Options to a Specified Simulation Interval.

Controlling Signal Value Representation

The Output Character Set

By default SIMIC uses a 15-character representation for the possible combinations of levels and strengths. These characters, and their associated signal states, are shown in the following table:

Strengths Level 0 Level 1 Level X
POWER G V S
DRIVING 0 1 X
RESISTIVE L H Y
FLOATING D C Z
UNKNOWN F T U

Suppressing Signal Strength in the Output

It is sometimes distracting to see signal values in the simulation output described with the 15-character representation. The VALUES (VA) keyword directs SIMIC to represent signal values in a 4-character (0, 1, X, Z) representation, ignoring all strength information except for floating-unknown (Z). The values can be either STRENGTHS (S) or LEVELS (L), corresponding to 15-character or 4-character, respectively. The command:

PRINT VALUES=LEVELS

selects the 4-character representation, while the command:

PRINT VALUES=STRENGTHS

selects the 15-character representation.

Specifying Signal Groups and Output Radix Format

In many instances, it is easier to read the output if a display radix other than binary (LEVEL) is used. If signals are grouped into arrays (vectors) in the network description, then the vector can be displayed in its declared radix format (in the SNL %DECLARE statement, see Signal Arrays). This is accomplished by specifying the "root" name (the name without the dimension specification) at the desired position in the output list. For example, consider this partial SNL description:

T=alu I=a,b,func O=ovl,out
%DECLARE INT=a[0:7],b[0:7],func[0:1],out[0:7]
<part statements have been removed>

If the inputs and outputs (with intervening blank columns) are to be printed in their declared integer format, the following command can be used:

PRINT LIST=a*b*func**ovl*out

Sometimes it may be desirable to output a group of signals that are not declared as a vector, or to change the radix format of a declared vector, or even to reverse or modify the array order of a declared vector. All of these functions are handled by defining a vector alias with the DEFINE command. The format for this command is:

DEFINE V<name>.<format>=<list of signals>

where <name> is a user-supplied alias for the vector, and <format> is one of the following formats:

Except for the one's complement specification, which can only be INTEGER1 or INT1, any valid specification prefix is sufficient.

For example, to display a and b together in HEXADECIMAL format, and display func as an integer in the reverse array order, the following commands can be used:

DEFINE VAB.HEX=a,b
DEFINE VFUNC.INT=func[1:0]
PRINT LIST=vab*vfunc**a*b*vfunc**ovl*out

When vab and vfunc are displayed in the signal name header, the "v" prefix is replaced with an asterisk (*). This is a reminder that the displayed signal is not an original signal, but is actually an alias generated at run time.

Once a vector alias is defined, it (like declared arrays) may also be used as a value for any keyword that processes a list of signals. In this case, the root name is synonymous with its associated list of signals.

For Octal and Hexadecimal formats, if all signal in the radix group are tristated (Z), then a Z will be displayed in that group's position. Otherwise, if any signal is unknown (X) or tristated (Z), then an X will be displayed in that groups position. For the integer formats, if all signals in the array are Z, then a Z is displayed. Otherwise, if any signal is X or Z, then an X is displayed.

Querying For Current Selected Options

SIMIC can be queried to report which options have been currently selected, which signals are currently selected for output, and which signals will trigger output when they change value, by issuing the command:

?WRITE

(?WR) for the write options, and:

?PRINT

(?PR) for the print options.