Using Electric 10-2: Simulator Operation

Chapter 10: SIMULATION

| ## 10-2: Simulator Operation |

To begin simulation of the circuit in the current window, use the Simulate... subcommand of the Simulation (Built-in) command of the Tools menu. The simulator already knows about MOS transistors. The ALS simulator also knows about many digital logic gates and can be programmed to describe any function with the hardware description language described later in this chapter.

### The Waveform Window

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 exports in the circuit are listed on the left (if there are too many, then the slider allows them to be scrolled into view). 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.

You can rearrange the order of the signals by dragging them to their desired location. You can remove a signal by selecting it and typing the letter "r". You can add a signal to the list by typing the letter "a" (you will then be prompted for the signal to add). To aggregate a number of signals into a single "bus" signal, select them and type "b" (to select multiple signals, start in the blank space between signal names and drag vertically over other names). Once a bus signal has been created, its individual signals can be shown or hidden by double-clicking on its name. All of these rearrangements are remembered with the facet for subsequent simulations. With the ALS simulator, you can use the Restore Signal Display Order (ALS) subcommand to reset the waveform display to its original set of signals.

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. The time axis of the simulation window can also 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.

### Test Vectors

When a signal name is 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). For bus signals, type "v" (you will then be prompted for the value to set on that bus). Prefix the letter with a "w" ("wl", "wh", "wx", and "wv") to set a weaker strength signal (shown in green). Prefix the letter with an "s" ("sl", "sh", "sx", and "sv") for stronger strength signals (shown in black).

Another way to control the strength of signals is by setting a transistor's strength. You can use the Transistor Strength subcommands of the Simulation (Built-in) command of the Tools window to control a selected transistor. Note that this must be done before simulation begins.

To remove the test vectors on the selected signal, type the "e" key. Use the Clear All Vectors subcommand of the Simulation (Built-in) command of the Tools menu to erase all test vectors. Note that these commands do not remove "strong" vectors (those set with the "sl", "sh", "sx", or "sv" commands).

Once vectors are established, the Save Vectors to Disk subcommand of the Simulation (Built-in) command of the Tools menu will write this information to disk. Use the Restore Vectors from Disk subcommand to read it back.

In the ALS simulator, you can also obtain simulation data from 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 (ALS) subcommand of the Simulate command of the Tools menu.

### Clocks

Besides simple test vectors, the ALS simulator can also set clock patterns 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 generates simulation events to fill only 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 shown 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.

### Simulator Control

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 (Built-in) command of the Tools menu, and select the instance in which to descend. To see the next higher level, use the Up Hierarchy subcommand.

The Simulation Options... subcommand of the Simulation (Built-in) command of the Tools menu offers control over the simulation process. 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, 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.

You can choose where you want the waveform window to be displayed. The default, "Cascade", requests that it appears in a new overlapping window. You can also request that the waveform window "Tile Horizontally" or "Tile Vertically", which causes the simulated circuit's window to split, showing the waveform in the other half.

For signals that are aggregated into busses, you can choose the number base for display of values.

The ALS simulator handles only a fixed number of events before it stops simulating (initially 10,000). If your circuit or analysis is too long, you will have to increase the number of events.

The IRSIM simulator can handle three levels of parasitic information: "Quick" makes quick estimates of area and perimeter; "Local" analyzes each level of hierarchy fully but separately; "Full" analyzes the entire hierarchy, and can take a long time. In addition, you can specify the ".prm" parameter file that you want IRSIM to use.

Besides the options offered by the dialog, there are some additional commands that can be typed to the waveform window. Use "t" (ALS only) to trace the simulation for the selected signal (and "ft" to dump a full trace of all signals). Use "i" to display information about the selected signal. Use "p" to preserve a snapshot of the simulation window in the database (a facet with the "simulation-snapshot" view is created with artwork components). To stop simulation, close the simulation window.

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)
v wv sv | Set a value on the selected bus signal at main cursor (gate strength) Set a value on the selected bus signal at main cursor (node strength, weak) Set a value on the selected bus signal at main cursor (VDD/GND strength, strong)
c | Specify a clock on selected signal
e | Delete all vectors on selected signal
i t ft | Print information about selected signal Trace simulation for selected signal (ALS only) Trace simulation for all signals (ALS only)
b | Aggregate selected signals into a bus signal
a | Add signal to simulation window
r | Remove selected signal from simulation window
p | Preserve 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 |