23.01.2015 Views

Download - Wolfram Research

Download - Wolfram Research

Download - Wolfram Research

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

Create successful ePaper yourself

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

2.3 Circuits and Subcircuits 53<br />

{subcircuit instance name, {port connections},<br />

Model −> subcircuit class name, Selector −> selector}<br />

To reference a subcircuit object (see Section 3.1.8) the subcircuit class name and the selector must<br />

be the same identifiers as those given as arguments to the Name and Selector parameters in the<br />

corresponding Model statement. The subcircuit instance name may be any symbol or string which can<br />

serve as the unique identifier of this instance of the subcircuit object.<br />

You can even use subcircuit instance names which begin with an element type tag known to Analog Insydes.<br />

A subcircuit reference with an instance identifier such as RX will never be confused with a resistor because<br />

the reference will have been expanded before circuit equations are set up.<br />

A netlist entry which marks a reference to an instance of the NPN transistor model<br />

NPNTransistor/ACsimple, using the instance identifier Q1, would be written as follows:<br />

{Q1, {connectivity},<br />

Model −> NPNTransistor, Selector −> ACsimple}<br />

This line does not yet specify how the instance Q1 of NPNTransistor/ACsimple should be embedded<br />

into the surrounding circuit structure, i.e. which nodes of the latter should be connected to the<br />

subcircuit’s port nodes. Associating external nodes with subcircuit port nodes is done by means of<br />

a special format of the connectivity field. All entries of this field must be written as rules of the form<br />

external node −> subcircuit port node<br />

In our common-emitter amplifier (see Figure 3.1 in Section 2.3.1), node 1 of the top-level netlist is<br />

connected to the base node "B" of the transistor, node 3 to the collector node "C", and node 4 to the<br />

emitter node "E", resulting in a node-to-port mapping such as this:<br />

{Q1, {1 −> "B", 3 −> "C", 4 −> "E"},<br />

Model −> NPNTransistor, Selector −> ACsimple}<br />

Since the mapping is defined by names, the relative positions of the entries in the connectivity field<br />

are not important. We could have written the connectivity field as<br />

equally well.<br />

{3 −> "C", 1 −> "B", 4 −> "E"}<br />

A Hierarchical Netlist Description of the Amplifier<br />

Having learned how to define and how to make references to subcircuits (see Section 3.1.8), we can<br />

now write a hierarchically structured netlist for the common-emitter amplifier from Section 2.3.1 (see<br />

Figure 3.1).<br />

In[1]:=

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

Saved successfully!

Ooh no, something went wrong!