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.

3.4 Expanding Subcircuits and Device Models 227<br />

With AutoloadModels −> True, ExpandSubcircuits searches the model library for undefined device<br />

models.<br />

Load undefined models<br />

from the library.<br />

In[4]:= ExpandSubcircuits[buffer, DefaultSelector −> AC,<br />

AutoloadModels −> True, Protocol −> Notebook]<br />

Searching model libraries for model "BJT/AC".<br />

Loading model "BJT/AC" from library FullModels‘.<br />

Instantiating model "BJT/AC" for reference Q$T1.<br />

Instantiating model "BJT/AC" for reference Q$T3.<br />

Instantiating model "BJT/AC" for reference Q$T4.<br />

Instantiating model "BJT/AC" for reference Q$T5.<br />

Instantiating model "BJT/AC" for reference Q$T2.<br />

Out[4]= NetlistFlat, 55 <br />

The following command tells Analog Insydes to load a model from the library into memory and store<br />

it in the global subcircuit database for future reference. Further requests for the model "BJT/AC"<br />

will not invoke a library search.<br />

Load the model "BJT/AC"<br />

and store it in the global<br />

subcircuit database.<br />

List the contents of the<br />

global subcircuit database.<br />

In[5]:= Circuit[<br />

LoadModel["BJT", "AC", Scope −> Global]<br />

] // ExpandSubcircuits;<br />

In[6]:= GlobalSubcircuits[]<br />

Out[6]= BJT, AC SpiceAC Noise SpiceNoise<br />

Now that the model "BJT/AC" has been loaded into memory, turning off the autoloading mechanism<br />

no longer results in an error when expanding the netlist buffer.<br />

Use only model definitions<br />

from the subcircuit<br />

database; do not search<br />

the library.<br />

In[7]:= ExpandSubcircuits[buffer, DefaultSelector −> AC,<br />

AutoloadModels −> False, Protocol −> Notebook]<br />

Instantiating model "BJT/AC" for reference Q$T1.<br />

Instantiating model "BJT/AC" for reference Q$T3.<br />

Instantiating model "BJT/AC" for reference Q$T4.<br />

Instantiating model "BJT/AC" for reference Q$T5.<br />

Instantiating model "BJT/AC" for reference Q$T2.<br />

Out[7]= NetlistFlat, 55 <br />

Clear the subcircuit<br />

database.<br />

In[8]:= RemoveSubcircuit[All]<br />

Out[8]= <br />

To illustrate how to write patterns for HoldModels, we make a list off all Model and Selector<br />

specifications in the netlist buffer.

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

Saved successfully!

Ooh no, something went wrong!