Using the Electric VLSI Design System

Chapter X: SIMULATION

| ## 2: Simulator Operation |

To begin simulation of the circuit in the current window, use the Simulate... subcommand of the Simulation command of the Tools menu. The simulator already knows about MOS transistors and many digital logic gates. In addition, the user can describe any function with the hardware description language described later in this chapter.

When simulation begins, a waveform appears in a new window which is highlighted with a red border. The circuit that is being simulated is also highlighted with a red border to indicate its association.

All exported ports in the circuit are listed on the left (if there are more than 20, then the slider allows them to be scrolled into view). Two vertical cursors appear in the window, called "main" and "extension" (the extension cursor has an "x" at the top). You can click over the cursors and drag them to different time locations. You can also click over signal names to select them for appropriate operations. Note that when you click on a signal name, the equivalent signal in any other associated window is also highlighted.

Once a signal name has been selected, a test vector can be placed on that signal at the time specified by the main cursor. Type "l", "h" or "x" to set the signal to low, high, or undefined (using normal strength, shown in magenta). Prefix the letter with a "w" ("wl", "wh", and "wx") to set a weaker strength signal (shown in green). Prefix the letter with an "s" ("sl", "sh", and "sx") for stronger strength signals (shown in black).

Besides simple test vectors, clock patterns can be set on the currently selected signal by typing the letter "c". The user is then given a dialog for clock specification. Note that the clock may cycle infinitely, but Electric only generates simulation events to fill the current waveform window. If you want more clock events generated, zoom-out the waveform window before issuing the clock command.

There are three ways to specify a clock: by frequency, period, or with custom phases. If the frequency or period method is selected, the only option is the frequency (in cycles per second) or period (in seconds).

| If, however, custom clock specifications are requested, the entire lower part of the dialog is enabled (as show on the left) and many options are available. You can choose the strength of the clock (node, gate, or VDD), the random distribution of the clock, and a list of phases that will be repeated a specified number of times (use 0 repetitions for an infinite clock). For each phase, select its level (low, high, or undefined) and its duration. Then use the "Add Phase" button to add it to the list. Use the "Delete Phase" button to remove a phase.

To remove the test vectors on the selected signal, type the "e" key. Use the Clear All Vectors subcommand of the Simulation command of the Tools menu to erase all test vectors.

Once vectors are established, the Save Vectors to Disk subcommand of the Simulation command of the Tools menu will write this information to disk. Use the Restore Vectors from Disk subcommand to read it back. Another way to obtain simulation data is to read an SDF file (with the SDF subcommand of the Import command of the File menu). Once this data has been read, one of three sets of values (Typical, Minimum, or Maximum) must be selected from the Annotate Delay Data subcommand of the Simulate command of the Tools menu.

Besides test vector commands, you can control the simulation window. Use "r" to remove the selected signal from the display. Use "a" to add a signal back onto the display. Use the Restore Signal Display Order subcommand to reset the waveform display to its original set of signals.

The time axis of the simulation window can be controlled with the appropriate Window menu commands. Use Zoom Out and Zoom In to scale the time axis by a factor of two. Use Focus on Highlighted to display the range between the main and extension cursors.

Some miscellaneous commands are also available. Use "i" to display information about the selected network. Use "s" to save a snapshot of the simulation window in the database (a facet is created with artwork components).

The simulator uses the hierarchy in the original circuit during simulation. Therefore, the signals shown are those from the current hierarchical level. To see a lower level of hierarchy, use the Down Hierarchy... subcommand of the Simulation command of the Tools menu, and select the instance in which to descend. To see the next higher level, use the Up Hierarchy subcommand. If there are more signals at a given level than can fit in the window, use the Up and Down commands of the Window menu to scroll through the signal names.

Each change that is made to the simulator causes it to resimulate and display the results. If multiple changes are to be made and the simulation time is long, use the Simulation Options... subcommand of the Simulation command of the Tools menu. Uncheck the "Resimulate each change" item. Then you must type "u" when you want to resimulate.

| The "Auto advance time" check tells the simulator to move the time cursor automatically when a new signal is added to the simulation. The "Multistate display" check tells the simulator to show signals in the layout or schematics window with texturing and color to indicate strength. Without this, a simple on/off indication is drawn in the layout or schematics window. The "Show waveform window" check tells the simulator to create a separate window with waveform plots when simulation starts. When this is unchecked, simulation still runs, but only displays signal information on the schematic or layout. The simulator only handles a fixed number of events before it stops simulating. If your circuit or analysis is too long, you will have to increase the number of events.

To stop simulation, close the simulation window. You can get the simulation window back with the Resume Simulation subcommand of the Simulation command of the Tools menu.

Here is a summary of the single-key commands available in digital simulation windows:

Key | Meaning
l wl sl | Set selected signal low at main cursor (gate strength) Set selected signal low at main cursor (node strength, weak) Set selected signal low at main cursor (VDD/GND strength, strong)
h wh sh | Set selected signal high at main cursor (gate strength) Set selected signal high at main cursor (node strength, weak) Set selected signal high at main cursor (VDD/GND strength, strong)
x wx sx | Set selected signal undefined at main cursor (gate strength) Set selected signal undefined at main cursor (node strength, weak) Set selected signal undefined at main cursor (VDD/GND strength, strong)
c | Specify a clock on selected signal
e | Delete all vectors on selected signal
i | Print information about selected signal
a | Add signal to simulation window
r | Remove selected signal from simulation window
s | Save snapshot of simulation window in database
u | Resimulate and redisplay the waveform information
? | Print this help message

These window menu functions apply to the digital simulation windows:

- Zoom out (show twice as much time)
- Zoom in (show half as much time)
- Focus on Highlighted (show from main to extension cursors)
- Left (show earlier time)
- Right (show later time)

| Previous |  |  | Table of Contents |  | Next |