Users Manual
Users Manual
Users Manual
Trademarks
PSpice is a trademark of Cadence Design Systems Inc.
Hspice is a trademark of Synopsis Inc.
Contact
SIMetrix Technologies Ltd., Terence House, 24 London Road,
Thatcham, RG18 4LQ, United Kingdom
Tel:
Fax:
Email:
Internet
Table of Contents
Table of Contents
Chapter 1
Introduction
Installation ................................................................ 16
General Information.................................................. 16
Uninstalling ............................................................... 17
Installation - Linux Version............................................... 17
To Install from CD..................................................... 17
error while loading shared libraries ........................ 18
Installing to Other Locations ..................................... 18
Uninstalling - Linux Version ...................................... 19
Licensing.......................................................................... 19
Overview................................................................... 19
Installing Stand Alone License Files......................... 19
Network Licensing- Overview ................................... 20
Installing Network Licensing for Windows ................ 21
Using the GUI Installer ............................................. 21
Installing License Manager Manually ....................... 21
Installing Network Licensing for Linux ...................... 22
Starting SIMetrix Network Version............................ 22
Using TCP Ports....................................................... 23
Changing the Location of the License Server........... 24
License Server Version ............................................ 25
Obtaining a License File ........................................... 25
Using the License Server ......................................... 25
What Is Simetrix............................................................... 27
What is SIMPLIS.............................................................. 28
Why Simulate?................................................................. 29
System Requirements ..................................................... 29
Operating System..................................................... 29
Hardware .................................................................. 30
Recommended System ............................................ 30
About the 64 bit Version ........................................... 31
Upgrade Notes................................................................. 31
Windows Vista User Account Control ..................... 31
Chapter 2
Quick Start
Examples and Tutorials - Where are They? ............. 32
Simulation for the Novice.......................................... 32
Tutorial 1 - A Simple Ready to Run Circuit ...................... 33
Tutorial 2 - A Simple SMPS Circuit.................................. 41
3
Users Manual
Tutorial 3 - Installing Third Party Models......................... 47
Chapter 3
Getting Started
Simulation Modes - SIMetrix or SIMPLIS ........................ 51
Using the Schematic Editor ............................................. 51
Creating a Schematic............................................... 51
Circuit Rules .................................................................... 53
Circuit Stimulus ............................................................... 54
Waveform Generator................................................ 54
PWL Source ............................................................. 55
Power Supply/Fixed Current Source........................ 55
AC Source................................................................ 55
Universal Source...................................................... 55
Other Sources .......................................................... 56
Analysis Modes ............................................................... 58
Overview .................................................................. 58
Using the Choose Analysis Dialog ........................... 58
Setting Up a SIMPLIS Simulation ............................ 62
Manual Entry of Simulator Commands .................... 65
Running the Simulator..................................................... 65
SIMetrix .................................................................... 65
SIMPLIS ................................................................... 66
Plotting Simulation Results.............................................. 66
Overview .................................................................. 66
Fixed Probes ............................................................ 66
Random Probes ....................................................... 67
Chapter 4
Schematic Editor
Schematic Windows and Sheets.............................. 70
Schematic Editor Window ........................................ 70
Editing Operations.................................................... 71
Wiring ....................................................................... 75
Edit Modes ............................................................... 77
Bus Connections ...................................................... 77
Copying to the Clipboard.......................................... 78
Annotating a Schematic ........................................... 78
Assigning Component References........................... 79
Checking the Schematic .......................................... 79
Schematic Preferences ............................................ 79
Adding and Removing Worksheets.......................... 80
Finding and Specifying Net Names.......................... 80
Hierarchical Schematic Entry .......................................... 80
Table of Contents
Top-Down Method .................................................... 81
Bottom-up method .................................................... 81
Navigating Hierarchical designs ............................... 82
Placing - Full vs Relative Path.................................. 82
Connecting Busses in a Hierarchy ........................... 83
Global Nets............................................................... 84
Global Pins ............................................................... 84
Passing Parameters Through a Hierarchy ............... 86
Missing Hierarchical Blocks...................................... 86
Highlighting............................................................... 86
Printing............................................................................. 87
Printing a Single Schematic Sheet ........................... 87
Printing a Hierarchical Schematic............................. 87
File Operations ................................................................ 87
Saving....................................................................... 87
Exporting Schematic Graphics ................................. 87
Exporting to Earlier Versions of SIMetrix.................. 88
ASCII format ............................................................. 88
Autosave................................................................... 89
Creating Schematic Symbols - Overview ........................ 89
Symbol Generator............................................................ 89
To Create a New Symbol ......................................... 90
To Create a New Symbol From an Existing One...... 90
Symbol Shape .......................................................... 90
Pins........................................................................... 91
Netlist Order ............................................................. 91
Symbol Pin Order ..................................................... 91
Modifying Pins .......................................................... 91
Properties ................................................................. 91
Placing Symbol on Schematic .................................. 94
Graphically Editing Generated Symbols................... 94
Graphical Symbol Editor .................................................. 94
Notes ........................................................................ 94
Symbol Editor Window ............................................. 94
The Elements of a Symbol ....................................... 95
Creating a New Symbol............................................ 95
Editing an Existing Symbol ....................................... 95
Drawing Straight Line Segments .............................. 95
Drawing Arcs, Circles and Ellipses........................... 95
Placing and Defining Pins......................................... 96
Defining Properties ................................................... 98
Saving Symbols...................................................... 101
Creating a Symbol from a Script.................................... 103
Properties ...................................................................... 103
5
Users Manual
Overview ................................................................ 103
What is a Property?................................................ 104
Template Property.................................................. 106
Editing Properties in a Schematic .......................... 107
Restoring Properties .............................................. 107
Template Property......................................................... 107
Overview ................................................................ 107
Template Property Format ..................................... 108
Template Scripts .................................................... 115
Symbol Library Manager ............................................... 115
Operations.............................................................. 116
Editing System Symbol Libraries ........................... 118
PSpice Schematics Translation..................................... 118
Configuring the Translator...................................... 118
If you don't have PSpice......................................... 119
Reading PSpice Schematics.................................. 119
Installing PSpice Libraries for Use with SIMetrix.... 119
What the Translator will do..................................... 119
Limitations .............................................................. 119
Using Schematic Editor for CMOS IC Design ............... 120
MOSFET Symbols ................................................. 120
Automatic Area and Perimeter Calculation ............ 121
Editing the MOS Symbols ...................................... 122
Further Information........................................................ 122
How Symbols are Stored ....................................... 122
Summary of Simulator Devices.............................. 123
Chapter 5
Components
Numbered Components ................................................ 126
Numbered Components in SIMPLIS ............................. 127
SPICE to SIMPLIS Conversion .............................. 128
Generic Components .................................................... 132
Saturable Inductors and Transformers................... 134
Ideal Transformers ................................................. 136
Coupling Factor...................................................... 137
Mutual Inductors..................................................... 137
Resistors, Capacitors and Inductors ...................... 138
Infinite Capacitors and Inductors............................ 139
Potentiometer......................................................... 140
Lossless Transmission Line ................................... 140
Lossy Transmission Line........................................ 141
Fixed Voltage and Current Sources ....................... 141
Controlled Sources................................................. 141
Table of Contents
Voltage Controlled Switch ...................................... 141
Switch with Hysteresis............................................ 142
Generic ADCs and DACs ....................................... 142
Generic Digital Devices .......................................... 143
Functional Blocks - Overview ................................. 144
Non-linear Transfer Function.................................. 145
Laplace Transfer Function...................................... 146
Arbitrary Non-linear Passive Devices ..................... 148
Creating Models............................................................. 148
Overview................................................................. 148
Creating Soft Recovery Diode Models ................... 149
Subcircuits ..................................................................... 151
Overview................................................................. 151
Creating a Sub-circuit from a Schematic ................ 151
Calling a Sub-circuit in a Schematic ....................... 153
Special Components...................................................... 155
Initial Conditions ..................................................... 155
Nodesets ................................................................ 155
Keeps ..................................................................... 156
Parameters and Expressions......................................... 156
Example.................................................................. 156
Chapter 6
Users Manual
Chapter 7
Analysis Modes
Running Simulations ..................................................... 171
Overview ................................................................ 171
Starting, Pausing and Aborting Analyses............... 171
Running Analyses in Asynchronous Mode............. 172
Running an Analysis on a Netlist ........................... 172
Transient Analysis ......................................................... 172
Setting up a Transient Analysis.............................. 172
Restarting a Transient Run .................................... 175
Transient Snapshots .............................................. 175
Operating Point ............................................................. 177
Sweep Modes................................................................ 178
Device Sweep ........................................................ 178
Temperature........................................................... 179
Model Parameter.................................................... 179
Parameter .............................................................. 179
Frequency .............................................................. 181
Monte Carlo............................................................ 181
Setting up a Swept Analysis................................... 181
DC Sweep ..................................................................... 182
Setting up a DC sweep .......................................... 182
Example ................................................................. 183
AC Sweep ..................................................................... 184
Setting up an AC sweep......................................... 184
Example ................................................................. 185
Noise Analysis............................................................... 185
Setting up an AC Noise analysis............................ 185
Plotting Results of Noise Analysis.......................... 186
Example 1 .............................................................. 187
Example 2 .............................................................. 188
Real Time Noise............................................................ 189
Setting Up a Real Time Noise Analysis ................. 189
Transfer Function .......................................................... 190
Setting up a Transfer Function Analysis ................ 190
Plotting Transfer Function Analysis Results........... 191
Example ................................................................. 191
Pole-zero ....................................................................... 193
Setting up a Pole-zero Analysis ............................. 193
Viewing Results...................................................... 193
Example ................................................................. 193
Sensitivity ...................................................................... 193
Setting up a Sensitivity Analysis ............................ 194
Simulator Options.......................................................... 194
Setting Simulator Options ...................................... 194
Table of Contents
Multi-step Analyses........................................................ 196
Setting up a Multi-step Analysis ............................. 197
Example 1............................................................... 198
Example 2............................................................... 199
Safe Operating Area Testing ......................................... 200
Overview................................................................. 200
Defining Simple Limit Tests .................................... 200
Advanced SOA Limit Testing.................................. 201
Chapter 8
Chapter 9
Users Manual
Using Fixed Probes in Hierarchical Designs .......... 219
Adding Fixed Probes After a Run has Started ....... 219
Changing Update Period and Start Delay .............. 219
Random Probes ............................................................ 219
General Behaviour ................................................. 219
Functions................................................................ 220
Notes on Probe Functions...................................... 221
Plotting Noise Analysis Results.............................. 222
Plotting Transfer Function Analysis Results........... 222
Fourier Analysis ..................................................... 223
Probing Busses ...................................................... 227
Bus Probe Options ................................................. 228
Plotting an Arbitrary Expression............................. 229
Curve Arithmetic..................................................... 234
Using Random Probes in Hierarchical Designs ..... 234
Plot Journals and Updating Curves............................... 236
Overview ................................................................ 236
Update Curves ....................................................... 236
Plot Journals .......................................................... 236
Graph Layout - Multiple Y-Axis Graphs......................... 237
AutoAxis Feature.................................................... 238
Manually Creating Axes and Grids......................... 239
Selecting Axes ....................................................... 239
Moving Curves to Different Axis or Grid................. 239
Deleting Axes ......................................................... 239
Editing Axes ........................................................... 240
Reordering Grids and Digital Axes......................... 241
Plotting the Results from a Previous Simulation ........... 241
Combining Results from Different Runs................. 241
Curve Operations .......................................................... 243
Selecting Curves .................................................... 243
Deleting Curves...................................................... 243
Hiding and Showing Curves................................... 243
Re-titling Curves..................................................... 243
Highlighting Curves ................................................ 244
Graph Cursors............................................................... 244
Overview ................................................................ 244
Cursor Operations.................................................. 245
Additional Cursors.................................................. 246
Cursor Readout...................................................... 247
Cursor Functions.................................................... 249
Curve Measurements .................................................... 249
Overview ................................................................ 249
Available Measurements........................................ 249
10
Table of Contents
Using the Define Measurement GUI....................... 249
Measurement Definitions Manager......................... 252
Repeating the Same Measurement........................ 253
Notes on Curve Measurement Algorithms.............. 253
Plots from curves.................................................... 255
Graph Zooming and Scrolling ........................................ 255
Annotating a Graph........................................................ 256
Curve Markers ........................................................ 257
Legend Box ............................................................ 258
Text Box ................................................................. 259
Caption and Free Text............................................ 260
Copying to the Clipboard ............................................... 260
Overview................................................................. 260
Copy Data to the Clipboard .................................... 260
Copying Graphics to the Clipboard......................... 261
Paste Data from the Clipboard ............................... 261
Using the Internal Clipboard ................................... 261
Exporting Graphics ........................................................ 262
Saving Graphs ............................................................... 262
Saving..................................................................... 262
Restoring ................................................................ 263
Viewing DC Operating Point Results ............................. 263
Schematic Annotation............................................. 263
Displaying Device Operating Point Info .................. 263
List File Data........................................................... 263
Other Methods of Obtaining Bias Data................... 263
Bias Annotation in SIMPLIS ................................... 264
Bias Annotation Display Precision.......................... 264
Bias Annotation and Long Transient Runs ............. 264
Saving Data ................................................................... 264
Saving the Data of a Simulation ............................. 264
Restoring Simulation Data...................................... 265
Performance Analysis and Histograms.......................... 265
Overview................................................................. 265
Example.................................................................. 265
Histograms ............................................................. 267
Goal Functions ....................................................... 270
Data Import and Export.................................................. 280
Importing SPICE3 Raw and CSDF Files ................ 280
Importing Tabulated ASCII Data............................. 280
Exporting SPICE3 Raw Files.................................. 281
Exporting Data........................................................ 281
Launching Other Applications................................. 281
Data Files Text Format ........................................... 282
11
Users Manual
Table of Contents
Floor(real) ............................................................... 305
GroupDelay(real/complex)...................................... 306
Histogram(real, real)............................................... 306
Iff(real, any, any)..................................................... 306
IIR(real, real [, real])................................................ 307
im(real/complex), imag(real/complex) .................... 308
integ(real) ............................................................... 308
Interp(real, real [, real, real]) ................................... 308
IsComplex(any) ...................................................... 308
length(any).............................................................. 308
ln(real/complex) ...................................................... 308
log10(real/complex), log(real/complex) .................. 309
mag(real/complex), magnitude(real/complex) ........ 310
maxidx(real/complex) ............................................. 310
Maxima(real [, real, string])..................................... 310
Maximum(real/complex [, real, real]) ...................... 310
mean(real/complex)................................................ 310
Mean1(real [, real, real]) ......................................... 311
minidx(real/complex) .............................................. 311
Minima(real [, real, string])...................................... 311
Minimum(real/complex [, real, real]) ....................... 311
norm(real/complex)................................................. 311
ph(real/complex), phase(real/complex) .................. 312
phase_rad(real/complex)........................................ 312
Range(real/complex [, real, real]) ........................... 312
re(real/complex), real(real/complex)....................... 312
Ref(real/complex) ................................................... 312
Rms(real)................................................................ 312
RMS1(real [, real, real]) .......................................... 312
rnd(real) .................................................................. 313
RootSumOfSquares(real [, real, real]) .................... 313
sign(real)................................................................. 313
sin(real/complex) .................................................... 313
sqrt(real/complex)................................................... 313
SumNoise(real [, real, real]).................................... 313
tan(real/complex).................................................... 313
Truncate(real [, real, real]) ...................................... 313
unitvec(real)............................................................ 314
vector(real) ............................................................. 314
XFromY(real, real [, real, real]) ............................... 314
XY(real, real) .......................................................... 314
YFromX(real, real [, real]) ....................................... 314
13
Users Manual
Table of Contents
Auto Configuration Options .................................... 350
Installation - Customising ....................................... 352
Colours and Fonts ......................................................... 352
Colours ................................................................... 352
Fonts....................................................................... 352
Using a Black Background ..................................... 354
Startup Script ................................................................. 354
15
Users Manual
Chapter 1 Introduction
Installation - Windows Version
Installation
If you are upgrading from an earlier version, you must install to a new folder. Your
previous version will continue to function as before.
See below for information on upgrading.
Procedure - Installing from CD
Insert CD. If AutoRun is enabled, a simple dialog box should appear automatically. If
not execute SETUP.EXE in the Setup directory of the CD.
You should always install SIMetrix to a local drive. By modern standards it is a
compact application occupying around 50MBytes so therefore consumes negligible
resources. Although SIMetrix itself may run satisfactorily from a remote network
drive, the Help system probably wont run due to security limitations.
Upgrading
If you are upgrading an earlier version of SIMetrix, when you run SIMetrix for the first
time you will be asked if you would like to migrate your old preference settings. This
will migrate the following items:
1.
2.
Any changes made to the system symbol library using version 5.3 or 5.4. These
changes are stored separately from the symbol library files themselves and the
files containing the changes are copied during the migration process. Other
symbol libraries, for example new symbols stored in your own library files, will
not be migrated.
3.
Model/symbol associations
Model libraries will not be migrated and these will need updating manually.
Please read Upgrade Notes on page 31.
General Information
All SIMetrix files are installed in the directory tree you specify to the setup program
except the example files which are copied to the application data tree (see Application
Data Directory on page 328). No files are copied to any other location and no system
files are updated or added. (But, SIMetrix does write files to other locations when it is
run - see Uninstalling below).
SIMetrix does not use any files that may be shared with other applications other than
those that form part of the standard operating system. This means that installing
SIMetrix cannot affect the running of other applications.
16
Chapter 1 Introduction
SIMetrix does not use the system registry for any of its settings. Some settings get
written to the registry by the installer, but SIMetrix itself does not use them.
Uninstalling
SIMetrix in common with most applications includes an uninstall utility. However, the
uninstall program does not remove everything from the system. Any files that you
create will remain on your system. The following describes where you may find some
files that the uninstall program may leave behind.
To uninstall SIMetrix:
1.
2.
As explained above their may be some files left over and you will find these in the
following locations:
SIMetrix will not place files in any other location unless you explicitly ask it to.
To Install from CD
Insert and mount CD. The following assumes that the CD is mounted at /mnt/cdrom.
Proceed as follows:
1.
Become root.
17
Users Manual
2.
cd /usr/local
3.
4.
This stage is optional. A number of example files are also provided and these
may also be installed if required. Simply copy the examples tree to a suitable
location where you have read-write access. We recommend
$HOME/simetrix/examples:
tar xf /mnt/cdrom/linux/simetrix.tar
mkdir /home/username/simetrix
cp -R /mnt/cdrom/examples /home/username/simetrix
Replace username and group as appropriate. The examples will still run if you
leave the ownership at root, but you will not be able to edit the schematics.
5.
6.
If you have purchased a stand-alone license, you should leave the CDROM
mounted for the time being as your license file will usually be located on it.
7.
you will need to install an additional file. This error is likely with Red Hat Linux
Enterprise 5. To resolve, untar the lib_extra.tar file which you will find in
/usr/local/tmp after following the instructions in the above section:
tar xf lib_extra.tar
18
Chapter 1 Introduction
DO NOT UNDER ANY CIRCUMSTANCES move the contents of
/usr/lib/simetrix/5.5 to a global library directory such as /usr/lib or any directory listed
in LD_LIBRARY_PATH or /etc/ld.so.conf. SIMetrix will probably work fine, but
other applications could break, in particular, the KDE desktop environment. Both
SIMetrix and KDE (and many other applications) use the Qt library, but the version
SIMetrix uses is not guaranteed to be compatible with other applications that use Qt.
These different versions MUST be kept separate. Adehering to the above advice will
guarantee this.
Licensing
Overview
Essentially there are two classes of license namely, portable licenses controlled by a
single license file and a security key (dongle) and network licenses controlled by a
license server.
19
Users Manual
(The above screen captured image was taken from a Linux system. The layout will be
similar for Windows and other Linux distributions, although the style may be quite
different.)
If you have already received a license file, perhaps by Email, then simply press
Install License... and locate the license file on your machine. SIMetrix will copy this
file to the correct location. On Linux stand-alone systems, you will normally find the
license file on the install CD at /mnt/cdrom/license.
If you do not yet have a license file, please email support@simetrix.co.uk providing
the Host ID and Serial Number information supplied.
Standalone Licensing for Remote X Servers
Linux only: Standalone SIMetrix licenses cannot be used on a remote X-server. If you
wish to use SIMetrix on such systems you must use a network license.
20
Chapter 1 Introduction
Before you can use the license server, you will need a license file which we will supply
you. The license file locks the server to a particular machine identified by its Host ID
which is either an Ethernet ID or optionally the ID of a FLEXid dongle. Before we can
provide you with the license file we need to know the Host ID of your license server.
See Obtaining a License File on page 25 for details.
Manual method
We strongly recommend using the GUI installer unless you are already familiar with
FLEXnet publisher installation.
Copy the license file to your Desktop. (The license file is a file with the extension
.lic)
2.
Run flex_install.exe.exe
3.
Follow the instructions given. You will be prompted for the license file after
clicking the first "Next". Select the file copied to your desktop in 1. above
4.
When the installation is complete, you can install SIMetrix itself on the users'
machines
5.
If you get error messages during the installation, please visit our web page:
http://www.simetrix.co.uk/site/users/LicenseManagerInstallerErrors.htm
21
Users Manual
Create a suitable directory on your machine for the FLEXnet publisher files. The
following assumes /usr/local/flexnet but you can use any location
2.
3.
Copy the license manager files from the CD. These are at cdrom/Flexlm/linux:
cp /mnt/cdrom/linux/Flexlm/linux/flexlm.tar .
4.
5.
Copy the license file we have supplied to a suitable location. You may choose to
use the same directory as the FLEXnet files.
cd /usr/local/flexnet
2.
./lmgrd -c licensefile
./lmutil/lmdown -q
You may wish to install a run-level script to start up the license manager automatically
when the machine is booted or enters a particular run level. However, this is a system
issue and is beyond the scope of this manual.
22
Chapter 1 Introduction
.
This is the unique name assigned to every machine on a network. If you do not know
this, ask your system administrator. You can also enter the IP address of the server in
this box.
If required you can also enter a TCP port number. When asked for the license server
name, press Advanced... and enter the required port number. For more information on
ports and the circumstances when you would use them, see Using TCP Ports on
page 23.
2.
The license manager communicates with the application using the TCP/IP protocol the same protocol used for the Internet and virtually every LAN. TCP communications
always specify a port which is a number between 1 and 64000 and identifies a kind of
communication channel. By default, the FLEXnet license manager uses one of the
ports in the range 27000 to 27009 and the application will scan through these in
sequence.
In most situations the server will use port 27000 and, as this is the first port to be
scanned by the application, everything will work fine.
In some situations, the server might use another port usually because 27000 etc. is
already in use. With the default settings, this may cause a start up delay as SIMetrix
searches for the correct port. This problem mostly occurs when running under
Windows. In this situation, specifying the exact port number at both ends will resolve
this problem. See below to find out how to do this.
If you are accessing the license manager through a firewall, you will need to open up a
suitable TCP port. In this situation, it is best to specify the exact port number so that
only one port needs to be opened.
Specifying the License Server Port
To specify the port used by the license server, you must edit the license file. Simply
add the port number to the end of the SERVER line. E.g:
SERVER NT_SERV1 000CF1C97B71 27001
23
Users Manual
The above specifies port number 27001
Specifying the Application Port Number
When SIMetrix prompts you for server license information with...
24
Chapter 1 Introduction
The result will be one of 7.0d, 7.2i, 8.2a, 9.5 or 11.4. If the version is anything other
than 11.4, we strongly recommend updating to 11.4.
The Ethernet address of the license server. The Ethernet address is a 12 digit
hexadecimal number and is associated with the Ethernet adapter in the server. It
is also known as the MAC address or sometimes the physical address.
2.
Instructions on how to obtain the above information may be found at our web site.
Please visit http://www.simetrix.co.uk/site/users/HowtoObtainaLicenseFile.htm
25
Users Manual
Simplis_if
Basic is, as the name implies, the basic feature and is compulsory for the SIMetrix
simulator to run. The remaining feature names enable functionality as defined in the
following table:
Feature name
Functionality
Digital
Micron
Advanced
Rtn
Simplis_if
By default SIMetrix will attempt to check out all features that are available. If you
have purchased the same number of licenses for all features then there is no problem.
If, however, you have fewer, for example, digital licenses than basic licenses, then a
problem could arise where the first users that check out licenses use up all the digital
licenses leaving these features unavailable for later users. This would be a waste if the
earlier users were not actually using the features. To overcome this SIMetrix has a
command line switch that instructs it what licenses to check out. The syntax is:
SIMetrix /f "basic|micron|digital|advanced|rtn"
You can remove any of the feature names from the above other than basic to prevent
those features from being checked out. The above allows you to setup alternative shortcuts or desktop icons to checkout different combinations of features.
The FLEXnet publisher options file also allows you to reserve particular features for
named users. See the end user documentation for details.
License Timeout
You can set up the license manager to automatically check out licenses from users who
have started SIMetrix but are not using it. To do this you must set up a FLEXnet
options file. To do this proceed as follows:
1.
2.
Using a text editor, create a file called options.txt and add this single line:
TIMEOUTALL 1800
26
Chapter 1 Introduction
1800 is the timeout in seconds which of course you can set to some other suitable
value. The FLEXnet license manager will make the license available to other
users after this much idle time has been detected. SIMetrix does not report that it
is idle until there has been at least 10 minutes of inactivity, so in practice the
actual idle time required in the above example will be 2400 seconds or 40
minutes.
If you do not specify an idle timeout, a default value of 2 hours will be used.
Client Node Crashes
If a user's (client) machine crashes while SIMetrix is running, the license will not be
immediately checked in but will be after a time-out period equal to the idle time out
described above. This is 2 hours by default. Before this time has elapsed, the license
can be checked in manually at the server by typing at the command line
lmutil lmremove <feature> <user_name> <host_name> <display>
For Windows, display is the same as the host_name, on Linux you will need to enter
the display name which would usually be :0.0. feature will be one of basic, digital,
micron, advanced, rtn or simplis_if. Each feature must be checked in individually.
What Is Simetrix
SIMetrix is a mixed-signal circuit simulator designed for ease and speed of use. It is
based on two publicly available programs namely SPICE developed by the CAD/IC
group at the department of Electrical Engineering and Computer Sciences, University
of California at Berkeley and XSPICE developed by the Computer Science and
Information Technology Laboratory, Georgia Tech. Research Institute, Georgia
Institute of Technology. XSPICE itself was developed from SPICE3C1.
Although originally derived from these programs only about 30% of the overall
application code can be traced to them. A large part of the simulator code is either new
or has been rewritten in order to provide new analysis features and to resolve
convergence problems. In addition SIMetrix includes schematic entry and waveform
analysis features that owe nothing to the original SPICE program.
Features
Closely coupled direct matrix analog and event driven digital simulator.
Advanced swept analyses for AC, DC, Noise and transfer function. 6 different
modes available.
Real time noise analysis allowing noise simulation of oscillators and sampled
data systems.
Support for BSIM3, BSIM4 and MOS9 devices. Compatible with Star-Hspice
model files.
27
Users Manual
Cross probing of voltage, current and device power from schematic. Current and
power available for sub-circuits.
Functional modelling with arbitrary non-linear source and arbitrary linear sdomain transfer function.
Arbitrary logic block for definition of any digital device using descriptive
language. Supports synchronous, asynchronous and combinational logic as well
as ROMS and RAMs.
What is SIMPLIS
SIMPLIS is a circuit simulator designed for rapid modelling of switching power
systems. An acronym for SIMulation for Piecewise LInear System, it is supplied
with the premium version of SIMetrix namely SIMetrix/SIMPLIS.
SIMPLIS is a component level simulator like SPICE but is typically 10 to 50 times
faster when simulating switching circuits. It achieves its speed by modelling devices
using a series of straight-line segments rather than solving non-linear equations as
SPICE does. By modelling devices in this way, SIMPLIS can characterise a complete
system as a cyclical sequence of linear circuit topologies. This is an accurate
representation of a typical switching power system where the semiconductor devices
function as switches. However, a linear system can be solved very much more rapidly
than the non-linear systems that SPICE handles. The end result is accurate, but
extremely fast simulations, allowing the modelling of complex topologies that would
not be viable with SPICE.
SIMPLIS has three analysis modes: Transient, Periodic Operating Point and AC.
Transient analysis is similar to the SPICE equivalent but is typically 10-50 times faster.
Periodic Operating Point is a unique analysis mode that finds the steady-state operating
waveforms of switching systems. AC analysis finds the frequency response of a
switching system without needing to use averaged models. This is especially useful for
what-if studies on new circuit topologies or control schemes where the small-signal
averaged model has not yet been derived.
Because non-linear devices are defined using a sequence of straight line segments,
models for such devices are quite different from SPICE models. There are of course
many SPICE models available and so in order to retain compatibility with these,
SIMetrix/SIMPLIS has the ability to convert models for some types of device into
SIMPLIS format. This conversion is performed when the device is placed on the
schematic. Devices currently supported are MOSFETs, BJTs and diodes. In the case of
MOSFETs and Zener diodes, the conversion is achieved by performing a sequence of
simulations using the SIMetrix-SPICE simulator. This method is independent of the
method of implementation of the device.
28
Chapter 1 Introduction
Why Simulate?
Integrated circuit designers have been using analog simulation software for over two
decades. The difficulty of bread-boarding and high production engineering costs have
made the use of such software essential.
For discrete designers the case has not been so clear cut. For them prototyping is
straightforward, inexpensive and generally provides an accurate assessment of how the
final production version of a circuit will behave. By contrast computer simulation has
been seen as slow and prone to inaccuracies stemming from imperfect models.
In recent years, however, the simulation of discrete analog circuits has become more
viable. This has come about because of the almost relentless advances in CPU power,
the increased availability of device models from their manufacturers and the
introduction of easy to use and affordable simulation tools such as SIMetrix.
The pressure to reduce product development time-scales has meant that for many
projects the traditional bread-boarding phase is skipped altogether - with or without
simulation - and circuit development is carried out on the first revisions of PCB. The
use of simulation on a circuit or parts of a circuit can help to eliminate errors in a
circuit design prior to this stage and reduce the number of PCB revisions required
before the final production version is reached. Of course, to be useful, the simulation
process must therefore not be too time consuming.
Computer simulation, does however, have many more uses. There are some things you
can do with a simulator which cannot be achieved with practical approaches. You can
remove parasitic elements, you can make non-invasive measurements that are
impossible in real-life or you can run components outside of their safe operating area.
These abilities make simulation a valuable tool for finding out why a particular design
does not behave as expected. If the problem can be reproduced on a simulator then its
cause can be much more easily identified. Even if a problem cannot be reproduced then
this gives some clues. It means that it is caused by something that is not modelled, a
wiring parasitic perhaps.
Simulation is extremely useful for testing ideas at the system level. Sometimes it is not
easy to test a concept because the hardware to implement it is very costly or time
consuming to build. It may even be that you don't know how to implement the idea in
hardware at all. The alternative is to design a model and simulate it with a computer.
Once it has been established that the concept is viable then attention can be given to its
implementation. If it proves not to be viable, then a great deal of time will have been
saved.
System Requirements
Operating System
Windows 32 bit versions
The following are supported
Windows 2000
Windows XP Home
29
Users Manual
Windows XP Professional
Windows Vista Home
Windows Vista Home Premium
Windows Vista Ultimate
Windows Vista Business
Windows Vista Enterprise
There are no service pack requirements for any of the above
The 32 bit version will also run on any of the systems listed under Windows 64 bit
version below.
Windows 64 bit version
The following are supported:
Windows XP Professional x64 Edition
Windows Vista Home, 64 bit edition
Windows Vista Home Premium, 64 bit edition
Windows Vista Ultimate, 64 bit edition
Windows Vista Business, 64 bit edition
Windows Vista Enterprise, 64 bit edition
There are no service pack requirements for any of the above
Linux
There are so many Linux distributions available that it is impossible to fully test and
support each and every one. We therefore only fully support the following
distributions:
Redhat Enterprise Linux, 3, 4 and 5
Currently only 32 bit versions are supported.
SIMetrix will run correctly on other distributions. However, if you use an unsupported
distribution, and you have difficulties with running SIMetrix on that distribution, we
will not be able to offer assistance unless we can reproduce that difficulty with a
supported distribution.
SIMetrix will usually run on any distribution that uses glibc 2.3.2 or later and gcc
version 3.2.3 or later.
Hardware
SIMetrix will run satisfactorily on any hardware that is sufficient to run the machines
operating system.
Recommended System
If you regularly run large circuit simulations or long runs on smaller circuits, we
recommend investing in the most powerful CPU available. A large RAM system can
be useful as this will allow caching of simulation data. This will speed up plotting
30
Chapter 1 Introduction
results if a large amount of data is generated. The data is stored to disk in an efficient
manner and therefore substantial RAM is not essential unless the circuits being
simulated are very large indeed. 20,000 MOSFETs requires around 64MBytes. A high
performance bus mastering SCSI disk system will improve simulation performance a
little.
Upgrade Notes
Windows Vista User Account Control
Vistas User Account Control imposes some restrictions on what files an application
can write to. In particular, regular applications may not write to any files in the
Program Files directory unless explicitly started to override this restriction. None of
the files in the SIMetrix root directory (typically located in Program Files) require
write access and so SIMetrix will run normally with User Access Control enabled.
Note that from version 5.4 some files have moved to accommodate User Account
Control. These are the examples files and the user script directory. The example files
have moved to the application data directory while the user script directory has moved
to the My Documents folder.
31
Users Manual
32
Select the menu File|Open Schematic.... Select the schematic file TUTORIAL1
which you should find in the folder EXAMPLES\TUTORIALS (See Examples
and Tutorials - Where are They? on page 32). Select Open to open this file.
A schematic window will open with the following circuit:
5.6k
R2
V1
5
Q3
Q2N2222
50
R5
Q1
Q2N2222
Q2
Q2N2222
V2
AC 1 0 Pulse(0 100m 0 10n 10n 5u)
2.7k
R1
2.2k
R3
Amplifier Output
CLOAD
100p
470
R4
V3
5V
33
Users Manual
attempt at a design but has not yet been optimised.
This example circuit has been setup to be ready to run.
2.
To start the simulation, select from the schematic window Simulator|Run or press
F9. The simulation will not take long, on a modern machine less than half a
second.
600
Amplifier Output / mV
500
400
300
200
100
Time/Secs
10
2Secs/div
As can be seen, our amplifier doesn't work all that well. There are two problems.
1.
2.
The sluggish falling edge is caused by the absence of any standing current in the output
emitter follower, Q3. To rectify this, we will place a resistor from the emitter to the -5V
rail. The resulting schematic is shown below:
34
5.6k
R2
V1
5
Q3
Q2N2222
50
R5
Q1
Q2N2222
Q2
Q2N2222
V2
AC 1 0 Pulse(0 100m 0 10n 10n 5u)
2.7k
R1
2.2k
R3
Amplifier Output
CLOAD
100p
470
R4
1K
R6
V3
5V
Press the Resistor button in the component toolbar. Alternatively, select the menu
Place|Passives|Resistor (Box shape) or, if you prefer, Place|Passives|Resistor (Z
shape). A resistor symbol will appear. Place this in the location shown in the
diagram above. Click the left mouse button to fix it to the schematic. You may
now see another resistor symbol appear (depending on how the system options
are set). Cancel this by clicking the right mouse button.
2.
Now wire up the resistor. There are a number of ways of doing this. If you have a
three button mouse or wheel mouse, one way is to use the middle button (or
wheel). Pressing it once will start a wire. Pressing it again will fix it and start a
new one. Pressing the right button will terminate it.
If enabled you can also use the smart-wiring method. Just take the mouse
pointer to the pin of the resistor. You will see a pen symbol appear as the mouse
gets close to the pin. Left click then move the mouse cursor to the destination
then left click again. This method will automatically locate a route for the wire if
one exists.
You can also enter wiring mode by selecting the toolbar wire button
. This
puts schematic into a permanent wiring mode where the left key is always used
for wiring. Revert to normal mode by pressing the wire button again.
3.
35
Users Manual
600
First attempt
500
Amplifier Output / mV
400
300
With R6 added
200
100
0
0
Time/Secs
10
2Secs/div
As you can see, The problem with the trailing edge has been fixed and the ringing is
much improved.
Now let's have a look at the ringing in more detail. To do this, we need to zoom in the
graph by adjusting the limits of the axes. There are two ways of doing this. The
quickest is to simply drag the mouse over the region of interest. The other method is to
manually enter the limits using the Edit Axis Dialog Box. To zoom with the mouse,
proceed as follows:
36
1.
Make sure that the graph window is selected by clicking in its title bar.
2.
Place the cursor at the top left of the region of interest i.e to the left of the y-axis
and above the top of the red curve.
3.
Press the left mouse key and while holding it down, drag the mouse to the bottom
right of the area you wish to zoom in. You should see a rectangle appear as you
drag the mouse.
4.
First attempt
600
Amplifier Output / mV
500
With R6 added
400
300
200
100
0
0
50
100
150
200
250
Time/nSecs
If you don't get it quite right, press the Undo Zoom button:
previous view.
300
350
400
50nSecs/div
to return to the
We can probably improve the ringing by adding a small phase lead in the feed back
loop. This can be done by connecting a small capacitor between the emitter of Q3 and
the base of Q2. There isn't room to add this tidily at present, so first, we will move a
few components to make some space. Proceed as follows:
1.
In the schematic window, drag the mouse with the left key pressed over the
region shown by the dotted lines below:
37
Users Manual
5.6k
R2
V1
5
Q3
Q2N2222
Amplifier Output
2.2k
R3
Q1
50
Q2N2222
Q2
V2
R5
AC 1 0 Pulse(0 100m 0 10n 10n 5u) Q2N2222
CLOAD
100p
470
R4
2.7k
R1
V3
5V
1K
R6
V1
5
Q3
Q2N2222
50
R5
Q1
Q2N2222
Q2
Q2N2222
V2
AC 1 0 Pulse(0 100m 0 10n 10n 5u)
2.7k
R1
2.2k
R3
Amplifier Output
CLOAD
100p
470
R4
1K
R6
V3
5V
The blue wires and components are said to be selected. To move them...
38
3.
Place the cursor within one of the selected components - V1 say - then press and
hold the left mouse key.
4.
Move the mouse to the right by two grid squares then release the left key.
Unselect by left clicking in an empty area of the schematic. This is what you
should now have:
5.6k
R2
V1
5
Q3
Q2N2222
50
R5
2.2k
R3
Q1
Q2N2222
Q2
Q2N2222
V2
AC 1 0 Pulse(0 100m 0 10n 10n 5u)
CLOAD
100p
470
R4
2.7k
R1
6.
Amplifier Output
1K
R6
V3
5V
Wire in the capacitor C1 as shown below using a similar procedure as for the
resistor R6.
Q3
Q2N2222
1n
C1
2.2k
R3
Q2
Q2N2222
Amplifier Output
CLOAD
100p
470
R4
1nF is obviously far too high a value so we will try 2.2pF. To change the component's
value proceed as follows:
1.
Double click C1. You should see the following dialog box appear:
39
Users Manual
You can type the new value in directly in the Result box or you can select a value
using the mouse alone with the up and down arrow buttons. Leave the Initial
Condition setting at its default (Open Circuit)
2.
Now re-run the simulation. This is the result you should see:
First attempt
600
With R6 added
500
Amplifier Output / mV
300
200
100
0
0
50
Time/nSecs
100
150
200
250
300
350
400
50nSecs/div
The blue curve is the latest result. This is now a big improvement on our first attempt.
We will now round off tutorial 1 by introducing AC analysis.
AC analysis performs a frequency sweep over a specified frequency range. To set one
up, follow these instructions:
1.
40
2.
Click AC check box and uncheck the Transient check box. The details of the AC
sweep have already been set up - click the AC tab at the top to see them.
3.
V1
9
R3
3
30u
IRF7501
L1
C1
150u
Output
47
Q1
R2
V2
X
Pulse(0 5 0 50n 50n 1.95u 5u)
41
Users Manual
You can either load this circuit from EXAMPLES\Tutorials\Tutorial2 (see Examples
and Tutorials - Where are They? on page 32) or alternatively you can enter it from
scratch. The latter approach is a useful exercise in using the schematic editor. To do
this follow these instructions:
1.
2.
3.
After placing the output probe, double click to edit its label. Enter this in the box
titled Curve Label. All the other options may be left at their defaults.
4.
For the pulse source V2, you can use Place|Voltage Sources|Universal Source or
the Universal Source tool bar button.
5.
This sets up a 200kHz 5V pulse source with 40% duty cycle and 50nS rise time.
6.
If you have any graph windows open, you should now close them. Once you have
loaded or entered the circuit, press F9 or use the schematic Simulator|Run menu to start
the simulation. This will take somewhat longer than the previous tutorial but still less
than 1 second on a modern machine. This is the graph you will see
42
0
-0.5
-1
Output / V
-1.5
-2
-2.5
-3
-3.5
-4
-4.5
0
0.2
0.4
0.6
0.8
Time/mSecs
1
200Secs/div
The circuit is the switching stage of a simple step-down (buck) regulator designed to
provide a 3.3 V supply from a 9V battery. The circuit has been stripped of everything
except bare essentials in order to investigate power dissipation and current flow.
Currently, it is a little over simplified as the inductor is ideal. More of this later. We
will now make a few measurements. First, the power dissipation in Q1:
1.
2.
Power(Q1) / W
140
120
100
80
60
40
20
-0
0
Time/mSecs
0.2
0.4
0.6
0.8
1
200uSecs/div
43
Users Manual
This shows a peak power dissipation of 200W although you are probably more
interested in the average power dissipation over a specified time. To display the
average power dissipation over the analysis period:
1.
This should display a value of 517mW. This is the average power over the whole
analysis period of 1mS. You can also make this measurement over any period you
select using the cursors as described below:
1.
Zoom in the graph at a point around 100uS, i.e. where the power dissipation is at
a peak.
2.
Switch on graph cursors with menu Cursors|Toggle On/Off. There are two
cursors represented by cross-hairs. One uses a long dash and is referred to as the
reference cursor, the other a shorter dash and is referred to as the main or
measurement cursor. When first switched on the reference cursor is positioned to
the left of the graph and the main to the right.
3.
Position the cursors to span a complete switching cycle. There are various ways
of moving the cursors. To start with the simplest is to drag the vertical hairline
left to right. As you bring the mouse cursor close to the vertical line you will
notice the cursor shape change. See Graph Cursors on page 244 for other ways
of moving cursors.
4.
Press F3 or select analysis menu Measure|More Functions... . From the tree list
select Measure|Transient|Mean|Cursor Span:
You should see a value of about 2.8W displayed. This is somewhat more than the
517mW average but is still well within the safe operating area of the device. However,
as we noted earlier, the inductor is ideal and does not saturate. Lets have a look at the
inductor current.
1.
44
Left click on the left pin of the inductor L1. This is what you will see:
0
-1
I(L1-P) / A
-2
-3
-4
-5
-6
0
Time/mSecs
0.2
0.4
0.6
0.8
1
200Secs/div
This shows that the operating current is less than 1.5A but peaks at over 6A. In practice
you would want to use an inductor with a maximum current of around 2A in this
application; an inductor with a 6A rating would not be cost-effective. We will now
replace the ideal component, with something closer to a real inductor.
1.
Delete L1.
2.
45
Users Manual
3.
4.
Select the graph sheet that displayed the inductor current by clicking on its tab at
the top of the graph window. Now select schematic menu Probe|Current in
Device Pin... and left click on the left hand inductor pin.
You will notice the peak current is now in excess of 45A. This is of course because the
inductor is saturating. You can also measure the peak power over 1 cycle:
1.
46
Select the graph sheet with the power plot then select Probe|Power In Device
2.
3.
4.
Position the cursors to span a full cycle. (The cursors are currently tracking the
first power curve. This doesn't actually matter here as we are only interested in
the x-axis values. If you want to make the cursors track the green curve, you can
simply pick up the cursor at its intersection with the mouse and drag it to the
other curve)
5.
We now have two curves on the graph so we must select which one with which
we wish to make the measurement. To do this check the box as shown:
6.
2.
A message box will appear asking you to confirm you wish to install the file. Click Ok.
The message Making device catalog. This may take some time, please wait... will be
displayed.
At this stage, SIMetrix knows where to find our fictitious devices. You will find that it
also knows about the NPN transistor as the following demonstrates:
1.
2.
Press control-G or select menu Place|From Model Library. You should see
window displayed with the caption Select Device
3.
Select the * Recently Added Models * category from the top of list shown on
the left hand side.
47
Users Manual
4.
Select SXN1001 from the listed items on the right hand side. This is what you
should see:
5.
Without you having to tell it, SIMetrix already knew that the SXN1001 is an NPN
transistor. This is because it is a primitive device defined using a .MODEL control.
Such devices are built in to the simulator and SIMetrix can determine the part type
simply by reading the .MODEL control in TUTORIAL3.MOD.
This is not the case with the other device in the model library. This is an opamp and is
defined as a subcircuit. This is a module made up of other components, in this case
BJTs, diodes, resistors and current sources. SIMetrix cant tell what type of device this
is. It knows that it has five terminals and it knows where the electrical model is located
in the file system, but it doesnt know what schematic symbol to use for this model.
SIMetrix will ask you for this information when you try and place it. Follow this
procedure:
1.
48
Repeat the steps 1-5 above but instead select the SXOA1000 device instead of
the SXN1000. Notice that when you select the device in the right hand side, you
see the message SIMetrix does not know what symbol to use for this model.
Press Place to resolve.
After pressing the Place button, you should see the following box:
3.
First specify a suitable category for the device. In this case it is an operational
amplifier, so select Op-amps from the drop down box labelled Choose Category
for SXOA1000.
4.
Next define a symbol for this part. Under Define Symbol for SXOA1000 select
Operational Amplifier - 5 terminal.
We have not quite finished yet. Our new op-amp has the wrong pin out for the
schematic symbol. The pin order for the symbol is shown in the third box down on the
right and is as follows:
Pin name
Function
INP
Non-inverting input
INN
Inverting input
VSP
Positive supply
VSN
Negative supply
OUT
Output
The text at the bottom of the dialog box shows the actual subcircuit definition.
Fortunately, it has been annotated with the function of each of the sub-circuit's
terminals. (This is in fact usually the case with third-party models). As you can see, the
output terminal is in the wrong place. We can change the pin order using the Pin order
up and down buttons:
1.
49
Users Manual
2.
Click twice on the up button so that it is positioned between inn and vsp. This is
what you will now have:
3.
Press OK
You will now find our op-amp listed under the Op-amps category in the parts browser.
Notes
You will not always need to execute the above procedure to associate models and
symbols even for subcircuit devices. SIMetrix is supplied with a data base of over
30000 devices that are already associated. These are devices for which SPICE models
are known to be available from some third party source. This database is in the file
ALL.CAT which you will find in support directory under Windows and in the share
directory under Linux. The information you enter in the associate models dialog is
stored in a file called USER_v2.CAT which you will find in the application data
directory - see Application Data Directory on page 328.
You will also not need to perform the above procedure for many 2 and 3 terminal
semiconductor parts even if they are not listed in the ALL.CAT database. SIMetrix
runs a series of simulations on these models and attempts to determine what the device
type is from their results. If successful, the association step demonstrated above will
be skipped.
Finally, there is a method of embedding association information within the model
itself, and such models will not require manual association. The embedding method is
described in Embedded Association on page 165.
50
Enter the circuit using the schematic editor. See page 51 below
2.
3.
Specify analysis. This includes what type of analysis and over what limits it
should run. See page 58 below.
4.
5.
The following paragraphs briefly describe these steps. More details are given in other
sections.
51
Users Manual
To Place a Component
If it is a simple device which only needs a value such as a resistor or capacitor, select
the appropriate symbol from the tool bar or Place menu. For other devices that require
a part number, it is easiest to use the parts browser. Select menu Place|From Model
Library and select your desired device.
To Change Value or Device Type for a Component
First select it then double click or select schematic popup Edit Part... or press F7. (Note
that the double click behaviour first appeared in version 5.1 and may be disabled for
backward compatibility. See Using the Options Dialog on page 330 for details). A
dialog box appropriate for the type of component will be displayed. For devices
requiring a model name, a list of available types will appear.
To Rotate, Mirror or Flip a Component
Use the rotate toolbar button
or key F5 to rotate a component. You can repeat
pressing this button/key until the desired orientation is reached. (It sequences through
all 8 possible orientations).
This operation can be performed while a component is being placed or while a block is
being moved or copied (see below).
You can also select a component or block then press the rotate button/key to rotate insitu.
To mirror a component or block through the y-axis, press the mirror toolbar button or
F6 key.
To flip a component or block (mirror about x-axis), press Flip button or press shift-F6.
Wiring
If you have a three button mouse you can start a wire by clicking the middle button.
Clicking the middle button a second time will complete the wire and start a new one.
Click the right button to terminate wiring.
If you have a two button mouse you can start a wire by pressing F3 or double clicking
the left button. Single clicking the left button will complete the wire and start a new
one. Click the right button to terminate wiring.
Alternatively, press the Wire button on the toolbar
. You can start a wire by single
clicking the left button, otherwise continue as described above. Press the Wire button
again to cancel this mode
Disconnecting Wires
Press the shift key then select area enclosing the wire. Press delete button.
52
Circuit Rules
The following design rules must be observed for the simulation to run correctly. Note
that most circuits obey them anyway and they do not impose serious limitations on the
capability of the simulator.
Every node on the circuit must have a dc path to ground. If you do have a floating
node, connect a high value resistor (e.g. 1G) between it and ground.
There must not be any zero resistance loops constructed from voltage sources and
or inductors. If you do have such loops. insert a low value resistor. It is best to
make the resistance as low as is needed to have a negligible effect on your circuit
but no lower.
53
Users Manual
Circuit Stimulus
Most circuits require some form of input signal such as a pulse or sine wave. Such
signals - or stimuli - are specified using a voltage or current source which is placed on
the schematic in the usual way. A number of different types of source are available.
These are described in the following sections.
Waveform Generator
This is used to create a time domain signal for transient analysis. This generator will
work in both SIMetrix and SIMPLIS1 modes of operation. To place one of these
devices, select menu Place|Voltage Sources|Waveform Generator for a voltage source
or Place|Current Sources|Waveform Generator for a current source.
To specify the signal for the source, select then choose the popup menu Edit Part... or
press F7. This will bring up the dialog box shown below:
Select the wave shape on the right hand side then enter the parameters as appropriate.
The following notes provide details on some of the controls.
Off until delay if checked specifies that the signal will be at the Initial value until
the delay period has elapsed.
e-damping*t
1.
54
Note that some parameters can be specified in more than one way. For example
both frequency and period edit controls are supplied. Changing one will cause the
other to be updated appropriately. The same applies to duty and width and the
vertical controls in the lower half.
A Cosine wave-shape combined with a positive delay and with Off until delay
checked, will only function correctly in SIMPLIS mode.
PWL Source
This device can be used to describe a piece wise linear source. A PWL source can
describe any arbitrary wave shape in terms of time-voltage or time-current pairs. To
place a PWL source select menu Place|Voltage Sources|PWL Source or Place|Current
Sources|PWL Source.
To edit the device, select it and press F7 or Edit Part... popup menu. This will open the
Edit PWL Dialog which allows you to enter time and voltage/current values.
As well as entering values individually, you can also paste them from the Windows
clipboard by pressing the Paste button or control-V. The values can be copied to the
clipboard using a text editor. The values may be separated by spaces, tabs, commas or
new lines.
PWL sources may be used in both SIMetrix and SIMPLIS modes. When defined in
this way PWL sources are limited to 256 points. In SIMetrix mode, much larger PWL
sources may be defined. See the Analog Device Reference in the Simulator
Reference Manual for more information.
AC Source
The small signal analysis modes, AC sweep and Transfer Function, require AC sources
for their input stimulus. In SIMPLIS mode, POP (Periodic operating point) also
requires an AC source for its input.
To place an AC source select menu Place|Voltage Sources|AC Source (for AC
analysis) or Place|Current Sources|AC Source.
Universal Source
All of the sources described above can be used in both SIMetrix and SIMPLIS modes
of operation. In SIMetrix mode there is also a Universal source which provides the
function of transient, AC and DC sources all in one device. In addition, the Universal
source may be used to create a random noise source.
To place a universal source, select menu Place|Voltage Sources|Universal Source or
Place|Current Sources|Universal Source.
55
Users Manual
To edit a universal source, select the device and press F7 or popup menu Edit Part....
This will display the following dialog box:
Pulse, sine, noise and DC waveforms may be specified using the tab sheets of the same
name. You can also specify a Piece wise linear source, exponential source or a single
frequency FM source. To enter one of these select the Text tab and enter the
appropriate syntax for the source. Please refer to Voltage source in the Simulator
Reference Manual for more information on these sources. The AC sheet is for AC
analysis only.
With the universal source, you can specify transient, AC and DC specifications
simultaneously. This is not possible with any of the other sources.
Other Sources
Sine Tone Burst
Generates a sequence of sinusoidal bursts with a user defined number of cycles per
burst, burst frequency and tone frequency.
Use menu Place | Voltage Sources | Sine Tone Burst then place device in the usual
way. Editing the device will bring up a dialog with 6 parameters:
56
Parameter
Description
Burst Freq.
Burst frequency
Tone Freq.
Peak
Peak voltage
Offset
Offset voltage
Swept Sinusoid
Generate a sinusoidal signal with linearly increasing frequency.
Use menu Place | Voltage Sources | Swept Sine then place in the usual manner. Editing
the device will bring up a dialog with 6 parameters:
Parameter
Description
Start Frequency
Starting frequency
End Frequency
Interval
Peak
Peak voltage
Offset
Offset voltage
Bidirectional Pulse
Generates a symmetrical bidirectional pulse waveform.
Use menu Place | Voltage Sources | Bidirectional Pulse then place device in the usual
way. Editing the device will bring up a dialog with 3 parameters:
57
Users Manual
Parameter
Description
P-P Voltage
Frequency
Pulse frequency
Delay
Analysis Modes
Overview
In this section we explain how to setup the most commonly used analysis modes in
both SIMetrix and SIMPLIS (SIMetrix/SIMPLIS product only)
For more comprehensive details on analysis modes, see Analysis Modes on
page 170 for SIMetrix and SIMPLIS Analysis Modes on page 202 for SIMPLIS .
58
The analysis will sweep the device you specify in the Device name box over the range
specified by Start value, Stop value and Number of points or Points per decade if you
select a decade sweep.
The entry in the Device name box is the component reference of the device to be swept
and for DC sweep would usually be a voltage source, a current source or a resistor.
Device sweep is just 1 of 5 modes available with DC sweep. The Define... button
allows you to specify one of the others. See DC Sweep on page 182 for details.
59
Users Manual
AC Frequency Sweep
An AC Frequency Sweep calculates the small signal response of a circuit to any
number of user defined inputs over a specified frequency range. The small signal
response is computed by treating the circuit as linear about its DC operating point.
There must be at least one input source for AC analysis for the results to be
meaningful. Connect a voltage or current source to the circuit, select it then press F7.
In the dialog box select the Enable AC check box. On the circuit, an AC input voltage
source will look something like this:
AC 1 0
V1
To set up an AC Frequency Sweep, select the AC check box at the right and the AC tab
at the top. You will need to enter some values in the Sweep Parameters section:
The analysis will sweep the frequency over the range specified by Start frequency, Stop
frequency and Number of points or Points per decade if you select a decade sweep.
Frequency sweep is just 1 of 6 modes available with AC sweep. The Define... button
allows you to specify one of the others. See AC Sweep on page 184 for details.
Noise Frequency Sweep
Like AC analysis, Noise analysis is a small signal mode. Over a user defined frequency
range, the circuit is treated as linear about it's DC operating point and the contribution
of all noisy devices to a designated output is computed. The total noise at that output is
also calculated and optionally the noise referred back to an input source may also be
computed.
To set up a Noise Frequency Sweep, select the Noise check box at the right and the
Noise tab at the top. You will need to enter some values in the Sweep Parameters
section:
60
The analysis will sweep the frequency over the range specified by Start frequency, Stop
frequency and Number of points or Points per decade if you select a decade sweep.
You will also need to enter some additional parameters:
An entry in the Output node box is compulsory. It is the name of the circuit node as it
appears in the netlist. Usually the schematic's netlist generator chooses the node names
but we recommend that when running a noise analysis that you assign a user defined
name to your designated output node. You can do this using a terminal symbol
(Place|Connectors|Terminal) To find out more see Finding and Specifying Net
Names on page 80.
An entry in the Ref node box is optional. It is the node to which the output node is
referenced. If omitted it is assumed to be ground.
An entry in the Source name box is optional. If specified the noise referred back to it
will be calculated. Enter the component reference of the voltage or current source that
is used as the input to your circuit.
Frequency sweep is just 1 of 6 modes available with Noise Analysis. The Define...
button allows you to specify one of the others. See Noise Analysis on page 185 for
details.
DC Operating Point
To specify a DC operating point analysis, check the DCOP box on the right of the
Choose Analysis Dialog.
Note that the DC operating point is calculated automatically for all the other analysis
modes described above although for noise analysis the results are not stored.
After a DC operating point has been completed, you can annotate your schematic with
markers to display the voltages at each node. Press control-M on the schematic to place
a single marker or select the popup menu Bias Annotation|Auto Place Markers to
61
Users Manual
automatically place markers on all nodes. See Viewing DC Operating Point Results
on page 263 for full details.
Other Analysis Modes
Real-time noise
Transfer function
Sensitivity
Pole-zero
Multi-step Analyses Transient, AC, DC, Noise and Transfer Function analyses can
be run in an auto-repeat mode while stepping a user-defined
parameter. See Multi-step Analyses on page 196.
Monte Carlo Analysis See Monte Carlo Analysis on page 316.
62
SIMPLIS has three analysis modes, namely Transient, Periodic Operating Point (POP)
and AC. Transient is similar to SIMetrix transient analysis. POP is a unique analysis
mode that finds the steady state of a switching circuit. AC finds the small signal
response of a periodic system.
Transient Analysis
To setup a basic transient analysis:
1.
2.
3.
Enter an appropriate selection under Save Options. Its usually best to select All.
This will instruct SIMPLIS to save all data for subsequent plotting.
In most cases the above is all you need to do. For information on the remaining
transient analysis settings, see Transient Analysis on page 172.
63
Users Manual
Periodic Operating Point Analysis (POP)
2.
3.
Check the Use "POP Trigger" Schematic Device box. You will need to place a POP
trigger device on your schematic. See below
4.
In the Max. period box, enter a value that is larger than the largest possible value
of your circuits switching period.
You must place on your schematic a POP trigger device. Select menu Place|Analog
Functions|POP Trigger. After placing the device, connect its input to a switching
frequency signal. You do not need to connect the output of this device. Select the
trigger device then press F7. Enter suitable values for Ref. Voltage and Hysteresis so
that it will always reliably trigger on the switching waveform. If you don't use the
output, there is no need to change the other parameters.
AC Analysis
To setup an AC analysis:
64
Select AC sheet.
2.
3.
Enter parameters in Sweep Parameters section. These have the same meaning as
the equivalent SIMetrix analysis.
65
Users Manual
Notes
1.
2.
SIMPLIS
If the schematic is in SIMPLIS mode, the procedure described above will start the
SIMPLIS simulator. A window showing the progress of the SIMPLIS simulation will
be displayed. Please refer to the SIMPLIS Reference Manual for more information
about this display.
SIMPLIS can be aborted by pressing the Abort button in the progress window.
SIMPLIS, cannot however, be paused and resumed.
Fixed Probes
There are several types of fixed probe. Three of the commonly used probes are:
66
2.
3.
They are simply schematic symbols with special properties. When you place a fixed
probe on the schematic, the voltage or current at the point where you place the probe
will be plotted each time you run the simulation. The probes have a wide range of
options which can be set by selecting the probe then pressing F7. These options are
covered in detail in section Fixed Probes on page 215.
There are more fixed probes available in addition to those described above. See Fixed
Probes on page 215 for details.
Fixed Voltage Probes
You can place these on a schematic with the single hot key B or with one of the
menus
Probe|Place Fixed Voltage Probe...
Place|Probe|Voltage Probe
schematic popup Probe Voltage
Hint
If you place the probe immediately on an existing schematic wire, SIMetrix will try
and deduce a meaningful name related to what it is connected to. If you place the probe
at an empty location, its name will be a default (e.g. PROBE1-NODE) which won't be
meaningful and you will probably wish to subsequently edit it.
Fixed Current Probes
You can place these on a schematic with the single hot key U or with one of the
menus
Probe|Place Fixed Current Probe...
Place|Probe|Current Probe
schematic popup Probe Current
Current probes must be placed directly over a component pin. They will have no
function if they are not and a warning message will be displayed.
Fixed Differential Voltage Probes
These can be placed using one of the menus
Probe|Place Fixed Diff. Voltage Probe...
Place|Probe|Differential Voltage Probe
Random Probes
Most of the entries in the schematic's Probe menu are for random probing. You can
probe, voltage, current, differential voltage, device power, dB, phase, Nyquist
67
Users Manual
diagrams and much more. You can also plot arbitrary expressions of any circuit signal
and plot signals from earlier simulation runs. Just a few of the possibilities to get you
started are explained below. For a full reference see Random Probes on page 219.
Random Voltage Probing
1.
2.
Using the mouse, place the cursor over the point on the circuit you wish to plot.
3.
Press the left mouse button. A graph of the voltage at that point will be created.
The new curve will be added to any existing graph if the X-axis has the same
units. Otherwise, a new graph sheet will be created.
2.
Using the mouse, place the cursor over the point on the circuit you wish to plot.
3.
Press the left mouse button. A graph of the voltage at that point will be created. A
new graph sheet will be created for it unconditionally.
2.
Using the mouse, place the cursor at the device pin whose current you wish to
plot.
3.
Press the left mouse button. A graph of the current at that point will be created.
The new curve will be added to any existing graph if the X-axis has the same
units. Otherwise, a new graph sheet will be created.
Select the schematic menu item Probe|Current in Device Pin (New Graph
Sheet)...
2.
Using the mouse, place the cursor at the device pin whose current you wish to
plot.
3.
Press the left mouse button. A graph of the current at that point will be created. A
new graph sheet will be created for it unconditionally.
68
1.
2.
Using the mouse, place the cursor over the point on the circuit you wish to plot.
3.
Press the left mouse button. The new curve will be added to any existing graph if
the X-axis has the same units. Otherwise, a new graph sheet will be created.
2.
69
Users Manual
Undo
Duplicate
Function of left
mouse button
70
Place components
Editing Operations
To Place a Component
If it is a simple device which only needs a value such as a resistor or capacitor, select
the appropriate symbol from the tool bar or Parts menu. For other devices that require a
part number, it is easiest to use the parts browser. Select menu Place|From Model
Library and select your desired device.
Once the symbol has been selected, using the mouse, move the image of the
component to your desired location then press the left mouse button. This will fix the
component to the schematic. Depending on preference settings (command shell menu
File|Options|General... schematic tab), you may now be presented with another copy of
the symbol for placement. Use left key as before to place, press right key to cancel.
Selecting a Single Component
Most operations require items to be selected. When an item (component or wire) is
selected, it changes colour to blue.
To select a single component, just left click it.
Selecting an Area
To select all items within a rectangular area of the schematic press the left mouse key
in an empty area of the sheet and hold down while dragging mouse to opposite corner
of rectangle. A rectangular box should be drawn as you move the mouse. (Note that if
the initial cursor position is too close to a wire junction or component, a move
operation will be carried out instead of selection.)
To Change Value or Device Type for a Component
First select it then select schematic popup Edit Part... or press F7. Alternatively, you
can just double click the device. (Note that the double click behaviour is new for
version 5.1 and may be disabled for backward compatibility. See Using the Options
Dialog on page 330 for details). A dialog box appropriate for the type of component
will be displayed. For devices requiring a model name, a list of available types will
appear
To Rotate, Mirror or Flip a Component
Use the rotate toolbar button
or key F5 to rotate a component. You can repeat
pressing this button/key until the desired orientation is reached. (It sequences through
all 8 possible orientations).
This operation can be performed while a component is being placed or while a block is
being moved or copied (see below).
You can also select a component or block then press the rotate button/key to rotate in
situ.
71
Users Manual
To mirror a component or block through the y-axis, press the mirror toolbar button or
F6 key.
To flip a component or block (mirror about x-axis), press Flip button or press shift-F6.
Wiring
See Wiring on page 75 below
Deleting Wires
Select the wire by placing cursor over it clicking left button. Press
delete key.
button or press
Disconnecting Wires
Press the shift key, then select area enclosing the wire or wires to be deleted. Press
delete button.
To Move a Single Component
Place the cursor within it and then drag it using the left mouse key. You can
rotate/flip/mirror the component (see above) while doing so.
To Move More Than One Item
Select items as described above. Place cursor within any of the selected items then
drag the items to the desired location. You can rotate/flip/mirror the items (see above)
while doing so.
To Move Items Disconnected
Select items as described above. Select schematic menu Edit|Detach menu item. Move
items to desired location then press left mouse key. You can rotate/flip/mirror the items
(see above) while doing so.
To Move Property Text (Labels)
SIMetrix provides the ability to move property labels simply by dragging them with
the mouse but this method is disabled by default. To enable, use menu File | Options |
General... then in Schematic sheet select Enable GUI property edits in the Property
editing box.
Although this is of course a convenient method for moving property labels, our
recommendation is that this method is kept switched off. Our philosophy is that it is
better to move the symbol so that the label is clearly visible rather than move the label
itself. That way the label will always be in a consistent location with respect to the
symbol and there will be no confusion about which symbol a label refers to. By not
having GUI editing enabled, there can be no conflict with other interactive functions
such as drawing wires or moving symbols. See Notes on Property Text Position on
page 75 for a discussion.
72
Multiple Selection
Individual items which do not lie within a single rectangle can be selected by holding
down the control key while using the mouse to select the desired items as described
above.
Selecting Wires Only
Hold down shift key while performing select operation.
Holding Down the ALT Key...
... while selecting will limit component selection to only devices that are wholly
enclosed by the selection box.
Unselecting
Place the cursor in an empty area and press left mouse key.
Unselect Items Within a Rectangle
You can unselect an area of schematic enclosed by the selection box. Use menu
Edit|Unselect|Rectangle.
To Increment/Decrement a Component Value
Select component then press shift-up or shift-down respectively. This only works with
resistors, capacitors and inductors.
73
Users Manual
To Change a Component Reference
Select component(s) then press F8 or select schematic menu Edit|Change Reference.
Enter new reference.
To Correct a Mistake
Press the Undo button
. By default you can backtrack up to ten operations (but
this can be changed with File|Options|General...). If you want to undo the undo
operation, select the schematic popup or fixed menu Edit|Redo menu item.
To Add Text To a Schematic
Select the popup menu item Edit|Add Free Text.... This opens a dialog box prompting
you for the text to be entered. After entering text and closing box you can then position
the text where you require using the mouse.
To Change Text Already Entered
Select the text then press F7 and enter the new text.
To Hide A Component Value
Select popup menu item Hide/Show Value
Zoom Area
Press
Zoom In
Press
Panning
Use the scroll bars to pan schematic. You may also use the left, right, up and down
cursor keys to pan the schematic one grid square in the relevant direction and the Page
up, Page down, control left cursor, control right cursor to pan the schematic 10 grid
squares. Also the schematic will auto pan if either of the left or right mouse keys is
held down when the cursor enters the a region of the schematic less than one grid
74
Wiring
Overview
SIMetrix offers both manual and smart wiring methods. In smart mode, you select the
start and end points and SIMetrix will find a suitable route. In manual mode, you place
each wire segment individually in exactly the locations you require. You dont need to
change global settings to select the mode you desire; the procedures for each mode are
different and so you can freely switch between them from one wiring operation to the
next.
However, in most applications you wont need to use the manual wiring method. The
smart wiring method can still be used to enter wire segments one by one, simply by
selecting start and end points that have an obvious straight line route. The fundamental
difference between smart and manual is that smart mode will always route around
obstacles such as existing wire terminations or whole symbols. In manual mode the
75
Users Manual
wire will always go exactly where you take it even it crosses existing connections or
passes through existing symbols.
Smart Wiring Procedure
1.
Initiate smart wiring by bringing the mouse cursor close to either an unselected
symbol pin or an unselected wire end. As you do this you will notice that the
cursor changes shape to depict a pen symbol.
2.
Click the left button (press and release), to mark the starting point of the wire
connection.
3.
Move, the cursor to the destination point. This may be anywhere on the
schematic, not just at a wire end or symbol pin.
If there is a viable route from the start point to the destination point, SIMetrix will
locate it and draw the wire route.
Smart Wiring Notes
The smart wiring algorithm use an heuristic algorithm that finds as many routes as
possible then chooses the best one based on a number of criteria. The criteria used in
the selection include the number of corners, the number of wires crossed, the number
of property labels crossed and its overall length. It attempts to find the most
aesthetically pleasing route, but as this is somewhat subjective, it may not necessarily
find the route you may have chosen manually. However, in our tests, we have found
that it usually finds the best route for situations where there are no more than 2 or 3
corners required. In developing the algorithm we paid particular attention to common
scenarios found in analog design such as routing the output of an opamp back to its
inverting input and you should find that these common scenarios work well.
Smart Wiring Options
There is two option to control the smart wiring algorithm. Firstly, you can disable the
smart wiring algorithm altogether, in which case the smart wiring procedure will place
wires in a similar fashion to the manual wiring methods.
Secondly, there is an option that controls whether or not the smart wiring algorithm is
allowed to route wires through existing wires that are connected to the start and end
points. By default this option is on, i.e. the smart algorithm is allowed to route through
connected wires. If the option is off, the algorithm will not allow any wires in the route
to connect to any existing wire regardless of what it is connected to. In general, we
recommend that the option is left switched.
To change the smart wiring options, select menu File | Options | General... . The two
wiring options are in the section titled Wiring.
Manual Wiring Procedure
If you have a three button mouse you can start a wire by clicking the middle button.
Clicking the middle button a second time will complete the wire and start a new one.
Click the right button to terminate wiring.
76
Edit Modes
SIMetrix has three alternative edit modes that affect how wires are treated during move
operations and also the behaviour when superimposed connecting pins are separated.
These are:
1.
Classic. This is a basic rubberbanding mode where wires are fixed at one end and
follow the component at the selected end. When superimposed pins are
separated, no wire is created between them. This is the method used for all
SIMetrix version up to and including release 5.2 hence the name classic.
2.
Grow wire. The wire editing is the same as for classic but when superimposed
pins are separated, a wire is created to maintain the electrical connection.
3.
Orthogonal. As grow wire but wires are edited in a manner so that they are kept at
right angles as much as possible.
2.
In schematic tab in the Edit Mode section select the mode of your choice. Note
that this change will not affect currently open schematic sheets
Bus Connections
SIMetrix provides the Bus Ripper symbol to allow the connection of busses.
To Add a Bus Connector
1.
77
Users Manual
2.
Start index and end index define the wires within the bus that you wish to connect
to. Suppose you were connecting to a data bus called DATA and it was 16 bits
wide. If you wish to make a connection to the 4 bits from DATA8 to DATA11,
you would enter 8 and 11 for the start and end index respectively. The bus ripper
doesn't care about the size of the bus to which it is connecting.
3.
Choose an appropriate style. This only affects the appearance of the symbol not
its functionality.
4.
To Draw Busses
There is no special method of drawing busses. Simply wire up bus rippers as you
would any other component. As soon as you connect to the bus pin of a bus ripper, the
colour and thickness of the wire will automatically change to signify that it is a bus.
To Increase/Reduce the Connections to a Bus
If you wish to add connections to or delete connections from a bus ripper, select the
ripper device and press F7 or popup menu Edit Part.... The same dialog as above will
be displayed. Adjust the start and end indexes appropriately then close the box.
Connecting Busses in a Hierarchy
See Connecting Busses in a Hierarchy on page 83
Annotating a Schematic
You can add a caption or free text to a schematic. The only difference between them is
the font style and justification. Captions use a heavy font and are centre justified. Free
text use a smaller font and are left justified. To place a caption or free text use the
popup or fixed menus:
Edit|Add Caption... or
Edit|Add Free Text...
respectively. Note, you can use the enter key to add a new line. The actual fonts used
can be changed with File|Options|Font.... Note the fonts are global and not stored with
the schematic.
78
Unconnected pins.
Dangling wires.
Implicit connections (e.g. two terminal symbols with the same name)
Name translations. This is for busses with different names connected together.
One name has to win.
Next the netlist is read in by the simulator but the simulation is not started. This will
identify any devices for which models have not been found.
Schematic Preferences
Component Toolbar
The default toolbar show a selection of symbols useful for either CMOS IC design
(Micron versions) or discrete circuit design (all other versions). There are however
many more buttons available and these can be added as desired. To do this select the
schematic menu View|Configure Toolbar... . This will display a dialog box allowing
full customisation of the component buttons on the schematic toolbar. Note that the
toolbar configuration in SIMetrix mode is independent of the configuration in
SIMPLIS mode.
79
Users Manual
Further customisation of all toolbars is possible using script commands. You can also
define your own toolbars and buttons. Full details may be found in the Script Reference
Manual
Component Placement Options
You can specify whether or not you prefer multiple or single placement of components.
By default, placement of components from the schematic tool bar is repetitive while
placement of components from the menus is done one at a time. This can be changed.
Select the command shell menu File|Options|General.... In the schematic sheet, the
options available are presented in the Placement box.
80
Bottom-up method
Schematics are designed first then blocks are created to use with
them.
From version 4.1, the schematic and its symbol can be stored within the same file. The
combined element is known as a component and is usually given the file extension
.SXCMP. In earlier versions, the symbol (or block) had to be stored in the symbol
library while the schematic was stored as a separate file. This method is still supported
but we recommend using the component method for all new designs.
All the methods for creating hierarchical schematics described in this section use
components.
Top-Down Method
Creating Component Symbol
Select schematic menu Hierarchy|Create New Symbol... . This will open the graphical
symbol editor. See page 89 for details. Note that the symbol you create must be given a
Ref property typically with the initial value U? and a Model property which must
have the value X.
Placing Symbol
If the schematic containing the block has never been saved (untitled in caption bar)
you must save it now. This is so that the schematic has a title. This step is only
necessary if the schematic has never been saved before.
Select either Hierarchy|Place Component (Full Path)... or Hierarchy|Place Component
(Relative Path)... . The first references the component file using a full file system path
name while the second uses a path relative to the parent schematic. SeePlacing - Full
vs Relative Path on page 82 for more details. Select the .SXCMP file you used to save
the symbol in the above paragraph. Note that you will see the warning message
Component module ports in underlying schematic do not match symbol pins
displayed in the command shell. This warning may be ignored at this point.
Creating Schematic for Block
1.
Select the symbol whose schematic you wish to define then select schematic
menu Hierarchy|Descend Into. Note the symbol must have been saved as a
component as described above.
2.
A new schematic sheet will be opened with a number of module port symbols
already placed. These will be named according to the pin names of the block.
You must use these to make connections to the outside world.
Bottom-up method
Creating Schematic
1.
Open or draw schematic. It must have at least one Module Port symbol on it. To
place a module port, use schematic menu Hierarchy|Place Module Port.
81
Users Manual
2.
Save the schematic as a component. Select menu Save As... then select
Components from Save as type: list.
2.
3.
The symbol created can be saved straight away or you can edit it to suit your
requirements. To save it, in the symbol editor window, select the menu
File|Save... . You will not usually need to change any of the settings in the dialog.
Just press Ok to close.
Select the block then either press Control-E or select Hierarchy|Descend Into.
2.
If schematic attached to the block is already open, it will be brought into view. If
it isn't it will be opened. Note that the schematic will now be associated with the
block that you entered. This is important if you have more than one block
attached to the same schematic and you intend to plot curves from it after a
simulation. This is explained more fully in the section on simulating hierarchical
designs.
Select Hierarchy|Ascend
2.
82
2.
To define a bus connection, place the part Hierarchy|Place Module Bus Port
instead of the usual Module Port. Select the device and press F7 to define the port
name and bus size (i.e. the number of wires in the bus).
3.
4.
5.
83
Users Manual
1.
Select the label next to the bus pin. This will be of the form [A..B] where A is the
start wire (default is 0) and B is the final wire. Note that if you edited an existing
symbol to add a bus connection, you may not see this label. If so select the
component then menu Hierarchy|Update Bus Connections.
2.
Press F7 then enter the new offset and OK. You will see the label change
accordingly. For example, suppose the bus has 8 wires as defined in the child
schematic. To begin with the label will be [0..7] and will therefore connect to bus
wire 0 to 7. If you change the offset to, for example, 4, the label will change to
[4..11] meaning that the connection will now be made to wires 4 to 11.
In the child schematic change the Module Port to a Module Bus Port and edit as
appropriate.
2.
In the parent schematic, select the block then menu Hierarchy|Update Bus
Connections. This will update the schematic to show the bus connection on the
hierarchical block.
2.
3.
In the parent schematic, select the block then menu Hierarchy|Update Bus
Connections
Global Nets
You can access any net at the top level of a hierarchy using a terminal symbol and
prefixing the name with '#'.
For example, suppose you have a net at the top level called VCC. You can access this
net at any level of the hierarchy without having to pass the connection by connecting a
terminal symbol (Place|Connectors|Terminal) and then assigning it the name #VCC.
Global Pins
Supposing you have two instances of a hierarchical block which you wish to connect to
different supply rails. To do this you would need to connect the supplies - say VCC - to
pins at the top level with explicit (i.e. non-global) connections at the lower levels. So
every child schematic at lower levels would also need VCC pins.
However, it is sometime convenient to hide these connections. When there is only one
supply for an entire design, this can be done using global nets. However, in the
scenario we described above, there are two versions of VCC so we would not be able
to use a global net in this case.
A solution to this is to use a feature of SIMetrix called Global Pins. Global pins are
defined during symbol definition. Once a pin is defined as global, a net of the same
name will be available in all child schematics at all levels without the need for it to be
explicitly passed.
84
12
V5
5
V3
VCC
block1.sxsch
U1
VCC
In Out
VEE
Sine(0 1 1k 0 0)
V1
block1.sxsch
U2
In Out
VEE
1K
R1
1K
R2
12
V4
5
V2
Pin0
Pin1
R1
block2.sxsch
U1
Out
Block 1
v cc
1u
Q1
N1
Pin0
L1
Pin1
VEE
Block 2
In the above example, VCC and VEE connections have been made in block2 without
them having to be passed via the parent block1.
The above trivial example is supplied as an example. See Examples\Hierarchy\Global
Pins.
Creating Global Pins
To define a global pin. select the symbol editor menu Property/Pin|Global Pins... .
Double click on the pin you wish to assign as global and select Yes.
85
Users Manual
Highlighting
The schematic highlighting features will work through a hierarchy. The menus Edit |
Highlight by Net and Edit | Highlight Net by Name... will highlight a selected net
within the displayed schematic and any connected nets in other schematics in the same
hierarchy. But note the following:
86
1.
In very large hierarchies, it is possible that the mechanism that traces through the
hierarchy to identify connected nets can noticeably slow down the time taken to
descend into a new schematic. Hierarchical highlighting can be disabled if this
becomes a problem. See menu File | Options | General... then check Disabled
under Hierarchy Highlighting
2.
Printing
Printing a Single Schematic Sheet
1.
2.
If there is a graph window currently open (See Graphs, Probes and Data
Analysis on page 213) you can choose to plot the schematic alongside the graph
on the same sheet. Select your choice in the Layout section.
3.
In the Schematic box select an appropriate scale. Fit area will fit the schematic to
a particular area relative to the size of paper. If multiple sheets are chosen, a
small overlap will be included. Fixed grid means that the schematics grid will be
mapped to a fixed physical size on the paper. The sizes are in inches (1 inch=
25.4mm). So 0.3 means that 1 grid square on the displayed schematic will be 0.3
inches or 7.5mm on the printed sheet.
2.
You will be presented with a complete list of schematics used in the current
hierarchy. Select the schematics you wish print and Ok.
3.
File Operations
Saving
For normal save operations use the File|Save or File|Save As... menus.
To save all the sheets currently open use File|Save All.
Windows Meta File (.EMF and .WMF). This is only available in Windows
versions. Nearly all windows applications that support graphics import will
accept this format. Note that this is a scalable format and therefore suitable for
high resolution printing.
2.
Scalable Vector Graphics (.svg). This is a relatively new format and is not
supported by many applications. However, it is the only scalable format available
in Linux.
3.
Bitmap - default image size (.png, .jpg, .bmp) These are available on all
platforms, are widely supported by graphics applications but these are not
scalable formats and so do not offer good quality when printed using high
87
Users Manual
resolution printers. PNG is the default format if you do not choose a file
extension and generally this is the format that provides the best image quality/file
size trade off. To choose JPG (JPEG format) or BMP (windows bitmap format)
you must explicitly enter .jpg or .bmp file extensions respectively. With this
option the image size will match the image size currently displayed on screen. If
you wish to specify a different image size, use next option.
4.
Bitmap - specify image size (.png, .jpg, .bmp). As 3 above but you must
explicitly define the image resolution in pixels. You will be prompted for this
when you close the file selection dialog box. Note that schematics always
maintain their aspect ratio so the final image size may differ from what you
specify. The actual image will always fit within the X and Y values you give.
ASCII format
SIMetrix schematics are usually saved in a binary format. This is fast, compact and can
be read by earlier versions.
From version 5.0 a new ASCII format was introduced. The format used is fully
documented allowing the development of translators to other formats. Also there are
some editing operations that are easier performed on an ASCII file than with the
graphical editor. For example, changing a symbol name is very difficult with the
schematic editor as you have to delete and replace all instances. But this is a simple
task with a text editor operating on the ASCII file.
Saving in ASCII Format
To save a schematic in the ASCII format use the menu File|Save Special... then select
ASCII format.
Opening ASCII Schematics
No special procedure is needed. Just open the schematic in the usual way. SIMetrix
will detect that it is in the ASCII format automatically.
File Format
Documentation for the install CD may be found at
cd-drive-letter:\Docs\File-Formats\schematic-ascii-format.pdf (Windows) or
/cd-mount-point/Docs/File-Formats/schematic-ascii-format.pdf (Linux)
88
The file being saved does not already exist OR the file does exist and is not
already a SIMetrix ASCII schematic.
So, if you have an ASCII schematic and wish to convert it to binary, the only method is
to open it normally then save to a new file.
Autosave
When enabled, SIMetrix will automatically save all open schematics at regular
intervals.This system does not write to the schematic's normal file but to a backup
location.If SIMetrix closes unexpectedly due perhaps to a power failure, you will be
asked whether you would like to recover the auto-saved schematics when you restart
SIMetrix.
To enable auto saving and to set the auto-save interval, select menu File | Options
| General.... See the Auto-save interval section in the Schematic sheet.
2.
3.
For most applications, using the graphical symbol editor is the most appropriate
method. The symbol generator was originally developed for a very early version of
SIMetrix as a temporary measure before a full graphical editor became available. It
isnt as flexible as the graphical editor, but with practice, it is possible to create
symbols very rapidly with this tool. For that reason the symbol generator continues to
be available.
The manual approach using a script is described in the Script Reference Manual.
Symbol Generator
Select menu item Symbol Editor|Symbol Generator.... This will open symbol generator
dialog as shown below.
89
Users Manual
2.
Enter a description for symbol as you wish it to appear in the dialog opened with
the schematic popup All Symbols.... The symbol also requires a unique name
which may not contain spaces. This name is used internally by SIMetrix.
3.
Enter a catalog. You can use an existing one or create a new one.
4.
Select OK
5.
Select symbol to use as base from description box. Note that only symbols
originally created with the symbol generator and not subsequently edited with the
graphical editor will be listed.
2.
3.
Symbol Shape
Select Rectangle or Triangle. A triangle shape converges to a point on the right.
Triangle symbols may only have one pin defined on the right.
90
Pins
Select Pin Definition tab.
1.
Enter pin name. This can be anything but may not have spaces. Also, avoid pin
names with arithmetic characters such '+' and '-'. This isn't an error but will
introduce restrictions if plotting currents into a pin of the symbol on a schematic.
2.
Select where you want the pin to be put on the symbol with the Left, Right, Top
and Bottom radio buttons
3.
If you want the name of the pin to be shown on the symbol, ensure the Name
Visible? check box is checked.
4.
Press Add. The pin description will appear in the list box.
5.
Netlist Order
Each time you enter a new pin the Netlist Order box will increment. Each pin must
have a unique netlist order value and the values must be contiguous. If you are creating
a symbol to be used as a hierarchical block, the netlist order is unimportant - SIMetrix
uses the pin name to match block pins to schematic module ports. If you are creating a
symbol to use with an existing subcircuit - from say, a model library- the netlist order
must match the order in which the pins are defined for the subcircuit definition.
Modifying Pins
1.
2.
Change the characteristic you wish to modify. Note that SIMetrix will not allow
you to change the netlist order to a value that is already used.
3.
Press Modify
Properties
Properties defined for a symbol are actually the initial properties present when the
symbol is first placed on a schematic. These can be changed afterwards.
1.
2.
91
Users Manual
3.
All schematic symbols must have a component reference (ref property), and a
value (value property). Additionally simulator symbols should also have a model
property. For subcircuits, this should have the value X. Hierarchical blocks do
not need a value property.
4.
Enter required properties. See below for more information. For each property,
select the location for the text of the property. You may also choose to have the
property not visible. This is usual for the model property
5.
Press Add
92
Property name
Function
Ref property
Value property
Model property
93
Users Manual
Zoom Box/out/in
Enter draw
segment mode
Current mouse
mode
94
Magnification
Segments. These make up the visible body of the symbol. They include straight
line segments and arc segments.
Properties. Properties have a name and a value and are used to define the
behaviour of the device represented by the symbol. They can also be used for
annotation, for example, a label or a caption.
2.
If you have a three button mouse, the middle button will start a new segment. The
left button will complete a segment and terminate the operation, while the right
button will terminate without completing the current segment.
3.
4.
95
Users Manual
Dedicated menus are supplied for starting a full circle, half circle and quarter circle.
For everything else use Arcs|Ellipse/Arc... .
When you have initiated the operation, the cursor will change to a shape showing a
pencil with a small circle. You can now draw the curved segment by dragging the
mouse with the left key. When you release the mouse button the operation will be
complete and the mouse mode will revert to normal select mode.
It is easier to demonstrate than explain. You may wish to experiment with
arc/circle/ellipse drawing to gain a feel of how the system operates.
You will note that full circles are displayed with a small filled square on opposite sides.
These are the select points. You can pick either one and drag it to resize the circle.
Pin name
Must be unique within the symbol and may not contain spaces.
96
Hidden
Check this box if you do not wish the pin name to be visible on
the schematic
Vertical
Attributes
Font style
Select font style to use for a visible pin name. There is a choice
of 8 styles. Schematic fonts are explained on page 352.
97
Users Manual
match the order in which the corresponding nodes are defined in the .SUBCKT
control. If the symbol is a primitive device, then it must follow the order defined in
section Summary of Simulator Devices on page 123. Pin order is unimportant for
hierarchical blocks.
To define the symbol's pin order select menu Property/Pin|Edit Pin Order.... Use the up
and down buttons to reorder the pins as appropriate.
Adding XSpice Pin Attributes
Some XSPICE devices support vector connections and/or variable type connections.
These are designated in the netlist with the characters '[', ']' and '%' and are explained in
the Digital Simulation chapter of the Simulator Reference Manual. You can add
these to a symbol by prefixing the appropriate pin name with the same characters as
required in the netlist. E.g. to start a vector connection at a pin named IN1 enter the pin
name [IN1. To close a vector connection at pin IN3 use pin name IN3].
Similarly to change a connection whose default type is v (i.e. a single-ended voltage)
to a differential current (type%id), prefix the first pin name with%id and a space. E.g.
pin name VIN would become %id VIN.
Examples of the use of vector connections in symbols can be found with any of the
digital gate symbols.
Defining Properties
Properties define the behaviour of the symbol. For full documentation on the use of
properties, see section Properties on page 103. In this section, the methods of adding
and editing properties in the symbol editor are described.
Adding a Single Property
To add a property to a symbol, select Property/Pin|Add Property.... You will see the
following dialog box:
98
This box allows you to define the name, value and attributes of the property. Note that
if the property is not protected, the value and attributes can be changed after the
symbol has been placed on a schematic using the schematic popup Edit Properties....
Name
Name of property. This would usually be one of the special properties documented in
Properties on page 103. You can, however, add any property name you wish to
display as text or to provide a special function that you define in a custom script. The
only restriction is that the name must not contain spaces.
Value
The property's value. (Don't confuse this with the Value property). You can insert a
new line by pressing the ENTER key. But be careful that if you press the ENTER key
accidentally intending to close the dialog that you must delete the erroneously entered
new line.
Text location
Define the position of the property's value text on the schematic.
Auto/Absolute
99
Users Manual
automatically outside the symbol's border according to the
options specified in Normal and Rotated. When absolute is
selected, the property is placed at a fixed position relative to the
symbol body. You can define the location interactively with the
mouse. When auto is selected, the text is always horizontal,
when absolute is selected, the text is vertical when the symbol is
at a 90 degree rotation.
Normal
Rotated
Justification
Centre
Top
Base line
Property Text
Hidden
Vertical
Property Attributes
100
Font style
Selectable
Protected
Linear
When this is not checked, the size of the font is adjusted for best
readability and does not necessarily scale exactly with the zoom
magnification. When the box is checked, the font size follows
the magnification in a linear fashion.
Show Name
Resolve symbolic
Saving Symbols
To save the current symbol, select menu File|Save... . The following dialog will be
displayed:
101
Users Manual
102
Properties
Overview
Properties are one of the schematic editor's most important concepts. They are actually
used for a number of purposes but the most importantly they are used to determine how
a schematic device behaves during simulation. A property tells the simulator what type
of device it is (resistor, BJT, sub-circuit etc.), another property specifies a device's
value or model name and, for a hierarchical block, a property specifies the file location
of the underlying schematic.
For most applications, you only need to understand the meaning of ref, value and
model properties. These are explained below but also in Properties on page 91. It is
also useful, but not essential, to understand the schematic_path property used in
hierarchical blocks.
103
Users Manual
What is a Property?
A Property is an item of text that is attached to a schematic component to specify some
circuit parameter such as a component reference (e.g. R23), value (e.g. 2.2K) or model
name (e.g. BC547).
All properties have a name, a value and a number of attributes. A property's value may
be displayed on the schematic. The attributes determine how the value is displayed
with the exception of the protected attribute which determines whether a property is
allowed to be modified.
A property can have any name (as long as does not have spaces in it) and any value.
However, certain property names have a special meaning and impart a particular
functionality on the component that owns it. These special properties are described in
the following table.
104
value
model
105
Users Manual
scterm
schematic_path
mapping
params
template
valuescript
incscript
decscript
handle
simulator
Template Property
This is the subject of its own section. See below.
106
Restoring Properties
This is a method of restoring an instance's properties to the values and attributes of the
original symbol. This is especially useful in situations where a symbol has been edited
to - say - add a new property and you wish that new property to be included on existing
instances of that symbol.
To restore instances properties follow the instructions below.
1.
2.
3.
This function will restore properties according to the local symbol definition stored in
the schematic. This won't necessarily be the same as the global definition in the symbol
library. For more information see How Symbols are Stored on page 122
Template Property
Overview
The template property provides a method of customising the netlist entry for a
schematic component. Normally a single line is created in the netlist for each
schematic component (except 'F' and 'H' devices which are defined by two lines). The
line is created according to the values of various properties most importantly the ref,
model, and value properties. If, however, a template property is specified this system is
bypassed and the netlist entry is defined by the value of this property.
The template property value can contain a number of special keywords and characters
that will be substituted during the netlist creation. Values that can be substituted
include node names, pin names and the value of any property.
107
Users Manual
There are three template keywords, new for version 4, that define multiple lines to
implement series or/and parallel combinations, ladder networks or arrays of devices.
if L=1u, W=0.5u, MODEL=M, REF=Q23 and VALUE = N1, this would resolve to the
following after the first pass:
M$Q23 <nodelist> N1 L=1u W=0.5u AD={0.5u*0.5u}
108
Keyword
Description
nodelist
pinlist
node[n]
mappednode
pinnames
mappedpinnames
nodename
This is not replaced by any text but signifies that the item
following is a node name. The netlist generator must be
able to identify any text that is a node so that it can
correctly substitute the name when required.
repeat
series
parallel
step
if
ifd
109
Users Manual
Keyword
Description
join, join_pin,
join_num
sep
ref
inode
NODELIST
<NODELIST>
Replaced by the nodes connected to the device's pins.
PINLIST
<PINLIST>
Replaced by the symbols pin names.
NODE
<NODE[n]>
Replaced by the individual node identified by n starting at 1. So node[1] is node name
connected to the first pin on the symbol.
PINNAMES
<PINNAMES>
Equivalent to PINNAMES: <PINLIST> except that no substitution takes place if the
/nopinnames switch is specified for the Netlist command.
NODENAME
<NODENAME>
This is not replaced by any text but signifies that the item following is a node name.
The netlist generator must be able to identify any text that is a node so that it can
correctly substitute the name when required. For example, the following is the
template definition of the N-channel MOSFET with bulk connected to VSS:
%model%$%ref% <nodelist> <nodename>vss %value%
If VSS were actually connected to ground, the netlist generator would replace all nodes
called VSS with 0 (meaning ground). If the <nodename> keyword were not present in
the above the netlist generator would not be able to determine that VSS is a node and
the substitution would not take place.
110
<SEP>
Returns separator character used to separate the device letter and component reference.
This defaults to '$' but can be changed at the Netlist command line. See Netlist
command syntax in the Script Reference Manual.
REF
<REF>
Returns the component reference of the device using the same rules that are used when
the template property is not present. The rules are:
<REPEAT:var_name:num:<line>>
Repeats line num times. var_name is incremented on each step. var_name may be used
in an expression to define device or node names.
The following example creates a subcircuit that define an RC ladder circuit with a
variable number of sections defined by the property NUM. The resistance of each
section is defined by the property RES and the capacitance by the property CAP. Note
that, as explained above, templates are resolved in two passes. In the first pass the
property names enclosed by '%' are substituted with their values while expressions and
keywords are left untouched. In the second pass the keywords and expressions are
processed.
.subckt ladder 1 {%NUM%+1} gnd
<repeat:idx:%NUM%:<X{idx} {idx} {idx+1} gnd section;>>
111
Users Manual
.subckt section in out gnd
R1 in out %RES%
C1 out gnd %CAP%
.ends
.ends
var_name in the above is set to idx. If NUM were set to ten, the line:
X{idx} {idx} {idx+1} gnd section;
would be repeated 10 times with idx incrementing by one each time. Note the semicolon at the end of the line. This signifies that a new line must be created and is
essential. The end result of the above with NUM=10, RES=1k and CAP=1n is
.subckt ladder 1 11 gnd
X1 1 2 gnd section
X2 2 3 gnd section
X3 3 4 gnd section
X4 4 5 gnd section
X5 5 6 gnd section
X6 6 7 gnd section
X7 7 8 gnd section
X8 8 9 gnd section
X9 9 10 gnd section
X10 10 11 gnd section
.subckt section in out gnd
R1 in out 1k
C1 out gnd 1n
.ends
.ends
<SERIES:num:<line>>
Creates a series combination of the device described in line. For example:
<series:%series%:<<ref> <nodelist> %VALUE%>>
112
R1_P 1 1k
1 2 1k
2 3 1k
3 4 1k
4 R1_N 1k
If the num element is empty - e.g. in above example if SERIES property were empty or
missing - then no output will be made at all.
The example above can be used for any two terminal component. There must however
be a SERIES property present on the symbol.
PARALLEL
<PARALLEL:num:<line>>
Creates a parallel combination of the device described in line. For example:
<parallel:%parallel%:<<ref> <nodelist> %VALUE%>>
R1_P
R1_P
R1_P
R1_P
R1_P
R1_N
R1_N
R1_N
R1_N
R1_N
1k
1k
1k
1k
1k
If the num element is empty - e.g. in above example if PARALLEL property were
empty or missing - then no output will be made at all.
The example above can be used for any two terminal component. There must however
be a PARALLEL property present on the symbol.
STEP
<STEP>
Used with SERIES and PARALLEL keywords. Returns sequence number.
IF
<IF:test:action1[:action2]>
If test resolves to a non-zero value action1 will be substituted otherwise action2 will be
substituted. Typically test would be an expression enclosed in curly braces. ('{' and '}').
For example, the following implements in a somewhat complex manner a series
connection of resistors. (This should actually all be on one line)
113
Users Manual
<REPEAT:line:%SERIES%:<%REF%$R{line} <if:{line==
1}:<<NODE[1]>>:$%REF%${line}> <if:{line==
%SERIES%}:<<NODE[2]>>:$%REF%${line+1}> %VALUE%;>>
Note that usually each action should be enclosed with '<' and '>'. They can be omitted
if the action does not contain any keywords. If in doubt, put them in.
IFD
<IFD:propname:action1[:action2]>
If propname is present and not blank, action1 will be substituted otherwise action2 will
be substituted.
Example
<ifd:value:<%value%>:1>
In the above, if the property value is present it will be substituted otherwise the value
1 will be substituted.
JOIN
<JOIN:prop_name[:index]>
This can only be used with instances of symbols with one and only one pin. Returns
the value of prop_name on an instance attached directly to the single pin of the device.
For example in the following:
R1-P
1K
R1
<JOIN:REF> on the probe (R1-P) would return R1 as this is the value of the REF
property of the resistor. In situations where more than one instance is connected to the
pin, index may be used to specify which one. index may have a value between 0 and 1
less than the number of devices connected. Use <join_num> to determine how many
devices are connected.
Note that the pin of the device must be directly connected i.e. with pins superimposed
and not by wires.
<JOIN> is intended to be used for current probes.
JOIN_NUM
<JOIN_NUM>
Only valid for single pin instances. Returns number of joined devices. See <JOIN>
above for details.
JOIN_PIN
<JOIN_PIN[:index]>
114
<T:prop_name>
Does the same as %prop_name% except that the properties value is evaluated as if it
were a template itself. With %prop_name% the literal value of the property is always
used. Note that recursive properties will simply be substituted with nothing. E.g.
<T:TEMPLATE> will return empty if used in a template property called TEMPLATE.
Further Information
To put a new line in the netlist entry you can use a ';'. Literal new lines are also
accepted.
To put a literal < >; {} or % character in the text, use two of them. So '<<' will become
'<'.
Template Scripts
It is also possible to write a script to compile the line generated by the netlist generator.
Such scripts are called Template Scripts. With this approach, you enjoy the full
power of the scripting language and very complex devices can be created in this
manner. For full details of this approach, please refer to the Script Reference Manual.
115
Users Manual
Operations
Installing Libraries
Select the Add... button and select a library file to install. Note that if you have the
PSpice translator option you can install PSpice symbol libraries (.SLB files) directly.
See PSpice Schematics Translation on page 118 for more details.
Pressing the Add... button will open a file select dialog box but note that it has two
additional buttons at the top left called User and System. Pressing these buttons will
take you straight to the user symbols directory and the system symbols directory
respectively.
116
117
Users Manual
Creating a New Symbol
Select the category where you wish the symbol to be placed, then press Create... or the
popup menu of the same name. Enter the desired user name. An internal name will be
automatically entered as you type in the user name. This can usually be left alone.
The symbol created will be empty. Use the symbol editor to define it. You can call this
directly by pressing the Edit button. Note that this will close the library manager dialog
box.
Placing Symbol
If a schematic sheet is open, you can place a symbol on it directly from the library
manager by pressing the Place button. Note that this will close the dialog box.
2.
3.
4.
Locate the file PSPICE.INI. This is usually at the root folder for PSpice e.g.
C:\Program Files\Orcad\PSpice\PSPICE.INI. Press Open when you have found
the file.
The above assumes you are using version 9 of PSpice. Earlier versions stored their
settings in a similar manner but the file name was different and in a different location.
118
The translator will convert symbols, parts and wires and display them in a
manner that is as close as reasonably possible to the original schematic.
2.
3.
It will copy where possible any simulator commands to the F11 window.
4.
5.
Limitations
The translator has the following limitations:
1.
2.
Boxes, text boxes, free text and embedded graphics are not supported.
3.
4.
Hierarchical blocks are not supported but hierarchical symbols are. To use
hierarchical blocks, use PSpice to convert them to symbols.
119
Users Manual
5.
The template properties are converted to the SIMetrix format but with one
limitation. References to properties that are themselves templates are not
supported. These are used in some of the standard ABM blocks supplied with
PSpice. These will need to be manually converted by editing the template
property.
6.
You will not normally be able to cross probe current into a device converted from
PSpice. The current into the device will be available but the schematic crossprobing mechanism won't work without manually editing the symbols and
template property.
7.
PSpice Schematics allows the placement of symbol pins, parts and wires off-grid.
The translator will convert these correctly and SIMetrix will display them
correctly but they can cause problems if attempting to edit them subsequently.
(SIMetrix itself does not permit the user to place off-grid items). If off grid parts
are identified, they will be highlighted and a warning will be displayed. Off-grid
symbols will also resulting in a warning. If possible we recommend that these are
corrected within the PSpice environment before reading the file into SIMetrix.
In the Micron versions of SIMetrix, these will by default be available from the
component toolbar. These symbols have the model name N1 for the N-channel types
and P1 for the P-channel types. These names can of course be changed after being
120
Modify your SPICE model files so the devices are always called N1 and P1
Modify the standard symbol so the model name corresponds to your SPICE
models.
The best course of action is probably to create a new symbol for each process. Once
you have created the new symbols, you can modify the toolbar buttons so that they call
up your new symbols instead of the standard ones. You must do this using the
DefButton command which redefines toolbar buttons. To make permanent changes the
DefButton command should be put in the startup script. Here is the procedure:
1.
Select command shell menu "File | Scripts | Edit Startup...". If you are using
Linux, you might first need to define a suitable text editor for this menu to work.
(The default is gedit)
2.
Enter a DefButton command for each toolbar button you wish to redefine. For the
MOS symbols the commands will be one or more combinations of the following:
DefButton NMOS4 "inst /ne your_nmos4_symbol"
DefButton PMOS4 "inst /ne your_pmos4_symbol"
DefButton NMOS3IC "inst /ne your_nmos3_symbol"
DefButton PMOS3IC "inst /ne your_pmos3_symbol"
Replace your_nmos4_symbol, your_pmos4_symbol etc. with the internal names
of your new symbols.
The above device will have an AD parameter calculated from 2*width+0.8u. Note
that the formula is enclosed in curly braces ({, }) and width and length expressed as
%W% and %L% respectively. You can use similar expressions for any other
parameter.
As an alternative, you can define AS, AD etc. as a parameter expression in a subcircuit. See Subcircuits on page 151 for more details.
121
Users Manual
Further Information
How Symbols are Stored
When a symbol is placed on a schematic, a copy of that symbol definition is stored
locally. This makes it possible to open the schematic even if some of the symbols it
uses are not available in the symbol library. However, if you edit a symbol definition
for a schematic that is saved, when you open that schematic, it has a choice between its
local copy of the symbol or the copy in the library. Which it chooses depends on an
option chosen when the symbol is saved. When saving the symbol with the graphical
editor, you will see the check box All references to symbols automatically updated. If
this is checked then the schematic editor will always use the library symbol if present.
If not, it will use its local copy.
If a schematic is using a local copy and you wish to update it to the current library
version, select the symbol or symbols then select the popup menu Update Symbol.
Note that all instances of the symbol will be updated. It is not possible to have two
versions of a symbol on the same schematic.
122
Device
Model
Pin no. Pin
Pin function
property
names
XSPICE device
Arbitrary Sources
1
2
p
n
1
2
3
4
c
b
e
s
Capacitor
1
2
p
n
Collector
Base
Emitter
Substrate
123
Users Manual
124
Device
Model
Pin no. Pin
Pin function
property
names
1
2
p
n
1
2
3
4
p
n
any
any
1
2
p
n
1
2
3
4
p
n
any
any
+ output
- output
+ control
- control
Current Source
1
2
p
n
+
-
Diode
1
2
p
n
Anode
Cathode
GaAs FETs
1
2
3
d
g
s
Drain
Gate
Source
Inductor
1
2
p
n
Junction FET
1
2
3
d
g
s
Drain
Gate
Source
MOSFET
1
2
3
4
d
g
s
b
Drain
Gate
Source
Bulk
Resistors
Transmission Line
T
(lossless)
O (lossy)
1
2
3
4
p1
n1
p2
n2
Port 1 Term 1
Port 1 Term 2
Port 2 Term 1
Port 2 Term 2
1
2
3
4
p
n
cp
cn
+ output
- output
+ contol
-control
+ output
- output
+ control
-control
Device
Model
Pin no. Pin
Pin function
property
names
1
2
3
4
p
n
cp
cn
Switch term 1
Switch term 2
+ control
- control
1
2
3
4
p
n
cp
cn
+ output
- output
+ control
-control
Voltage Source
1
2
p
n
+ output
- output
Subcircuits
125
Users Manual
Chapter 5 Components
Overview
In this chapter we describe the components available at the schematic level. Broadly
speaking components fall into two categories namely numbered and generic.
Numbered components are devices that have a manufacturers part number and are
described by a model either supplied with SIMetrix or by the manufacturer itself.
Generic components are devices that are defined by one or more parameters that are
entered by the user after the component has been placed on the schematic.
A transistor like a 2N2222 or BC547 is an example of a numbered component and a
resistor is probably the simplest example of a generic component.
There are some components that have characteristics of both types. CMOS IC
designers would use MOSFETs defined by a model but will then customise it with
length and width parameters. Saturable inductors have an underlying model to describe
the core's characteristics but a number of user defined parameters to define the
geometry and air gap.
Numbered components need a model which is usually stored in the model library.
Refer to Device Library and Parts Management on page 159 for details.
This chapter is concerned only with devices at the schematic level. Many of these
devices are implemented directly by the simulator. For example the simulator has a
bipolar transistor model built in and such devices can be defined with a set of simulator
parameters. However, not all devices are implemented directly by the simulator. It does
not, for example have a operational amplifier device built in. These components are
constructed from a number of other components into a subcircuit.
The devices built in to the simulator are described in the Simulator Devices chapter
of the Simulator Reference Manual.
Numbered Components
Numbered components may be accessed via the Parts Browser. Select menu
Place|From Model Library to open it. This is what you will see:
126
Chapter 5 Components
Select the appropriate category on the left then the part number on the right. If you are
not sure what category the component is in, select the * All Devices * category which
you will find at the bottom of the category list.
If you are looking for a part that you installed (as opposed to a part supplied with
SIMetrix) then you will find it in the * All User Models * category as well as the *
All Devices * category. If installed within the last 30 days, you will also find it under
* Recently Added Models *.
To reduce the number of devices displayed to a manageable level, you can specify a
filter. You can use the wild-cards '*' and '?' here. '*' will match 1 or more of any
character while '?' will match any single character. So, '*' on its own will match any
string and so all devices will be displayed. But 'IRF*' will display any device that starts
with the three letters 'IRF'. 'IRF???' will display any device beginning with IRF and
followed by three and only three characters.
127
Users Manual
devices available from Place|From Model Library when in SIMPLIS mode will not be
the same as in SIMetrix mode.
However, SIMetrix is able to convert some SPICE models for use with SIMPLIS. This
conversion operation is performed behind the scenes and you don't necessarily need to
know what is happening. However, it is very useful to understand the process that is
being performed in order to understand the devices behaviour under SIMPLIS. This
conversion process is described in the next section.
Type
Supported SPICE
Implementation
Conversion Method
Diode
Primitive model
Parameter translation
Zener Diode
Primitive model or
subcircuit
BJT
Primitive model
Parameter translation
MOSFET
Primitive model or
subcircuit
Supported SPICE Implementation refers to the way the SPICE model must be
implemented for the conversion operation to be supported. SPICE models can be either
primitive models using the .MODEL control or can be sub-circuits using .SUBCKT.
.ENDS.
Conversion Method describes the method used to perform the conversion. Parameter
translation is a simple process whereby the .MODEL parameters are read from the
model and used to compile a SIMPLIS model using a knowledge of the SPICE device
equations. Simulated parameter extraction is a more sophisticated and general purpose
method that can be applied to any primitive model or subcircuit. In this method the
SPICE device is measured using the SIMetrix simulator in a number of test circuits.
The results of these tests are then analysed and used to derive the final SIMPLIS
model.
SPICE to SIMPLIS conversion takes place when you place the device on the
schematic. If Simulated parameter extraction is being used, the message Extracting
SIMPLIS model for ???. Please wait. will be displayed. For MOSFETs this process
usually takes less than about 0.5 seconds on a 1.5G P4 machine but can be much
longer. Note that Simulated parameter extraction is not guaranteed to succeed and can
fail if the SPICE model is faulty or badly designed.
Additional Parameters
Semiconductor devices converted for SIMPLIS operation have some additional
parameters that may be edited after the device is placed. This is done using the popup
menu Edit Additional Parameters.... In general each device has two types of additional
parameter. These are LEVEL parameters which define the complexity of the model
128
Chapter 5 Components
used and LIMIT parameters which define operating limits for the device. The latter are
used to work out suitable coordinates for the piece wise linear approximation needed
for SIMPLIS devices. Model complexity defined by LEVEL parameters trade off
accuracy for speed.
The following table explains the meaning of the parameters for each device:
Device
Parameters
Diodes
Maximum current
This should be set to the maximum current rating
of the device. The conversion process needed to
create the SIMPLIS model is often able to look up
this value in a database. If not you will be prompted
to enter a suitable value
BJTs
Model level
This may be set to 1 or 2. 1 runs faster while 2
provides more accurate results. See diagrams
below for model structures used.
Max. Collector Current
Set to specified maximum collector current for
device
MOSFETs
Zener Diodes
Maximum Power
Set this to the maximum rated power for the
device. The conversion process needed to create
the SIMPLIS model is often able to look up this
value in a database. If not you will be prompted to
enter a suitable value
129
Users Manual
SIMPLIS Models
D
S1
D1
130
Chapter 5 Components
D
S1
B
!RBE
131
Users Manual
C
RC
i=alphaF X I(!RBE)
FCB
!RBC
B
RB
i=alphaR X I(!RBC)
FEB
!RBE
RE
Generic Components
As explained in the overview generic components are devices that are defined by one
or more parameters entered by the user after the component is placed. The following
generic components are available:
132
Device
SIMPLIS
support?
Page
No
134
Ideal Transformer
Yes
136
Inductor
Yes
138
Capacitor
Yes
138
Resistor
Yes
138
Potentiometer
Yes
140
No
140
No
141
Chapter 5 Components
Device
SIMPLIS
support?
Page
Infinite capacitor
No
139
Infinite inductor
No
139
Voltage source
Yes
141
Current source
Yes
141
Yes
141
Yes
141
Yes
141
Yes
141
No
141
Yes
142
Device
Page
145
146
Non-linear resistor
148
Non-linear capacitor
148
Non-linear inductor
148
Analog-Digital converter
142
Digital-Analog converter
142
Digital counter
143
143
NAND/NOR/OR/AND gates
143
143
133
Users Manual
Device
Comparator
Set-reset flip-flop
Set-reset flip-flop clocked
J-K flip-flop
D-type flip-flop
Toggle flip-flop
Latch
Simple switch - voltage controlled
Simple switch - current controlled
Transistor switch - voltage controlled
Transistor switch - current controlled
VPWL Resistor
IPWL Resistor
PWL Capacitor
PWL Inductor
134
Chapter 5 Components
2.
Specify the number of windings required for primary and secondary in the
Configuration section. If you just want a single inductor, set primary turns to 1 and
secondaries to 0.
3.
Specify turns ratios in the Define Windings section. You can select the winding to
define using the Select Winding drop down box then enter the required ratio to
primary 1 in the edit box below it.
4.
Specify the number of turns for the primary and coupling factor. The coupling
factor is the same for all windings. You can define different coupling factors for
each winding by adding ideal inductors in series with one or more windings. In
some instances it may be necessary to add coupled inductors in series. This is
explained in more detail in Coupling Factor on page 137
5.
Specify the core characteristics in the Define Core section. A number of standard
core sets are pre-programmed and can be selected from the Select Core Type list
at the top. If the part you wish to use is not in the list or if you wish to use a
variant with a - say - different air gap, you can manually enter the characteristics
by clicking on the Manual Entry check box.
Ae
Effective Area
Le
Ue
Core Material
Effective Length
Relative Permeability
Model Details
The models for saturable components can be found in the file cores.lb. Most of the
models are based on the Jiles-Atherton magnetic model which includes hysteresis
effects. The MPP models use a simpler model which does not include hysteresis. These
models only define a single inductor. To derive a transformer model, the user interface
135
Users Manual
generates a subcircuit model that constructs a non-magnetic transformer using
controlled sources. The inductive element is added to the core which then gives the
model its inductive characteristics.
The model does not currently handle other core characteristics such as eddy current
losses nor does it handle winding artefacts such as resistive losses, skin effect, interwinding capacitance or proximity effect.
Ideal Transformers
Ideal transformers may be used in both SIMetrix and SIMPLIS modes. Note that
SIMPLIS operation is more efficient if the coupling factors are set to unity.
To define an ideal transformer, select the menu Place|Passives|Ideal Transformer....
This will open the following dialog box:
Configuration
Specify the number of primaries and secondaries. You can specify up to ten of each.
Define turns ratio
Select Winding
Ratio to Primary 1
136
Primary 1 Inductance
Self-explanatory
Inter-primary coupling
Primary-secondary coupling
Chapter 5 Components
This method of implementing an ideal transformer is not totally general purpose as you
cannot arbitrarily define inter winding coupling factors. If you need a configuration not
supported by the above method, you can define any ideal transformer using ideal
inductors and the Mutual Inductance device. The SIMetrix version is explained in the
next section. For the SIMPLIS equivalent, see the SIMPLIS reference manual.
Coupling Factor
The standard user interface for both saturable and ideal transformers provide only
limited flexibility to specify inter-winding coupling factor. In the majority of
applications, coupling factor is not an important issue and so the standard model will
suffice.
In some applications, however, the relative coupling factors of different windings can
be important. An example is in a flyback switched mode supply where the output
voltage is sensed by an auxiliary winding. In this instance, best performance is
achieved if the sense winding is strongly coupled to the secondary. Such a transformer
is likely to have a different coupling factor for the various windings.
You can use external leakage inductances to model coupling factor and this will
provide some additional flexibility. One approach is to set the user interface coupling
factor to unity and model all non-ideal coupling using external inductors. In some
cases it may be necessary to couple the leakage inductors. Consider for example an Ecore with 4 windings, one on each outer leg and two on the inner leg. Each winding
taken on its own would have approximately the same coupling to the core and so each
would have the same leakage inductance. But the two windings on the centre leg
would be more closely coupled to each other than to the other windings. To model this,
the leakage inductances for the centre windings could be coupled to each other using
the mutual inductor method described in the next section.
Mutual Inductors
You can specify coupling between any number of ideal inductors, using the mutual
inductor device. There is no menu or schematic symbol for this. It is defined by a line
of text that must be added to the netlist. (See Manual Entry of Simulator Commands
on page 65). The format for the mutual inductance line is:
inductor_2
coupling_factor
Note
If more than 2 inductors are to be coupled, there must be a K device to define every
possible pair.
Examples
** Couple L1 and L2 together
K12 L1 L2 0.98
137
Users Manual
** Couple
K12 L1 L2
K23 L2 L3
K13 L1 L3
L1, L2 and L3
0.98
0.98
0.98
You can enter the value directly in the Result box or use the Base and Decade up/down
controls.
Additional Parameters
Press Parameters... button to edit additional parameter associated with the device such
as temperature coefficients (TC1, TC2). Refer to device in the Simulator Reference
Manual for details of all device parameters.
Capacitors and Inductors
Capacitors and inductors may be used in both SIMetrix and SIMPLIS modes. Note that
in SIMetrix mode a number of additional parameters may be specified. These will not
work with SIMPLIS and must not be specified if dual mode operation is required.
The following dialog will be displayed when you edit a capacitor or inductor:
138
Chapter 5 Components
The device value is edited in the same manner as for resistors. You can also supply an
initial condition which defines how the device behaves while a DC operating point is
calculated. For capacitors you can either specify that the device is open circuit or
alternatively you can specify a fixed voltage. For inductors, the device can be treated
as a short circuit or you can define a constant current.
Important note to experienced SPICE users
The initial condition values above do not require the UIC (or Skip DC bias
point) option to be set. This implementation of initial condition is a new feature
not found in standard SPICE. If an initial condition for a capacitor is defined, it
will behave like a voltage source during the DC operating point calculation.
Similarly an inductor will behave like a current source if it has an initial
condition defined.
During the DC bias point calculation, it behaves like an open circuit, just like a
regular finite capacitor.
2.
During any subsequent analysis it behaves like a voltage source with a value
equal to the voltage achieved during the the DC bias point calculation.
During the DC bias point calculation, it behaves like a short circuit, just like a
regular finite inductor.
2.
During any subsequent analysis it behaves like a current source with a value
equal to the current achieved during the the DC bias point calculation.
These components allow you to close a feedback loop during the DC bias point then
open it for any subsequent analysis.
139
Users Manual
The infinite capacitor is a built in primitive component and is actually implemented by
the voltage source device. The infinite inductor is a subcircuit using an infinite
capacitor and some controlled sources.
Potentiometer
The potentiometer may be used in both SIMetrix and SIMPLIS modes. To place, select
the menu Place|Passives|Potentiometer. This device can be edited in the usual manner
with F7/Edit Part... popup. This will display:
140
Chapter 5 Components
Lossy lines must be defined in terms of their per unit length impedance characteristics.
Currently only series losses are supported.
Enter parameters as indicated. The absolute tolerance and relative tolerance parameters
control the accuracy/speed trade-off for the model. Reduce these values for greater
accuracy.
Controlled Sources
There are four types which can be found under menu Place|Controlled Sources:
Voltage controlled voltage source or VCVS
Voltage controlled current source or VCCS
Current controlled voltage source or CCVS
Current controlled current source or CCCS
These have a variety of uses. A VCVS can implement an ideal opamp; current
controlled devices can monitor current; voltage controlled devices can convert a
differential signal to single ended.
They require just one value to define them which is their gain. Edit value in the usual
way and you will be presented with a dialog similar to that used for resistors,
capacitors and inductors but without the Parameters... button.
141
Users Manual
142
Chapter 5 Components
These devices are implemented using the simulator's ADC and DAC models. For
details of these refer to the chapter Digital/Mixed Signal Device Reference in the
Simulator Reference Manual.
The controls in these boxes are explained below.
Number of bits
Resolution of converter. Values from 1 to32
Convert time (ADC)
Time from start convert active (rising edge) to data becoming available
Max conversion rate (ADC)
Max frequency of start convert. Period (1/f) must be less than or equal to convert time.
Output slew time
Whenever the input code changes, the output is set on a trajectory to reach the target
value in the time specified by this value.
Offset voltage
Self-explanatory
Range
Full scale range in volts
143
Users Manual
a dialog box. Functions provided are, counter, shift register, AND, OR, NAND and
NOR gates, and bus register.
2.
SIMetrix provides functional modelling at both the schematic and simulator levels.
The schematic provides a convenient user interface to the functional devices provided
by the simulator.
The simulator provides three devices that can be defined in a completely arbitrary
manner. These are defined in the following table. See the Simulator Reference Manual
for full details on these devices.
Device
Description
S-domain Transfer Function Linear block with single input and output each
Block
of which may be single ended or differential,
voltage or current. Specified in terms of its Sdomain or Laplace transfer function.
Arbitrary Logic Block
Schematic support for functional blocks is provided by a number of devices under the
menus Place|Analog Behavioural, Place|Digital Generic. Devices currently provided
are shown in the following table.
144
Chapter 5 Components
Device
Description
Specify the number of input voltages and currents you require. All voltage inputs are
single-ended and all input currents are differential. In the expression box, you must
specify an equation relating the output to the inputs. In the equation, currents are
referred to by the label I(Vn) where n identifies the actual current input. 1 is the first
(top most on the symbol), 2 is the second and so on. Voltages are referred to by the
label V(Nn). Again n identifies the actual voltage input in the same manner as for
current. In the example above, the expression shown - (V(n1)-V(n2))*I(V1) multiplies a voltage and current together. This could be used to monitor the power in a
two terminal device as shown in the following schematic.:
145
Users Manual
(V(n1)-V(n2))*I(V1)
ARB2
I(V1)
V1
Pulse(0 1 0 1m 1m)
1
R1
N1
N2
OUTP
ARB2-OUTP
OUTN
In the above, ARB2 is the device created from the Non-linear Transfer Function menu.
ARB2-OUTP will carry a voltage equal to the power dissipation in R1.
146
Chapter 5 Components
Definition
Enter an expression using the 'S' variable to define the frequency domain transfer
function. The above shows the example of a second order response. See Laplace
Expression below for details of the expression syntax.
Frequency scale factor
Multiplier for frequency
Device type
Transfer function
Impedance V/I
Admittance I/V
Input
Input configuration for transfer function
Output
Output configuration for transfer function
Laplace Expression
When you close the box, a symbol will be created according to the selections you make
for device type, input and output.
As seen in the above examples, the transfer function of the device is defined by the
model parameter LAPLACE. This is a text string and must be enclosed in double
quotation marks. This may be any arithmetic expression containing the following
elements:
Operators
+-*/^
^ means raise to power. Only integral powers may be specified.
Constants
Any decimal number following normal rules. SPICE style engineering suffixes
are accepted.
S Variable
This can be raised to a power with '^' or by simply placing a constant directly
after it (with no spaces). E.g. s^2 is the same as s2.
Filter response functions
These are described in the following table:
147
Users Manual
Function Syntax
Filter Response
BesselLP(order, cut-off)
Bessel low-pass
BesselHP(order, cut-off)
Bessel high-pass
ButterworthLP(order, cut-off)
Butterworth low-pass
ButterworthHP(order, cut-off)
Butterworth high-pass
ChebyshevLP(order, cut-off,
passband_ripple)
Chebyshev low-pass
ChebyshevHP(order, cut-off,
passband_ripple)
Chebyshev high-pass
Where:
order
cut-off
passband_ripple
Creating Models
Overview
SIMetrix version 5.1 introduced a new soft recovery diode model for use in power
electronics circuits. As this model is not a SPICE standard, there are no models
available from device manufacturers or other sources. So, we therefore also developed
a soft recovery diode parameter extractor that allows the creation of soft recovery
diode models from data sheet values.
The parameter extraction tool works directly within the schematic environment and
may be used in a similar manner to other parameterised devices such as the
parameterised opamp. However, there is also an option to save a particular model to
the device library and so making it available as a standard part.
148
Chapter 5 Components
Select menu Place|Create Model|Soft Recovery Diode... . You will see this dialog
box:
2.
Enter the required specification in the DC Forward bias spec, Reverse recovery
specification and Capacitance sections. See below for technical details of these
specifications.
3.
Select Save to schematic symbol if you wish to store the specification and model
parameters on the schematic symbol. This will allow to you to modify the
specification later. If you select Save to model library, then the definition will be
written to a library file and installed in the parts library. This will make the new
model available as a standard part, but you will not be able to subsequently
modify it other than by re-entering the specification manually. If you choose this
option, you must specify a device name in the box below.
4.
Press Ok to place diode on the schematic. If you selected Save to model library,
the model file for the device will also be created at this point. The file will be
saved in your user models directory. On windows this is located at My
Documents\SIMetrix\Models and on Linux it is at $HOME/simetrix/Models.
149
Users Manual
essentially determine the value of the IS parameter while the high current value defines
the series resistance of the device.
The reverse recovery characteristics are explained in the following diagram.
Tr
IF
dIf/dt
IRM * 37%
IRM
The values quoted in data sheets vary between manufacturers. The value given for Tr is
sometimes taken from the reverse peak rather than the zero crossing. If this is the case
you can calculate the time from the zero crossing to the reverse peak using the values
for IRM and dIf/dt and so arrive at the value of Tr as shown above.
Some data sheets do not give the value of IRM. In these cases the best that can be done
is to enter an intelligent guess.
Capacitance is the measured value at zero bias. Unfortunately this is not always quoted
in data sheets in which case you can either enter zero (which may speed simulation
times) or enter an estimated value. Of course an alternative would be to measure the
capacitance of an actual device.
Notes of Soft Recovery Diode Model
The soft recovery diode does not use the standard SPICE model but a new model based
on work at the University of Washington. Full details of the model can be found in the
Simulator Reference Manual.
150
Chapter 5 Components
Subcircuits
Overview
Subcircuits are a method of defining a circuit block which can be referenced any
number of times by a single netlist line or schematic device. Subcircuits are the method
used to define many device models such as op-amps. It is also the underlying
mechanism of the hierarchical schematic entry system.
You don't need to know anything about subcircuits unless you wish to define you own
device models, perhaps to build up a library of tested blocks for general distribution. If
you just wish to enter your circuit in a modular manner, hierarchical schematic entry is
probably the more appropriate method. See Hierarchical Schematic Entry on
page 80 for details.
This section explains how to create a subcircuit from a schematic and how to reference
one in netlist or schematic. For the .SUBCKT control syntax see the Command
Reference chapter of the Simulator Reference Manual.
Draw circuit using schematic editor including module port symbols to identify
external connections.
2.
151
Users Manual
VSP
Q6
P1
Q5
P1
Q7
P1
Q1
N1
100
R1
INP
INN
10p
C1
1K
R2
1K
R3
Q3
N1
D1
D1
Q4
N1
I1
100u
D3
D1
OUT
D2
D1
Q2
P1
I2
100u
VSN
are the connections to the outside world. This is a module port symbol which can be
found in the schematic menu Hierarchy|Place Module Port. Important - do not use the
normal Terminal symbol.
It is recommended that any model definitions are included in the subcircuit definition.
This makes the subcircuit self-contained. If you have referenced models in the device
library, you can import them into the schematic automatically using the schematic
menu Simulator|Import Models... They will be placed in the simulator command
window which can be opened by pressing F11. Alternatively you can enter them in the
command window manually.
Stage 2 - Netlist Circuit
To create a subcircuit netlist, select schematic menu
Simulator|Create Netlist as Subcircuit... .
You will be first be prompted for a subcircuit name. This name will also be used for the
file name with extension .MOD.
After entering the name, you will be asked to specify the subcircuit pin order:
152
Chapter 5 Components
When you close this box, the subcircuit will be created and its text will be displayed.
Property
name
Property value
Purpose
Model
Value
subcircuit_name
Ref
153
Users Manual
Most symbols possess these properties anyway, the important fact is that the model
property must be set to X. When defining a symbol from scratch, these properties can
be defined in one go in the graphical symbol editor with
Property/Pin|Add Standard Properties... .
To use the sub-circuit definition, SIMetrix must be able to find it. There are various
places where it can be put and means of telling SIMetrix of the location. These are the
choices.
1.
Place the definition directly in the simulator command - or F11 - window (see
Manual Entry of Simulator Commands on page 65). If placed at that location,
it will be read in unconditionally and SIMetrix will not need to search for it.
2.
Put in a separate file and pull in to the schematic with .INC control (see
Simulator Reference Manual) placed in simulator command (F11) window. As 1.,
this will be read in unconditionally.
3.
Put in a library file and reference in schematic with .LIB control (see Simulator
Reference Manual) placed in simulator command (F11) window. Similar to 2. but
more efficient if library has many models not used in the schematic. Only the
devices required will be read in.
4.
Put in a library file and install it using the procedure described in Full Model
Installation Procedure on page 160. This will make the device globally available
to all schematics. You can also install it into the parts browser system. These
topics are covered in Device Library and Parts Management on page 159 and
are also the subject of Tutorial 3.
To place the device on the schematic, find the symbol in schematic popup
All Symbols... and place in the normal way. After it is placed, select the device and
press shift-F7 and enter the subcircuit's name.
If you installed the device into the parts browser system, as mentioned in choice 4
above, you will be able to place the device by pressing control-G and selecting the
device from the appropriate category. The parts browser system also provides a simple
to use means of overcoming the problem mentioned above that occurs if the symbol's
pin order does not match the subcircuit's node order. This is explained Associating
Multiple Models with Symbols on page 163.
Passing Parameters
You can pass parameters to a subcircuit. This subject is covered in detail in the
Simulator Reference Manual. To specify the parameters for a sub-circuit device in a
schematic, you must enter the values manually using shift-F7 and placing a ':' between
the sub-circuit name and the parameter list. E.g. suppose you wished to specify the
parameters: FREQ=12k Q=15. To enter these, select the sub-circuit, press shift-F7
and append the sub-circuit name with:
: FREQ=12k Q=15
Note for information about passing parameters to a hierarchical block, please refer to
Passing Parameters Through a Hierarchy on page 86
154
Chapter 5 Components
Special Components
Initial Conditions
Initial conditions force a node to a fixed voltage or current during the calculation of the
DC bias point. There are two types of initial condition namely soft and hard. Soft
initial conditions apply a voltage through a fixed resistance. Hard initial conditions,
apply a voltage directly without any resistance.
To Place a Soft Initial Condition
1.
2.
Place device at the desired location then select and press F7. Enter a suitable
voltage
2.
3.
Place device at the desired location then select and press F7. Enter a suitable
voltage
Notes
Soft initial conditions are implemented using the .IC control and will also correctly
apply an initial condition when Skip DC bias point is specified for a transient analysis.
The driving resistance for a soft initial condition is 1 by default but can be altered
using the ICRES simulator option. To do this, add .OPTIONS ICRES=nnn to the F11
window (see Manual Entry of Simulator Commands on page 65).
Hard Initial conditions are implemented using a voltage source with the DCOP
parameter specified. This feature is proprietary to SIMetrix and is not compatible with
other SPICE simulators. Refer to the Simulator Reference Manual for more
information on voltage sources and the DCOP parameter.
Nodesets
Nodesets are used to help convergence and also to coerce a particular state for circuits
that have more than one possible DC solution. More information about nodesets is
given in the Simulator Reference Manual.
To Place a Nodeset
1.
2.
Place device at the desired location then select and press F7. Enter a suitable
voltage
155
Users Manual
Keeps
Keeps form part of a system to limit the amount of data that is output during a
simulation. For some designs the data output can be too great to fit in the available disk
space and in these situation, the data output needs to be restricted. For non-hierachical
designs, the default is for all voltages and currents at the top level (i.e. not in a subcircuit) to be output. For hierarchical designs, data for all signals for the whole circuit
are output. To restrict the output you can use the .KEEP control in the F11 window (see
Manual Entry of Simulator Commands on page 65) to restrict what data is output.
E.g.
.KEEP /noi /top
will result in only top level voltages and digital signals being output.
.KEEP /nov /noi /top
will prevent all data except digital signals and the reference vector (time, frequency
etc.) from being output.
With some or all data output inhibited using .KEEP as described above, you can add
keep symbols to the schematic to select specific voltages or currents to be saved. For
information on the comprehensive features of .KEEP, please refer to the Simulator
Reference Manual.
To Add a Voltage Keep to a Schematic
1.
2.
3.
2.
3.
Example
156
Chapter 5 Components
{ C1 }
C1
{ 2/(2*PI*f req * C1 * alpha) }
R1
R2
AC 1 0
V1
1
VOUT
E1
{ C1*alpha*alpha/4 }
C2
The above circuit is that of a two pole low-pass filter. C1 is fixed and R1=R2. The
design equations are:
R1=R2=2/(2*pi*f0*C1*alpha)
C2=C1*alpha*alpha/4
where freq is the cut off frequency and alpha is the damping factor.
Expressions for device values must be entered enclosed in curly braces ('{' and '}'). To
enter expressions for components we recommend that you use shift-F7 not F7 as for
normal value editing - and remember the curly braces. shift-F7 provide literal editing
of a devices value and bypasses the intelligent system employed by F7 and the Edit
Part... menu.
Before running the above circuit you must assign values to the variables. This can be
done by one of three methods:
1.
2.
With Let command from the command line or from a script. (If using a script you
must prefix the parameter names with global:)
3.
By sweeping the value using the parameter mode of a swept analysis (page 178)
or multi-step analysis (page 196).
Expressions for device values must be entered enclosed in curly braces ('{' and '}').
Suppose we wish a 1kHz roll off for the above filter.
Using the .PARAM control, add these lines to the netlist (using the F11 window - see
Manual Entry of Simulator Commands on page 65)
.PARAM f0 1k
.PARAM alpha 1
.PARAM C1 10n
157
Users Manual
If you then wanted to alter the damping factor to 0.8 you only need to type in its new
value:
Let alpha=0.8
IN
R1
R2
{ C1*alpha*alpha/4 }
C2
1
OUT
E1
You can set the values of the parameters for each instance of the above subcircuit by
appending the expressions to the value property of the symbol in the main circuit
separated by a ':'. E.g.:-
U?
158
159
Users Manual
Procedure
There are two stages to installing SPICE models.
1.
Install the model itself so that the program knows where to look for it. This is
simply a matter of dropping files or folders on the command shell. See Installing
Electrical Model below.
2.
Associate the model(s) with a schematic symbol. This process is often automatic
and you dont need to do anything - see explanation in the Overview above. If
this is necessary, you will be prompted for the information required. See Placing
New Model on Schematic below.
160
2.
Select the items you wish to install. You can also install a single file, multiple
files an entire folder or multiple folders. You only thing you can't do is install
files and folders at the same time.
3.
Make sure that the SIMetrix command shell is visible. If it is obscured, you can
bring it to the surface by pressing the spacebar with a schematic or graph
selected.
4.
Pick up the items selected in 2. above and drop them into the message window of
the command shell.
5.
If you installed individual files, you will see a message box asking you to
confirm that you wish to continue. Just click OK. The model files are now
installed.
6.
If you drop folders a search will be made in those folders for SPICE models. The
Add/Remove Models dialog will then be displayed as shown below:
Select the items you wish to install in the lower box and transfer them to the
upper box by pressing the Add button. You can also change the order of the items
in the upper box. This affects the search order when a simulation is run. Press Ok.
161
Users Manual
You will see a message displayed in the command shell Making Device Catalog.
This may take some time, please wait.... When finished the message
Completed will be displayed. The electrical model or models are now installed.
Placing New Model on Schematic
1.
You can now place models installed using the parts browser. Select schematic
menu Place | From Model Library... . You will see a dialog box similar to that
shown on page 127.
2.
On the left hand side select category * Recently Added Models * or if the
models were installed more than 30 days ago, select * All User Models *. You
should see the models you have installed listed on the right hand side. Select the
device you wish to place the press Place.
3.
4.
162
Enter a suitable category for the part under Choose Category for xxx (where xxx is
your model name). You can create a new category if desired by pressing New
Category...
6.
Using the drop down box under Define Symbol for xxx, select a suitable symbol
for your model. An image of the symbol will be displayed so you can check if it
is appropriate. If no suitable symbol is available, press Auto Create Symbol and
one will automatically be created. You can edit this symbol later if required.
7.
If you selected an existing symbol, you must check that the pin order matches
that of the model itself. The model text is displayed under Electrical Model - xxx.
If the pin order needs changing, use the up and down arrow keys to rearrange the
pins as appropriate.
8.
is displayed when you drop a file, it means that no valid SPICE models were found in
the file. It does not mean the file has the wrong extension. SIMetrix will accept any
extension for model files with the exception of the extensions used for schematic or
graph files (sch, sxsch and sxgph).
163
Users Manual
164
Embedded Association
It is possible to embed association information within the model file itself. This is
useful if you wish to prepare a model to distribute to other users and wish to spare them
the burden of performing the association process themselves. Models with embedded
association can be installed by dropping their files in the command shell with no other
action being required.
Only subcircuit devices may receive embedded association information. The
information is placed in a specially formatted comment line after the .SUBCKT line
but before the first device or command. The line is in the form:
symbol
mapping
Example
.SUBCKT IRF530 D G S
*#ASSOC Category=NMOS Symbol=nmos_sub
165
Users Manual
...
.ENDS
Priorities
Its possible that association information could be provided from multiple sources in
which case the possibility of conflict arises. If this is the case the following priorities
apply:
1.
User supplied association (e.g. using the associate symbols and models dialog)
takes precedence over embedded association
2.
Embedded association takes precedence over pre-defined association. Predefined association is what is stored in the ALL.CAT catalog file supplied with
SIMetrix
Catalog Files
The data for model and symbol associations are stored in catalog files. There are three
catalog files as follows:
ALL.CAT
USER_V2.CAT
OUT.CAT
File Format
Catalog files are text files. Each line provides data about a single device in semi-colon
delimited fields. The fields are as follows
166
Field 1
Field 2
Symbol name
Field 3
Category
Field 5
Field 6
Filed 7
When you select OK your edits will be written to the USER_V2.CAT file (see above
table). This is in the same format as ALL.CAT in the root folder. ALL.CAT is never
modified. Also another file is updated called OUT.CAT. This is the file used by the
parts browser. The process of building OUT.CAT may take a few seconds if the model
library is large.
You can edit the models locally without affecting the global library.
Sundry Topics
.LIB Control
The .LIB netlist control allows the local specification of model library for a particular
circuit.
Syntax:
.LIB pathname
pathname
167
Users Manual
This control specifies a pathname to be searched for model and subcircuit libraries.
Any number of .LIB controls may be specified and wild-cards (i.e. * and ? ) may be
used.
If a model or subcircuit is called up by a device line but that definition was not present
in the netlist, SIMetrix will search for it in files specified using the .LIB control.
SIMetrix also supports another form of .LIB used by model files designed for
Hspice. See the Simulator Reference Manual for details.
Library Diagnostics
When enabled, library diagnostics display messages showing the progress of the
location of device models. To enable/disable select File|Options|General... then Model
Library tab.
Local Models
You can also enter a model or subcircuit definition in the schematic's F11 window.
However if you enter a model in this manner it will only be available to that schematic.
168
First ensure that all the model library files you wish to process are installed as
global libraries.
2.
Make backup copies of your model files. This is optional, the utility makes
backups anyway.
3.
Type at the command line (i.e. the edit box below the menu bar in the command
shell):
rename_libs
4.
A list of currently installed libraries will be displayed. Double click on any that
you wish to be processed for renaming and supply a suffix. The suffix must not
contain spaces and should start with a non-alphanumeric character such as '/' or
'-'. Note that only models found to have duplicates will be renamed. SIMetrix will
not rename unique models. If you do not supply a suffix for a library, no devices
within it will be renamed.
5.
Press OK. The operation can take a long time; possibly a few minutes if the
library is large. On completion the message:
*** RENAME COMPLETE. See ???\RENAME.LOG for details
will be displayed in the command shell. The RENAME.LOG file will contain
full details of the rename process. This includes details of all models that were
renamed.
Notes
Devices that are used locally, i.e. within the model file itself, will be excluded
from the rename procedure. These devices will not be renamed nor will they
added to the list that is searched to identify duplicate names.
You can perform a test run which creates the log file but does not actually
perform the renaming. To do this, type the command:
rename_libs_check
Note that messages output to the log file and to the command shell will report the
renaming of models but no renaming will actually take place.
Old Duplicate Name System
Older versions of SIMetrix (4.1 and earlier) were able to handle duplicate model names
directly. This system is no longer supported.
169
Users Manual
170
Running Simulations
Overview
Once an analysis has been set up using the procedures described in this chapter, a
simulation would normally be run in synchronous mode perhaps by selecting the
Simulator|Run menu. In synchronous mode, you cannot use any part of the program
while the simulation is running.
There are also other methods of running a simulation. You can run a simulation for a
netlist directly and you can also run in asynchronous mode. These are explained in the
following sections.
171
Users Manual
2.
When the simulation is complete, you must load the data manually. The name of
the file to load will be displayed in the command shell when the simulation starts.
Select menu Fil|Data|Load Temporary Data... to load data file. You will be able to
cross probe the schematic used to run the analysis in the normal manner once this
file is loaded.
Transient Analysis
In this mode the simulator computes the behaviour of the circuit over a time interval
specified by the stop time. Usually, the stop time is the only parameter that needs
specifying but there are a number of others available.
172
1.
2.
Select Transient tab at the top. Enter parameters as described in the following
sections.
Transient Parameters
Enter the stop time as required. Note that the simulation can be paused before the stop
time is reached allowing the results obtained so far to be examined. It is also possible
to restart the simulation after the stop time has been reached and continue for as long as
is needed. For these reasons, it is not so important to get the stop time absolutely right.
You should be aware, however, that the default values for a number of simulator
parameters are chosen according to the stop time. (The minimum time step for
example). You should avoid therefore entering inappropriate values for stop time.
Data Output Options
Sometimes it is desirable to restrict the amount of data being generated by the
simulator which in some situations can be very large. You can specify that data output
does not begin until after some specified time and you can also specify a time interval
for the data.
Output all data/Output at .PRINT step
The simulator generates data at a variable time step according to circuit activity.
If Output all data is checked, all this data is output. If Output at .PRINT step is
checked, the data is output at a fixed time step regardless of the activity in the
circuit. The actual interval is set by the .PRINT step. This is explained below.
If the Output at .PRINT step option is checked, the simulator is forced to perform
an additional step at the required interval for the data output. The fixed time step
interval data is not generated by interpolation as is the case with generic SPICE
and other products derived from it.
Start data output @
No simulation data will be output until this time is reached.
.PRINT step
.PRINT is a simulator command that can be specified in the netlist to enable the
output of tabulated data in the list file. See Simulator Reference Manual for
details of .PRINT.
The value specified here controls the interval used for the tabulated output
provided by .PRINT but the same value is also used to determine the data output
interval if Output at .PRINT step is specified. (see above).
Real Time Noise
See page 189
Monte Carlo and Multi-step Analysis
See page 196
Advanced Options
Opens a dialog as shown below
173
Users Manual
Time Step
The simulator always chooses the time step it uses but it will not rise above the
maximum time step specified here.
If the simulator needs to use a time step smaller than the minimum specified, the
simulation will abort. Reduce this value if the simulation aborts with the message
Time step too small. This might happen for long runs on circuits that have very small
time constants.
Integration Method
Set this to Gear if you see an unexplained triangular ringing in the simulation results.
Always use Trapezoidal for resonant circuits. A full discussion on integration methods
is given in the Convergence and Accuracy chapter of the Simulator Reference
Manual.
Skip DC bias point
If checked, the simulation will start with all nodes at zero volts. Note that unless all
voltage and current sources are specified to have zero output at time zero, the
simulation may fail to converge if this option is specified.
Fast start
The accuracy of the simulation will be relaxed for the period specified. This will speed
up the run at the expense of precision.
This is a means of accelerating the process of finding a steady state in circuits such as
oscillators and switching power supplies. Its often of little interest how the steady state
is reached so precision can be relaxed while finding it.
174
2.
In the New Stop Time box enter the time at which you wish the restarted analysis
to stop. Press Ok to start run.
See Also
.TRAN in Simulator Reference Manual.
Transient Snapshots
Overview
There is often a need to investigate a circuit at a set of circuit conditions that can only
be achieved during a transient run.
For example, you might find that an amplifier circuit oscillates under some conditions
but these conditions are difficult or impossible to create during the bias point
calculation that usually precedes a small-signal AC analysis.
Transient snapshots provide a solution to this problem. The state of the circuit at user
specified points during a transient run may be saved and subsequently used to initialise
a small-signal analysis. The saved state of the circuit is called a snapshot.
Snapshots can be created at specified intervals during a transient run. They can also be
created on demand at any point during a transient run by first pausing the run and then
manually executing the save snapshot command. So, for example, if you find your
amplifier reaches an unstable point during a transient analysis, you can stop the
analysis, save a snapshot and then subsequently analyse the small signal conditions
with an AC sweep.
An option is also available to save the DC operating point data to the list file at the
point at which snapshots are saved.
Defining Snapshots Before a Run Starts
1.
2.
3.
175
Users Manual
Select either Linear sequence or List to define the time points at which the snapshots
are saved. In the Snapshot mode box select one of the three options:
Write bias info to list file. Instructs the simulator to write the DC operating point
Save state for AC/TF/Noise analysis. Instructs the simulator to save snapshot data
Write bias info and save state. Performs both operations described in 1 and 2
Pause the current transient analysis or allow it to finish normally. You must not
abort the run as this destroys all internal simulation data.
2.
Type at the command line (the edit box below the menu bar in the command shell
window):
SaveSnapShot
That is all that is needed. You can now start a new small signal analysis using the
snapshot created.
Applying Snapshots to a Small Signal Analysis
1.
2.
3.
4.
176
2.
3.
The above procedure will result in the small signal analysis being repeated for each
snapshot currently available.
Operating Point
To specify a DC operating point analysis check DCOP. Note that an operating point is
performed automatically for all analysis modes and this is only useful if it is the only
analysis specified.
Operating point analysis does not have any additional parameters so there is no tab
sheet for it.
See Also
.OP in Simulator Reference Manual.
Viewing DC Operating Point Results on page 263
177
Users Manual
Sweep Modes
Each of the analysis modes DC, AC, AC Noise and Transfer Function are swept. That
is they repeat a single analysis point while varying some circuit parameter. There are 6
different sweep modes that can be applied to these analyses. These modes are also used
to define multi step analyses which are explained on page 196. The 6 modes are:
Device
Temperature
Parameter
Model parameter
Monte Carlo
Linear
Decade
List
Dialog support for the List method is only available for the definition of Multi-step
analyses. The simulator also offers an Octal sweep method but this is not supported by
the Choose Analysis Dialog.
Not all combinations of sweep mode and analysis are available with all versions of the
product. Contact sales for details.
Each of the sweep modes is explained in more detail below.
Device Sweep
In this mode the principal value of a single device is swept. The analysis definition
must specify the component reference for the device. The following types of device
may be used.
Device
178
Value swept
Capacitor
Capacitance
Diode
Area
Gain
Gain
Transconductance
Device
Value swept
Transresistance
Current source
Current
JFET
Area
Inductor
Inductance
Bipolar Transistor
Area
Resistor
Resistance
Impedance
Voltage source
Voltage
GaAs FET
Area
Temperature
Global circuit temperature is swept
Model Parameter
Similar to device sweep except applied to a named model parameter. Both the model
name and the parameter name must be specified.
Special Note
It is recommended that any model parameter being swept is also specified in the
.MODEL parameter list. In most cases it isn't actually necessary but there are a few
instances - such as for terminal resistance parameters - where it is necessary.
Parameter
A user named variable that can be referenced in any number of expressions used to
define model or device parameters. Here is an example. (See
Examples\Sweep\AC_Param.sxsch)
179
Users Manual
10k
R3
10k
R4
Output
Probe
Q12
5V
V1
Q13
AC 1 0
V3
I1
20u
{restail}
R1
{restail}
R2
5V
V2
Q1
Q2
SUB
This is a simple long tailed pair. The above circuit resistors R1 and R2 have been given
the values {restail}. restail is a parameter that is swept in an AC sweep to plot the gain
of the amplifier vs tail resistance at 100kHz. Here is the result of the run:
Gain @ 100kHz of
simple differential amplifier
3.5
Output / V
2.5
1.5
1
100
#restail / ?
180
200
400
1k
2k
4k
10k
Frequency
Sweeps frequency for the small signal analysis modes namely AC, AC Noise and
Transfer Function. In standard SPICE it is the only sweep mode available for AC and
Noise while Transfer Function can not be swept at all.
Monte Carlo
Repeats analysis point for a specified number of times with device tolerances enabled.
The following graph show the result for the same circuit as shown above but with
restail=1k and with a 1000 point Monte Carlo AC sweep. This run took 0.6 seconds
with a 1.5G P4:
2.94
2.92
2.9
Output / V
2.88
2.86
2.84
2.82
2.8
2.78
2.76
0.1
0.2
0.3
0.4
Count/k
0.5
0.6
0.7
0.8
0.9
100/div
The graph shows the variation in gain for 1000 samples. Using the histogram feature a
statistical distribution of the above can easily be plotted.
181
Users Manual
Select the desired mode on the left then enter the necessary parameters on the right.
The parameters required vary according to the mode as follows:
Mode
Parameters
Device
Parameter
Parameter name
Frequency (AC, Noise and TF only)
Model Parameter
Model name
Model parameter name
Frequency (AC, Noise and TF only)
Temperature
None
Monte Carlo
Number of points
Frequency (AC, Noise and TF only)
DC Sweep
Operates in any of the sweep modes described on page 178 except Frequency. Repeats
a DC operating point calculation for the range of circuit parameters defined by the
sweep mode.
Setting up a DC sweep
182
1.
2.
3.
Select DC tab at the top. Enter parameters as described in the following sections.
Example
The following is the result of a DC sweep of V3 in the example circuit shown on
page 180 with restail set to 1K. Analysis parameters were as follows:
Sweep mode: Device, V3
Sweep range: -0.1 to 0.1, linear sweep with 50 points.
DC transfer function
of simple diff amp
150
100
Output / mV
50
-0
-50
-100
-150
-100
V3/mV
-80
-60
-40
-20
20
40
60
80
100
20mV/div
183
Users Manual
AC Sweep
An AC analysis calculates the small signal response of a circuit to any number of user
defined inputs. The small signal response is computed by treating the circuit as linear
about its DC operating point.
Like DC, AC Noise and Transfer Function analyses, AC analysis is a swept mode and
can operate in any of the 6 modes documented in Sweep Modes on page 178. With
some of these modes - e.g. sweeping a resistor value - it will be necessary for the DC
operating point to be recalculated at each point while with others - such as frequency
sweep - it is only necessary to calculate it at the start of the run.
For AC analysis to be meaningful at there must be at least one voltage or current
source on the circuit with an AC specification. To find out how to set one up see
Circuit Stimulus on page 54.
Setting up an AC sweep
1.
2.
3.
Select AC tab at the top. Enter parameters as described in the following sections.
Sweep Parameters
Start value, Stop value
Defines sweep range stop and start values
Points per decade, Number of points
Defines sweep range. The number of points of the sweep is defined per decade
for a decade sweep. For a linear sweep you must enter the total number of points.
Define...
Sets up desired sweep mode. See Setting up a Swept Analysis on page 181.
Monte Carlo and Multi-step Analysis
See page 196
Data output
Check the Save all currents check box to enable the output of all current data including
semiconductor devices. If this box is not checked the current into devices such as
transistors and diodes will not be saved. In AC analysis the CPU time required to
output data can be very significant relative to the solution time, so you should be aware
that checking this box may slow down the simulation significantly.
Note that this check box only affects AC analyses.
See Also
.AC in Simulator Reference Manual.
184
Example
Both the examples shown in Sweep Modes on page 178 are AC analyses. The
following is a frequency sweep which is the traditional AC analysis mode. This was
performed on the circuit shown on page 180 with restail = 1k.
10
Frequency sw eep of
diff amp circuit
Output / V
400m
200m
10k
100k
1M
10M
100M
1G
Frequency / Hertz
Noise Analysis
Like AC analysis, AC Noise analysis is a small signal mode. The circuit is treated as
linear about it's DC operating point and the contribution of all noisy devices to a
designated output is computed. The total noise at that output is also calculated and
optionally the noise referred back to an input source may also be computed.
Like DC, AC and Transfer Function, it is a swept mode and can be operated in any of
the 6 modes described in Sweep Modes on page 178. With some of these modes e.g. sweeping a resistor value - it will be necessary for the DC operating point to be
recalculated at each point while with others - such as frequency sweep - it is only
necessary to calculate it at the start of the run.
Note that it is not necessary to apply an AC specification to any source - including the
optional input referred source - as it is with standard SPICE and many (if not all) of its
derivatives.
2.
185
Users Manual
3.
Select Noise tab at the top. Enter parameters as described in the following
sections.
Sweep Parameters
Start value, Stop value
Points per decade
Number of points
Define...
Noise Parameters
Output node
Reference node
Source name
186
Example 1
Frequency Sweep
10k
R3
10k
R4
VPos
5V
V1
VNeg
Q12
AC 1 0
V3
Q13
{restail}
R1
I1
20u
{restail}
R2
Q1
5V
V2
Q2
SUB
The result of a noise analysis on the above circuit using a frequency sweep
100n
40n
20n
10n
4n
2n
1n1
10
100
1k
10k
100k
1M
10M
100M
1G
Frequency / Hertz
187
Users Manual
Example 2
Noise with a Parameter Sweep
In the following circuit we wish to find the optimum value of tail current for a source
impedance of 1K. To do this we sweep the parameter taili which is used to set the
current as well as the values for R1, R2, R3 and R4. As can be seen from the graph
about 300A would seem to be best. The noise analysis was setup with the following
parameters:
Sweep parameter taili from 1 to 10m, 25 points per decade
Output node: VPos
Reference node:VNeg
Input source: V3
sourceR = 1000 (set with .PARAM control)
{1/taili/5}
R3
{1/taili/5}
R4
5V
V1
VPos
VNeg
sourceR
Q12
Q13
R5
AC 1 0
V3
sourceR
R6
{1/taili/50}
R1
Q1
I1
{taili}
{1/taili/50}
R2
5V
V2
Q2
SUB
The result:
188
100n
40n
20n
10n
4n
2n
10
100
1m
10m
#taili / ?
2.
3.
Select Transient tab at the top. Enter parameters as described in the following
sections.
4.
5.
Check Enable real-time noise. Select Define... to set up real time noise parameters.
Enter values as explained below.
189
Users Manual
Interval
This specifies the sampling interval of the noise generators. You should set this to a
maximum of about 1/3 of the highest noise frequency of interest. Note that the interval
also forces a maximum time step so short intervals can result in long simulation times.
Start time
The time at which the noise generators are switched on. Defaults to 0.
Stop time
The time at which the noise generators are switched off. This defaults to the stop time
of the transient run.
If you think you may wish to restart the transient run after it has completed and you
wish the noise generators to continue to be enabled after the restart then you must
specify this time beyond the initial stop time before starting the analysis. You should
avoid, however, using inappropriately large values for this stop time as this may
noticeably slow the simulation and in extreme cases could cause an out of memory
condition.
See Also
Real Time Noise analysis in the Simulator Reference Manual. This includes the results
of some comparisons between AC noise and real time noise.
Transfer Function
Transfer function analysis is similar to AC analysis in that it performs a swept small
signal analysis. However, whereas AC analysis calculates the response at any circuit
node from a (usually) single input source, transfer function analysis calculates the
individual responses from each source in the circuit to a single specified output node.
This allows, for example, the series mode gain, common mode gain and power supply
rejection of an amplifier to be measured in one analysis. The same measurements could
be performed using AC analysis but several of them would need to be run. Transfer
function mode also calculates output impedance or admittance and, if an input source
is specified, input impedance.
2.
3.
Select TF tab at the top. Enter parameters as described in the following sections.
Sweep Parameters
Start value, Stop value
Defines sweep range stop and start values
Points per decade, Number of points
Defines sweep range. The number of points of the sweep is defined per decade
190
Example
Perform transfer function frequency sweep on the following circuit
191
Users Manual
10k
R3
10k
R4
VPos
5V
V1
VNeg
Q13
10m AC 1 0
V3
Q12
I1
20u
5V
V4
{restail}
R1
{restail}
R2
Q1
5V
V2
Q2
SUB
The results:
10
100m
Gain from V2 to output
Common mode gain
10m
1m
100
100k
Frequency / Hertz
192
1M
10M
100M
1G
Pole-zero
Pole zero analysis is a small signal analysis mode that - as the name implies - locates
the poles and zeros of a circuit. Note that circuits containing transmission lines or any
of the Philips compact models are not supported.
*** IMPORTANT *** Pole-zero analysis is an unsupported mode. This means that we
cannot provide assistance in its use nor will we be able to resolve any problems found
with it. We may withdraw Pole-zero analysis from future versions of the product.
Viewing Results
Select the command shell menu Simulator|List Pole-zero results. The poles and zeros
will be listed in complex form.
Example
An example circuit that is already setup is provided in
Examples\Pole-zero\simple_amp.sxsch. Also provided is another circuit containing a
Laplace block defined from the results of the pole-zero analysis. This circuit can be
found at Examples\Pole-zero\verify_pz.sxsch. The example demonstrate a method of
verifying the results and also an application for pole-zero analysis. The application is a
method of modelling a complex circuit as a small signal block. First run a pole-zero
analysis to locate the poles and zeros then build the laplace transform from them. The
laplace transform can then be entered into the Laplace block. Note that pole-zero
analysis does not provide the gain of the circuit. This will need to be evaluated
separately, perhaps using transfer function analysis.
Sensitivity
This control instructs the simulator to perform a DC sensitivity analysis. In this
analysis mode, a DC operating point is first calculated then the linearised sensitivity of
the specified circuit voltage or current to every model and device parameter is
evaluated. The results are output to a file (SENS.TXT by default but can be changed
with SENSFILE option) and they are also placed in a new data group. The latter allows
193
Users Manual
the data to be viewed in the message window (type Display) at the command line and
can also be accessed from scripts for further analysis.
*** IMPORTANT *** Sensitivity analysis is an unsupported mode. This means that
we cannot provide assistance in its use nor will we be able to resolve any problems
found with it. We may withdraw Sensitivity analysis from future versions of the
product.
refnodename
sourcename
Simulator Options
The simulator features a large number of option settings although, fortunately, the vast
majority can be left at their default values for nearly all applications. A few option
settings can be set via the Choose Analysis dialog box and these are described in the
following sections. The remainder can be controlled using the simulator's .OPTIONS
control details of which may be found in the Simulator Reference Manual.
194
1.
2.
Tolerances
Relative Tolerance
Current Tolerance
Voltage Tolerance
Circuit Conditions
Temperature
Circuit temperature in C.
195
Users Manual
List File Output
Expand subcircuits
Parameters
None
Brief
No Output
Only values defined by
an expression are output
Given
Full
Monte Carlo
Seed
Seed for pseudo random number generator used to generate random numbers for
tolerances. See Multi-step Analyses on page 196.
Multi-step Analyses
Multi-step analyses are not available with all versions of the product.
The analysis modes, Transient, AC, DC, Noise and Transfer Function can be setup to
automatically repeat while varying some circuit parameter. Multi-step analyses are
defined using the same 6 sweep modes used for the individual swept analyses. The 6
modes are briefly described below. Note that Monte Carlo analysis is the subject of a
whole chapter see Monte Carlo Analysis on page 316.
Device. Steps the principal value of a device. E.g. the resistance of a resistor,
voltage of a voltage source etc. The component reference of the device must be
specified.
Model parameter. Steps the value of a single model parameter. The name of the
model and the parameter name must be specified.
Frequency. Steps global frequency for AC, Noise and Transfer Function
analyses.
Monte carlo. Repeats run a specified number of times with tolerances enabled.
As well as 6 different modes there are 3 different sweep methods which can be applied
to all modes except Monte Carlo. These are:
196
Linear
Decade
List
The simulator also offers an Octal sweep method but this is not supported by the
Choose Analysis Dialog.
Enter parameter as described below. Only the boxes for which entries are required will
be enabled. In the above example, only the Number of steps box is enabled as this is all
that is required for Monte Carlo mode.
Sweep Mode
Choice of 6 modes as described above.
Step Parameters
Define range of values. If Decade is selected you must specify the number of steps per
decade while if Linear is specified, the total number of steps must be entered. If List is
selected, you must define a sequence of values by pressing Define List... .
Group Curves
197
Users Manual
Parameters
The parameters required vary according to the mode as follows:
Mode
Parameters
Device
Parameter
Parameter name
Model Parameter
Model name
Model parameter name
Temperature
None
None
Monte Carlo
None
Example 1
Refer to circuit on page 188. In the previous example we swept the tail current to find
the optimum value to minimise noise for a 1K source resistance. Here we extend the
example further so that the run is repeated for a range of source resistances. The source
resistance is varied by performing a parameter step on sourceR. Here is what the dialog
settings are for the multi-step run:
This does a decade sweep varying sourceR from 1K to 100k with 2 steps per decade.
This is the result we get:
198
10
sourceR = 100000
sourceR = 31622.7766017
sourceR = 10000
V/rtHz
100n
10n
sourceR = 3162.27766017
10
sourceR = 1000
100
1m
10m
#taili / ?
Example 2
The following circuit is a simple model of a full bridge switching amplifier used to
deliver a controlled current into an inductance.
250n
100n
C2
L2
15m
C1
48
V1
22m
R6
IRFP260
1
IRFP260
2.2
R1
2.2
X
Q2
E2
1m
R5
L1
X
Q3
L1-N
IRFP260
IRFP260
X
Q1
X
Q4
2.2
V2
R3
R2
E1
2.2
R4
V3
199
Users Manual
This was setup to perform a multi step analysis with the parameter duty stepped from
0.1 to 0.9. This is the result:
duty = 0.9
15
10
duty = 0.7
Current in L1 / A
5
duty = 0.5
0
duty = 0.3
-5
-10
duty = 0.1
-15
0
0.2
0.4
0.6
0.8
Time/mSecs
1.2
1.4
1.6
1.8
200Secs/div
Define the SOA limits for the models or devices you are using.
2.
Item 1. above is covered in detail in the Simulator Reference Manual - see section
titled .SETSOA and also the LIMIT parameter described in the section titled .MODEL.
Setting up simple limit tests using some simple schematic symbols is described below.
200
2.
3.
The maximum limit. Use a large positive number (e.g. 1e100) if you dont wish
to specify a maximum limit.
3.
A label. The default value is %REF% that will resolve to the devices component
reference. You can enter any literal value instead.
2.
3.
Under SOA mode choose either Summary output or Full output. In summary
output mode, only the first violation for each SOA device will be reported. In full
output mode, all violations are reported.
4.
In Results to: choose where you would like the results reported. Note that writing
results to the message window is a time consuming operation and you avoid
selecting this option if you are expecting a large number of violations.
Running Simulation
Run the simulation in the normal way. If there are any violations, the results will be
reported in the location or locations specified in the Results to: section.
201
Users Manual
SIMPLIS offers three analysis modes namely Transient, AC and Periodic Operating
Point or POP. These analysis modes are described in detail in the SIMPLIS Reference
Manual. The meaning of each of the controls is described in this chapter.
As with SIMetrix, you can also enter the raw netlist command in the F11 window. The
contents of this window remain synchronised with the Choose Analysis dialog box
settings so you can freely switch between the two methods.
Transient Analysis
SIMPLIS transient analysis is similar to SIMetrix transient analysis.
202
2.
3.
Select Transient tab at the top. Enter parameters as described in the following
sections.
Analysis Parameters
Stop Time
The data required to create plots will start being output at this
time. (Start plotting data @ under Plot data output has a similar
function but is subtly different. See below for details)
Stop Plotting Data @ This is the time at which the process of creating plot data is
203
Users Manual
Advanced...
Pressing the Advanced button opens the following dialog
Snapshot output
SIMPLIS has the ability to save its internal state in order to allow a run to be repeated
from a certain time point. This allows a run to be continued from where it previously
left off. (Similar to SIMetrix transient restart facility). The internal saved states are
known as snapshots.
SIMPLIS always saves a snapshot at the end of every run so if you start a new run of
the same circuit with a start time (Start Saving Data @) equal to the stop time of the
previous run, SIMPLIS will not need to rerun the start and instead will load the
snapshot state. SIMPLIS will do this automatically.
The entries in this dialog section allow you to specify the saving of snapshots at other
times as well as the end of a run. This might be useful if you wanted to restart a run at
some before the end of the previous run.
Enable snapshot output
Snapshot interval
Max snapshots
204
2.
3.
Select POP tab at the top. Enter parameters as described in the following
sections.
POP Parameters
Triggering - Use "POP Trigger" Schematic Device
If you do not use the schematic POP trigger device (see above)
you must specify a suitable component in this edit box. Enter
the full component reference of the device.
Trigger Condition
Conditions
Max. period
You should set this to a value that is larger than the expected
period of your circuit's switching cycle.
During each run SIMPLIS expects to see valid trigger
conditions. However, if there is a fault in the design of the
circuit or a fault in the definition of the trigger conditions, it is
possible that none will be detected. The Max. period prevents
SIMPLIS from carrying on indefinitely in such an event.
Iteration limit
205
Users Manual
simulation runs.
Output POP progress
AC Analysis
AC is a small signal frequency domain analysis mode applied to a switching circuit.
Please refer to the SIMPLIS Reference Manual for full details of this analysis mode.
Note that AC analysis requires a POP analysis (see above) to be also defined.
Setting up an AC Analysis
1.
2.
Select AC check box on the right. Note that the POP check box is automatically
checked when AC is checked.
3.
Select AC tab at the top. Enter parameters as described in the following sections.
AC Sweep Parameters
Start frequency
Stop frequency
SIMPLIS Options
Save options
All
Voltages only
Probes only
Other Options
Force New Analysis
206
2.
207
Users Manual
3.
Enter r3_value for Parameter Name and set Start value to 20, Stop value to 100
and Number of steps to 3. This should be what you see:
4.
Press Run .
The analysis will be repeated three times for values of r3_value of 20, 60 and 100. The
resistor value R3 is defined in terms of r3_value so in effect we are stepping R3
through that range.
In most cases you will probably want to step just one component in a similar manner as
described above. But you can also use the parameter value to define any number of
component or model values.
If you now run a normal single analysis, you will find that SIMPLIS reports an error as
it is unable to resolve the value for R3. This can be overcome by specifying the value
using a .VAR control. Add this line:
.VAR r3_value=100
to the F11 window. This line defines the value of R3 when a normal single step
analysis is run.
Options
The above example illustrates a linear multi-step parameter run. You can also define a
decade (logarithmic) run and also a list based run that selects parameter values from a
list. To set up a list run, select the List radio button, then press Define List... Enter the
values for the list using the dialog box.
The Group Curves check box controls how graphs are displayed. If unchecked, curves
for each run will have their own legend and curve colour. If checked, curves will all
have the same colour and share a single legend.
208
2.
3.
Delete the fixed probes on the V1 input and on R1. (This is just to prevent too
many unnecessary curves being plotted)
The above will give R3 a 5% tolerance and C2 a 20% tolerance with a 3 Sigma
Gaussian distribution. Now set up the Monte Carlo run:
1.
2.
3.
4.
Press Run
Function Name
Description
GAUSS(tol)
UNIF(tol)
WC(tol)
The L and E suffix functions available in SIMetrix Monte Carlo analysis are not
available for SIMPLIS operation.
209
Users Manual
Lot and Device Tolerances
No special provision has been made to implement so called Lot tolerances which
model tolerances that track. However, it is nevertheless possible to implement Lot
tolerances by defining a parameter as a random variable. Suppose for example that you
have a resistor network consisting of 4 resistors of 1k with an absolute tolerance of 2%
but the resistors match to within 0.2%. The absolute tolerance is the lot tolerance.
This is how it can be implemented:
1.
Assign a random variable using the .VAR preprocessor control. (You cannot use
.PARAM in SIMPLIS simulations). E.g.:
.VAR rv1 = {UNIF(0.02)}
2.
rv1 will be updated on each Monte Carlo step but will always have the same value in
each place where it is used.
The initial conditions back annotated to top level capacitors and inductors will
also be recognised in SIMetrix simulation mode.
2.
Back annotated initial conditions are attached to schematic instances and will be
faithfully reproduced if, for example, a schematic block is copied and pasted to
another schematic
Please read all of the sections below on back-annotation and ensure you correctly
understand all the issues involved.
210
Back-annotation Errors
If you get the error message The following instances have initial condition values but
do not support back annotation it means that the SIMPLIS_TEMPLATE property is
protected for the instances listed. To fix the problem remove the protection on this
property. You will need to open the symbol in the symbol editor to do this.
In order to apply back-annotation in a generic fashion, SIMetrix needs to modify the
SIMPLIS_TEMPLATE property, but cannot do so if it protected hence the error
message. You shouldnt get this error with any standard symbols from the SIMetrix v5
library or later, but you may get it with your own symbols or symbols from an earlier
library.
211
Users Manual
inductors. This action is done using a special script specified by the INIT_SCRIPT
property. In the case of the capacitor, the script ic_reactive is called. The advantage
of the specialised method is that the device can be modified in a manner that is
consistent with its existing user interface. Capacitors already have user editable initial
conditions and the application of back-annotated initial conditions is compatible with
this.
The disadvantage of the specialised method is that a method of applying the back
annotated value needs to be developed for every different type of device. This would
not be acceptable for most users who develop their own symbols. The generic method
overcomes this difficulty. The generic method modifies the properties so that
additional netlist lines are created containing the .INIT simulator command that
defines the initial conditions. To achieve this the SIMPLIS_TEMPLATE property
needs to be modified and as long as this isnt protected , the generic method will
always work.
212
Y-Axis
Note that the legend panel can be resized. With most systems a resize handle is
clearly visible on the lower edge but with the standard Windows XP theme - e.g. the
above picture - this is not the case.
213
Users Manual
Graph Toolbar
Display 3dB High Pass
Display 3dB Low Pass
Display Average/Cycle
Display RMS/Cycle
Display Fall Time
Move curve to
new axis/grid
Name Curves
Hide selected curves
Show Selected Curves
Display
Rise Time
Fit Page
Graph toolbar
The above shows the function of each of the buttons on the graph toolbar. These are
referred to in the following sections.
214
Fixed Probes
There are 8 types of fixed probe as described in the following table
Probe Type
Description
To Place
Voltage
Current
Inline current
dB
Phase
Bode plot
Bus plot
Menu: Probe|Place|Fixed
Bus Probe
These probes are simply schematic symbols with special properties. When you place a
fixed probe on the schematic, the probed value at the point where you place the probe
will be plotted each time you run the simulation.
215
Users Manual
Current probes must be placed directly over a component pin. They will have no
function if they are not and a warning message will be displayed.
Persistence
Axis Type
216
Graph
Check the Use Separate Graph box if you wish a new graph
sheet to be used for the probe. You may also supply a graph
name. This works in the same way as axis name (see above). It
is not a label but a means of identification. Any other probes
using the same graph name will have their curves directed to the
same graph sheet.
Analyses
217
Users Manual
Plot on completion only
X-Axis/Y-Axis
No Change
Defined
218
Pause simulation.
2.
3.
Resume simulation
Random Probes
General Behaviour
A wide range of functions are available from the schematic Probe and Probe AC/Noise
menus. With a few exceptions detailed below, all random probe functions have the
following behaviour.
If a graph window is open and the currently displayed sheet has a compatible xaxis to what you are probing, the new curve will be added to that sheet. E.g. if the
currently displayed graph is from a transient analysis and has an x-axis of Time,
and you are also probing the results of a transient analysis, then the new curve
will be added to the displayed graph. If, however the displayed curve was from
an AC analysis, its x-axis would be frequency which is incompatible. In this case
a new graph sheet will be created for the new curve.
If you want to force a new graph sheet to be created, press F10. This will create an
empty graph sheet.
The menus:
Probe|Voltage (New graph sheet)...
Probe|Current (New graph sheet)...
will always create a new graph.
219
Users Manual
Functions
The following table shows all available random probe functions. Many of these can be
found in the schematics Probe menu while others are only available from Probe|More
Probe Functions...
Function
220
Function
Single Ended Current - Group delay
Differential Current - Actual
Differential Current - dB
Differential Current - Phase
Differential Current - Fourier
Differential Current - Nyquist
Differential Current - Normalised dB
Differential Current - Group delay
Power
Impedance
Output noise (noise analysis only)
Input noise (noise analysis only)
Device noise (noise analysis only)
Arbitrary expressions and XY plots
221
Users Manual
Note that you must specify an input source for input referred noise to be available. See
Noise Parameters on page 186 for details.
To Plot Device Noise
1.
2.
Note that noise results are only available for noisy devices such as resistors and
semiconductor devices.
2.
222
Fourier Analysis
A Fourier spectrum of a signal can be obtained in a number of ways. You have a choice
of using the default settings for the calculation of the Fourier spectrum or you can
customise the settings for each plot. The following menus use the default settings:
Probe|Fourier|Probe Voltage Quick...
Probe|More Probe Functions...
Graph menu: Measure|Plot Fourier of Curve
Graph menu: Measure|Plot Fourier of Curve (Cursor span)
The following prompt you to customise the settings:
Probe|Fourier|Probe Voltage Custom...
Probe|Fourier|Arbitrary...
Command shell menu: Graphs and Data|Fourier...
Default Settings
The default fourier spectrum settings are:
Setting
Default value
Method
Interpolated FFT
Number of points
Interpolation order
Span
Custom Settings
With menu Probe|Fourier|Probe Voltage Custom... you will see the dialog below. With
the menus Probe|Fourier|Arbitrary... or command shell menu Graphs and
Data|Fourier... a dialog box similar to that shown in Plotting an Arbitrary Expression
on page 229 will be displayed but will include a Fourier tab. Click on the this tab to
display the Fourier analysis options as shown below.
223
Users Manual
Method
SIMetrix offers two alternative methods to calculate the Fourier spectrum: FFT and
Continuous Fourier.
The simple rule is: use FFT unless the signal being examined has very large high
frequency components as would be the case for narrow sharp pulses. When using
Continuous Fourier, keep an eye on the Estimated calculation time shown at the bottom
right of the dialog.
A description of the two techniques and their pros and cons follows.
FFT
224
Start Freq./Hz
Stop Freq./Hz
Log X-Axis
225
Users Manual
the time interval being analysed.
Signal Info
If the signal being analysed is repetitive and the frequency of that signal is known
exactly then a much better result can be obtained if it is specified here. Check the Know
fundamental frequency box then enter the frequency. The Fourier spectrum will be
calculated using an integral number of complete cycles of the fundamental frequency.
This substantially reduces spectral leakage. Spectral leakage occurs because both the
Fourier algorithms work on an assumption that the signal being analysed is a repetition
of the analysed time interval from t=- to t=+. If the analysed time interval does not
contain a whole number of cycles of the fundamental frequency this will be a poor
approximation and the spectrum will be in error. In practice this problem is minimised
by using a window function applied to the signal prior to the Fourier calculation, but
using a whole number of cycles reduces the problem further.
Note that the fundamental frequency is not necessarily the lowest frequency in the
circuit but the largest frequency for which all frequencies in the circuit are integral
harmonics. For example if you had two sine wave generators of 1kHz and 1.1KHz, the
fundamental is 100Hz, not 1kHz; 1kHz is the tenth harmonic, 1.1KHz is the eleventh.
You should not specify a fundamental frequency for circuits that have self-oscillating
elements.
FFT Interpolation
As explained above, the FFT method must interpolate the signal prior to the FFT
computation. Specify here the number of points and the order. The number of points
entry may be forced to a minimum if a high stop frequency is specified in the
Frequency Display section.
The number of interpolation points required depends on the highest significant
frequency component in the signal being analysed. If you have an idea what this is, a
useful trick to set the number of points to a suitable value, is to increase the stop
frequency value in the Frequency Display section up to that frequency. This will
automatically set the number of interpolation points to the required value to handle that
frequency. If you don't actually want to display frequencies up to that level, you can
bring the stop frequency back down again. The number of interpolation points will stay
at the value reached.
If in doubt, plot the FFT twice using a different number of points. If the two results are
significantly different in the frequency band of interest, then you should increase the
number of points further.
Usually an interpolation order of 2 is a suitable value but you should reduce this to 1 if
analysing signals with abrupt edges. If analysing a smooth signal such as a sinusoid,
useful improvements can be gained by increasing the order to 3.
Advanced Options
Pressing the Advanced Options... button will open this dialog box:
226
Data Span
Usually the entire simulated time span is used for the fourier analysis. To specify a
smaller time interval click Specify and enter the start and end times.
Note that if you specify a fundamental frequency, the time may be modified so that a
whole number of cycles is used. This will occur whether or not you explicitly specify
an interval.
Window
A window function is applied to the time domain signal to minimise spectral leakage
(See above).
The choice of window is a compromise. The trade off is between the bandwidth of the
main spectral component or lobe and the amplitude of the side-lobes. The rectangular
window - which is in effect no window - has the narrowest main lobe but substantial
side-lobes. The Blackman window has the widest main lobe and the smallest side
lobes. Hanning and Hamming are something in between and have similar main lobe
widths but the side lobes differ in the way they fall away further from the main lobe.
Hamming starts smaller but doesn't decay whereas Hanning while starting off larger
than Hamming, decays as the frequency moves away from the central lobe.
Despite the great deal of research that has been completed on window functions, for
many applications the difference between Hanning, Hamming and Blackman is not
important and usually Hanning is a good compromise.
There are situations where a rectangular window can give significantly superior
results. This requires that the fundamental frequency is specified and also that the
simulated signal is consistent over a large number of cycles. The rectangular window,
however, usually gives considerably poorer results and must be used with caution.
Probing Busses
It is possible to probe a bus as long as all the signals on the bus are digital. In this case
a plot representing all the signals on the bus will be created. Usually this will be a
numeric display of the digital bus data, but it is also possible to display the data as an
analog waveform.
227
Users Manual
To probe bus using default settings
Use the schematic popup menu Probe Voltage... or hot key F4 and probe the bus in the
same way as you would a single wire.
This will plot a numeric trace using decimal values.
To probe bus using custom settings
1.
2.
3.
Enter the desired bus parameters as described in Bus Probe Options below
Define Bus
Label
Start, End
Defines which wires in the bus are used to created the displayed
data. The default is to use all wires
Plot Type
Decimal/Hexadecimal/Binary
228
If checked, then and invalid digital states found in the data will
be replaced with the most recent valid state. If not checked,
invalid states will be shown as an 'X' in numeric displays. This
option is automatically selected for analog waveform mode.
Offset
Units
229
Users Manual
Expression
Y
Expression for X data. Only required for X-Y plot and you must
check X-Y Plot box. Expression entered in the same way as for
Y data
Available Vectors
Lists values available for plotting. This is for finding vectors that aren't on a schematic
either because the simulation was made direct from a netlist or because the vector is for
a voltage or current in a sub-circuit. (You need to tell SIMetrix to save sub-circuit
currents and voltages using .KEEP - for details see page 204 of the Simulator
Reference Manual). Press Edit Filter to alter selection that is displayed. See below.
The names displayed are the names of the vectors created by the simulator. The names
of node voltages are the same as the names of the nodes themselves. The names for
device currents are composed of device name followed by a '#' followed by the pin
name. Note that some devices output internal node voltages which could get confused
with pin currents. E.g. q1#base is the internal base voltage of q1 not the base current.
The base current would be q1#b. For the vector names output by a noise analysis refer
to .NOISE on page 212 of the Simulator Reference Manual.
Edit Filter...
Pressing the Edit Filter... button opens:
230
This allows you to select what is displayed in the available vectors dialog. This is
useful when simulating large circuits and the number of vectors is very large.
Sub-circuit Filter
All
Top level
Select sub-circuit
Signal Type
All
Voltages Only
Currents Only
Digital Only
Wildcard filter
Enter a character string containing * and/or ? to filter vector names. * matches 1
or more occurrences of any character and ? matches any single character. Some
examples:
*
matches anything
X1.*
matches any signal name that starts with the three letters: X1.
X?.*
matches any name that starts with an X and with a '.' for the third
letter.
231
Users Manual
*.q10#c
matches any name ending with .q10#c i.e the current into any
transistor called q10
*.U1.vout
matches any name ending with .U1.C11 i.e any node called vout
in a subcircuit with reference U1.
Curve Label
Enter text string to label curve
Axis/Graph Options Sheet
Allows you to control where the curve for the probed signal will be placed.
Axis Type
Select an appropriate axis type. Note that you can move a curve to a new axis or grid
after it has been plotted. See Moving Curves to Different Axis or Grid on page 239
232
Auto select
Use Selected
Digital Axis
Create a new digital axis. Digital axes are placed at the top of
the window and are stacked. Each one may only take a single
curve. As their name suggests, they are intended for digital
traces but can be used for analog signals if required.
X-Axis/Y-Axis
Lin/Log/Auto
No Change
Auto scale
Defined
233
Users Manual
Curve Arithmetic
SIMetrix provides facilities for performing arithmetic on existing curves. For example
you can plot the difference between two plotted curves.
There are two methods:
1.
With the menus:
Plot | Sum Two Curves...
Plot | Subtract Two Curves...
Plot | Multiply Two Curves...
Select one of the above menus and follow instructions given
2.
Using the Add Curve... dialog box. With this method, select menu Probe | Add
Curve... then enter an expression as desired. To access an existing curves data,
simply click on the curve. For more information, see Plotting an Arbitrary
Expression on page 229.
This only needs to be done once. Note that you can only do this with the full versions
of SIMetrix.
This problem wont arise if you always run every schematic at least once while it is
open. If you do this, the netnames will be updated and you will be promted to save the
schematic before closing it. This wasnt the case with SIMetrix version 4.2 and earlier
and the above problem is most common with schematics created with those earlier
versions.
Multiple Instances
An issue arises in the situation where there are multiple instances of a block attached to
the same schematic. Consider the following top level circuit.
234
VP
V INP
V INN
V OUTP
V OUTN
V3
VN
A C 1 0 Pulse(0 10m 0 5n 5n 500n 1u)
U1
f astamp.sc h V P
V INP
V INN
U2
f astamp.s ch
V OUTP
V OUTN
R3
1K
VN
E1
R2
1Meg
R1
1Meg
V2
5V
This has two instances of the block FASTAMP.SCH U1 and U2. Suppose you wanted
to plot the voltage of a node inside U1. The schematic FASTAMP.SCH is open but to
which block does it refer? The answer is that it will refer to the most recent block that
was used to descend into it. The block that a schematic refers to is always displayed in
the schematic's status bar as illustrated below
Pathname of root
235
Users Manual
To plot a node in U2, ascend to parent (TOP.SCH in the above example) then descend
into U2. The same schematic as above will be displayed but will now refer to U2
instead of U1.
Plotting Currents
In the same way that you can plot currents into subcircuits in a single sheet design, so
you can also plot currents into hierarchical blocks at any level.
Update Curves
Make sure that no curves are selected then select graph menu Plot|Update Curves. The
curves currently on the graph sheet will be redrawn using the current simulation data.
Although this would usually be the latest simulation run, you can also use this feature
to restore the curves back to those from an earlier run. Use the Graphs and
Data|Change Data Group... menu to select earlier data. (For more information see
Plotting the Results from a Previous Simulation on page 241)
Options
By default all curves are redrawn, that is the older ones are deleted. You can change
this behaviour so that older curves are kept. Select menu Plot|Update Curves Settings...
then uncheck the Delete old curves box.
If there are curves that you would like to remain fixed and so wont be updated, simply
select them first. This behaviour can be overridden using the menu Plot|Update Curves
Settings... Simply uncheck the Ignore selected curves box.
Plot Journals
First create a plot journal using the menu Plot|Create Plot Journal... then choose a file
name. The file created has a .sxscr extension - its the same extension used by scripts
because the file created is a script.
To run the plot journal, you will of course first need to run a simulation or load
previous data so that the journal has some data to work with. The plot journal itself
does not store any data. With the simulation data you wish to work with in place, select
236
237
Users Manual
AutoAxis Feature
When you plot a new curve on an existing graph, SIMetrix will select - or if necessary
create - a compatible axis for that curve. The decision is made on the basis of the
curve's Units i.e voltage, current etc. The rules it follows are:
1.
If the currently selected axis or grid (shown by black axis line) has the same units
as curve to be plotted or if it has undefined units (designated by a '?' on label),
that axis will be used.
2.
If any other axis or grid has compatible units (i.e same as curve or undefined) that
axis will be used.
3.
If no axes exist with compatible units, a new axis (not grid) will be created to
accommodate the curve.
The above works for all plots made using random probes. For plots created with fixed
probes, the above is the default behaviour, but this can be changed. See Fixed Probes
on page 215 for more details. For plots created using the Curve command at the
command line, the /AutoAxis switch must be specified e.g
Curve /AutoAxis L3#P
238
Selecting Axes
Some operations are performed on the selected axis or grid. The selected axis or grid
will be displayed with its vertical axis line a deep black while the remaining axes and
grids will be light grey. Newly created axes and grids are always selected. To select an
axis, click the left mouse button immediately to the left of the vertical axis line.
Select the curve or curves you wish to move by checking its checkbox next to the
coloured legend which designates the curve.
2.
3.
Press the Move selected curves to new axis button. The curves will be re-drawn on
the new axis. Any axes that become empty as a result of this operation will be
deleted unless it is the Main axis. See section below on Deleting Axes.
Deleting Axes
To delete an axis, select it then press Erase axis button. Note that you cannot erase an
axis or grid that has curves attached to it nor can you erase the Main axis. The main
axis is the first axis that is created on a graph. For example with the following graph
239
Users Manual
If you attempt to delete the selected axis (the lower one), nothing will happen. Instead
you should move the two curves in the top axis to the lower one. See above section on
how to move curves.
Editing Axes
You can edit axis scales, label and units by selecting the graph popup menu
Edit Axis.... This brings up the following dialog box:
240
You will be presented with a list of currently displayed grids identified by their yaxis title. Use the up and down arrow buttons to arrange them in the order
required then press Ok
Note that the main axis (the one at the bottom) cannot be moved.
To change the digital axis order:
1.
Select menu Axes|Reorder Digital Axes...
2.
2.
Select the name of the previous run (or group) that you require. The current
group will be highlighted. (Note that the AC analysis mode generates two
groups. One for the AC results and the other for the dc operating point results.
Transient analysis will do the same if the start time is non-zero)
3.
Plot the result you require in the normal way. A word of warning: If the
schematic has undergone any modifications other than component value changes
since the old simulation was completed, some of the netnames may be different
and the result plotted may not be of what you were expecting.
Note
By default, only the three most recent groups are kept. This can be changed
using the GroupPersistence option (using Set command - see Set on
page 299) or a particular group can be kept permanently using the
Simulator|Keep Current Data Group menu item.
Although only three groups are held at a time, the data is actually stored on
a disc file which will not necessarily have been deleted. If you wish to
access an old run, use File|Load Data... and retrieve the data from the
TEMPDATA directory created under the SIMetrix install directory. The file
will have the same name as the group appended with .SXDAT. In the case
of monte carlo analyses, it will be named MCn.SXDAT. Whether or not the
data file is still available depends on a preference setting. See Graph/
Probe/Data Analysis on page 331 for details.
241
Users Manual
the two signals come from different runs we need a method of identifying the run. This
is done by prefixing the name with the group name followed by a colon. The group
name is an analysis type name (tran, ac, op, dc, noise, tf or sens) followed by a number.
The signal name can be obtained from the schematic. For voltages, put the cursor over
the node and press control-S. For currents put the cursor on a device pin and press
control-P. The group name is displayed in the simulator progress box when the
simulation is running. You can also find the current group by selecting
Simulator|Change Data Group... and noting which group is highlighted in the dialog
box.
Here is an example. In tutorial 1, the signal marked with the Amplifier Output probe is
actually called Q3_E. The latest run (group) is called tran4. We want to plot the output
subtracted from the output for the previous run. The previous run will be tran3. So we
type at the command line:
Plot tran4:q3_e-tran3:q3_e
This will create a new graph sheet. If you wanted to add the curve to an existing graph,
use the Curve command instead of Plot.
For more details on data groups, the Plot command and the Curve command, please
refer to the Script Reference Manual. This is available as a PDF file on the install CD
and may also be downloaded from our web site. A hardcopy version is also available
for an additional charge.
242
Curve Operations
Selecting Curves
Click here to
select...
...this curve
Deleting Curves
To delete a curve (or curves), select it (or them) then press the Erase selected curves
button. Any axes or grids other than the Main axis left empty by this operation will
also be deleted.
Re-titling Curves
You can change the title of a curve by selecting it then pressing the Name curve button.
This will change the name of the curve as displayed in the legend panel. (Above main
graph area and below toolbar)
243
Users Manual
Highlighting Curves
You can highlight one or more curves so that they stand out from the others. This is
useful if there are many overlapping curves displayed.
To Highlight Curves
1.
Select the curves you wish to highlight then press H or menu Curves|Highlight
Selected Curves.
To Un-highlight Curves
1.
Graph Cursors
Overview
Graph cursors can be used to make measurements from waveforms. In their default
configuration they consist of two dimensioned crosshairs as shown below:
254.2373n
4.757869u
4.503632u
400
300
200
100
-100
-94.3299m
-200
-292.533m
-300
Reference
Cursor
-386.863m
-400
0
0.5
Time/Secs
244
1.5
2.5
3.5
4.5
500nSecs/div
Main
Cursor
Cursor Operations
Displaying
To switch on/off the cursor display select the graph menu Cursors|Toggle On/Off.
Moving
Cursors can be moved by a number of methods:
1.
Left to right. In this mode the x-position of the cursor is varied while the cursor
tracks the curve to which it is attached. To use this method, place the mouse on
the vertical crosshair but away from the intersection with the horizontal crosshair.
You should see the mouse cursor shape change to a left-right arrow. Press left
mouse key and drag.
2.
Up-down. Similar to 1. above but instead the y-position is varied. To use this
method, place the mouse on the horizontal crosshair but away from the
intersection with the vertical crosshair. You should see the mouse cursor shape
change to an up-down arrow. Press left mouse key and drag.
3.
Drag and drop. In this mode the cursor is picked up and moved without tracking
any curve. It can be dropped to any location and will then snap to the nearest
curve. To use this method, place the mouse cursor at the intersection of the
crosshairs. You will see the cursor shape change to a four-pointed arrow. Press
left key and drag to new location.
4.
The reference cursor can be moved in a left-right mode using the right mouse
button.
5.
Both cursors can be moved together using the left button while holding down the
shift key
Key
Function
F5
shift-F5
F6
shift-F6
245
Users Manual
Key
Function
F7
shift-F7
F8
shift-F8
These operations can also be accessed from the graph menu Cursors|Move.
Hiding Cursors
You can temporarily hide all or some of the displayed cursors. Menu Cursors | Hide/
Show | All has a toggle action and will hide all cursors if all cursors are currently
displayed and vice-versa. If some cursors are visible and some are hidden, you will be
presented with an option to hide all cursors or show all cursors.
Menu Cursors | Hide/Show | Select allows you to selectively hide or show some
cursors.
Freezing Cursors
You can freeze the cursors so that they can't be moved accidentally. Select menu
Cursors|Freeze/Unfreeze.
Aligning Cursors
Select menu Cursors|Align to align the two cursors so that they have the same y
position.
Changing Cursor Style
The crosshair style is the default but there is an alternative style where each cursor is a
small cross. Select menu Cursors|Set style to change. This is the same style used with
versions 3.1 and earlier.
Additional Cursors
SIMetrix has the ability to display any number of cursors, not just the standard two.
To Add an Additional Cursor
246
1.
2.
Enter a suitable label for the cursor. This is displayed at the bottom of the graph
and to avoid clutter, we recommend that you use a short label such as a single
letter.
3.
Select to which other cursor you wish the new cursor to be referenced for both
horizontal and vertical dimensions. Select **none** if you do not wish it to be
referenced to any currently displayed cursor. Note that you may reference further
additional cursors to this one if desired.
Press Ok. The new cursor will be initially displayed at the start of the x-axis and
attached to the first curve on the sheet. You may subsequently move it as desired.
2.
Select the cursor or cursors to be removed. These are identified by their labels.
Cursor Readout
There are a number of options as to how the cursors' absolute and relative positions are
displayed. Initially all values are displayed as dimensions on the graph. This can be
altered in a number of ways:
You can opt to have just the absolute or just relative readings displayed
The actual format of the graph readout can be customised. E.g extra text can be
added, perhaps something like Delay = xxxnS where xxx is the relative reading.
The values can optionally be displayed in the status bar with or without the graph
readings.
247
Users Manual
example, if you changed label 1 to Pulse Start = %x1% the value displayed for
the position of the reference cursor would be prefixed with Pulse Start = .
You can use expressions relating constants and symbolic values enclosed by %.
Expressions must be enclosed in braces: { and }. For example, the expression
{1/%xdiff%} will cause the difference value to be displayed as a reciprocal. This
is useful if you wanted to display a frequency instead of a period.
You can use any arithmetic operator along with many of the functions described
in the script reference manual in these expressions.
Style
Show Absolute
Show Difference
Automatic/Internal/External
248
The name of the simulation group that was current when the
Run number
Cursor Functions
There are four functions which return the current positions of the cursors and these can
be used in script expressions . These are
XDatum()
YDatum()
XCursor()
YCursor()
See Script Reference Manual for details. This is available as a PDF file on the install
CD. A hardcopy version is also available for an additional charge.
Curve Measurements
Overview
A number of measurements can be applied to selected curves. The results of these
measurements are displayed below the curve legend and are also printed. Some of
these measurements can be selected from the tool bar and more can be called directly
from the Legend Panel's pop-up menu (Right click in Legend Panel see Elements of
the Graph Window on page 213). The remainder may be accessed via the menu
Measure | More Functions... or by pressing F3.
Note that the legend panel may be resized by dragging its bottom edge with the mouse.
In general to perform a measurement, select the curve or curves then select
measurement from tool bar or menu. If there is only one curve displayed, it is not
necessary to select it.
Available Measurements
A wide range of measurement functions are available. Select menu Measure | More
Functions... to see the complete list. For more information see Using the Define
Measurement GUI below
249
Users Manual
To open the Define Measurement GUI, select menu Measure | More Functions... . You
will see the following dialog box:
Choose measurement
Lists all available measurement functions. If cursors are not switched on, some of the
functions will be greyed out. These are functions that require you to identify parts of
the waveform to be measured. For example the manual rise and fall time measurements
require you to mark points before and after the rising or falling edge of interest.
When you click on one of the measurements, some notes will appear at the bottom
explaining the measurement and how to use it.
Pre-process
Listed in the pre-process box are three operations that can optionally be performed on
the waveform before the measurement function is applied. These are
250
Cursor span
Integral cycles
AC coupled
Offsets the data by the mean value. This is equivalent to ACcoupling the data
Expression
Format template
Full description
251
Users Manual
The Measurement Definitions Manager allows you to edit both built in and custom
measurement definitions.
Select measurement
Select measurement you wish to edit from this list.
Restore Factory Definition
This button will be enabled for any built-in definition that has been edited in some way.
Press it to restore the definition to its original. For custom definitions, this buttons
label changes to Delete. Press it to delete the definition.
It is not possible to delete built-in definitions
Create new measurement
You can create a completely new empty measurement or you can copy an existing one
to edit. Enter a name then press Create to create a new empty definition. To copy an
exsiting definition, select the definition under Select measurement then press Copy
selected.
Measurement definition
Define measurement. There are five entries:
Label as displayed on graph
See similar for Define Measurement GUI
page 251
Expression
252
Full description
Templates
Both the graph label and Format template may be entered using a template containing
special variables and expressions. The following is available:
%yn%
%xn%
%uyn%
%uxn%
%%
Literal % character
{ expression }
253
Users Manual
frequency or is of a burst nature. The /cycle measurements calculate over as many
whole cycles as possible.
Each of these measurements use an algorithm to determine the location of x-axis
crossings of the waveform. The algorithm is quite sophisticated and works very
reliably. The bulk of this algorithm is concerned with finding an optimum base line to
use for x-axis crossings.
The per cycle measurements are useful when the simulated span does not cover a
whole number of cycles. Measurements such as RMS on a repetitive waveform only
have a useful meaning if calculated over a whole number of cycles. If the simulated
span does cover a whole number of cycles, then the full version of the measurement
will yield an accurate result.
Rise and Fall Time, and Overshoot Measurements
These measurements have to determine the waveforms pulse peaks. A histogram
method is used to do this. Flat areas of a waveform produce peaks on a histogram. The
method is very reliable and is tolerant of a large number of typical pulse artefacts such
as ringing and overshoot. For some wave-shapes, the pulse peaks are not well enough
defined to give a reliable answer. In these cases the measurement will fail and an error
will be reported.
Distortion
This calculates residue after the fundamental has been removed using an FFT based
method. This algorithm needs a reasonable number of cycles to obtain an accurate
result. The frequency of the fundamental is displayed in the message window. Note
that most frequency components between 0Hz and just before the second harmonic are
excluded. The precision of the method can be tested by performing the measurement
on a test circuit such as:
V2
5 Sine(0 1m 2k 0 0)
V1
5 Sine(0 1 1k 0 0)
The signal on the pos side of V2 has 0.1% distortion. Use V1 as your main test source
(assuming you are testing an amplifier) then after the simulation is complete, check
that the distortion measurement of V2 is 0.1%. If it is inaccurate, you will need either
to increase the number of measurement cycles or reduce the maximum time step or
both. You can adjust the amplitude of V2 appropriately if the required resolution is
greater or less than 0.1%.
254
255
Users Manual
To zoom in on a portion of a graph, place the cursor at the top left of the area you wish
to view, press and hold the left mouse key then move cursor to bottom right of area and
release left key. The axes limits will be modified appropriately.
To view whole graph again select the graph popup Zoom|Full or toolbar button.
Zooming with the Keyboard
F12 to zoom out
shift-F12 to zoom in
HOME returns graph to full view. (Same as graph popup Zoom|Full)
Recovering an Earlier Zoom
Press the Undo Zoom toolbar button
If you add a new curve to a graph which has been zoomed, the axes limits
will not change to accommodate that curve; if the new curve does not lie
within the zoomed area you will not see it. Selecting graph popup
Zoom|Full or pressing HOME key restores the graph to auto-scaling and
the limits will always adjust so that all curves are visible even ones
subsequently added.
Annotating a Graph
A number of objects are available to annotate graphs for documentation purposes.
These are:
256
Curve Marker. A single arrow, line and item of text to identify a curve or feature
of a curve
Legend Box. Box of text that lists all the names of curves currently displayed.
Free Text. Similar to text box but without border and background.
Curve Markers
Placing
To place a curve marker, select menu Annotate|Add Curve Marker. A single curve
marker should appear in the right hand margin of the graph.
Moving
To move it, place the mouse cursor at the arrow head - you should see the cursor shape
change to a four pointed arrow - then left click and drag to your desired location. When
you release the marker it will snap to the nearest curve.
Moving Label
To move the text label alone, place the mouse cursor to lie within the text, then left
click and drag. You will notice the alignment of the text with respect to the arrowed
line change as you move the text around the arrow. You can fix a particular alignment
if preferred by changing the marker's properties. See below.
Deleting
First select the marker by a single left click in the text. The text should change colour
to blue. Now press delete key or menu Annotate|Delete Selected Object.
Editing Properties
Double click the marker's label or select then menu Annotate|Edit Selected Object. The
following dialog will open:
Label
Text of the marker's label. %curve:label% automatically resolves to the curve's
label. If the curve name is edited with menu Curves|Rename curve this value will
reflect the change. You can of course enter any text in this box.
257
Users Manual
You can also use expressions in the same manner as for cursor dimensions. See
Label on page 247
Text Alignment
This is how the label is aligned to the arrowed line. If set to automatic the
alignment will be chosen to be the most appropriate for the relative position of
the label and the arrowhead. Uncheck automatic and select from the list to fix at a
particular alignment.
Font
Press Edit Font... to change font for text.
Other Properties
Snap To Curve
You can switch off the action that causes curve markers to
always snap to a curve. Select Properties tab then double
click on SnapToCurve item. Select Off. You will now be
able to move the curve marker to any location.
Legend Box
Placing
Select menu Annotate|Add Legend Box. A box listing all the curve names will appear
at the top left of the graph.
Moving
Place cursor inside the box and drag to new location.
Resizing
You can alter the maximum height of the box by placing the mouse cursor on it's
bottom edge and dragging. The text in the box will automatically reposition to comply
with the new maximum height.
Editing Properties
Double click on the box or select then menu Annotate|Edit Selected Object. The
following dialog will be opened:
258
Label
Lists each label in the box. These are usually %DefaultLabel% which resolves to
the name of the referenced curve. To edit, double click on the desired item.You
can also enter the symbols %X1% and %Y1% which represent the x and y coordinates of the marker respectively. These can be combined with other text in
any suitable manner. For example: Voltage @ %X1%S = %Y1% might resolve
to something like Voltage at 10u = 2.345. The values of %X1% and %Y1% will
automatically update if you move the marker.
You can also use expressions in the same manner as for cursor dimensions. See
Label on page 247
Background Colour
Select button Edit Colour... to change background colour. To change the default
colour select command shell menu File|Options|Colour... then select item Text
Box. Edit colour as required.
Font
Select button Edit Font... to change font. To change the default font select
command shell menu File|Options|Font... then select item Legend Box. Edit font
as required.
Text Box
Placing
Select menu Annotate|Text Box. Enter required text then Ok. You can use the symbolic
constants %date%, %time%, and %version% to represent creation date, creation time
and the product version respectively.
Moving
Place cursor inside the box and drag to new location.
259
Users Manual
Editing Properties
Double click on the box or select then menu Annotate|Edit Selected Object. A dialog
like the one shown for legend boxes (see above) will be displayed
Note when editing the label, you can use the symbolic constants as detailed in
Placing above.
260
1.
2.
Monochrome
Colour with markers Copies graph to clipboard in full colour but also differentiates
curves using markers and line styles. Curve legends
distinguished curves with a straight line example.
2.
3.
Either create a new graph sheet to receive the new curves (use F10) or switch to
an existing graph sheet.
4.
261
Users Manual
2.
3.
Either create a new graph sheet to receive the new curves (use F10) or switch to
an existing graph sheet.
4.
Exporting Graphics
You may export schematic graphics to other applications such as word processors or
drawing programs. You can do this via the clipboard (windows only, see Copying
Graphics to the Clipboard above) or by writing out to a file. To export waveform
graphics to a file, select the graph menu File | Save Picture... then select the format of
your choice using the Save as type: drop down box. The choices are:
1.
Windows Meta File (.EMF and .WMF). This is only available in Windows
versions. Nearly all windows applications that support graphics import will
accept this format. Note that this is a scalable format and therefore suitable for
high resolution printing.
2.
Scalable Vector Graphics (.svg). This is a relatively new format and is not
supported by many applications. However, it is the only scalable format available
in Linux.
3.
Bitmap - default image size (.png, .jpg, .bmp) These are available on all
platforms, are widely supported by graphics applications but these are not
scalable formats and so do not offer good quality when printed using high
resolution printers. PNG is the default format if you do not choose a file
extension and generally this is the format that provides the best image quality/file
size trade off. To choose JPG (JPEG format) or BMP (windows bitmap format)
you must explicitly enter .jpg or .bmp file extensions respectively. With this
option the image size will match the image size currently displayed on screen. If
you wish to specify a different image size, use next option.
4.
Bitmap - specify image size (.png, .jpg, .bmp). As 3 above but you must
explicitly define the image resolution in pixels. You will be prompted for this
when you close the file selection dialog box.
Saving Graphs
You can save a graph complete with all its curves, cursor settings and annotations to a
binary file for later retrieval. Note that all the graph data is stored not just that needed
for the current view. If a long run was needed to create the graph, the file could be quite
large.
Saving
Select command shell menu File|Graph|Save As... or graph menu File|Save As... to
save a graph that has never been saved before. To update a saved graph use command
shell menu File|Graph|Save or graph menu File|Save
262
Restoring
Select command shell menu File|Graph|Open... or, if a graph window already exists,
graph menu File|Open...
263
Users Manual
This forces a separate data group and separate data file to be created for the transient
analysis bias point data. Unless tstart>0 bias point data is usually taken from t=0
values. The problem with this approach is that to view a single value, the entire vector
has to be loaded from the data file to memory. This isn't a problem if the run is only a
100 points or so, but could be a problem if it was 100,000 points. It can take a long
time to load that amount of data. By specifying this option, the bias point data is stored
separately and only a single value needs to be read from the file. This is much more
efficient.
Future versions may set this option by default.
Saving Data
Saving the Data of a Simulation
The simulator usually saves all its data to a binary file stored in a temporary location.
This data will eventually get deleted. To save this data permanently, select menu
File|Data|Save.... You will be offered two options:
Move existing data file to new location
This will move the data file to location that you specify and thus change its status from
temporary to permanent. As long as the new location is in the same volume (=disk
partition) as the original location, this operation will be very quick. However, if the
data is from the most recent simulation, SIMetrix needs to unhook it in order to be
able to move the file. This will make it impossible to resume the simulation (if paused)
or restart the simulation (transient only).
Note that if you specify a location on a different volume as the original data, then the
files data has to be copied and for large data files, this will take a long time.
264
Example
The following circuit is a model of a hybrid linear-switching 5V PSU. See
Work\Examples\HybridPSU\5vpsu_v1.sxsch
265
Users Manual
C7
100u
R12
470
12
V1
5
D2
X2
IDEAL
Q2
BC547
BC547
Q1
LT1078
1.235
V2
1n
C4
R1
0.5
220
R13
100k
330u
L1
100u
C5
X1
100k
E1
820k
R11
R4
1MEG
R5
R6
LT1078
100k
R3
100k
R8
26u
C8
270k
R10
1
R7
2
R9
0.6
R14
260u
C2
0.6
R2
C9
714u
1u
C1
4.7n
C3
v out
R15
0.3
100n
C6
1
V3
I2 provides a current that is switched on for 1mS after a short delay. A multi-step
analysis is set up so that the load current is varied from 10mA to 1A. The output for all
runs is:
I2-pos iload=10m
4.98
I2-pos / V
4.96
4.94
4.92
I2-pos iload=1
4.9
28
Time/mSecs
266
30
32
34
36
38
40
2mSecs/div
2.
You will see a dialog box very similar to that shown in Plotting an Arbitrary
Expression on page 229. In the expression box you must enter an expression
that resolves to a single value for each curve. For this example we use:
yatx(vout, 0)-minimum(vout)
yatx(vout, 0) returns the value of vout when time=0. minimum(vout) returns the
minimum value found on the curve. The end result is the drop in voltage when
the load pulse occurs. Press OK and the following curve should appear:
100m
yatx(vout, 0)-minimum(vout) / V
40m
20m
10m
4m
2m
10m
20m
40m
100m
200m
400m
iload / ?
Histograms
The procedure for histograms is the same except that you should use the menu
Probe|Histogram... instead. Here is another example.
267
Users Manual
This is a design for an active band-pass filter using the simulated inductor method. See
Examples\MonteCarlo\768Hz_bandpass.sxsch. We want to plot a histogram of the
centre frequency of the filter.
100k
1%
R1
1%
R5
2.7k
10%
C2
V1
100n
ac 1 sin 0 2 768
vn
tl062
vp
X2
1%
R2
2.2k
X1
tl062
vp
vn
1%
R3
2.2k
10%
C1
10n
1%
R4
16k
The example circuit has been set up to do 100 runs. This won't take long to run, less
than 10 seconds on most machines. This is the procedure:
1.
2.
3.
Left click on the output of the filter. This is the junction of R1 and C2.
4.
You should see R1_P appear in the expression box. We must now modify this
with a goal function that returns the centre frequency. The function CentreFreq
will do this. This measures the centre frequency by calculating the half way point
between the intersections at some specified value below the peak. Typically you
would use 3dB.
Modify the value in the expression box so that it reads:
CentreFreq(R1_p, 3)
5.
268
At this stage you can optionally modify the graph setting to enter your own axis
labels etc. Now close the box. This is what you should see:
Mean = 764.529
Std. Dev. = 15.6069
25
Frequency / counts
20
15
10
730
740
750
760
770
780
790
Frequency/Hertz
10Hertz/div
Note that the mean and standard deviation are automatically calculated.
Histograms for Single Step Monte Carlo Sweeps
An example of this type of run is shown on page 181. These runs produce only a single
curve with each point in the curve the result of the Monte Carlo analysis. With these
runs you do not need to apply a goal function, just enter the name of the signal you
wish to analyse. To illustrate this we will use the same example as shown on page 181.
1.
2.
Run simulation.
3.
4.
Left click on '+' pin of the differential amplifier E1. You should see R4_N appear
in the box. Now enter a '-' after this then click on the '-' pin of the E1. This is what
should be in the box:
R4_N-R3_N
5.
269
Users Manual
Mean = 2.85301
Std. Dev. = 30.3897m
70
Frequency / counts
60
50
40
30
20
10
2.78
Voltage/V
2.8
2.82
2.84
2.86
2.88
2.9
2.92
20mV/div
This is a histogram showing the distribution of the gain of the amplifier at 100kHz.
Goal Functions
A range of functions are available to process curve data. Some of these are primitive
and others use the user defined function mechanism. Primitive functions are compiled
into the binary executable file while user defined functions are defined as scripts and
are installed at functions at start up. User defined functions can be modified and you
may also define your own. For more information refer to the Script Reference Manual.
This is available as a PDF file on the install CD. A hardcopy version is also available
for an additional charge.
The functions described here aren't the only functions that may be used in the
expression for performance analysis. They are simply the ones that can convert the
array data that the simulator generates into a single value with some useful meaning.
There are many other functions that process simulation vectors to produce another
vector for example: log; sqrt; sin; cos and many more. These are defined in Function
Reference on page 303.
Of particular interest is the Truncate function described on page 313. This selects data
over a given X range so you can apply a goal function to work on only a specific part
of the data.
Primitive Functions
The following primitive functions may be used as goal functions. Not all actually
return a single value. Some return an array and the result would need to be indexed.
Maxima is an example.
270
Name
Description
Page
Maximum(real/complex [,
real, real])
Mean(real/complex)
Minimum(real/complex)
311
312
313
314
314
310
311
Name
Description
Page
BPBW(data, db_down)
Band-pass bandwidth.
272
Bandwidth(data, db_down)
Same as BPBW
272
CentreFreq(data, db_down)
Centre frequency
273
Duty(data, [threshold])
273
Fall time
274
275
271
Users Manual
Name
Description
GainMargin(data,
phaseInstabilityPoint)
Gain Margin
Page
HPBW(data, db_down)
275
LPBW(data, db_down)
276
Overshoot
277
PeakToPeak(data, [start,
end])
Peak to Peak
278
Period(data, [threshold])
278
PhaseMargin(data,
phaseInstabilityPoint)
Phase Margin
278
Rise time
279
XatNthY(data, yValue, n)
279
XatNthYn(data, yValue, n)
279
XatNthYp(data, yValue, n)
280
XatNthYpct(data, yValue, n)
280
YatX(data, xValue)
Y value at xValue
280
YatXpct(data, xValue)
280
BPBW, Bandwidth
BPBW(data, db_down)
Finds the bandwidth of a band pass response. This is illustrated by the following graph
272
db_down
First 3dB crossing
after peak = x2
Bandwidth
CentreFreq(data, db_down)
See diagram in BPBW, Bandwidth above. Function returns (x1+x2)/2
Both British and North American spellings of centre (center) are accepted.
Implemented by built-in script uf_centre_freq. See install CD for source.
Duty
Duty(data, [threshold])
273
Users Manual
X2
Y1
Amplitude
Y2
Function returns the 10% to 90% fall time of the first falling edge that occurs between
x1 and x2. The 10% point is at y threshold Y1 + (Y2-Y1)*0.1 and the 90% point is at y
threshold Y1 + (Y2-Y1)*0.9.
If xStart is specified, X1=xStart otherwise X1 = x value of first point in data.
If xEnd is specified, X2=xEnd otherwise X2 = x value of last point in data.
If xStart is specified, Y1=y value at xStart otherwise Y1 = maximum y value in data.
274
Frequency(data, [threshold])
Finds the average frequency of data.
Returns:
(n-1)/(xn-x1)
Where:
n = the number of positive crossings of threshold
xn = the x value of the nth positive crossing of threshold
x1 = the x value of the first positive crossing of threshold
If threshold is not specified a default value of (ymax+ymin)/2 is used where ymax is
the largest value in data and ymin is the smallest value.
Implemented by built-in script uf_frequency. See install CD for source.
GainMargin
GainMargin(data, [phaseInstabilityPoint])
Finds the gain margin in dB of data where data is the complex open loop transfer
function of a closed loop system. The gain margin is defined as the factor by which the
open loop gain of a system must increase in order to become unstable.
phaseInstabilityPoint is the phase at which the system becomes unstable. This is used
to allow support for inverting and non-inverting systems. If data represents an
inverting system, phaseInstabilityPoint should be zero. If data represents a noninverting system, phaseInstabilityPoint should be -180.
The function detects the frequencies at which the phase of the system is equal to
phaseInstabilityPoint. It then calculates the gain at those frequencies and returns the
value that is numerically the smallest. This might be negative indicating that the
system is probably already unstable (but could be conditionally stable).
If the phase of the system does not cross the phaseInstabilityPoint then no gain margin
can be evaluated and the function will return an empty vector.
HPBW
HPBW(data, db_down)
Finds high pass bandwidth.
275
Users Manual
X1
X max
Y max
Y max - db_down
LPBW(data, db_down)
Finds low pass bandwidth
276
X1
Y max
Y max - db_down
277
Users Manual
PeakToPeak
Period(data, [threshold])
Returns the period of the data.
Refer to diagram for the Duty function on page 273. The Period function returns:
X3 - X1
Default value for threshold is
(Ymax+Ymin)/2
Where Ymax = largest value in data and Ymin in smallest value in data.
Implemented by built-in script uf_period. See install CD for source.
PhaseMargin
PhaseMargin(data, [phaseInstabilityPoint])
Finds the phase margin in dB of data where data is the complex open loop transfer
function of a closed loop system. The phase margin is defined as the angle by which
the open loop phase shift of a system must increase in order to become unstable.
phaseInstabilityPoint is the phase at which the system becomes unstable. This is used
to allow support for inverting and non-inverting systems. If data represents an
inverting system, phaseInstabilityPoint should be zero. If data represents a noninverting system, phaseInstabilityPoint should be -180.
The function detects the frequencies at which the magnitude of the gain is unity. It then
calculates the phase shift at those frequencies and returns the value that is numerically
the smallest. This might be negative indicating that the system is probably already
unstable (but could be conditionally stable).
If the gain of the system does not cross unity then no phase margin can be evaluated
and the function will return an empty vector.
PulseWidth
PulseWidth(data, [threshold])
Returns the pulse width of the first pulse in the data.
278
X2
Y2
Amplitude
Y1
Function returns the 10% to 90% rise time of the first rising edge that occurs between
x1 and x2. The 10% point is at y threshold Y1 + (Y2-Y1)*0.1 and the 90% point is at y
threshold Y1 + (Y2-Y1)*0.9.
If xStart is specified, X1=xStart otherwise X1 = x value of first point in data.
If xEnd is specified, X2=xEnd otherwise X2 = x value of last point in data.
If xStart is specified, Y1=y value at xStart otherwise Y1 = maximum y value in data.
If xEnd is specified, Y2=y value at xEnd otherwise Y2 = minimum y value in data.
XatNthY
XatNthY(data, yValue, n)
Returns the x value of the data where it crosses yValue for the nth time.
XatNthYn
XatNthYn(data, yValue, n)
Returns the x value of the data where it crosses yValue for the nth time with a negative
slope.
279
Users Manual
XatNthYp
XatNthYp(data, yValue, n)
Returns the x value of the data where it crosses yValue for the nth time with a positive
slope.
XatNthYpct
XatNthYpct(data, yValue, n)
As XatNthY but with yValue specified as a percentage of the maximum and minimum
values found in the data.
YatX
YatX(data, xValue)
Returns the y value of the data at x value = xValue.
YatXpct
As YatX but with xValue specified as a percentage of the total x interval of the data.
2.
3.
SIMetrix will read the entire file and write its data out to a temporary .sxdat file in the
same way as it does when saving its own simulation data. The data read from the raw
file is buffered in RAM in order to maximise the efficiency of the saved data. SIMetrix
will use up to 10% of system RAM for this purpose.
Note that this feature is not available with SIMetrix Intro.
280
2.
Note that various applications use slightly different variants of this format. By default,
SIMetrix outputs the data in a form that is the same as the standard unmodified
SPICE3 program. This can be modified using the option setting ExportRawFormat.
Use the Set command to set this value. See Set on page 299 for details. Set this value
to spice3, spectre or other.
Exporting Data
To export data, use the Show command (page 300) with the /file switch. E.g
Show /file data.txt vout r1_p q1#c
will output to data.txt the vectors vout, r1_p, and q1#c. The values will be output in a
form compatible OpenGroup /text.
Vector Names
In the above example the vector names are vout, r1_p and q1#c. If you simulate a
schematic, the names used for voltage signals are the same as the node names in the
netlist which in turn are assigned by the schematic's netlist generator. To find out what
these names are, place the mouse cursor on the node of interest on the schematic then
press control-S. The node name - and therefore the vector name - will be displayed in
the command shell. A similar procedure can be used for currents. Place the mouse
cursor on the device pin of interest and press control-P.
281
Users Manual
will launch the program procdata.exe and will not return until procdata.exe has closed.
Voltage1
0
1e-09
2e-09
4e-09
8e-09
1.6e-08
3.2e-08
6.4e-08
1e-07
1.064e-07
14.5396
14.5397
14.5398
14.54
14.5408
14.5439
14.5555
14.5909
14.6404
14.6483
Voltage2
14.6916
14.6917
14.6917
14.6917
14.6911
14.688
14.6766
14.641
14.5905
14.5821
If the above was read in as a text file (using OpenGroup /text), a new group called
textn where n is a number would be generated. The group would contain three vectors
called time, Voltage1 and Voltage2. The vectors Voltage1 and Voltage2 would have a
reference of Time. Time itself would not have a reference.
To read in complex values, enclose the real and imaginary parts in parentheses and
separate with a comma. E.g:
Frequency
1000
1004.61579
1009.252886
282
:VOUT
(-5.94260997, 0.002837811)
(-5.94260997, 0.00285091)
(-5.94260996, 0.002864069)
(-5.94260995, 0.002877289)
(-5.94260994, 0.00289057)
(-5.94260993, 0.002903912)
(-5.94260992, 0.002917316)
(-5.94260991, 0.002930782)
(-5.9426099, 0.00294431)
(-5.94260989, 0.0029579)
(-5.94260988, 0.002971553)
283
Users Manual
Execute
command
Drop down list for
command history
Command line
Message window
Command Line
The command line is at the top of the command shell. See diagram above.
The vast majority of operations with SIMetrix can be executed from menus or predefined keys and do not require the use of the command line. However, a few more
advanced operations do require the use of the command line. From the command line
you can run a script or an internal command. You can also define a new menu to call a
script, command or series of commands. In fact all the built in menu and keys are in
fact themselves defined as commands or scripts. These definitions can be changed as
well as new ones defined. See Editing the Menu System on page 285
Details of some of the available commands are given in Command and Function
Reference on page 292. The remainder are documented in the SIMetrix Script
Reference Manual.
Command History
A history of manually entered commands is available from the drop down list. (select
arrow to the right of the command line). Some other commands entered via menus or
from a script may also be placed in the command history.
Message Window
Various messages may be displayed in the message window below the command line.
These include command progress, errors, warnings and listing outputs. The text in the
window may be copied to the clipboard using a context sensitive menu activated by the
right mouse button.
284
Scripts
SIMetrix features a comprehensive scripting language. Full details of this can be found
in the Script Reference Manual. This is available as a PDF file on the install CD. A
hardcopy version is also available for an additional charge.
/quiet Inhibits error messages for that command. This only stops error message
being displayed. A script will still be aborted if an error occurs but no message
will be output
/noerr Stops scripts being aborted if there is an error. The error message will still
be displayed.
Using the script language. You can either edit the menu.sxscr script that builds
the menu system on program start, or you can make additions by adding
commands to the start up script
285
Users Manual
2.
The first method offers the ultimate in flexibility but has a steep learning curve. The
second method is quite simple to use and is appropriate for simple changes to the menu
system such as deleting unused menus or changing hot-key definitions.
The following describes the second method. For details about the first method, please
refer to the Script Reference Manual.
Procedure
Select menu File | Options | Edit Menu... . This will open the following dialog box
The above view shows the layout for SIMetrix/SIMPLIS products. For SIMetrix only
products the top level menu choices will be slightly different.
The left hand pane shows the current menu system in a tree structured list. The buttons
on the right allow you to move, delete or add new menu items and sub menus.
To Delete a Menu Item or Entire Sub-menu
Select the item you wish to delete on the left hand side then press Remove. To
subsequently restore a deleted item, use Add Item... (see below).
286
shift, control or alt. The key you press will be assigned to the menu.
Press Remove to delete the accelerator key assignment.
To Reset to Factory Settings
Press Reset to reset the menu system back to factory settings. Usually this means that
the menu system will revert to the structure defined when SIMetrix was first installed.
However, if you defined any menus in the startup script using the DefMenu command,
these menus will be faithfully restored as well.
Reopen Menu
The Reopen menu in the Command Shell File menu is dynamically updated to include
schematic files recently opened or saved. The items in this menu are not listed in the
Menu Editor and cannot be edited. The Reopen sub-menu itself should not be deleted,
or moved to a new sub-menu nor should it be renamed, but it may be repositioned in
the command shells File menu as desired.
287
Users Manual
Message Window
The message window is the window in the command shell below the command line.
The majority of messages, including errors and warnings, are displayed here. The
window can be scrolled vertically with the scroll bar.
You can copy a line of text from the message window to the command line by placing
the cursor on the line and either double clicking the left mouse key or pressing the
Insert key.
Up to 2000 lines of messages will be retained for viewing at any time.
Menu Reference
For complete documentation on menu system, please refer to the on-line help. The
menu reference topic can be viewed by selecting the menu Help|Menu Reference
Keyboard
The following keys definitions are built in. They can all be redefined using the DefKey
command (see DefKey on page 293) or short-cut with DefMenu command.
Key Unshifted
Shift
Control
Place 2-input
AND
Place fixed
voltage probe
Place capacitor
Copy (schem),
Copy to
clipboard (graph)
288
Place diode
Place voltage
controlled
voltage source
Place current
controlled
current source
Shift-Control
Key Unshifted
Shift
Control
Place ground
Place digital
ground
Browse Parts
Place module
port
Place current
source
Place digital
inverter
Show current in
pin
Place N-JFET
Place P-JFET
Place ideal
inductor
Place NMOS
transistor
Place NPN
transistor
Place 2-input
NAND
Place Op-amp
Place 2-input OR
Place PNP
transistor
Place digital
pulse
Place bias
marker
Shift-Control
Update bias
values
Show voltage at
node
Show pinname
at cursor
Repeat arc
(symbol editor)
Place resistor
Place 2-input
NOR
Place switch
Show netname
at cursor
Place
transmission line
Switch window
Place fixed
current probe
Place voltage
source
Place waveform
generator
Place ideal
transformer
Place terminal
Place zener
diode
Place digital
VCC
Repeat last
probe
Paste
Select Window
Place 2-input
XOR
Cut
Undo
(schematic)
1
2
289
Users Manual
Key Unshifted
3
Shift
Control
Shift-Control
5
6
7
8
9
290
Key
Unshifted
Shift
Control
F1
Help
F2
Step script
Pause script
Resume
script
F3
F4
Probe Voltage
(immediate)
F5
F6
F7
F8
Move ref
F9
Start simulation
Open Last
Schematic
F10
Alt
Quit/
Close
window
Key
Unshifted
F11
Open/close simulator
command window
(schem)
F12
Shift
Control
Alt
Zoom in (schem,
graph, symbol
editor)
Insert
Paste
Delete Delete
Cut
Copy
End
Page
Up
Page
Down
Up
Big scroll
Scroll up (schem, graph) Increment
up (schem)
component/
potentiometer
(schem), Scroll up
selected axis
(graph)
Down
Big scroll
Decrement
down
component/
(schem)
potentiometer
(schem), Scroll
down selected axis
(graph)
Left
Right
Scroll right
selected axis
(graph)
TAB
Step reference
cursor
ESC
Big scroll
right
(schem)
SPACE
291
Users Manual
Notation
Symbols Used
Square brackets: [ ]
These signify a command line parameter or switch which is optional.
Pipe symbol: |
This signifies either/or.
Ellipsis: ...
This signifies 1 or more optional multiple entries.
Fonts
Anything that would be typed in is displayed in a fixed width font.
Command line parameters are in italics.
Case
Although upper and lower cases are used for the command names, they are NOT in
fact case sensitive.
Examples
OpenGroup [ /text ] [ filename ]
Both /text (a switch) and filename (a parameter) are optional in the above example.
So the following are all legitimate:
OpenGroup
OpenGroup /text
OpenGroup run23.dat
OpenGroup /text output.txt
DelCrv curve_number...
292
Command Summary
Only a few of the approximately 220 available commands are detailed in this chapter
and a list is given in the table below. Documentation for the remainder is provided in
the Script Reference Manual. This is available as a PDF file on the install CD and can
also be downloaded from our web site.
Command name
Description
DefKey
DefMenu
DelMenu
ListStdKeys
OpenGroup
SaveRhs
Set
Set option
Show
UnSet
Delete option
Reference
DefKey
DefKey Key_Label Command_string [option_flag]
DefKey is used to define custom key strokes.
Key_Label
GRAPH
SHELL
SYMBOL
293
Users Manual
windows.
Command_string
option_flag
5.
294
INS
DEL
HOME
END
PGUP
PGDN
LEFT
RIGHT
UP
DOWN
TAB
BACK
Insert key
Delete key
Home key
End key
Page up key
Page down key
Tab key
Back space
ESC
Escape key
NUM1
NUM2
NUM3
NUM4
NUM5
NUM6
NUM7
NUM8
NUM9
NUM0
NUM*
NUM/
NUM+
Keypad 1
Keypad 2
Keypad 3
Keypad 4
Keypad 5
Keypad 6
Keypad 7
Keypad 8
Keypad 9
Keypad 0
Keypad *
Keypad /
Keypad +
Keypad Keypad .
This definition only functions when a schematic is active. A similar definition for
F12:GRAPH zooms out a graph when a graph window is active.
DefMenu
DefMenu [/immediate] [/shortcut key_code] menuname
command_string when_to_enable
Defines custom menu.
/immediate
/shortcut key_code
295
Users Manual
description is placed on right hand side of menu item. Use any
of the codes specified in DefKey on page 293 except key pad
codes. Note that DefKey has precedence in the event of the key
or key combination being defined by both DefKey and
DefMenu.
menuname
SHELL
SCHEM
SIMETRIX
SIMPLIS
GRAPH
GRAPHMAIN
SCHEMMAIN
SYMBOL
SYMBOLMAIN
Notes
Changes to a schematic or symbol editor main menu will not affect currently open
windows. For the changes to take effect, close the schematic/symbol editor window
and open a new one.
296
DelMenu
DelMenu [/bypos position] menuname
Deletes specified menu
position
menuname
SCHEM
GRAPH
LEGEND
OpenGroup
OpenGroup [/text] [/overwrite] [filename]
Reads in a data file.
/text
/overwrite
filename
OpenGroup creates a new Group. If /text is not specified then the name of the group
will be that with which it was stored provided the name does not conflict with an
existing group. If there is a conflict the name will be modified to be unique. If /text is
specified then the group will be named:
textn
where 'n' is chosen to make the name unique.
297
Users Manual
ReadLogicCompatibility
ReadLogicCompatibility filename
Reads a file to define the compatibility relationship between logic families. For an
example of a compatibility table, see the file COMPAT.TXT which you will find in the
SCRIPT directory. This file is actually identical to the built-in definitions except for the
UNIV family which cannot be redefined.
Please refer to the Digital Simulation chapter of the Simulator Reference Manual for
full details on logic compatibility tables.
File Format
The file format consists of the following sections:
Header
In-Out resolution table
In-In resolution table
Out-Out resolution table
Header:
The names of all the logic families listed in one line. The names must not use the
underscore ('_') character.
In-Out resolution table:
A table with the number of rows and columns equal to the number of logic families
listed in the header. The columns represent outputs and the rows inputs. The entry in
the table specifies the compatibility between the output and the input when connected
to each other. The entry may be one of three values:
OK
Fully compatible
WARN
ERR
ROW
COL
OK
ERR
298
ROW
COL
OK
ERR
Reset
Reset
Frees memory associated with most recent simulation run.
It is not normally necessary to use this command unless available memory is low and is
needed for plotting graphs or other applications. Note that Reset does not delete the
data generated by a simulation only the internal data structures set up to perform a run.
These are automatically deleted at the beginning of a new run.
Any graph curves created by fixed probes (i.e. .GRAPH controls) will be updated
when this command is executed.
SaveRhs
SaveRhs [/nodeset] filename
Creates a file containing every node voltage, inductor current and voltage source
current calculated at the most recent analysis point. The values generated can be read
back in as nodesets to initialise the dc operating point solution.
/nodeset
filename
Set
Set [/temp] [option_spec [option_spec...]]
Defines an option.
/temp
299
Users Manual
restored to its original value when control returns to the
command line. (i.e when all scripts have completed).
option_spec
See Also
Options on page 330
Unset on page 301
Show
Show [/file filename] [/append filename] [/noindex] [/noHeader] [/plain]
[/force] [/clipboard] [/names names] [/width width] expression
[expression ...]
Displays the value of an expression. This command can be used to export data from the
simulator in ASCII form. See Data Import and Export on page 280 for more details.
300
/file filename
/append filename
/noindex
If the vector has no reference, the index value for each element
is output if this switch is not specified.
/noHeader
/plain
/force
/clipboard
/names names
/width width
expression
Unset
UnSet [/temp] option_name
/temp
Deletes specified option. See Options on page 330 for a full explanation.
Note that some Option values are internal. This means that they always have a value. If
such an option is UnSet, it will be restored to its default value and not deleted. See
Options on page 330 for more details.
Function Summary
The following table lists a small selection of the functions available with SIMetrix.
Full documentation for these is provided in the Script Reference Manual. This is
available as a PDF file on the install CD.
Function name
Description
Page
no.
abs(real/complex)
Absolute value
303
arg(real/complex)
304
arg_rad(real/complex)
atan(real/complex)
Arc tangent
304
cos(real/complex)
Cosine
304
db(real/complex)
304
diff(real)
304
exp(real/complex)
Exponential
304
fft(real [, string])
304
305
Floor(real)
305
301
Users Manual
302
Function name
Description
Page
no.
GroupDelay(real/complex)
Histogram(real, real)
306
306
im, imag(real/complex)
308
integ(real)
308
Interpolates argument to
specified number of evenly
spaced points
308
IsComplex(any)
308
length(any)
308
ln(real/complex)
Natural logarithm
308
log, log10(real/complex)
Base 10 logarithm
309
mag, magnitude(real/complex)
310
maxidx(real/complex)
310
310
mean(real/complex)
310
311
minidx(real/complex)
311
311
norm(real/complex)
ph, phase(real/complex)
312
phase_rad(real/complex)
312
312
Function name
Description
Page
no.
re, real(real/complex)
312
Ref(real/complex)
312
Rms(real)
312
rnd(real)
313
RootSumOfSquares(real [, real,
real])
313
sign(real)
313
sin(real/complex)
Sine
313
sqrt(real/complex)
Square root
313
tan(real/complex)
Tangent
313
313
unitvec(real)
vector(real)
314
Function Reference
Only a few of the approx. 200 functions are documented here. For the rest, please refer
to the Script Reference Manual. This is available as a PDF file on the install CD. A
hardcopy version is also available for an additional charge. The ones detailed here are
the functions that accept and return numeric values and that could conceivably used for
graph plots.
abs(real/complex)
Returns absolute value or magnitude of argument. This function is identical to the
mag() function.
303
Users Manual
arg(real/complex)
Same as phase() (page 312) except the result wraps at 180/-180 degrees.
arg_rad(real/complex)
Same as phase_rad() (page 312) except the result wraps at pi/-pi radians.
atan(real/complex)
Returns the arc tangent of its argument. If degrees option is set return value is in
degrees otherwise radians.
cos(real/complex)
Return cosine of argument in radians. Use cos_deg if the argument is in degrees.
db(real/complex)
Returns 20*log10(mag(argument))
diff(real)
Returns the derivative of the argument with respect to its reference (x-values). If the
argument has no reference the function returns the derivative with respect to the
argument's index - in effect a vector containing the difference between successive
values in the argument.
exp(real/complex)
Returns e raised to the power of argument. If the argument is greater than 709.016, an
overflow error occurs.
fft(real [, string])
Arg1
Vector to be processed
Arg2
Performs a Fast Fourier Transform on supplied vector. The number of points used is
the next binary power higher than the length of argument 1. Excess points are zerofilled. Window used may be Hanning (default) or None.
Users should note that using this function applied to raw transient analysis data will not
produce meaningful results as the values are unevenly spaced. If you apply this
function to simulation data, you must either specify that the simulator outputs at fixed
intervals (select the Output at interval option in the Choose Analysis dialog box) or you
must interpolate the results using the Interp() function - see page 308. (The FFT
plotting menu items run a script which interpolate the data if it detects that the results
304
Vector to be filtered
Filter coefficients
Arg3
Performs Finite Impulse Response digital filtering on supplied vector. This function
performs the operation:
yn = xn . c0 + xn-1 . c1 + xn-2 . c2 ...
Where:
x is the input vector (argument 1)
c is the coefficient vector (argument 2)
y is the result (returned value)
The third argument provide the history of x i.e. x-1, x-2 etc. as required.
The operation of this function (and also the IIR() function) is simple but its application
can be the subject of several volumes! Below is the simple case of a four sample
rolling average. In principle an almost unlimited range of FIR filtering operations may
be performed using this function. Any text on Digital Signal Processing will provide
further details.
Users should note that using this function applied to raw transient analysis data will not
produce meaningful results as the values are unevenly spaced. If you apply this
function to simulation data, you must either specify that the simulator outputs at fixed
intervals (select the Output at interval option in the Choose Analysis dialog box) or you
must interpolate the results using the Interp() function - see page 308
Example
Suppose a vector VOUT exist in the current group (simulation results). The following
will plot VOUT with a 4 sample rolling average applied
Plot FIR(vout, [0.25, 0.25, 0.25, 0.25])
Floor(real)
Returns the argument truncated to the next lowest integer. Examples
Floor(3.45) = 3
305
Users Manual
Floor(7.89) = 7
Floor(-3.45) = -4
GroupDelay(real/complex)
Returns the group delay of the argument. Group delay is defined as:
d ( phase ( y )) 1
.
dx
2.
where y is the supplied vector and x is its reference. The GroupDelay() function
expects the result of AC analysis where y is a voltage or current and its reference is
frequency.
This function will yield an error if its argument is complex and has no reference.
Histogram(real, real)
Arg1
Arg2
Vector
Number of bins
Test
Arg2
Arg3
306
Vector to be filtered
Coefficients
Arg3
Performs Infinite Impulse Response digital filtering on supplied vector. This function
performs the operation:
yn = xn . c0 + yn-1 . c1 + yn-2 . c2 ...
Where:
x is the input vector (argument 1)
c is the coefficient vector (argument 2)
y is the result (returned value)
The third argument provide the history of y i.e. y-1, y-2 etc. as required.
The operation of this function (and also the FIR() function) is simple but its application
can be the subject of several volumes! In principle an almost unlimited range of IIR
filtering operations may be performed using this function. Any text on Digital Signal
Processing will provide further details.
Users should note that using this function applied to raw transient analysis data will not
produce meaningful results as the values are unevenly spaced. If you apply this
function to simulation data, you must either specify that the simulator outputs at fixed
intervals (select the Output at interval option in the Choose Analysis dialog box) or you
must interpolate the results using the Interp() function - see page 308
Example
The following graph shows the result of applying a simple first order IIR filter to a
step:
The coefficients used give a time constant of 10 * the sample interval. In the above the
sample interval was 1Sec so giving a 10Sec time constant. As can be seen a first
order IIR filter has exactly the same response as an single pole RC network. A general
first order function is:
yn = xn . c0 + yn-1 . c1
where c0=1-exp(-T/)
and c1=exp(-T/)
and =time constant
and T=sample interval
The above example is simple but it is possible to construct much more complex filters
using this function. While it is also possible to place analog representations on the
circuit being simulated, use of the IIR function permits viewing of filtered waveforms
after a simulation run has completed. This is especially useful if the run took a long
time to complete.
307
Users Manual
im(real/complex), imag(real/complex)
Returns imaginary part of argument.
integ(real)
Integrates the argument with respect to its reference (x-values).
The function uses simple trapezoidal integration.
An error will occur if the argument supplied has no reference.
Vector to be interpolated
Number of points in result
Arg3
Arg4
Interpolation order
(Boolean) include last point
IsComplex(any)
Returns 1 (=TRUE) if the supplied argument is complex and 0 (=FALSE) if the
argument is any other type
length(any)
Returns the number of elements in the argument. The result will be 1 for a scalar and 0
for an empty value.
The length() function is the only function which will not return an error if supplied
with an empty value. Empty variables are returned by some functions when they cannot
produce a return value. All other functions and operators will yield an error if
presented with an empty value and abort any script that called it.
ln(real/complex)
Returns the natural logarithm of the argument.
308
log10(real/complex), log(real/complex)
Returns log to base 10 of argument. In general, we recommend using log10 rather than
log. Software products of all types vary in their interpretation of log(). Some treat it as
log to the base 10 and others treat it as log to the base e. By using log10() there will
never be any doubt.
Using log10() with Negative or Complex Values
See notes above under ln() function
Using log10() with AC Analysis Data
The data output by the simulator when running an AC or TF analysis is complex. As
described in Using ln() with Negative or Complex Values above, all SIMetrix
logarithm functions correctly handle complex arguments and return a complex value.
This means that the following expression to calculate dB will not produce the expected
result:
20*log(data)
where data is a value produced by an AC analysis simulation. What you should do is:
20*log(mag(data))
The mag() function will convert the complex data to real values which is actually what
is intended. Better still use:
db(data)
309
Users Manual
Note that the graph system will always plot the magnitude of complex data. But, any
expression presented for plotting will be evaluated as complex and only the final result
is converted to real. So 20*log(data) will be plotted as mag(20*log(data)). This is not
the same as 20*log(mag(data)) when data is complex.
mag(real/complex), magnitude(real/complex)
Returns the magnitude of the argument. This function is identical to the abs() function.
maxidx(real/complex)
Returns index of the array element in argument 1 with the largest magnitude.
Vector
Minimum value. Default -
Arg3
Returns an array of values holding every maximum point in the supplied vector whose
value is above argument 2. The value returned - if noInterp is not specified - is
obtained by fitting a parabola to the maximum and each point either side then
calculating the x,y location of the point with zero slope. If noInterp is specified, the
peak values are those found in argument 1 without any interpolation. The vector
returned by this function has an attached reference which contains the x values of the
maximum points. If xSort is not specified, the vector is arranged in order of descending
y values i.e. largest y value first, smallest last. Otherwise, they are organised in
ascending x-values.
Vector
Start x value
Arg3
End x value
Returns the largest value found in the vector in the interval defined by start x value and
end x value. If the vector is complex the operation will be performed on the magnitude
of the vector.
mean(real/complex)
Returns the average of all values in supplied argument. If the argument is complex the
result will also be complex.
310
Vector
Start x value. Default: start of vector
Arg3
Returns the integral of the supplied vector between the ranges specified by arguments
2 and 3 divided by the span (= arg 3 -arg 2). If the values supplied for argument 2
and/or 3 do not lie on sample points, second order interpolation will be used to
estimate y values at those points.
minidx(real/complex)
Returns index of the array element in argument 1 with the smallest magnitude.
Vector
Maximum value. Default +
Arg3
Returns array of values holding every minimum point in the supplied vector whose
value is below argument 2. The value returned - if noInterp is not specified - is
obtained by fitting a parabola to the minimum and each point either side then
calculating the x,y location of the point with zero slope. If noInterp is specified, the
values are those found in argument 1 without any interpolation. The vector returned by
this function has an attached reference which contains the x values of the minimum
points. If xSort is not specified, the vector is arranged in order of ascending y values
i.e. smallest y value first, largest last. Otherwise, they are organised in ascending x
values.
Vector
Start x value
Arg3
End x value
Returns the smallest value found in the vector in the interval defined by start x value
and end x value. If the vector is complex the operation will be performed on the
magnitude of the vector.
norm(real/complex)
Returns the input vector scaled such that the magnitude of its largest value is unity. If
the argument is complex then so will be the return value.
311
Users Manual
ph(real/complex), phase(real/complex)
Returns the phase of the argument. ph() is identical to phase() and return the phase in
degrees.
The ph() and phase() functions produces a continuous output i.e. it does wrap from 180
degrees to -180 degrees.
phase_rad(real/complex)
Identical to ph() and phase() functions except that the result is in radians.
Vector
Start index. Default: 0
Arg3
Returns a vector which is a range of the input vector in argument 1. The range extends
from the indexes specified by arguments 2 and 3. If argument 3 is not supplied the
range extends to the end of the input vector. If neither arguments 2 or 3 are supplied,
the input vector is returned unmodified.
re(real/complex), real(real/complex)
Returns the real part of the complex argument.
Ref(real/complex)
Returns the reference or x-values of the argument.
Rms(real)
Returns a vector of the accumulative RMS value of the input. Unlike RMS1() this
function returns a vector which can be plotted.
Vector
Start x value. Default: start of vector
Arg3
Returns the root mean square value of the supplied vector between the ranges specified
by arguments 2 and 3. If the values supplied for argument 2 and/or 3 do not lie on
sample points, second order interpolation will be used to estimate y values at those
points.
312
rnd(real)
Returns a vector with each element a random value between 0 and the absolute value
of the argument's corresponding element.
Vector
Start x value. Default: start of vector
Arg3
Similar to RMS1 function but returns the root of the sum without performing an
average.
sign(real)
Returns 1 if argument is greater than 0 otherwise returns 0.
sin(real/complex)
Return sine of argument in radians. Use sin_deg if the argument is in degrees.
sqrt(real/complex)
Returns the square root of the argument. If the argument is real and negative, an error
will result. If however the argument is complex a complex result will be returned.
tan(real/complex)
Return tan of argument in radians. Use tan_deg if the argument is in degrees.
Data
Start x Value
Arg3
End x value
Returns a portion of the input vector with defined start and end points. Interpolation
will be used to create the first and last points of the result if the start and end values do
not coincide with actual points in the input vector.
Arguments 2 and 3 define the beginning and end of the vector.
313
Users Manual
Example
Suppose we have a vector called VOUT which was the result of a simulation running
from 0 to 1mS. We want to perform some analysis on a portion of it from 250S to
750S. The following call to Truncate would do this:
Truncate(VOUT, 250u, 750u)
If VOUT did not actually have points at 250S and 750S then the function would
create them by interpolation. Note that the function will not extrapolate points before
the start or after the end of the input vector.
unitvec(real)
Returns a vector consisting of all 1's. Argument specifies length of vector.
vector(real)
Returns a vector with length specified by the argument. The value in each element of
the vector equals its index.
Input vector
Y value
Arg3
Arg4
Interpolation order (1 or 2)
Direction of slope. 0 = any, 1 = +ve, -1 = -ve
Returns an array of values specifying the horizontal location(s) where the specified
vector (argument 1) crosses the given y value (argument 2) in the direction specified by
argument 4. If the vector never crosses the given value, an empty result is returned.
The sampled input vector is interpolated to produce the final result. Interpolation order
is specified by argument 3.
XY(real, real)
Returns a vector with y-values of argument 1and x-values of argument 2. This function
provides a means of creating X-Y plots using the .GRAPH control. See the Command
Reference chapter of the Simulator Reference Manual for details.
Input vector
Arg2
Arg3
Y value
Interpolation order
Returns an array of values (usually a single value) specifying the vertical value of the
specified vector (argument 1) at the given x value (argument 2). If the given x-value is
314
315
Users Manual
An Example
Consider the following active filter circuit.
6.2n
10%
8.2n
10%
VOUT
C1
V1
ac 1
33k
1%
33k
1%
33k
1%
R7
R1
R2
10%
C2
2.7n
X2
TL072
C4
VP
33k
1%
33k
1%
R3
R6
X1
VN
10%
C3
180p
TL072
VP
VN
10%
C5
62p
316
1
100m
X1-out / V
10m
1m
100
10
1
1k
2k
4k
10k
20k
40k
100k
Frequency / Hertz
This circuit is to be used in an application that requires the gain of the amplifier to
remain within 2dB of the dc value from 0 to 6kHz. A 1dB ripple specification therefore
seems a reasonable choice. Clearly though the tolerance of the capacitors and resistors
may upset this. To investigate, a Monte Carlo analysis is required. The standard
component tolerances are 10% for capacitors and 1% for resistors. With the example
circuit the tolerances are already applied but the procedure for doing this is as follows:
1.
2.
3.
4.
Enter 10%.
The example circuit has already been set up to run 100 steps of Monte Carlo. To view
the settings:
1.
2.
Note in the section Monte Carlo and Multi-step Analysis the Enable multi-step box
is checked.
3.
4.
Note that in the Sweep Mode section, Monte Carlo is selected and in the Step
Parameters section Number of steps has been set to 100.
Start the analysis in the usual way. It takes about 2.5 seconds with a 1.5G P4.
The analysis will be repeated 10 times. Now plot the output of the filter in the usual
way (Probe AC/Noise|dB - Voltage...). The result is the following:
317
Users Manual
dbV @ X1-inn / dB
-2
-4
-6
-8
-10
4k
6k
8k
Frequency / Hertz
Seed selection to allow repeated runs with same randomly applied values.
318
1.
2.
Model Tolerances
Refer to the Simulator Reference Manual for full details.
Matching Devices
Some devices such as resistor networks are constructed in a manner that their
tolerances track. Such devices often have two specifications one is an absolute
tolerance and the other a matching tolerance. A thin film resistor network might have
an absolute tolerance of 1% but a matching tolerance of 0.05%. This means that the
resistors will vary over a +/-1% range but will always be within +/-0.05% of each
other.
To specify matched devices for Monte Carlo analysis two pieces of information are
required. Firstly, the components that are matched to each other must be identified and
secondly their matching tolerances need to be specified.
To Identify Matched Devices
Select the components you wish to match to each other. (Use control key to select
multiple components.)
You must now supply a lot name which must be unique. You can use any
alphanumeric name.
Matching Tolerances
To specify device match tolerances, proceed as follows:
Select the components you wish to match to each other. (Use control key to select
multiple components.)
319
Users Manual
If using device tolerance parameters, note that any absolute tolerance specified must be
the same for all devices within the same lot. Any devices with the same lot name but
different absolute tolerance will be treated as belonging to a different lot. For example
if a circuit has four resistors all with lot name RN1 but two of them have an absolute
tolerance of 1% and the other two have an absolute tolerance of 2%, the 1% resistors
won't be matched to the 2% resistors. The 1% resistors will however be matched to
each other as will the 2% resistors. This does not apply to match tolerances. It's
perfectly OK to have devices with different match tolerances within the same lot.
Random Distribution
The default distribution for device tolerances is Gaussian with the tolerance
representing a 3 spread. This can be changed to rectangular using two simulator
options. These are
MC_ABSOLUTE_RECT
MC_MATCH_RECT
Distributions can be specified on a per component basis or even a per parameter basis
by using distribution functions in an expression. See the Monte Carlo Analysis
chapter of the Simulator Reference Manual for details.
2.
1. above is applicable to AC, DC, Noise and Transfer Function analyses. 2. can be
applied to the same analyses in addition to transient analysis.
An example of 1. can be seen on page 181. This was a run where the gain at a single
frequency was calculated 1000 times with the Monte Carlo tolerances applied. This
used AC analysis with the Monte Carlo sweep mode - one of the six modes available.
Only a single curve is created hence the name single step
An example of 2 is the example at the beginning of this chapter. Here a complete
frequency sweep from 1kHz to 100kHz was repeated 100 times creating 100 curves.
Select schematic menu Simulator|Choose Analysis.... Select the AC, DC, Noise or
TF tab as required.
320
2.
3.
In the Parameters section enter the required value for the Number of points.
5.
For AC, Noise and TF, you must also supply a value for Frequency.
Select schematic menu Simulator|Choose Analysis.... Select the AC, DC, Noise,
Transient or TF tab as required.
2.
3.
In the Monte Carlo and Multi-step Analysis section, check the Enable multi-step box
then press the Define... button. This will open:-
4.
5.
321
Users Manual
2.
Select Options tab and enter the seed value in the Monte Carlo section.
The first run of each Monte Carlo analysis will use the same random values as the run
from which you obtained the seed value in the log file. Note this assumes that only
changes in values are made to the circuit. Any topology change will upset the
sequence.
This technique is a convenient way of investigating a particular run that perhaps
produced unexpected results. Obtain the seed used for that run, then repeat with the
seed value but doing just a single run. You will then be able to probe around the circuit
and plot the results for just that run.
2.
Pick up the main cursor (the one with the short dashes) and place it on the curve
of interest. (To pick up a cursor, place mouse cursor at intersection, press left key
and drag).
3.
Select Show Curve Info menu. Information about the curve will be displayed in
the command shell.
The information of interest here is the Run number. With this you can look up in the
log file details of the run i.e. what values were used for each component and parameter.
You can also obtain the seed value used so that the run can be repeated. See Setting
the Seed Value on page 321.
Plotting a single Curve
If you wish to plot a single curve in a Monte Carlo set, you must obtain the run number
then use the Probe|Add Curve... menu to plot an indexed expression. We use an
example to explain the process.
Using the Chebyshev filter example, let's suppose that we wish to plot the curve of the
filter output created by run 49 alone without the remaining curves. Proceed as follows.
322
Run the chebyshev filter example as explained at the beginning of this chapter.
2.
3.
Click on the output of the filter. You should see C4_P entered in the Y expression
box.
4.
You must now modify the expression you have entered to give it an index value.
For the simple case of a single voltage or current just append it with
[index]
where index is the run number less 1. In this example the run number is 49 so we
enter 48 for the index. You should now have:
C4_P[48]
An alternative method of plotting single curves is given in Setting the Seed Value on
page 321.
Creating Histograms
See Performance Analysis and Histograms on page 265.
323
Users Manual
Saving a Session
Select menu File | Save Session.
Restoring a Session
You can only restore a session if all graphs and schematics are closed and there is no
current simulation data loaded. This is the normal state when SIMetrix has just been
started. If you wish to restore a session when SIMetrix has been in use since first
starting, you can either shut down and restart, or close all windows and graphs then
select menu Graphs and Data | Delete Data Group..., press Select All, then Ok.
To restore the session, select menu File | Restore Session
324
Definition
There are two types of symbolic constant. These are system constants and user
constants. system constants are pre-defined while user constants can be arbitrarily
defined by the user. There are currently 7 system constants. These are:
STARTPATH
DOCSPATH
EXEPATH
APPDATAPATH
TEMPPATH
Path of the root support directory used for various support files
used by SIMetrix such as model and symbol libraries.
User constants must be defined in the configuration file. See Configuration Settings
on page 328 for more information. User constants are defined in the [Locations]
section of the file. Currently these must be added by hand using a text editor.
The format used is as follows:
[Locations]
symbol_definitions
Where symbol_definitions is any number lines of the form:
symbolname=symbolvalue
symbolvalue may be any sequence of characters that are valid for a system path name
and may contain spaces. There is no need to enclose it in quotation marks even if the
value contains spaces. Nested definitions to any level are permitted. That is
symbolvalue may also itself use other symbolic constants. Recursive definitions won't
raise an error but will not be meaningful.
UNC paths (e.g. \\server\c\project) may be used for symbolvalue.
Comments may be added to the project file prefixed with a semi-colon.
325
Users Manual
326
/s startup_script
/i
/n
/c config_location
327
Users Manual
settings
The REG; syntax available with earlier versions is no longer
supported.
/f features
Using startup.ini
Start-up parameters can also be specified in a file called startup.ini. On Windows this
must be located in the same directory as SIMetrix.exe. On Linux the file must be
located at $HOME/.simetrix/startup.ini. The format of the file is as follows:
[StartUp]
settings
settings can be any combination of the following:
StartupScript=startup_script (equivalent to /s on command line)
UsePrevInst= (equivalent to /i on command line)
InhibitSplash= (equivalent to /n on command line)
ConfigLoc=config_location (equivalent to /c on command line)
Features=features (equivalent to /f on command line)
Configuration Settings
Overview
SIMetrix, in common with most applications, needs to store a number of values that
affect the operation of the program. These are known as configuration settings.
Included among these are the locations of installed symbol libraries, installed model
libraries, font preferences, colour preferences and default window positions.
(windows)
simetrix_app_data_dir/config/Base.sxprj
(linux)
328
sys_application_data_dir
is a system defined location.
The following table shows typical locations for all supported Windows systems:
Operating
System
Path
Windows 2000
Windows XP
Windows Vista
C:\Users\username\AppData\Roaming
username is the log on name currently being used. The above are only typical locations
on English language versions of Windows. The user or system administrator may
move them and also the names used may be different for non-English versions of
Windows.
With full versions of SIMetrix, you can locate the SIMetrix application data directory
by typing the following command at the command line:
Show TranslateLogicalPath('%sxappdatapath%')
329
Users Manual
Options
Overview
There are a number of options affecting all aspects of SIMetrix. Many of these may be
viewed and adjusted using the Options dialog box, others can only be accessed from
the command line using the Set and UnSet commands.
Schematic Sheet
Undo Level
Placement
330
Wiring
Edit Mode
Graph Printing
Axis line width
331
Users Manual
Start
Curve weight
332
Displays a flat line for the width of each bin. Similar to a bar
graph
Smooth
Start up
333
Users Manual
Temp Data
Built-in Scripts
This is the first location that SIMetrix searches for scripts. Much
of the user interface is implemented with scripts and these are
all internal to the program. These can be overridden by placing
scripts of the same name at this location. This allows
modification of the UI. Changing this setting has no effect until
you restart SIMetrix.
Start up Script
Editor
PSpice inifile
Set this file location if you wish to use the PSpice Schematics
translator. See PSpice Schematics Translation on page 118 for
more information.
334
Schematic Components
Extensions used by schematic component files.
Data Files
Text files
Symbol Files
Scripts
Device models
Device catalogs
335
Users Manual
Name
Type
Description
700Extensions
AlwaysUseMarkers
AnnoMinSuffix
Numeric Default = 1
Minimum suffix used for
automatic generation of
schematic component
references
AutoStartWire
Options
Boolean Default=False
dialog
Only effective if
AutoWireEnabled is False.
Selects mode whereby a
wire is started when the
cursor is brought close to a
pin or wire termination.
This mode is on
automatically when
AutoWireEnabled is True
AutoWireEnabled
Boolean Default=True
Smart wiring is on if this is
True
User
interface
support
Options
dialog
Options
dialog
Options
Controls whether the smart dialog
wire algorithm is allowed to
route wires through
existing wires that connect
to the destination or target
AxisPrintWidth
336
Options
dialog
Name
Type
BiasAnnoPrecision
Numeric Default=6
Options
Precision of values
dialog
displayed for schematic DC
bias annotation
BiScriptDir
Text
BuildAssociations
Text
Default=ask
See Auto Configuration
Options on page 350
BuildModelLibs
Text
Default=ifempty
See Auto Configuration
Options on page 350
BuildPreferenceSettings
Text
Default=askmigrate
See Auto Configuration
Options on page 350
BuildSymbolLibs
Text
Default=ifempty
See Auto Configuration
Options on page 350
CachePathSymbols
Boolean Default=false
If true, SIMetrix will cache
symbolic paths
unsupported
CancelOnFocusLost
Description
User
interface
support
No
Boolean Default = True on
Windows, False on Linux
When true, interactive
actions are cancelled when
the window focus is lost.
This can cause problems if
the environment is set up
with Point to give focus as
moving the mouse outside
the active window then
cancels the users action.
Point to give focus is
available on Linux
systems.
337
Users Manual
Name
Type
Description
CursorDisplay
Text
User
interface
support
Display on graph
only
StatusBar Display on status
bar only
Both
Display on both
graph and status
bar
Graph
CurvePrintWidth
CurveWeight
Options
Numeric Default = 1
Sets the line width in pixels dialog
of graph curves. Note that
although widths greater
than 1 are clearer they
normally take considerably
longer to draw. This does
however depend on the
type of adapter card and
display driver you are
using.
DataGroupDelete
Text
Default = OnStart
Options
dialog
Determines when
temporary simulation data
is deleted. Possible values,
Never, OnStart, OnClose
and OnDelete.
SeeGraph/Probe/Data
Analysis on page 331 for
details.
DefaultLib
Text
Default=%SHAREPATH%/
SymbolLibs/default.sxslb
Name and location of
default symbol library
338
Options
dialog
Name
Type
Description
DevConfigFile
Text
Default=%SHAREPATH%/
DeviceConfig.cfg
User
interface
support
DisplaySimProgressMessage
Boolean Default=False
If true, a message will be
displayed in the command
shell indicating the start
and end of a simulation
EchoOn
Options
dialog
Editor
Text
Default = NOTEPAD.EXE
Default text editor.
Options
dialog
ExportRawFormat
Text
Default = SPICE3
Possible values, SPICE3,
SPECTRE and OTHER.
Controls format of raw
output. See Exporting
SPICE3 Raw Files on
page 281
No
GlobalCatalog
Text
Default=%SHAREPATH%/
all
unsupported
Location and base name of
global catalog file. (usually
referred to as ALL.CAT).
339
Users Manual
340
Name
Type
Description
GridPrintWidth
GroupPersistence
No
Numeric Default = 3
Sets the number of groups
that are kept before being
deleted. See Plotting the
Results from a Previous
Simulation on page 241
HideSchematicGrid
Options
dialog
HighlightIncrement
Numeric Default = 1
Highlighted graph curves
are thicker than normal
curves by the amount
specified by this option
No
HistoCurveStyle
Text
InhibitAutoCD
No
Boolean The current working
directory is automatically
changed to the displayed
schematic when you switch
schematic tabs. Set this
option to disable this
feature.
InvertCursors
Boolean Default=false
If true, schematic and
graph mouse cursors are
modified to be suitable for
use on a black background
LibraryDiagnostics
Text
User
interface
support
Default=stepped
Options
Sets histogram curve style dialog
Default = Full
Possible values, Partial,
None and Full. Affects
progress information
displayed during model
library searching.
Options
dialog
Name
Type
MaxVectorBufferSize
Numeric Default=32768
See the Simulator
Reference Manual for a full
explanation
MinGridHeight
MinorGridPrintWidth
Numeric Default=0.05
Print width in mm of
graphs minor grid
Options
dialog
MRUSize
Numeric Default = 4
Number of items in
File|Reopen menu.
Options
dialog
NewModelLifetime
Numeric Default=30
Number of days that user
installed models remain
displayed in the * Recently
Added Models * parts
browser category
NoEditPinNamesWarning
Boolean Default=false
If true, the warning given
when using the Edit Pin
Names button in the
associate models dialog
box is inhibited
unsupported
Description
User
interface
support
NoInitXaxisLimits
Boolean Default=false
Inverse of default value of
the initxlims parameter of
the .GRAPH statement.
See Simulator Reference
Manual for details
NoKeys
341
Users Manual
Name
Type
NoMenu
Options
Boolean If on, the default menu
definitions will be disabled dialog
and no menu bar will
appear. This will not take
affect until the next session
of SIMetrix.
NoStopOnError
NoStopOnUnknownParam String
Description
User
interface
support
Options
dialog
OldUserCatalog
unsupported
342
Text
Default=%sxappdatapath% No
/user
Location and base name
without extension of user
catalog file used by
versions 5.2 and earlier.
This file is used to populate
the current user catalog file
Name
Type
OmitAsciiRevision
Boolean Default=false
No
If true, the revision value is
not written to ASCII
schematic files. For
backward compatibility.
unsupported
Description
User
interface
support
OpenIntro
PassUnresTemplate
Boolean Default=false
No
If true, unresolved template
values in netlists will be
passed literally. Default
behaviour is no output
unsupported
Check
box in
Welcome
dialog
Precision
Numeric Default = 10
Precision of numeric
values displayed using
Show command.
No
PrintOptions
Text
Print
dialog
PrintWireWidth
Numeric Default=5
Width in pixels of
schematic wires when
printed
ProbeStartDelay
Numeric Default = 1
Options
Delay after start of
dialog
simulation run before fixed
probe graphs are first
opened.
ProbeUpdatePeriod
Options
dialog
PSpiceIniPath
Text
Option
dialog
RebuildConfig
Boolean Default=true
See Auto Configuration
Options on page 350
No
No
343
Users Manual
344
Name
Type
Description
User
interface
support
RepeatPlace
Text
Default = Toolbar
Controls when schematic
placement is repeated.
Possible values, Always,
Toolbar (toolbar symbols
only) and Never.
Options
dialog
SchematicEditMode
Text
Options
Default=NoSnap
Schematic behaviour when dialog
double clicking. If set to
Classic a wire is started. If
set to NoSnap a script
defined by
SchemDoubleClickScript is
called. Standard behaviour
is to edit a component if
mouse is located inside
one
SchematicMoveMode
Text
Options
Default=ClassicMode
Controls wiring behaviour dialog
with schematic move
operations. Values are
ClassicMove, GrowWire
and Orthogonal. See Edit
Modes on page 77 for
details
SchematicReadOnly
Boolean Default=false
If set all schematics are
opened in read only mode
SchemDoubleClickScript
Text
Default=on_schem_double
_click /ne
Script that is called when a
double click action is
detected in the schematic.
Only active if
SchematicEditMode=
NoSnap
ScriptDir
Text
Options
Directory used to search
for scripts and symbol files dialog
if not found in the current
directory. Changes to this
option do not take effect
until next session.
No
Name
Type
Description
SimDataGroupDelete
Text
No
Default=Never
Same as DataGroupDelete
(see page 338) when
simulator is run
independently. I.e. not
called from the front end
SIMPLISComponentButtons
Text
User
interface
support
menu
SIMPLISPath
Text
Default=%EXEPATH%/sim No
plis.exe
Path of SIMPLIS binary
StartUpDir
Text
StartUpFile
Text
StatusUpdatePeriod
SymbolsDir
Text
Default=%SHAREPATH%/ Option
SymbolLibs
dialog
Path of directory where
system symbol libraries are
located.
TempDataDir
Text
Options
dialog
345
Users Manual
346
Name
Type
Description
TotalVectorBufferSize
TranscriptErrors
Boolean Default=false
If true, incorrectly typed
commands will be entered
in the history box. (The
drop down list in the
command line that shows
previously entered
commands)
UndoBufferSize
Numeric Default = 10
Options
Number of levels of
dialog
schematic undo. See
Creating a Schematic on
page 51
UpdateClosedSchematics
UpdateCurvesNoDeleteOld
Boolean Default=false
If true, old curves are not
deleted when using the
Update Curves feature.
Plot |
Update
Curve
Settings
UpdateCurvesNoFixSelected
Boolean Default=false
If true update includes
selected curves when
using the Update Curves
feature
Plot |
Update
Curve
Settings
UseAltGraphPrintStyles
Options
dialog
UseGreekMu
Boolean Default=false
If true, the u used to
denote 10e-6 will be
displayed as a greek in
graph axis labels
No
User
interface
support
Name
Type
UseNativeXpSplitters
No
Boolean Default=false
The standard splitter bar
in windows XP is flat and
usually not visible. In some
SIMetrix windows the
standard style has been
bypassed in order to make
these visible. For example
the legend panel in graphs.
Set this option to true to
revert to standard XP
behaviour. You may need
to use this if using a non
standard XP theme
UserCatalog
Text
Default=%sxappdatapath% No
/user_v2
Location and base name
without extension of the
user catalog file
UserScriptDir
Text
UserSymbolsDir
Text
UserSystemSymbolDir
Text
Default=%sxappdatapath% No
/SysSymbols
Location of symbol libraries
containing edits to system
symbols
UseSmallGraphCursor
Boolean Default=false
Cursors |
If true, a small graph cursor Cursor
will be used instead of the Style
full crosshair
unsupported
Description
User
interface
support
347
Users Manual
Name
Type
Description
VertTextMode
Text
No
Default=Alt
Controls vertical text
display when copying
graphs to the Windows
clipboard. Default setting
has been found to be
reliable and it isnt usually
necessary to change it. If
you find a target application
does not display the y-axis
labels correctly, try values
of:
Normal (use a different
method to rotate text), Hide
(hides vertical text) or Horiz
(displays vertical text
horizontally).
WarnSubControls
Boolean Default=false
If true, a warning will be
issued if unexpected
simulator commands are
found in subcircuits.
No
WireWidth
No
WorkingCatalog
Text
unsupported
User
interface
support
Default=%sxappdatapath% No
/out
Location and basename
without extension of
working catalog file.
(OUT.CAT)
File Extension
The following options set default file extensions. See options dialog for more details.
348
Option name
Default
value
Description
CatalogExtension
cat
Catalog files
ComponentExtension sxcmp
DataExtension
sxdat;dat
Data files
GraphExtension
sxgph
LogicDefExtension
ldf
ModelExtension
lb;lib;mod;cir
SchematicExtension
sxsch;sch
Schematic files
ScriptExtension
sxscr;txt
Scripts
SnapshotExtension
sxsnp
SymbolExtension
lib
TextExtension
Toolbar Buttons
The buttons displayed on each of the standard toolbars are defined with an option
variable - that is one for each toolbar. The value of the option consists of a series of
semi-colon delimited button names. A complete list of button names and full
information concerning user defined toolbars can be found in the Script Reference
Manual. The toolbar option variable names are listed below.
Option name
Description
ComponentButtons
SchematicFileButtons
SymbolMainButtons
GraphMainButtons
349
Users Manual
What is Set Up
During this phase, the following is set up:
1.
2.
3.
4.
5.
Sets up default window positions according to the system screen resolution (only
if preference settings not migrated in 3.)
6.
Define default values for various fonts (only if preference settings not migrated
in 3.)
350
Option Name
RebuildConfig
true, false
BuildAssociations
BuildModelLibs
351
Users Manual
[Options]
name=value
For example:
[Options]
BuildSymbolLibs=merge
Skeleton Configuration File
The skeleton configuration file, if it exists, will be copied to base.sxprj if base.sxprj
does not exist.
The skeleton configuration file must be called skeleton.sxprj and be located in the
same directory as the executable file SIMetrix.exe (windows) or SIMetrix (Linux).
Installation - Customising
It isnt possible to customise the Windows install program. However, the SIMetrix
installer doesnt do much more than simply uncompress files to the chosen location. It
is therefore possible for you to create your own SIMetrix install process using a fresh
install tree as a source image. You can then add your own files to this including the
skeleton.sxprj file described above.
Fonts
Fonts for various components of SIMetrix may be selected using the font selection
dialog box. This is opened using the File|Options|Font... menu item.
Select the item whose font you wish to change the press Edit to select new font. Items
available are:
352
Command Line
F11 Window
Graph
Graph windows
Graph Caption
Legend Box
Message Window
Print Caption
Schematic
Schematic - annotation
Schematic - caption
353
Users Manual
the name (as in the list above) is stored with the schematic property. This means that if
you give a schematic file to a colleague, it may display differently on his machine
depending on how the font options are set up. So for this reason it is best to keep to the
allocated purpose for each font. Caption fonts should be large and possibly bold, free
text should be smaller etc. etc.
Startup Script
The startup script is executed automatically each time SIMetrix is launched. By default
it is called startup.sxscr but this name can be changed with in the options dialog box.
(File|Options|General...). The startup file may reside in the script directory (defined by
ScriptDir option variable) or in a user script directory (defined by UserScriptDir option
variable).
The most common use for the startup script is to define custom menus and keys but
any commands can be placed there.
To edit the startup script, select the File|Scripts|Edit Startup menu item.
354
Index
Index
.LIB 167
.OUT file 263
.PARAM 157
.param 157
700Extensions option variable 336
A
abs function 303
ABSTOL 195
AC sweep analysis 184
SIMPLIS 206
ALL.CAT 166
AlwaysUseMarkers option variable 336
Analog behavioural modelling
laplace 146
non-linear 145
Analog-digital converter 142
Analysis modes
AC sweep 184
choose analysis dialog 170
DC sweep 182
Monte Carlo sweep 181
multi-step 196
noise 185
operating point 177
options 194
pole-zero 193
real time noise 189
sensitivity 193
SIMPLIS 202
AC 206
Periodic operating point (POP) 204206
transient 202
specifying 58, 170
sweep modes 178182
sweeping devices 178
sweeping frequency 181
sweeping model parameters 179
355
Users Manual
sweeping parameters 179
sweeping temperature 179
transfer function 190
transient 172177
restarting 175
transient snapshots 175
AnnoMinSuffix options variable 336
APPDATAPATH system path 325
Application data directory 328
arg function 304
arg_rad function 304
atan function 304
AutoStartWire options variable 336
AutoWireEnabled options variable 336
AWAllowRouteThruConnected options variable 336
Axes
creating new 239
deleting 239
editing 240
reordering digital 241
selecting 239
AxisPrintWidth option variable 336
B
Bandwidth
function 272
Bias Point 263
BiasAnnoPrecision options variable 337
BiScriptDir option variable 326, 337
Blackman FFT window 227
Bode plot 215
BPBW function 272
BuildAssociations options variable 337
BuildModelLibs options variable 337
BuildPreferenceSettings options variable 337
BuildSymbolLibs options variable 337
Bus connections - see Schematic; bus connections
C
CachePathSymbols options variable 337
CancelOnFocusLost option variable 337
Capacitor
editing values 138
initial condition 139
non-linear 148
356
Index
sweeping 178
Catalog files 166
ALL.CAT 166
OUT.CAT 166
USER.CAT 166
CatalogExtension option variable 349
CentreFreq function 273
Chokes 134
see also Inductor
Choose analysis dialog 170
Circuit rules 53
Circuit stimulus 54
Clipboard
copying graphs 260
copying schematics 78
Colours, customising 352
Command history 284
Command line 284
maximum line length 285
Commands, full list 293
ComponentExtension option variable 349
Configuration settings 328
Core materials 134
cos function 304
Current
plotting 67, 68
Current source
controlled 141
fixed 141
sweeping 179
CursorDisplay option variable 338
Cursors, graph 244249
see also Graph cursors
CurvePrintWidth option variable 338
CurveWeight option variable 338
D
DataExtension option variable 349
DataGroupDelete 338
dB
function 304
plotting 68, 215, 220
DC sweep analysis 182
decscript property 106
DefaultLib option variable 326
357
Users Manual
DefaultLib options variable 338
Defining keys
DefKey command 293
Defining menus
DefMenu command 295
DelMenu command 297
DefKey command 293
Deleting schematic wires 72
DelMenu command 297
DevConfigFile options variable 339
Device power, probing 221
diff function 304
Differential voltage, probing 69
DigAxisHeight option variable 339
Digital-analog converter 142
Disconnecting schematic wires 52, 72
DisplaySimProgressMessage option variable 339
Distortion
calculating 254
DOCSPATH system path 325
Duplicate models 168
Duty function 273
E
EchoOn option variable 339
Editor option variable 339
EXEPATH system path 325
exp function 304
Exporting data 281
ExportRawFormat 339
Expressions 156
Extensions, file 334
F
Fall function 274
Fall time, calculating 254
Fast start, for transient analysis 174
ferrite 134
FFT
function 304
of selected curve 255
phase 225
plotting 224
File extensions 334
Filter response functions 147
358
Index
FIR function 305
Flipping schematic components 52, 71
Floor function 305
Fonts, customising 352
Fourier analysis 223227
Frequency
function 275
sweeping 181
with multi-step analysis 198
Functional modelling
arbitrary non-linear passive devices 148
generic ADCs and DACs 142
generic digital devices 143
laplace transfer function 146
non-linear transfer function 145
Functions, full list 301
G
Global nets 84
Global pins 84
GlobalCatalog options variable 339
Goal functions 270
full list 270272
Graph cursors 244249
changing styles 247
displaying 245
freezing 246
moving 245
moving to peak or trough 245
readout 247
Graph toolbar 214
GraphExtension option variable 349
Graphs 213
annotation 256260
AutoAxis 238
captions and free text 260
changing curve weight 332
changing digital axis height 332
copying to clipboard 260
creating new axes 239
creating new grids 239
cursors 244249
see also Graph cursors
deleting axes and grids 239
deleting curves 243
359
Users Manual
editing axes 240
hiding curves 243
highlighting curves 244
logarithmic 218, 233
measurements 249
moving curves 239
multiple y-axes 237
naming curves 243
plotting 213
printing options 331
saving and restoring 262
scrolling 255
selecting axes and grids 239
selecting curves 243
showing curves 243
zooming 255
GridPrintWidth option variable 340
Grids
creating new 239
deleting 239
reordering 241
Group curves, multi-step analysis feature 197
Group delay
plotting 220
GroupDelay
function 306
GroupPersistence option variable 241, 340
H
Hamming (FFT window) 227
handle property 106
Hanning (FFT window) 227
HideSchematicGrid option variable 340
Hierarchical schematics - see Schematic; hierarchical
HighlightIncrement option variable 340
HistoCurveStyle options variable 340
Histogram function 306
Histograms 267
HPBW function 275
I
if (template property keyword) 113
ifd (template property keyword) 114
Iff function 306
IIR function 307
360
Index
im function 308
Impedance, probing 221
Importing data 280
incscript property 106
Inductor
editing values 138
initial condition 139
mutual 137
non-linear 134, 148
sweeping 179
InhibitAutoCD option variable 340
Initial condition
capacitor 139
force resistance 195
inductor 139
inode (template property keyword) 110
Installation 16
integ function 308
Integration method 174
Interp function 308
InvertCursors option variable 340
IsComplex function 308
J
join (template property keyword) 114
join_num (template property keyword) 114
join_pin (template property keyword) 114
K
Keyboard 288
L
Laplace expression 147
length function 308
LibraryDiagnostics option variable 340
Licensing 19
network 20
stand alone 19
List file 263
ln function 308
log function 309
log10 function 309
LogicDefExtension option variable 349
lot property 106
LPBW function 276
361
Users Manual
M
mag function 310
mappednode (template property keyword) 109
mappedpinnames (template property keyword) 109
mapping property 106
match property 106
maxidx function 310
Maxima function 310
MaxVectorBufferSize option variable 341
MC_ABSOLUTE_RECT option variable 320
MC_MATCH_RECT option variable 320
Mean
function 310
Mean1 function 311
Menu reference 288
Message window 288
MinGridHeight option variable 341
minidx function 311
Minima function 311
Minimum function 311
MinorGridPrintWidth option variable 341
Mirroring schematic components 52, 71
Model libraries
.LIB 167
associating models with symbols 163
diagnostics 168
duplicates 168
importing to schematic 167
indexes 168
installing 47, 160
removing 163
SPICE to SIMPLIS conversion 128
model property 105, 153
ModelExtension option variable 349
Module port 81
Monte Carlo analysis 316
analysing results 322
distributions 320
example 316
plotting single curve 322
running 320
setting seed 196, 321
sweep 181, 320
tolerance
362
Index
device 318
matching 319
model 319
Moving schematic components 72
MRUSize option variable 341
Multiple schematic placement 80
N
Navigating hierarchical designs 82
netname property 106
Nets
global 84
NewModelLifetime option variable 341
node (template property keyword) 110
nodelist (template property keyword) 110
nodename (template property keyword) 110
NoEditPinNamesWarning option variable 341
NoInitXaxisLimits option variable 341
Noise analysis 185
plotting results 222
real time 189
NoKeys option variable 341
NoMenu option variable 342
norm function 311
NoStopOnError option variable 342
NoStopOnUnknownParam option variable 342
Nyquist, plots 220
O
OldUserCatalog option variable 342
OmitAsciiRevision option variable 343
OpenGroup command 297
OpenIntro option variable 343
Operating point analysis 177
viewing results 263
Options 330349
bus probes 228
colours 352
dialog box 330
fixed probe 216
fonts 352
SIMPLIS 206
simulator 194
variables
full list 335349
363
Users Manual
GroupPersistence 241
Set command 299
UnSet command 301
UpdateClosedSchematics 234
OUT.CAT 166
Overshoot
calculating 254
function 277
P
parallel (template property keyword) 113
Parameters 156
list file output 196
passing through hierarchy 86
passing through subcircuits 154
start up 327
sweeping 179
with multi-step analysis 198
params property 106
Parts browser 159
PassUnresTemplate option variable 343
Path names
symbolic 324
PeakToPeak function 278
Period function 278
Periodic operating point 204206
ph function 312
Phase
function 312
plotting 68, 215, 220
phase_rad function 312
pinlist (template property keyword) 110
pinnames (template property keyword) 110
Pins
global 84
Plotting
arbitrary expressions 229
noise analysis 222
results from earlier run 241
see also Probing
transfer function analysis 222
X-Y 230
Pole-zero analysis 193
viewing results 193
POP 204206
364
Index
Potentiometer 140
Precision option variable 343
PrintOptions option variable 343
PrintWireWidth option variable 343
ProbeStartDelay option variable 343
ProbeUpdatePeriod option variable 343
Probing 6669, 213, 214236
arbitrary expressions 69, 229
busses 227
device power 221
fixed 66, 215219
after run has started 219
changing update delay and period 219, 331
current 67
differential voltage 67, 69
in hierarchy 219
list of types 215
options 216
persistence 216
voltage 67
fixed vs random 214
fourier phase 225
fourier spectrum 223
impedance 221
in hierarchical designs 234
old results 241
random 67, 219236
busses 227
current 68
dB 68
fourier 223
functions 220
phase 68
voltage 68
results from earlier run 241
Properties - see Schematic; properties
PSP 203
PSpice schematic translator 118
configuring 118
opening schematics 119
symbol libraries 119
PSpiceIniPath option variable 326, 343
PulseWidth function 278
365
Users Manual
R
Random Probes 67
Range function 312
re function 312
ReadLogicCompatibility 298
real function 312
Real time noise analysis 189
RebuildConfig option variable 343
ref (template property keyword) 111
Ref function 312
ref property 105, 153
RELTOL 195
repeat (template property keyword) 111
RepeatPlace option variable 344
Reset command 299
Resistor
additional parameters 138
editing values 138
non-linear 148
sweeping 179
Restarting transient analysis 175
Rise function 279
Rise time, calculating 254
RMS
function 312
RMS1 function 312
rnd function 313
RootSumOfSquares function 313
Rotating schematic components 52, 71
Running simulation 65
basic steps 51
hierarchical designs 65
S
Saturation 134
SaveRhs command 299
Saving
graphs 262
simulation data 264
Schematic
annotating 78
bus connections 77
add 77
in hierarchy 83
probing 227
366
Index
ripper 77
wiring 78
checking 79
copy to clipboard 78
creating 70
displaying bias point 263
editing 71
adding free text 74
copying across schematics 73
deleting wires 72
disconnecting wires 52, 72
duplicating items 73
labelling nets 80
move single component 72
moving labels 72, 75
placing components 71
rotate, mirror or flip a component 52, 71
undo 74
undo, setting level 330
wiring 72
getting started 51
grid, hiding 331
hierarchical 80
ascending 82
bottom-up method 81
connecting busses 83
creating blocks 81
descending 82
global nets 84
global pins 84
navigating 82
passing parameters 86
probing 219, 234
running simulation 65
top-down method 81
importing models 167
modes 70
net names
displaying 80
user defined 80
preferences 79
component placement options 80
toolbar 79
properties 91, 103
367
Users Manual
decscript 106
editing in schematic 107
handle 106
incscript 106
lot 106
mapping 106
match 106
model 105, 153
netname 106
params 106
ref 105, 153
restoring 107
schematic_path 106
scterm 106
simulator 106
template 106
tol 106
value 105, 153
valuescript 106
selecting 71
components only 73
multiple 73
wires only 73
symbols
adding properties 98
changing search order 117
copying 117
creating 95
creating from script 103
defining pins 96
drawing arcs 95
drawing segments 95
editing 95
editing properties 101
graphical editor 94
how they are stored 122
installing 116
library manager 115
pin order 97
properties 91, 103
renaming 117
symbol generator 89
uninstalling 117
Xspice pin attributes 98
368
Index
toolbar
editing 79
placement options 330
unselecting 73
in box 73
using for IC design 120
automatic area and perimeter calculation 121
window 70
worksheets - adding and removing 80
zooming
box 74
in 74
out 74
to fit 74
schematic_path property 106
SchematicEditMode option variable 344
SchematicExtension option variable 349
SchematicMoveMode option variable 344
SchematicReadOnly option variable 344
SchemDoubleClickScript option variable 344
ScriptDir option variable 326, 344
ScriptExtension option variable 349
Scripts 285
location 333
options 334
startup 354
Scrolling
graph 255
scterm property 106
Selecting schematic components and wires 71
Sensitivity analysis 193
sep (template property keyword) 111
series (template property keyword) 112
Set command 299
Show command 300
sign function 313
SimDataGroupDelete option variable 345
SIMPLIS
Analysis modes
AC 206
Periodic operating point (POP) 204206
transient 202
analysis modes 202
options 206
369
Users Manual
primitive components 133
using SPICE models 128
SIMPLISComponentButtons option variable 345
SIMPLISPath option variable 345
Simulation
modes 51
Simulator controls
manual entry 65
Simulator options 194
simulator property 106
SIMXIDX.n 168
sin function 313
Singular matrix 53
SnapshotExtension option variable 349
Snapshots (SIMPLIS) 204
sqrt function 313
STARTPATH system path 325
Startup script 354
STARTUP.INI 328
StartUpDir option variable 345
StartupDir option variable 326
StartUpFile option variable 345
StatusUpdatePeriod option variable 345
step (template property keyword) 113
Stimulus 54
Subcircuits 151
calling from a schematic 153
creating from schematic 151
expanding 196
passing parameters 154
SumNoise function 313
Sweep modes 178182
Switch
voltage controlled 141
with hysteresis 142
Switches, command line 285
Symbol editor 94
SymbolExtension option variable 349
Symbolic path names 324
Symbols - see Schematic; symbols
SymbolsDir option variable 326, 345
System requirements 29
T
tan function 313
370
Index
TempDataDir option variable 326, 345
Temperature
setting 195
sweeping 179
with multi-step analysis 198
template property 106, 107
TEMPPATH 325
TextExtension option variable 349
Timestep too small error 174
tol property 106
Tolerance
current 195
relative 195
voltage 195
Toolbar
graph 214
schematic 70
configure 79
TotalVectorBufferSize option variable 346
TranscriptErrors option variable 346
Transfer function analysis 190
plotting results 222
Transformer
ideal 136
non-linear 134
Transient analysis 172177
SIMPLIS 202
Transient snapshots 175
Transmission line
lossy 141
Truncate function 313
Tutorial 32
U
UIC 139
Undo
Graph Zoom 256
UndoBufferSize option variable 346
Uninstalling 17
unitvec function 314
Unselecting schematic items 73
Unset command 301
UpdateClosedSchematics option variable 234, 346
UpdateCurvesNoDeleteOld option variable 346
UpdateCurvesNoFixSelected option variable 346
371
Users Manual
Upgrade notes 31
UseAltGraphPrintStyles option variable 346
UseGreekMu option variable 346
UseNativeXpSplitters option variable 347
USER.CAT 166
UserCatalog option variable 347
UserScriptDir option variable 347
UserSymbolsDir option variable 347
UserSystemSymbolDir option variable 347
UseSmallGraphCursor option variable 347
W
WarnSubControls option variable 348
Window
graph 213
schematic 70
symbol editor 94
WireWidth option variable 348
WorkingCatalog option variable 348
Worksheets - schematic 80
X
XatNthY function 279
XatNthYn function 279
XatNthYp function 280
XatNthYpct function 280
XFromY function 314
XY function 314
Y
YatX 280
YatXpct 280
372
Index
YFromX function 314
Z
Zooming
graph 255
373