23.01.2015 Views

Download - Wolfram Research

Download - Wolfram Research

Download - Wolfram Research

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

52 2. Tutorial<br />

Connections to subcircuits can only be made through designated port nodes. Any attempt to interface<br />

directly with an internal node will cause the generation of an error message when the netlist hierarchy<br />

is flattened. However, there is one exception: since the ground node (0) is considered to be global,<br />

elements in subcircuit definitions may be connected directly with global ground without the need<br />

to specify 0 as a port node. In fact, 0 cannot be used as port node identifier in Analog Insydes.<br />

Finally, all which remains to do is to write the netlists of the two subcircuits and set up the Model<br />

definitions as follows:<br />

Model[<br />

Name −> NPNTransistor,<br />

Selector −> ACsimple,<br />

Ports −> {"B", "C", "E"},<br />

Definition −><br />

Netlist[<br />

{RB, {"X", "E"}, RB},<br />

{CC, {"B", "X", "C", "E"}, beta}<br />

]<br />

]<br />

Model[<br />

Name −> NPNTransistor,<br />

Selector −> ACdynamic,<br />

Ports −> {"B", "C", "E"},<br />

Definition −><br />

Netlist[<br />

{RB, {"X", "E"}, RB},<br />

{CM, {"B", "C"}, CM},<br />

{CC, {"B", "X", "C", "E"}, beta},<br />

{RO, {"C", "E"}, RO}<br />

]<br />

]<br />

In this example, we used node names for all subcircuit nodes given by strings ("B", "C", "E", "X") but<br />

we could have used positive integers just as well. However, using symbolic names is usually preferable. The<br />

reason is that during subcircuit expansion all internal nodes of subcircuit objects will be instantiated and<br />

labeled with unique identifiers such as X$Q1, which are automatically generated from the node names and the<br />

reference designator of the subcircuit instance. If an internal node identifier is an integer, e.g. 2, the generated<br />

instance identifier 2$Q1 could be confused easily with the product 2*$Q1.<br />

2.3.3 Referencing Subcircuits<br />

The Netlist Entry Format for Subcircuit References<br />

Subcircuits or device models defined with the Model command can be referenced from a netlist on a<br />

higher hierarchy level by a netlist entry whose value field contains the options Model and Selector:

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

Saved successfully!

Ooh no, something went wrong!