10.06.2016 Views

eldo_user

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Eldo Netlist Setup<br />

Working With Subcircuits and Device Libraries<br />

Working With Subcircuits and Device Libraries<br />

This topic is divided into:<br />

Subcircuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127<br />

Device Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132<br />

Subcircuits<br />

Subcircuits can be used to simplify netlists because once defined they can be instantiated<br />

multiple times in the netlist. Subcircuit definitions and instances can be nested. The inner<br />

subcircuit definitions are local to the subcircuit definition in which they are defined, that is, they<br />

are not valid outside of it. Parameters contained in a subcircuit can be assigned explicitly or via<br />

the .PARAM command.<br />

Subcircuits may be parameterized. Symbols may be used as values within the subcircuit body<br />

which may be assigned values when the subcircuit is instantiated. A subcircuit may be stored in<br />

a library file, in which case the .SUBCKT LIB syntax should be used together with .LIB or<br />

.ADDLIB.<br />

A subcircuit may optionally be simulated using the differentiated accuracy system. The iteration<br />

technique used to process the subcircuit is chosen by the (ANALOG) optional keyword.<br />

Usually, a circuit with (ANALOG) specified indicates ‘high accuracy’.<br />

By default, when Eldo encounters multiple definitions of .SUBCKT statements an error is<br />

reported and the simulation is stopped. To enable the simulation to proceed you can force Eldo<br />

to only use the first definition by specifying option USEFIRSTDEF at the beginning of the<br />

netlist (any further definitions are ignored); or to only use the last definition specify option<br />

USE_LAST_SUBCKT or USELASTDEF (any previous definitions are ignored). The last<br />

definition takes into account contents included from library files.<br />

Order of Precedence of Subcircuit Parameter Assignments<br />

Parameters used within a subcircuit may be defined in several ways.<br />

• In the subcircuit instantiation:<br />

X1 N1 N2 N3 MY_SUBCIRCUIT P3=10<br />

• Internally, within the subcircuit:<br />

.SUBCKT MY_SUBCIRCUIT<br />

.PARAM p3=20<br />

.ENDS<br />

• In the subcircuit declaration:<br />

.SUBCKT MY_SUBCIRCUIT P1 P2 P3 PARAM: p3=2<br />

Eldo® User's Manual, 15.3 127

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!