Subcircuit Calls |
This statement causes the referenced subcircuit to be inserted into the circuit using the given nodes to replace the argument nodes in the definition. It allows a block of circuitry to be defined once and then used in several places.
X<name> <node>* <subcircuit name> [PARAMS: <<name>=<value>>*] [TEXT: <<name>=<value>>*] |
name
Is the name of the component and the initial letter X identifies the inclusion of a subcircuit.
node
Represent the nodes to which is connected the subcircuit. There must be the same number of nodes in the subcircuit calling statements as in its definition. When the subcircuit is called, the actual nodes (the ones in the calling statement) replace the argument nodes (the ones in the defining statement).
subcircuit name
The name of the subcircuit’s definition. The referenced subcircuit can be in the main circuit file, accessed through a .INCLUDE command, or it can be in a library file. The subcircuit is searched in the following order:
PARAMS:
Passes values into subcircuits as arguments and into expressions inside the subcircuit. The parameters are specified by the pair: name = value.
Note: If the value is in quotation marks then the parameter is of type text and is used as if it were specified after the keyword TEXT:.
TEXT:
Passes text values into subcircuits. The text parameters are specified by the pair: name = value.
X1 10 20 30 40 SUB1 PARAMS: P1=1 P3=5 TEXT: FILE=PWLDATA.TXT
.SUBCKT SUB1 1 2 3 4 PARAMS: P1=0 P2=0 P3=0 TEXT: FILE=SIMPLEPWL.TXT
.....
.ENDS SUB1