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>>*]

Parameters

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:

  1. In the current circuit.
  2. Within the current job.
  3. Within the files specified by the .LIB command.
  4. Within the jobs in the folder of the current job.
  5. Within the jobs in the folder USER/LIBRARY.
  6. Within the jobs in the folder APP/LIBRARY.

PARAMS:

Passes values into subcircuits as arguments and into expressions inside the subcircuit. The parameters are specified by the pair: name = value.

Note 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.

Examples

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

See also

Subcircuit Model
Subcircuit Definition
Subcircuit Expansion