User`s guide
6
-
6 Analo
g
Behavioral Modelin
g
ABM Part Templates
For most ABM symbols, a single PSpice A/D “E” or “G” device
declaration is output to the netlist per symbol instance. The
TEMPLATE attribute in these cases is straightforward. For
example the LOG symbol defines an expression variant of the E
device with its output being the natural logarithm of the voltage
between the input pin and ground:
E^@REFDES %out 0 VALUE { LOG(V(%in)) }
The fragment E^@REFDES is standard. The “E” specifies a
PSpice A/D controlled voltage source (E device); %in and %out
are the input and output pins, respectively; VALUE is the
keyword specifying the type of ABM device; and the expression
inside the curly braces defines the logarithm of the input
voltage.
Several ABM symbols produce more than one primitive
PSpice A/D device per symbol instance. In this case, the
TEMPLATE attribute may be quite complicated. An example is
the DIFFER (differentiator) symbol. This is implemented as a
capacitor in series with a current sensor together with an E
device which outputs a voltage proportional to the current
through the capacitor.
The template has several unusual features: it gives rise to three
primitives in the PSpice A/D netlist, and it creates a local node
for the connection of the capacitor and its current-sensing V
device.
C^@REFDES %in $$U^@REFDES 1\n
V^@REFDES $$U^@REFDES 0 0v\n
E^@REFDES %out 0 VALUE {@GAIN *
I(V^@REFDES)}
The fragments C^@REFDES, V^@REFDES, and
E^@REFDES create a uniquely named capacitor, current
sensing V device, and E device, respectively. The fragment
$$U^@REFDES creates a name suitable for use as a local node.
The E device generates an output proportional to the current
through the local V device.
For clarity, the template is shown
on three lines althou
g
h the actual
template is a sin
g
le line.