Electric can produce input decks for Spice simulation with Write Spice Deck... command (in menu Tool / Simulation (Spice)). After this has been done, you must run Spice externally to produce a simulation output file. Note that the Electric distribution does not come with a Spice simulator: you must obtain it separately.
Once Spice has been run, you can see a plot of the simulation by reading the Spice output file back into Electric. Since there are may formats of Spice output, you must first set the "Spice Engine" and the "Output format" fields of the "Spice" Preferences (in menu File / Preferences..., "Tools" section, "Spice" tab). The "Output format" field is "Standard" for the default output of the Spice engine; "Raw" for rawfile dumps; and "Raw/Smart" for the rawfile dumps from SmartSpice.
When Electric knows what type of Spice output file to expect, use the Plot Spice Listing... command (in menu Tool / Simulation (Spice)) to read the file. If the file has the same name as the current cell, you can more simply use Plot Spice for This Cell, which does not need to prompt for a file name. The Spice simulation information is shown in an analog waveform window (see Section 4-12-2 for more).
There are many powerful facilities for running Spice with Electric. The example shown here illustrates some of these facilities. This example is available in the Samples library as cell "tool-SimulateSpice" (you can read the library with the Load Library command, in menu Help / Samples).
All input values to Spice are controlled with special nodes, found in the "Spice" component menu entry. Note that the first time any Spice node is placed, the library of Spice parts is loaded into Electric, so there may be a delay. | ![]() |
The Spice primitives described here are for Electric's default set. However, additional sets can (and have) been written. To choose another set, use the "Spice" preferences (in menu File / Preferences..., "Tools" section, "Spice" tab). Under the setting "Spice primitive set", choose another set. A second set, called "SpicePartsS3", is tailored towards special Spice3 primitives.
![]() |
In this example, there is a 5-volt supply on the left.
It was created by using the "DC Voltage" entry under "Spice" entry of the component menu.
Once placed, the text that reads "Voltage=0V" can be selected and modified
(either with Object Properties... or by double-clicking on it).
The Pulse input signal on the right is created with the "Pulse" entry under "Spice" (it has 7 parameters).
There are both voltage and current sources, in AC and DC form. The pulse input sources are available as voltage and current. A set of "two-gate" devices are also available: "CCCS", "CCVS", "VCCS", "VCVS", and "Transmission". It is possible to specify Transient, DC, or AC analysis by using the "Transient Analysis", "DC Analysis", and "AC Analysis" subcommands. Only one such element may exist in a circuit. |
For advanced users, there are two special Spice nodes: "Node Set" and "Extension". The Node Set may be parameterized with an arbitrary piece of Spice code. Truly advanced users may create their own Spice nodes by modifying the cells in the Spice library.
This example also shows the ability to add arbitrary text to the Spice deck, as shown in the lower-right. To create this text, use the "Spice Code" or "Spice Declaration" entries under the "Misc." button in the component menu. These command create text that can be modified arbitrarily. Whatever the text says will be added to the Spice deck (declarations go near the top).
Another option that can be used when modeling transistors and other component is to set a specific Spice model to use for that component. To set a node's model, select it and use the Set Spice Model... command (in menu Tool / Simulation (Spice)).
The Add Multiplier subcommand places a multiplier on the currently selected node. Multipliers (also called "M" factors) scale the size of transistors inside of them.
Some nongraphical information can also be given to the Spice simulator with the "Spice" preferences (in menu File / Preferences..., "Tools" section, "Spice" tab).
The top part of this dialog allows you to control many of the Spice deck parameters such as:
Running Spice: Electric can create an external process as specified by the user to run Spice on the generated netlist. If the pull-down box is set to "Don't Run", nothing is done. If the pull-down box is set to "Run, Ignore Output", the external process is run, and the user is notified when it is finished. If set to "Run, Report Output", a dialog box is opened to show the user the output produced by the process. Please note that this is a *process*, and not a command line command.
There are several options for the process:
The lower section controls header and trailer cards (placed at the start and end of the Spice deck). This dialog allows you to specify a disk file with cards to be used instead of the built-in set. You can specify a particular file or request that the system search for files with the cell's name and a given extension.
Note that the header and trailer information is specific to a particular technology. If you set this information for one technology, but then use another technology when generating the Spice deck, the information that you set will not be used. Note also that schematics, although a technology in Electric, are not considered to be Spice technology. You can set the proper layout technology that you want to use when dealing with schematics by using the "Use Scale values from this Technology" popup. This popup can be found in the "Technology" preferences (in menu File / Preferences..., "Technology" section, "Technology" tab).
The bottom section of the dialog allows you to specify a disk file of Spice cards that will be used to describe any cell. Instead of the cell subcircuit, the specified disk file is "included" in the deck.