Any node name ending in the character '!' is assumed to be universal. Thus, ext2spice will electrically connect the node 'Vdd!' in one cell to the node 'Vdd!' in all other cells, whether or not they are physically connected. Identically named nodes that do not end in '!' will only be shorted together if they are present in the same instance of the same cell.
The user can control what identification number ext2spice gives to any particular transistor. The program looks to see if the gate argument is of the form Mx[xx..] where x's are integers. If that is the case, then in the .spice file, the fet will be identified by Mx[xx..]. In order to get magic to place a gate argument in the .ext file, a label must be placed within the channel region of the fet, and the label must end with the character '^'. For example, the label 'M12^' would cause the attached transistor to be identified as 'M12'. A transistor whose identification number is not specified will be issued one by ext2spice.
The user can also specify which terminal of the transistor is the source, and which one is the drain. In this case, at least one terminal attribute must be S or D. Both terminals may be labeled, but one is sufficient. In order for magic to place terminal attributes in the .ext file, the label S$ or D$ must be placed on the junction between the channel and the diffusion.
When merging parallel transistors (see -m below) it is sufficient to label only one of the transistors in order to specify the identification number and source-drain orientation of the merged transistor. However, both Mx and S or D labels should be placed on the same transistor. S or D labels on transistors other than the one(s) with Mx labels may be lost during the merging process.
The possible options are:
m Merge parallel transistors (if they have the same gate length) into an equivalent, wider transistor.
n Print all of the node names with their node numbers at the end of each subckt definition.
N Print all of the node names with their node numbers into a separate .names file. (-n and -N are mutually exclusive).
o Print nodes one per line in subcircuits. May make it easier to read.
t Use a top-down strategy to create node names. Generally, this will result in the shortest nodenames.
s Use the string (alphanumeric) nodenames generated by magic instead of using node numbers. This option overrides node numbers defined in the "defs" file. However, if the name is something like 54_435_27# (an unlabeled node in magic), ext2spice will just generate an integer number as the node name. Warning: this can cause errors if you labeled your nodes with integer names!
Do not output capacitors that are less than cmin femptoFarads. Default cmin is 1.0 femptoFarads.
If you use this option, any node name longer than nodeLenBarfLimit characters will instead be renamed to an integer. Set this value to 16 to make hspice happy. Spice3 does not need this option. This option is only usefull with the s option.
Subtract deltaW microns from the width of every transistor. This is applied before merging parallel transistors, so deltaW will be subtracted from every finger of fingered transistors.
.d defs is a definitions file. Within the defs file, the user may place the following commands, on separate lines:
The path command: path directorypath
Tells ext2spice in which directories to look for .ext files. ext2spice will look through each directory in the listed order, until it finds the .ext file. Directory names MUST BE SEPARATED BY BLANK CHARACTERS. Eg: path . ~burstein/magic ~burstein/magic/comp ~burstein/magic/opamp
The set command: set nodename number
causes the node with the label nodename to have the nodenumber "number" in the spice file. For example:
set GND! 0
set input 7
would set the node with the label 'GND!' to 0, and the node with the label 'input' to 7. In cmos, there are two special nodes, defined in the magic technology file which represent the bulk (substrate) connection of the transistors. (NMOS and PMOS are commonly used names). Generally, the user should SET THESE NODES TO THE SAME NODE as GND and Vdd.
The def command: def exttrans spicetrans flavor
specifies spice model name and flavor (n or p) for a fet. For example:
def pfet PMOS p
def nfet NMOS n
would cause the transistors identified as 'pfet' in the .ext file to have model name 'PMOS' is the .spice file. Likewise, 'nfet' transistors get the 'NMOS' model name. (These actually are the defaults.) The user must specify the actual model. It is necessary to specify the flavor so the program knows which type of diffusion to include in the source and drain area and perimeter calculations.
Two other commands - nrclass and prclass - tell ext2spice which resistance classes (as specified by the magic technology file) correspond to layers which contain pdiffusion and ndiffusion. (They are called resistance classes because magic thinks it is extracting areas and perimeters to calculate resistance. Instead, ext2spice uses it as part of the spice transistor description.) These commands have the form:
where k is an integer specifying the first or second or third ... resistance class. The default for narea is 1; for parea, 2.
Thus, if you use the defaults, the resist section of the extract section of the magic technology file should start with:
resist ndiff,ndc/active xxxxxx
resist pdiff,pdc/active xxxxxx
where xxxxxx is some resistance value (which is irrelevant to ext2spice since it ignores resistance).
Ring shaped transistors might not extract correctly.
When a node is renamed to an integer, ext2spice does not check to see if there was a node labeled in magic with the same integer, so the nodes may be erroneously merged. For now, don't label nodes in magic with integers.
Report bugs to firstname.lastname@example.org