rm12 179 204 PDF
rm12 179 204 PDF
rm12 179 204 PDF
179
The Package editor layout
The Package editor is accessed from the Windows menu. It looks like this:
File command
Data fields buttons
Package
Pin fields selector
Command buttons
Add Complex: This command adds an entry to the Package library. A Find
dialog box appears requesting the name of the component whose package
and pin information is to be defined. This command should be chosen when
the package contains multiple instances of the specified component.
Duplicate: This command duplicates the currently selected entry, except for
the component name, which is chosen from a Find dialog box. The purpose
of the command is to speed data entry when the new part is very similar to an
existing part, except for the component name.
Close: This command closes the Package editor and optionally saves any
changes to the package file.
Info: This command displays model information for the selected part.
Open: (CTRL + O) This command loads an existing package library file. Its
packages are then available for use in the Package library.
Merge: This command merges a package library file (*.PKG) with the cur-
rent package library file. It provides a dialog box to let you locate the exter-
nal library file that you want to merge with the current library. Only unique
packages from the external library file are included. Packages with duplicate
names are not merged.
Save File: This command saves the current package library file under its
current name.
Save File As: This command saves the current package library file under a
new name specified by the user.
Remove: This command removes the currently loaded package library file. Its
packages are no longer available for use in the Package library.
Data fields:
Package: This is the package as it will appear in the Attribute dialog box of
the specified component for the PACKAGE attribute.
Component: This is the component that the package is being defined for. This
field is fixed except when the package is first entered from an Add, Complex,
or Duplicate command.
181
Pin Cnt: This controls the pin count for the entry.
Accel: This field overwrites the Package field when the schematic is trans-
lated to an Accel netlist.
OrCad: This field overwrites the Package field when the schematic is trans-
lated to an OrCad netlist.
Protel: This field overwrites the Package field when the schematic is trans-
lated to a Protel netlist.
PADS: This field overwrites the Package field when the schematic is trans-
lated to a PADS netlist.
Pin fields:
These fields define the configuration of the pins in the PCB netlist. For a ba-
sic package, there are two fields: Pin Name and PCB. The Pin Name fields
contain the names of the pins as they appear in Micro-Cap for the specified
component. These are the pin names as they appear in the Component edi-
tor. If the Pin Name is set to NC#, (no connection) the corresponding PCB
field is ignored. The PCB fields contain the names of the pins that will be
used in the output PCB netlist. Normally, these are the pin numbers from
the component's data sheet that correspond to the pins specified in the Pin
Name fields. For a complex package, a third field, called Gate, will be pres-
ent. Since a complex package contains multiple instances of the component,
the Gate fields must specify which instance the pin is being defined for. A '*'
in the Gate field indicates that all instances of the component in the package
share this pin.
Package selector:
The selector is a list box that lets you select a package for viewing or editing.
The packages are sorted in groups according to their first character. The tabs
at the top of the selector control the group that is shown in the list box.
Where more than one package is available for a part, a default package can
be specified by clicking on the adjacent check box. When the part is placed in
a schematic, the default package is specified for the PACKAGE attribute.
183
Adding complex packages to the library
Figure 5-3 displays the package information for the 7400 component which uses
a complex package. The data sheet for this component can be found in TI's TTL
Logic data book.
• .Measure commands: These are now available from the Get Function
command.
.Nodeset: This command in the State Variables editor maps the current
conditions into a .Nodeset statement in the text area of the schematic to serve
as an initialization aide for a subsequent run.
185
What happens in transient analysis
Transient analysis predicts the time-domain behavior of a circuit. It tries to pre-
dict what would happen if you built the circuit in the lab, hooked up power sup-
plies and signal sources and looked at the curves with a scope or a logic analyzer.
187
The Transient Analysis Limits dialog box
Load the MIXED4 circuit file and select Transient from the Analysis menu.
Micro-Cap extracts the necessary circuit information directly from the schematic.
More information is needed before the analysis can begin, and that information is
supplied by the Analysis Limits dialog box.
Command buttons
Plot page
Plot group
Variables list
Expression fields
(Right click
in expression
field)
Figure 6-1 The Analysis Limits dialog box
The Analysis Limits dialog box is divided into five areas: the Command buttons,
Numeric limits, Curve options, Expression fields, and Options.
Command buttons
The Command buttons are located just above the Numeric limits field.
Run: This command starts the analysis run. Clicking the Tool bar Run button
or pressing F2 will also start the run.
Add: This adds another Curve options field and Expression field line after
the line containing the text cursor. The scroll bar to the right of the Expres-
sion fields scrolls through the curves when there are more than can be dis-
played.
Delete: This deletes the waveform row where the text cursor is.
Expand: This expands the text field where the cursor is into a large dialog
box for editing or viewing. To use the feature, click the mouse in the desired
field, and then click the Expand button. Use Zoom buttons to adjust text size.
PSS: This invokes the Periodic Steady State dialog box where you control
PSS parameters. See the chapter, Periodic Steady State, for more details.
Properties: This command invokes the Properties dialog box which lets you
control the analysis plot window and the way curves are displayed.
Help: This command invokes the Help screen which provides information by
index and topic.
Copy to Clipboard List: This command copies the upper analysis limits to
the Clipboard List. Analysis limits include everything but the waveforms.
Copy to Clipboard List: This command lets you paste one of the analysis
limits sets from the Clipboard List to the current analysis limits.
Numeric limits
The Numeric limits field provides control over the analysis time range, time step,
number of printed points, and the temperature(s) to be used.
• Maximum Run Time: This specifies the maximum run time for the
analysis. The format of the field is:
<tmax>
The run starts with time equal to zero and ends when time equals <tmax>.
• Output Start Time (tstart): This field specifies when the program will
start saving output. Output includes plots, numeric output, and Probe files
available from Run Options / Retrieve. The format of the field is:
[<tstart>]
For example, if you wanted to do a 200mS run, but only save the last
1mS, then you would enter 200mS for <tmax> and 199mS for <tstart>.
• Maximum Time Step: This field defines the maximum time step that the
program is allowed to use. The default value, (<tmax> )/50, is used when the
entry is 0 or blank.
189
• Number of Points: This sets the number of printed values in the numeric
output. The default is 51. This value is usually set to an odd value for an even
print interval. The print interval is the time between successive printouts. The
interval used is (<tmax> - <tstart>)/([number of points] - 1).
If the Temperature list box shows Linear or Log the format is:
The default value of <low> is <high>, and the default value of <step> is
<high> - <low> (linear mode) or high/low (log mode). Temperature values
start at <low> and are either incremented (linear mode) or multiplied (log
mode) by <step> until <high> is reached.
Retrace Runs
This field specifies the number of retrace runs.
Curve options
The Curve options field is located below the Numeric limits field and to the left
of the Expressions field. Each curve option affects only the curve in its row.
The second option toggles the X-axis between a linear and a log plot.
Log plots require positive scale ranges.
The third option toggles the Y-axis between a linear and a log
plot. Log plots require positive scale ranges.
Color
The option activates the color menu. There are 64 color choices for an
individual curve. The button color is the curve color.
Numeric Output
The option prints a table showing the numeric value of the curve. The
number of values printed is set by the Number of Points value. The table is
printed to the Output window and saved in the file CIRCUITNAME.TNO.
Plot page
This field lets you organize waveforms into groups which can be selected
for viewing from the tabs at the bottom of the plot window.
Plot group
A number from 1 to 19 in the (P) column selects the plot group the curve will
be plotted in. All curves with like numbers are placed in the same plot group.
If the P column is blank, the curve is not plotted. You can also use .defined
variables to simultaneously enable or disable plots. For example, if you use
P1 in several P fields, then
Expression fields
The X Expression and Y Expression fields specify the horizontal (X) and vertical
(Y) expressions. Micro-Cap can evaluate and plot a wide variety of expressions
for either scale. Usually these are single variables like T (time), V(10) (voltage at
node 10), or D(OUT) (digital state of node OUT), but the expressions can be
more elaborate like V(2,3)*I(V1)*sin(2*PI*1E6*T).
191
Variables list
Clicking the right mouse button in the Y expression field invokes the Variables
list which lets you select variables, constants, functions, operators, and curves, or
expand the field to allow editing long expressions. Clicking the right mouse but-
ton in the other fields invokes a simpler menu showing suitable choices.
X Range and Y Range fields: These specify the numeric scales to be used when
plotting the X and Y expressions.
<low> defaults to zero. [,<grid spacing>] sets the spacing between grids. [,<bold
grid spacing>] sets the spacing between bold grids. Placing "AUTO" in the X
or Y range calculates the range automatically. The Auto Scale Ranges option
calculates scales for all ranges during the simulation run and updates the X and
Y Range fields. The Auto Scale (F6) command immediately scales all curves,
without changing the range values, letting you restore them with CTRL + HOME
if desired. Note that <grid spacing> and <bold grid spacing> are used only on
linear scales. Logarithmic scales use a natural grid spacing of 1/10 the major grid
values and bold is not used. Auto Scale uses the number of grids specified in the
Properties dialog box (F10) / Scales and Formats / Auto/Static Grids field.
Options
• Run Options
• Normal: This runs the simulation without saving it.
• Save: This runs the simulation and saves it to disk, using the same
format as in Probe. The file name is NAME.TSA.
• Retrieve: This loads a previously saved simulation and plots and prints
it as if it were a new run. The file name is NAME.TSA.
• State Variables
These options determine the state variables at the start of the next run.
• Zero: This sets the state variable initial values (node voltages, inductor
currents, digital states) to zero or X.
• Leave: This leaves the current values of state variables alone. They
retain their last values. If this is the first run, they are zero. If you have
just run an analysis without returning to the Schematic editor, they are
the values at the end of the run. If the run was an operating point only
run, the values are the DC operating point.
• Retrace: This runs the analysis N times, where N is the number in the
Retrace Runs field. For the first run, normal initialization is done and, if
requested, the operating point is calculated. Initial conditions are retained
for subsequent runs, whether invoked manually with F2 or automatically
by using a number greater than 1 in the Retrace Runs field.
• Auto Scale Ranges: This sets the X and Y range to AUTO for each new
analysis run. If it is not enabled, the existing scale values from the X and Y
Range fields are used.
The Run, State Variables, and Analysis options affect the simulation results.
To see the effect of changes of these options you must do a run by clicking
on the Run command button or pressing F2.
• Fixed Time Step: This option forces the program to use a fixed time step
equal to the specified Maximum Time Step. This feature is made available
for theoretical study and is not often used. The native variable time step
based upon local truncation error theory is far more efficient.
193
• Periodic Steady State: This option uses a shooting method to eliminate
transients and produce steady state waveforms. Transient-free waveforms are
essential for accurate results in harmonic and intermodulation distortion,
switch-mode, and RF circuits. If the option is enabled, the program runs a
series of full transient analyses, with each iteration ideally producing a more
stable waveform. You can watch the progress on the screen as each plotted
waveform is shown and on the status bar where the periodicity error is shown
for each iteration. The bottom of the Schematic Info page also recaps the PSS
iteration and error history. To study PSS in more detail see the chapter on
Periodic Steady State.
Resizing
The Analysis Limits dialog box can be resized in a variety of ways:
• Field size adjustment: Adjust the field sizes by dragging the lines that
separate the column titles (e.g. X Expression, Y Expression, etc.).
• Auto-size: Click the auto-size button to the right of the Y Range field to
automatically adjust the field sizes to match existing expression lengths.
• Grow: Drag the Grow icon in the lower right corner of the dialog box to
change the shape / size of the dialog box.
Worst Case (ALT + F6): This accesses the Worst Case analysis dialog box.
Watch: (CTRL + W) This displays the Watch window where you define
expressions or variables to watch during a breakpoint invocation.
Operating Point Methods (CTRL + SHIFT + O): This lets you select
the operating point method to be used and the order in which each is tried.
Performance Windows: This lets you add or delete a function plot window.
It is enabled only if there is more than one run.
Fourier Windows: This adds or deletes Fourier windows. It opens the dialog
box, where you can select waveforms and specify Fourier parameters.
Slider: This lets you add or delete a slider bar to control a circuit parameter.
State Variables editor: (F12) This accesses the State Variables editor.
Smoke: This enables the Smoke feature. Smoke tests device operating
conditions against user-defined limits and displays a color-coded chart
showing how close each device is to exceeding the limits.
195
Reduce Data Points: This invokes the Data Point Reduction dialog box. It
lets you delete every n'th data point.
Setup initialization:
When you first select a transient, AC, or DC analysis, all state variables are
set to zero and all digital levels to X. This is called the setup initialization.
Run initialization:
Each new run evokes the run initialization based upon the State Variables
option from the Analysis Limits dialog box. This includes every run, whether
initiated by pressing F2, clicking on the Run button, stepping parameters,
using Monte Carlo, or stepping temperature. There are several choices:
Zero: The analog state variables, node voltages, and inductor currents are
set to 0. Digital levels are set to X, or in the case of flip-flop Q and QB
outputs, set to 0, 1, or X depending upon the value of DIGINITSTATE.
This value is defined in the Global Settings dialog box. This is the only
option in DC analysis.
Leave: MC12 does nothing to the initial state variables. It simply leaves
them alone. There are three possibilities:
First run: If the variables have not been edited with the State
Variables editor, they still retain the setup initialization values.
Later run: If the variables have not been edited with the State
Variables editor, they retain the ending values from the last run.
197
Device initialization: Device initialization is the third step. It is always done
for the first run and for subsequent runs if Retrace is disabled.
After the State Variables option has been processed, .IC statements are
processed. Device IC statements, such as those for inductor current and
capacitor voltage, override .IC statements if they are in conflict.
Note that .IC statements specify values that persist throughout the initial
bias point calculation.
They are more resilient than simple initial values which can (and usually
do) change after the first iteration of the bias point. This may be good or
bad depending upon what you are trying to achieve.
The transient analysis begins after the setup, run, and device initializations are
complete.
At first glance, you might think Retrace mode could be used to do eye diagrams,
but there is a much easier way. Simply use an X expression like this;
T MOD Period
instead of the usual T. Period is the expected period of the waveform so a typical
X expression might be like this;
T MOD 2n
The editor displays node voltages, inductor currents, and digital node levels. The
scroll bars may be used to review values not visible on the display. Any value
may be edited.
• Format: This lets you set the numeric format to be used in the Write, Print,
and .IC commands.
• Read: This immediately reads a new set of values from a disk file, after
prompting for a file name.
199
• Write: This immediately writes the displayed values to a disk file using a
user-supplied file name. This file is created for use when the Analysis Limits
State Variables Read option is selected. The Read option uses the values
stored in this file at the Run initialization stage.
It is important to note that the clear and read commands, and all manual
edits result in immediate changes, as opposed to the delayed changes
made by the Analysis Limits options. The Zero, Read, and Leave options
from the Analysis Limits dialog box affect the values at the start of the
simulation (Run initialization).
• Help: This accesses help topics for the State Variables editor.
• Curves: This lets you select which curves to print, their numeric format,
and an alternative alias for the curve name.
• Show: This section allows selection of the other material to include in the
numeric output file.
201
• Include Waveform Headers: This prints identifying
expression text above each numeric column.
• End Printing At: This specifies the last time value at which
waveform printing occurs.
• Standard Newton-Raphson: This is the simplest, and still the most often
successful method for solving for the operating point.
• Source Stepping: This is the first of the continuation methods that all
attempt to set a control parameter to a value to solve an easier problem, and
then gradually move the targeted parameter towards its final 100% value. In
this case the parameter is a scale factor which multiplies all DC voltage
sources. It starts with a small value and, when convergence is achieved,
increases the factor until convergence is achieved with the factor at 100%.
203
• Pseudo Transient: In this method, time-varying sources are set to their
T=0 value, and a fixed capacitor is added from each node to ground. A
transient analysis is then run until the circuit stabilizes. The stable set of
voltages then becomes the operating point. This method works slowly but
very well for most circuits. It does not usually work on unstable or oscillatory
circuits.
The dialog box lets you select which methods will be used and the order in which
they are used. The top method is used first, and so on to the end of the list. The
dialog box also provides a means to test for the best methods and adjusts the or-
der accordingly. It provides these options:
Down Triangle: This moves the selected method down in the list.
Left Triangle: This moves the selected method from the Using list and parks it in
the Available list, deactivating it.
Right Triangle: This moves the selected method from the Available list to the
Using list, activating it.
Test for Best: This tests all five methods and arranges their execution order from
fastest to slowest. If a method fails to converge, it is so indicated and placed at
the end of the list.
Default: This resets the method order to the default settings. These are the set-
tings that produce the shortest overall time on a large number of test circuits.
OK: This accepts any changes you have made and exits the dialog box.
Cancel: This ignores any changes you've made and exits the dialog box.
Help: This accesses the Help information for the dialog box.