Micro-Cap v7.1.6 / RM
.PDFAnimation
Filters (Present when at least one filter macro has been created by the user) Macros (Present when at least one macro circuit has been created by the Make Macro command)
Components in the Analog Primitives and Digital Primitives parts of the library require the user to select a model name, or for simple components like a resistor, a value.
Components in the Analog Library and Digital Library sections of the library do not require the user to select a model name. The user need only select the desired part name. With these parts, the model or subcircuit name is equated automatically to the part name. Selecting a part name also selects the model, subcircuit, or macro name used to access the electrical modeling information.
Model statements and subcircuits for the parts in the Analog Library and Digital Library are already available in the Model library and are accessed with the default '.LIB NOM.LIB' statement implicit in every circuit.
It is possible to use or have more than one component library. Multiple libraries can be maintained, merged, and viewed with the Component editor, but it is recommended that the original library, STANDARD.CMP, should be left unmodified in its original state.
The Model library
The Model library provides the electrical modeling information required for any type of analysis or simulation. The MC7 model library is contained in the set of files listed in the general file NOM.LIB. If you examine the files referenced in this file, you will find that the models are provided in four forms:
Model parameters lists: These are lists of part names, types, and model parameters. The lists are stored in binary files using the extension LBR. These files can be viewed and edited only with the Model editor. Much of the Analog Library is stored in this form. The major exception is the Vendor section, which is mostly subcircuit models contained in text files using the extension LIB.
Model statements: These are conventional SPICE .MODEL statements. They hold the part names, types, and model parameters. They are stored in
617
text files using the LIB extension. These are primarily used as a part of the subcircuit form of modeling.
Subcircuits: These are conventional SPICE subcircuits that describe the equivalent circuit for the part. The subcircuits are stored in text files using the LIB extension. All of the Digital Library is implemented with subcircuits.
Macros: These are conventional MC7 macros that describe the equivalent circuit for the part. The general macros are stored in schematic files using the CIR or MAC extension. The specific macro call that implements a particular part model is stored as a macro call in a text file using the LIB extension. Some parts of the Analog Library are implemented in this form.
Of these four basic forms, the most common are the model parameter lists and subcircuits.
Adding new parts to the Model library
To add new parts to the Model library you must do two things:
•Add the new part to the Component library (see Chapter 4).
•Add a .MODEL, .SUBCKT, or .MACRO statement that electrically models the part to a file and add the file name to the NOM.LIB file.
After these tasks are done, the new model/part name should show up on the Component menus.
618 Chapter 25: Libraries
How models are accessed
When you select an analysis, MC7 accesses electrical modeling information for any parts in the circuit that require models. How does it do this? It searches for the modeling information (model parameter lists, model statements, subcircuits, or macro statements) in one of the following places:
Local Search within the circuit:
•If the circuit is a schematic:
•In the grid text or text area
•In the file named in the File attribute (if the device has one).
•In one or more files named in a .LIB filename statement.
•In one or more files named in the default .LIB NOM.LIB statement.
•If the circuit is a SPICE text file:
•In the circuit description text.
•In one or more files named in a .LIB filename statement.
•In one or more files named in the default .LIB NOM.LIB statement.
Global Search using the Library path(s):
MC7 always begins its search for the model information by lookinglocally in the circuit itself. If it doesn't find it there it looksglobally in the LIBRARY folder specified at File menu / Paths / Model Library and Include Files. If more than one path is specified, it searches them in left to right order. For example, if the Library Path is:
C:\MC7\LIBRARY ; D:\OTHER ; E:\ELSEWHERE
MC7 will first search in C:\MC7\LIBRARY. If it fails to find the models it needs there it will search for them in D:\OTHER, and then lastly in E:\ELSEWHERE.
619
620 Chapter 25: Libraries
Chapter 26 Performance Functions
What's in this chapter
Performance functions are mathematical procedures designed to extract circuit performance measurements from curves generated during an analysis. This chapter describes their capabilities. It includes:
•What are performance functions?
•Performance functions defined
•The Performance Function dialog box
621
What are performance functions?
MC7 provides a group of functions for measuring performance-related curve characteristics. These functions let you measure performance related values such as rise time, fall time, pulse width, frequency, period, and many others. These functions may be used to analyze any curve generated during the course of an analysis. There are several ways in which performance functions may be used:
•Immediate mode: In this mode, you click on the Go To Performance button and select a function from the list. The function is then applied to the curve specified in the Expression list box curve and the numeric result printed in the dialog box.
•Performance plots: In this mode, you do multiple runs by stepping numeric parameters and then create a plot showing how the performance function varies with the stepped variables. You can create two and three dimensional performance plots.
•Monte Carlo plots: In this mode, you run multiple Monte Carlo runs and then create a histogram showing how the performance function varies statistically.
622 Chapter 26 Performance Functions
Performance functions defined
MC7 provides a group of functions for measuring performance-related curve characteristics. These functions include:
Rise_Time |
This function marks the N'th time the Y expression rises |
|
through the specified Low and High values. It places the |
|
cursors at the two data points, and returns the difference |
|
between the X expression values at these two points. |
|
This function is useful for measuring the rise time of |
|
time-domain curves. |
Fall_Time |
This function marks the N'th time the Y expression falls |
|
through the specified Low and High values. It places the |
|
cursors at the two data points, and returns the difference |
|
between the X expression values at these two points. |
|
This function is useful for measuring the fall time of |
|
time-domain curves. |
Peak_X |
This function marks the N'th local peak of the selected |
|
Y expression. A peak is any data point algebraically |
|
larger than the neighboring data points on either side. It |
|
places the left or right cursor at the data point and |
|
returns its X expression value. |
Peak_Y |
This function is identical to the Peak_X function but |
|
returns the Y expression value. This function is useful for |
|
measuring overshoot in time-domain curves and the peak |
|
gain ripple of filters in AC analysis. |
Valley_X |
This function marks the N'th local valley of the selected |
|
Y expression. A valley is any data point algebraically |
|
smaller than the neighboring data points on either side. It |
|
places the left or right cursor at the data point and |
|
returns its X expression value. |
Valley_Y |
This function is identical to the Valley_X function but |
|
returns the Y expression value. It is useful for measuring |
|
undershoot in time-domain curves and the peak |
|
attenuation of filters in AC analysis. |
623
Peak_Valley |
This function marks the N'th peak and N'th valley of the |
|
selected Y expression. It places the cursors at the two |
|
data points, and returns the difference between the Y |
|
expression values at these two points. This function is |
|
useful for measuring ripple, overshoot, and amplitude. |
Period |
The period function accurately measures the time period |
|
of curves by measuring the X differences between |
|
successive instances of the average Y value. It does this |
|
by first finding the average of the Y expression over the |
|
simulation interval where the Boolean expression is true. |
|
Then it searches for the N'th and N+1'th rising instance |
|
of the average value. The difference in the X expression |
|
values produces the period value. Typically a Boolean |
|
expression like "T>500ns" is used to exclude the errors |
|
introduced by the non-periodic initial transients. This |
|
function is useful for measuring the period of oscillators |
|
and voltage to frequency converters, where a curve's |
|
period usually needs to be measured to high precision. |
|
The function works best on curves that pass through |
|
their average value once per fundamental period. It will |
|
not work well on curves that contain significant |
|
harmonics of the fundamental. The function places the |
|
cursors at the two data points, and returns the difference |
|
between the X expression values at these two points. |
Frequency |
This is the numerical complement of the Period function. |
|
It behaves like the Period function, but returns 1/Period. |
|
The function places cursors at the two data points. |
Width |
This function measures the width of the Y expression |
|
curve by finding the N'th and N+1'th instances of the |
|
specified Level value. It then places cursors at the two |
|
data points, and returns the difference between the X |
|
expression values at these two points. |
High_X |
This function finds the global maximum of the selected |
|
branch of the selected Y expression, places either the |
|
left or the right cursor at the data point, and returns its X |
|
expression value. |
624 Chapter 26 Performance Functions
High_Y |
This function finds the global maximum of the selected |
|
branch of the selected Y expression, places either the |
|
left or the right cursor at the data point, and returns its Y |
|
expression value. |
Low_X |
This function finds the global minimum of the selected |
|
branch of the selected Y expression, places either the |
|
left or the right cursor at the data point, and returns its X |
|
expression value. |
Low_Y |
This function finds the global minimum of the selected |
|
branch of the selected Y expression, places either the |
|
left or the right cursor at the data point, and returns its Y |
|
expression value. |
X_Level |
This function finds the N'th instance of the specified Y |
|
Level value, places a left or right cursor there, and |
|
returns the X expression value. |
Y_Level |
This function finds the N'th instance of the specified X |
|
Level value, places a left or right cursor there, and |
|
returns the Y expression value. |
X_Delta |
This function finds the N'th instance of the specified Y |
|
expression range, places cursors at the two data points, |
|
and returns the difference between the X expression |
|
values at these two points. |
Y_Delta |
This function finds the N'th instance of the specified X |
|
expression range, places cursors at the two data points, |
|
and returns the difference between the Y expression |
|
values at these two points. |
X_Range |
This function finds the X range (max - min) for the N'th |
|
instance of the specified Y range. First it searches for the |
|
specified Y Low and Y High expression values. It then |
|
searches all data points between these two for the |
|
highest and lowest X values, places cursors at these two |
|
data points, and returns the difference between the X |
|
expression values at these two points. It differs from the |
|
X_Delta function in that it returns the difference in the |
|
maximum and minimum X values in the specified Y |
625
|
range, rather than the difference in the X values at the |
|
specified Y endpoints. |
Y_Range |
This function finds the Y range (max - min) for the N'th |
|
instance of the specified X range. First it finds the |
|
specified X Low and X High expression values. It then |
|
searches all data points between these two for the |
|
highest and lowest Y values, places cursors at these two |
|
data points, and returns the difference between the Y |
|
expression values at these two points. It differs from the |
|
Y_Delta function in that it returns the difference in the |
|
maximum and minimum Y values in the specified X |
|
range, rather than the difference in the Y values at the |
|
specified X endpoints. This function is useful for |
|
measuring filter ripple. |
Slope |
This function places cursors at the two data points that |
|
straddle the data point nearest the specified X value, and |
|
returns the slope between the two cursors. |
Phase Margin |
This function finds the phase margin of a plot. A dB(expr) |
|
plot and a PHASE(expr) plot must be present for it to |
|
work properly. This function is only available in AC |
|
analysis. |
626 Chapter 26 Performance Functions