#

## ext2spice, exttospice

Convert extracted file(s) to a SPICE format file.

### Usage:

> ext2spice [option]

> > where option is one of the following:
> > [run] [runtime_options]
> >   Run ext2spice on current cell, with command-line options (see Summary, below).
> > default
> >   Reset to default values
> > format hspice|spice2|spice3
> >   Set output format. spice3 is the default, for compatibility with tclspice. This is a change from previous versions of magic, where the default was hspice.
> > rthresh [value]
> >   Set resistance threshold value. Lumped resistances below this value will not be written to the output. The value is in ohms, or may be the keyword infinite to prohibit writing any lumped resistances to the output.
> > cthresh [value]
> >   Set capacitance threshold value. The value is in femtofarads, or may be the keyword infinite to prohibit writing any parasitic capacitances to the output.
> > merge [merge_option]
> >   Merge parallel devices/transistors. The valid merge options are:

> >   > conservative
> >   >   Merge transistors and capacitors having the same device type and node connections and having the same width and length. Widths are summed in the final output for transistors. Capacitor values are summed in the final output.
> >   > aggressive
> >   >   Merge transistors having the same node connections and having the same length. Widths are summed in the final output. Merge any capacitors having the same device type and node connections. Capacitance is summed in the final output.
> >   > none
> >   >   Do not merge any devices.

> > extresist on|off
> >   Incorporate output from the command extresist into the final SPICE file.
> > resistor tee [on|off]
> >   Model resistor capacitance as a T-network. Each resistor device is split into two, with all substrate and overlap capacitance placed on the node between the two half-length devices. Without this option, resistor devices lose all parasitic capacitance information, and ext2spice may produce warnings about unknown nodes. However, use of this option may conflict with LVS (layout-vs.-schematic), when only one resistor is expected per drawn device.
> > subcircuits [on|off]
> >   When set to on (the default), standard cells become subcircuit calls ("X") in the SPICE output. The contents of the standard cells are not output, and it is assumed that a pre-characterized SPICE deck exists modeling the behavior of each standard cell definition. Standard cells are defined by the use of the port method for labeling input and output ports. When set to off, ports are ignored, and the entire circuit hierarchy is flattened down to the device level.
> > help
> >   Print help information.

### Summary:

> Without options, or with the option run, the ext2spice command converts the hierarchical extracted netlist information produced by the extract command in a series of `.ext` files into a flattened representation in SPICE format, used for detailed analog simulation.

> runtime_options may be passed on the command line, and represent the original command-line options passed to the standalone version of ext2spice. A number of the original command-line options have been deprecated in the Tcl-based version, and some are duplicated by other ext2spice options. Valid runtime_options are:

> > -B
> >   Don't output transistor or node attributes in the SPICE file. This option will also disable the output of information such as the area and perimeter of source and drain diffusion and the FET substrate.
> > -F
> >   Don't output nodes that aren't connected to devices (floating nodes).
> > -t char
> >   Trim characters from node names when writing the output file. char should be either "#" or "!". The option may be used twice if both characters require trimming.
> > -y num
> >   Select the precision for outputting capacitors. The default is 1 which means that the capacitors will be printed to a precision of 0.1 fF.
> > -J hier|flat
> >   Select the source/drain area and perimeter extraction algorithm. If hier is selected then the areas and perimeters are extracted only within each subcell. For each device in a subcell the area and perimeter of its source and drain within this subcell are output. If two or more devices share a source/drain node then the total area and perimeter will be output in only one of them and the other will have 0. If flat is selected the same rules apply, only the scope of search for area and perimeter is the whole netlist. In general, flat (which is the default) will give accurate results (it will take into account shared sources/drains).

> With options, the command sets various parameters affecting the output format and content.

### Implementation Notes:

> ext2spice is implemented as a separate loadable Tcl package, but one which depends on the presence of the standard "tclmagic" package. magic is set up with a placeholder command for ext2spice, and will automatically load the Tcl package when this command is invoked.

> exttospice is an alias for ext2spice, to satisfy the grammatically anal retentive.

### See Also:

> extract
> ext2sim

Return to command index

Last updated: October 12, 2005 at 9:40pm