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 Samples Library command, in menu Help).
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 palette.
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 "Add Spice Card" under the "Misc." button in the component palette. The command creates a piece of text that can be modified arbitrarily. Whatever the text says will be added to the Spice deck.
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 exteral 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 middle section of the Spice Options dialog controls technology-specific information. Each layer of the technology can have a different resistance, capacitance, and edge-capacitance. You can also set the minimum resistance and capacitance for the entire technology. The "Gate Length Shrink" is a compensation factor for gate lengths. Some process technologies shrink the gate length by a fixed amount. To let Spice know the true gate length, this shrinkage can be entered here.
The lower-middle 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, trailer, and parasitic 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. This disk file replaces the any Spice description that may be derived from the circuitry.