Saber® Examples User Guide
Saber® Examples User Guide
Guide
Version D-2010.03-SP1, June 2010
Saber is a registered trademark of Sabremark Limited
partnership and is used under license.
ii Saber Examples User Guide
D-2010.03-SP1
Copyright Notice and Proprietary Information
Copyright 2010 Synopsys, Inc. All rights reserved. This software and documentation contain confidential and proprietary
information that is the property of Synopsys, Inc. The software and documentation are furnished under a license agreement and
may be used or copied only in accordance with the terms of the license agreement. No part of the software and documentation may
be reproduced, transmitted, or translated, in any form or by any means, electronic, mechanical, manual, optical, or otherwise, without
prior written permission of Synopsys, Inc., or as expressly provided by the license agreement.
Right to Copy Documentation
The license agreement with Synopsys permits licensee to make copies of the documentation for its internal use only.
Each copy shall include all copyrights, trademarks, service marks, and proprietary rights notices, if any. Licensee must
assign sequential numbers to all copies. These copies shall contain the following legend on the cover page:
This document is duplicated with the permission of Synopsys, Inc., for the exclusive use of
__________________________________________ and its employees. This is copy number __________.
Destination Control Statement
All technical data contained in this publication is subject to the export control laws of the United States of America.
Disclosure to nationals of other countries contrary to United States law is prohibited. It is the readers responsibility to
determine the applicable regulations and to comply with them.
Disclaimer
SYNOPSYS, INC., AND ITS LICENSORS MAKE NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH
REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Registered Trademarks ()
Synopsys, AMPS, Astro, Behavior Extracting Synthesis Technology, Cadabra, CATS, Certify, CHIPit, Design Compiler,
DesignWare, Formality, HAPS, HDL Analyst, HSIM, HSPICE, Identify, Leda, MAST, ModelTools, NanoSim, OpenVera,
PathMill, Physical Compiler, PrimeTime, SCOPE, Simply Better Results, SiVL, SNUG, SolvNet, Syndicated, Synplicity,
the Synplicity logo, Synplify, Synplify Pro, Synthesis Constraints Optimization Environment, TetraMAX, UMRBus, VCS,
Vera, and YIELDirector are registered trademarks of Synopsys, Inc.
Trademarks ()
AFGen, Apollo, Astro-Rail, Astro-Xtalk, Aurora, AvanWaves, BEST, Columbia, Columbia-CE, Confirma, Cosmos,
CosmosLE, CosmosScope, CRITIC, CustomExplorer, CustomSim, DC Expert, DC Professional, DC Ultra, Design
Analyzer, Design Vision, DesignerHDL, DesignPower, DFTMAX, Direct Silicon Access, Discovery, Eclypse, Encore,
EPIC, Galaxy, Galaxy Custom Designer, HANEX, HapsTrak, HDL Compiler, Hercules, Hierarchical Optimization
Technology, High-performance ASIC Prototyping System, HSIM
plus
, i-Virtual Stepper, IICE, in-Sync, iN-Tandem, Jupiter,
Jupiter-DP, JupiterXT, JupiterXT-ASIC, Liberty, Libra-Passport, Library Compiler, Magellan, Mars, Mars-Rail, Mars-Xtalk,
Milkyway, ModelSource, Module Compiler, MultiPoint, Physical Analyst, Planet, Planet-PL, Polaris, Power Compiler,
Raphael, Saturn, Scirocco, Scirocco-i, Star-RCXT, Star-SimXT, StarRC, System Compiler, System Designer, Taurus,
TotalRecall, TSUPREM-4, VCS Express, VCSi, VHDL Compiler, VirSim, and VMC are trademarks of Synopsys, Inc.
Service Marks (
sm
)
MAP-in, SVP Caf, and TAP-in are service marks of Synopsys, Inc.
SystemC is a trademark of the Open SystemC Initiative and is used under license.
ARM and AMBA are registered trademarks of ARM Limited.
Saber is a registered trademark of SabreMark Limited Partnership and is used under license.
All other product or company names may be trademarks of their respective owners.
iii
Contents
1. Design Example Tool Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Audio System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Brake System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Range Finder IC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Power Converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Analyzing the Audio System Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Audio System Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Copying the Audio Test System Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Copying Audio System Files for Saber Sketch. . . . . . . . . . . . . . . . . . . . . 6
Copying Audio System files for Cadence (Artist) . . . . . . . . . . . . . . . . . . . 7
Copying Audio System files for Mentor Graphics (Design Architect) . . . . 7
Copying Audio System files for ViewLogic (ViewDraw) on UNIX. . . . . . . 8
Copying Audio System files for ViewLogic (ViewDraw) on Windows . . . . 8
Invoking Your Schematic Capture Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Invoking Saber Sketch on the Audio System. . . . . . . . . . . . . . . . . . . . . . 10
Invoking Cadence (Artist) on the Audio System. . . . . . . . . . . . . . . . . . . . 10
Invoking Design Architect on the Audio System. . . . . . . . . . . . . . . . . . . . 11
Invoking Powerview on the Audio System (UNIX) . . . . . . . . . . . . . . . . . . 12
Invoking Powerview on the Audio System (Windows) . . . . . . . . . . . . . . . 13
Analyzing the Design (Audio System) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3. Designing the Test Tone Generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Specifying Design Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Selecting Models for the CSP Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Analyzing the CSP circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4. Designing the Oscillator Block. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Selecting Models for the Oscillator Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
iv
Contents
Simulating the Mixed-Signal Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5. Designing the Analog-to-Digital Converter . . . . . . . . . . . . . . . . . . . . . . . . . 35
Specifying Design Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Selecting Models for the Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Analyzing the Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
6. Designing the Divide by 8 Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Implementing the Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Simulating the Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
7. Designing the DSP Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Specifying Design Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Selecting Models for the DSP Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Analyzing the DSP Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
8. Designing the Power Amplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Selecting Models for the Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Analyzing the Power Amplifier circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
9. Designing the RLC Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Selecting Models for the RLC Filter Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Verifying the Functionality of the RLC Filter Circuit . . . . . . . . . . . . . . . . . . . . . 63
Sweeping Design Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Determining Parameter Sensitivity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Analyzing the Statistical Effects of Part Variation Using Monte Carlo Analysis 69
10. Designing the Loud Speaker Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Selecting Models for the Loudspeaker. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Determining the Static Response of the Loudspeaker Circuit . . . . . . . . . . . . . 75
Analyzing the Non-Linear Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
v
Contents
Analyzing the Linear Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Analyzing the Distortion Effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
11. Designing an Electrohydraulic Brake System . . . . . . . . . . . . . . . . . . . . . . 85
Selecting Models for the Electrohydraulic Brake System. . . . . . . . . . . . . . . . . 86
Analyzing the Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Copying the Brake System Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Invoking Saber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Opening the Brake System Design with Saber Sketch . . . . . . . . . . . . . . 89
Opening the Brake System Design with Design Architect . . . . . . . . . . . . 90
Opening the Brake System Design with ViewDraw on UNIX. . . . . . . . . . 90
Opening the Brake System Design with ViewDraw on Windows . . . . . . . 91
Checking the Functionality of the Brake Example . . . . . . . . . . . . . . . . . . . . . . 94
Running Vary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Determining Component Sensitivity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Determining Component Stress Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Performing Statistical Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
12. Range Finder IC Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Selecting Models for the Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Testing the MOS-Level Range Finder Design Example. . . . . . . . . . . . . . . . . . 118
Viewing the Range Finder Design in Saber Sketch . . . . . . . . . . . . . . . . . 118
Viewing and Preparing the Range Finder Design in Artist . . . . . . . . . . . . 120
DVE Range Finder Design Set Up, Viewing, and Preparation . . . . . . . . 122
Simulating the MOS-level Range Finder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Graph the Output Voltages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Find the Average Value of the Diffamp Output . . . . . . . . . . . . . . . . . . . . . 126
Testing the Range Finder OR Gate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Viewing and Preparing the Range Finder OR Gate. . . . . . . . . . . . . . . . . 128
Viewing and Preparing the Range Finder OR Gate in Artist . . . . . . . . . . 129
Viewing and Preparing the Range Finder OR Gate in DVE. . . . . . . . . . . 131
Simulating the MOS-Level Range Finder OR Gate . . . . . . . . . . . . . . . . . . . . . 132
Testing the Gate-Level Range Finder Design Example . . . . . . . . . . . . . . . . . . 135
Viewing and Preparing the Gate-Level Range Design. . . . . . . . . . . . . . . 136
vi
Contents
Viewing and Preparing the Gate-Level Range Design in Artist . . . . . . . . 137
Viewing and Preparing the Gate-Level Range Design in DVE. . . . . . . . . 140
Simulating the Gate-Level Range Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Testing the Gate-Level Range Finder Design Example in Saber/Verilog. . . . . 143
Viewing and Preparing the Gate-Level Range Design in Saber Sketch and Saber/
Verilog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Viewing and Preparing the Gate-Level Range Design in Artist/Saber-Verilog 146
Viewing and Preparing the Gate-Level Range Design in DVE/Saber-Verilog 148
Simulating the Gate-Level Range Design in Saber/Verilog . . . . . . . . . . . . . . . 150
13. Introduction: Power Converter Design Example . . . . . . . . . . . . . . . . . . . . 151
Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Copying the Power Converter Design Example . . . . . . . . . . . . . . . . . . . . . . . 152
For Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
For Saber Sketch (in a UNIX environment) . . . . . . . . . . . . . . . . . . . . . . . 153
For Mentor Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
14. Power Stage Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Designing the Duty Cycle and Transformer Turns Ratio . . . . . . . . . . . . . . . . . 155
Designing the Output Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Verifying the Power Stage Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
15. Average Circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Calculating the Control Voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Verifying the Average Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Determining the Control to Output Transfer Function . . . . . . . . . . . . . . . . . . . 168
Designing the Feedback Compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Verifying the Feedback Compensation Frequency Response . . . . . . . . . . . . 174
Verifying the System Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
16. Closed Loop Circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Designing the Modulation Circuitry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Verifying the Modulation Circuitry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
vii
Contents
Verifying the Closed Feedback Loop Transient Response . . . . . . . . . . . . . . . 183
17. Final Component Level Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Verifying the Final Component Level Design . . . . . . . . . . . . . . . . . . . . . . . . . 185
A. Running Batch Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Running a Batch File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Creating a Batch File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
viii
Contents
Saber Examples User Guide 1
D-2010.03-SP1
1
1Design Example Tool Overview
Describes various design examples available in the Design Example Tool
created using Saber.
Each of the following examples illustrates particular aspects of the Saber suite
of tools.
This section covers the following topics:
Audio System
Brake System
Range Finder IC
Power Converter
Audio System
The Audio System is a mixed-technology, mixed-signal, and hierarchical design
intended to illustrate simulation and analysis tools.
Brake System
The Brake System is a mixed-technology, hierarchical design for demonstrating
simulation and analysis tools.
2 Saber Examples User Guide
D-2010.03-SP1
Chapter 1: Design Example Tool Overview
Range Finder IC
Range Finder IC
This example allows a comparison of three methods for simulating a mixed-
signal design: an analog simulation with the digital circuitry represented as
MOS gates; a native mixed-signal simulation with the digital circuitry
represented as digital models; a Saber/Verilog mixed-signal simulation with the
digital circuitry represented as digital models.
Power Converter
The Power Converter is an illustration of both the advantages of a top-down
design approach (from functional abstraction to detailed design) and the use of
power converter state-space averaging models from the MAST Parts Library as
tools for interactive design with the Saber simulator.
Saber Examples User Guide 3
D-2010.03-SP1
2
2Analyzing the Audio System Example
Describes how to analyze the Audio Test System example. It illustrates the
diverse analysis capabilities of Saber Simulator, the extensive model libraries,
and the flexibility provided by MAST.
The Audio Test System is a comprehensive example, illustrating the diverse
analysis capabilities of the Saber Simulator, the richness of the supplied model
Libraries, and the flexibility provide by the MAST Hardware Description
Language. It illustrates the value of simulation in the design process, helping
integrate diverse modules and sub-systems and improve overall system
performance.
The audio system includes mixed-signal (analog and digital) ICs for clock
generation and A-to-D conversion, a DSP algorithm section for response
leveling and sound effects, board level analog electronics for filtering and
amplification, as well as a mixed-technology loudspeaker with mechanical non-
linearities and resonance characteristics. The dynamic interactions of the
modules makes design specification difficult to do in isolation. The Saber
Simulator, which simulates the audio system as a whole, supports total system
tuning or performance improvement, as well accommodating cross discipline
trade-off analysis for manufacturability and cost reduction.
The example also illustrates effective simulation strategies. These include
selecting models with the right level of abstraction for the job, as well as
bottom-up characterization of behavioral models to preserve accuracy while
increasing simulation speed. It also shows the creation of analog and digital
models, using the MAST Hardware Description Language. Both the successive
approximation register (SAR) digital model (sar_bhv.sin) in the A-to-D
converter, and the voice coil analog model (voice_coil.sin) in the Loudspeaker,
were written specifically for this example. Simulation progress often depends
on the users ability to supply key models of elements specific to his design.
This section covers the following topics:
4 Saber Examples User Guide
D-2010.03-SP1
Chapter 2: Analyzing the Audio System Example
Audio System Block Diagram
The Test Tone Processing (CSP) block generates complex audio test-tones
required to test the amplifiers performance.
The Relaxation Oscillator (OSC) block supplies a clock to the ADC and also
sets the system sampling rate. In the OSC directory, there are several
versions of the oscillator schematic, such as ex_osc_mos and
ex_osc_dig. These exercise oscillator models with different levels of
abstraction, such as a pure analog MOSfet level model and a pure DIGital
model, respectively.
The Divide by 8 Block (N8DIV) divides the clock signal generated by the
relaxation oscillator by a factor of eight, setting the sampling rate of the
analog-to-digital converter.
The RLC Filter block primarily filters sampling noise introduced by the ADC/
DSP prior to reaching the power amplifier.
The Power Amplifier block amplifies the filtered DSP output signals and
applies them to the speaker through an impedance-matching transformer.
The Speaker block converts the power amplifier signals electrical energy
into mechanical energy, moving the diaphragm to create sound.
Copying the Audio Test System Example
The Audio Test system example is available in the Saber Sketch, Cadence,
Mentor Graphics, and ViewLogic design environments. The following four
sections describe how to copy the Audio Test system design files (schematics,
netlists, and batch files) for your specific design capture tool.
This section covers the following topics:
DSP algorithm
All resistors in this design were specified at 50 ohms by changing the value
of the rnom property to 50.
The vsrc instance uses the v template to produce a 6 volt 100Hz sine wave.
You specify this waveform by modifying the saber_model property to
trans=(sin=(va=6, f=100, vo=0)). Because you will only analyze this circuit
in the time-domain, you only need to define the transient waveform.
The e2c1 instance uses the elec2var template to convert the electrical
signal (voltage) to a control signal (unitless). This conversion is necessary
to exchange signals between analog and control system parts in the design.
The v2e1 instance is used for a similar purpose.
The src1 instance uses the src template from the Control system library to
produce a 50 millisecond pulse with a 200millisecond period and an
amplitude of 1 unit by editing the Saber_model property to
tran=(pulse=(v1=0,
v2=1,tr=1u,tf=1u,td=10m,pw=10m,per=200m)).
The mult1 instance uses the mult template from the Control System library
to multiply the pulse waveform (generated by src1) and the sine waveform
(generated by vsrc). This part produces a 50 millisecond window of a 100
Hz sine wave every 200 milliseconds. Because the mult1 instance can only
multiple 2 control signals, the e2c1 symbol was added to convert the sine
wave from an electrical signal in volts to a unitless control signal.
The lim1 instance uses the limit template to limit the output of the multiplier
to a 5 unit maximum (because pulsetone is a control signal, it has no units).
lag1 filters out some of the harmonics associated with the pulse signal
produced by vpulse. Break frequency is at 1KHz. This filter also slightly
smooths the output signal.
Many other parameter adjustments can be made to achieve other signal
conditioning effects. Alternate signal conditioning blocks from the Control
System Library can be substituted as well.
Analyzing the CSP circuit
After you make a local copy of the design and set up your environment, you can
simulate the Audio system. The following procedure invokes Saber on the pre-
generated netlist in the Audio directory:
1. Invoke Saber
24 Saber Examples User Guide
D-2010.03-SP1
Chapter 3: Designing the Test Tone Generator
Analyzing the CSP circuit
(UNIX) Enter the following command:
(Windows) Choose the following menu item:
Start > Synopsys > saber > SaberGuide
2. Open the Saber netlist.
To open the Saber netlist follow these steps:
a. Display the Open Design dialog box (File > Open > Design...).
b. Browse to the directory containing the Audio example files (path/Audio/
CSP).
c. Select the ex_csp file and open it.
Note: The remaining steps exercise the Continuous Signal
Processing (ex_csp) block of the Audio Test system. This
block generates the test tone for the Audio circuit. It runs two
time domain analyses to compare the system response to
moving the break frequency of the filter.
3. Evaluate the DC Operating Point
a. Display the Operating Point Analysis form (Analyses > Operating Point
> DC Operating Point...).
b. Execute the DC analysis by clicking the OK button.
This action performs a DC analysis on the circuit. You can view the
resulting DC values in the Operating Report (Results > Operating Point
Report)
4. Determine the time-domain (transient) response.
Display the Transient Analysis form (Analyses > Time-Domain >
Transient...).
Edit the following fields in the Transient Analysis form.
End Time: 200m
Time Step: 1u
Monitor Progress: 100
Perform the analysis by clicking the OK button.
install_home/bin/saber
Saber Examples User Guide 25
D-2010.03-SP1
Chapter 3: Designing the Test Tone Generator
Analyzing the CSP circuit
This command determines the time domain response of the circuit
during the first 200 milliseconds and saves the resulting waveforms for
each signal on the root of the design in a Plot File called tr. It also
displays the information to the Saber Guide transcript window on every
100th data point of the simulation.
Note: The remaining steps determine the affects of reducing the
filter bandwidth.
5. Reduce the break frequency of the filter.
To reduce the break frequency of the filter from 1KHz to 100 Hz, you can
change the value of the w parameter by following these steps:
Display the Alter Design form (Edit > Alter).
Select the Netlist tab.
Display the Edit Values form by selecting the lag.lag1 part from the
instance list and clicking the Edit button.
Edit the w parameter value by changing the value of the w parameter to
628.3 and click the OK button.
This action changes the break frequency of the filter from 1kHz to 100 Hz.
6. Perform a Transient analysis using the new break frequency.
a. Display the Transient Analysis form (Analyses > Time-domain >
Transient).
b. Edit the following fields in the Transient Analysis form:
End Time: 200m
Time Step: 1u
Monitor Progress: 100
Plot File: (Input/Output tab): tr_filt
c. Perform the analysis by clicking the OK button.
This command performs a transient analysis using the same
arguments, except the results are saved to the tr_filt Plot File. This
method allows you to compare the circuit behavior with filter break
frequencies.
7. Plot the waveforms.
26 Saber Examples User Guide
D-2010.03-SP1
Chapter 3: Designing the Test Tone Generator
Analyzing the CSP circuit
You can compare the filt_out signal in both plot files by opening the plot files
in the Signal Manager, selecting the filt_out signal from both plot file
windows and plotting the signals in the graph window. The resulting
waveforms should look similar to the following graph:
Notice that the X-axis values are unitless because filt_out is a control signal
type.
8. Return the filter bandwidth to original value.
You can accomplish this task by repeating the procedure in Step 5 and
setting the w parameter to 6283.
After you finish simulating this block, you can either continue to analyze this
block using other analyses, parameters, and parts or you can examine other
blocks in the Audio Test System example.
(
-
)
-10.0
-5.0
0.0
5.0
10.0
t(s)
0.0 0.05 0.1 0.15 0.2 0.25
(-): t(s)
filt_out
filt_out
Saber Examples User Guide 27
D-2010.03-SP1
4
4Designing the Oscillator Block
Describes how to design an oscillator that generates a 40 kHz clock for the
Analog-to-Digital Converter block in the audio system design. Using the basic
ring oscillator approach, this circuit is implemented at different levels of
abstraction.
The oscillator circuit demonstrates the following capabilities:
Using Measurements
This example uses the following process to develop and test the schematic
block:
ex_osc_dig: A pure digital ring oscillator. It includes buffers with long delay
times, that have been calibrated from the relaxation times of the analog
RC[D] circuits. This digital version of the oscillator is very fast, and is used
in the audio system for improved simulation speed.
ex_osc_mos: A pure analog hierarchical circuit that includes MOS level for
the inverters and NAND gate shown in the following schematic. The proper
loop delay characteristics are achieved using resistor-capacitor-diode
(RCD) and RC networks on the top-level schematic (analog equivalent of
the buffers in the ex_osc_dig schematic).
Bit Stream
rc3
out
rc2 ndout
start
i1out
rc1
Saber Examples User Guide 29
D-2010.03-SP1
Chapter 4: Designing the Oscillator Block
Simulating the Mixed-Signal Circuit
The set0 instance uses the set_l4_0 template to provide a constant logic 0
to some of the control pins on the shift register.
The sh1 instance uses the shft8_l4 template to latch the output of the SAR
when the end-of-conversion (eoc) signal goes high. Because the other
control pins on this shift register are held at a logic 0, this shift register acts
as a 8-bit digital latch.
The pr1 instance uses the prbit_l4 template to inform the SAR to begin a
new conversion every 200 microseconds.
SET 0
SHIFT REGISTER
clk
clkinh
sdin
ld7
ld6
ld5
ld4
ld3
ld2
ld1
ld0
load
clr
q7
q6
q5
q4
q3
q2
q1
q0
D-to-A
d7
d6
d5
d4
d0
d1
d2
d3
(Behavioral)
SAR
q7
q6
q5
q4
q0
q1
q2
q3
eoc
clk
start
data
Bit
Stream
Logic_4
clock
comp_l4
eoc_out
eoc
d7
d6
d5
d4
d3
d2
d1
d0
data
vout
vin
d2a1
clk1
sh1
cmp1
pr1
Saber Examples User Guide 37
D-2010.03-SP1
Chapter 5: Designing the Analog-to-Digital Converter
Selecting Models for the Circuit
The clk1 instance uses the clock_l4 template to provide a 40 KHz digital
clock signal for the SAR. In the Audio design, the Oscillator block generates
this clock signal. In order to simulate this block independently from the larger
system, the clk1 instance was added.
This part was added so that the ADC could be tested independently from
the complete Audio system. When used in the system level design, this
waveform is produced by the test signal processor (csp) block.
The cmp1 uses the comp_l4 template to compare the analog input signals
from the d-to-a converter and the sawtooth waveform generator (vin). This
part produces a digital signal.
logic_clock provides the 40KHz clock signal for the design. In the Audio Test
System example, this signal is provided by the Oscillator block. This model
is only used to test the block separate from the Audio Test System.
set_1 provides a logic 1 to the global net called vcc. This global net is
attached to all set and reset pins on the D-type flip-flops in the circuit.
inv1 inverts the clock signal so the signal produced by the Divide by 8 block
and the Oscillator block will be in-phase.
Using Sampled Data System (SDS) models and Electrical system models
in the same circuit
This example uses the following process to develop and test the schematic
block:
The fix_d7 instance uses the set_l4 template to keep the d7 pin at a
constant logic level 1 by editing the level property on the fix_d7 to _1.
The clk1 instance uses the clock_l4 template to provide a 5 KHz clock to the
circuit by editing the freq property on the clk1 instance to 5k. The output of
this instance is a 4-state digital logic signal that oscillates between a logic 1
and a logic 0.
The zlti1 instance uses the zlti template to provide some additional filtering
using a Z-domain transfer function. The a parameter defines the gain. The
den and num parameters define the denominator and numerator of the Z-
domain transfer function. The min and max parameters define the minimum
and maximum output states of the instance.
SET_1
LOGIC_4
CLOCK
BIT
STREAM
zlti
zin
smp
zout
to Sample
Clock
smp
K=0.7
K=0.3
zdelay
zin
smp
zout
(MSB)
b2z1
clk
d15
d14
d13
d12
d11
d10
d9
d8
d7
d6
d5
d4
d3
d2
d1
d0
zout
eoc
zlti_out
zout
dly_out
pr_d3
add1
fix_d7
dly1 zlti1
clk1
c2s1
Saber Examples User Guide 47
D-2010.03-SP1
Chapter 7: Designing the DSP Circuit
Analyzing the DSP Circuit
The z2a1 instance uses the z2a template to convert the event-driven analog
(Z-domain) signal into a continuous analog signal. There is a
100nanosecond delay during the conversation, due to editing the tt property
to 100n.
The add1 instance uses the Z-domain zlcmb template to sum the output
direct and delayed signals. This instance multiples the direct signal by a
factor of 0.7 and the delayed signal by a factor of 0.3 prior to summing the
two Z-domain inputs (as defined using the a and b parameters). This
instance also limits the output to +/- 5 units.
The dly1 instance uses the Z-domain zdelay template to delay the input
signal by 500 clock cycles at the output by defining the k parameter to 500.
The b2z1 instance uses the b2z template to convert the 8 bit, binary, logic_4
signal to an event-driven analog signal.
Analyzing the DSP Circuit
After you make a local copy of the design, you can simulate the Audio system.
The following procedure invokes Saber on the pre-generated netlist in the
Audio directory:
1. Invoke Saber
(UNIX) Enter the following command:
(Windows) Choose the following menu item:
Start > Synopsys > saber > SaberGuide
2. Open the netlist.
To open the netlist follow these steps:
a. Display the Open Design Dialog Box (File > Open > Design...).
install_home/bin/saber
48 Saber Examples User Guide
D-2010.03-SP1
Chapter 7: Designing the DSP Circuit
Analyzing the DSP Circuit
b. Browse to the directory containing the Audio example files (path/Audio/
DSP).
c. Select the ex_dsp.sin file and open it.
Note: The remaining steps exercise the DSP (ex_dsp) block of the
Audio Test system. This block provides the echo feature of
the Audio System and does some filtering.
3. Evaluate the DC Operating Point.
Display the DC analysis form (Analyses > Operating Point > DC
Operating Point...).
This menu item displays the Operating Point Analysis form.
Execute the DC analysis by clicking the OK button.
This action performs a DC analysis on the circuit. You can view the
resulting DC values in the Operating Report (Results > Operating Point
Report...).
4. Determine the time-domain (transient) response.
Display the Transient Analysis form (Analyses > Time-Domain >
Transient...).
Edit the following fields in the Transient Analysis form:
End Time: 200m
Time Step: 50u
Monitor Progress: 300
Signal List (Input/Output tab): dsp_out dly_out
smp zin zlti_out zout d0_6 d7 eoc
Perform the analysis by clicking the OK button.
This command determines the time domain response of the circuit
during the first 200 milliseconds and saves the resulting waveforms for
each signal on the root of the design in a Plot File called tr. It also
displays the information to the Saber Guide transcript window on every
300th data point of the simulation.
5. Plot the results in Scope Waveform Analyzer.
6. Continue the Transient analysis to 1 second.
a. Display the Transient form (Analyses > Continue > Transient).
b. Change the value of End Time to 1.
Saber Examples User Guide 49
D-2010.03-SP1
Chapter 7: Designing the DSP Circuit
Analyzing the DSP Circuit
c. Continue the Transient analysis by clicking the OK button.
7. Determine the frequency components of the zlti_out signal.
a. Display the FFT Transform form (Analyses > Fourier > FFT).
b. Edit the following fields in the Fourier Transform (FFT) form:
Signals to Transform: (Input/Output tab) zlti_out
Input Plot File: (Input/Output tab) tr
Output Plot File: (Input/Output tab) fft
X-axis Scale (Control tab): Log
c. Perform the transform by clicking on the OK button.
This command transforms the zlti_out curve into the frequency
spectrum.
8. Plot the frequency spectrum of the zlti_out signal in Scope.
Note that the notch characteristic may help suppress the loudspeaker
resonance at 56 Hz, in the actual audio system.
After you finish simulating this block, you can either continue to analyze this
block using other analyses, parameters, and parts or you can examine other
blocks in the Audio Test System example.
50 Saber Examples User Guide
D-2010.03-SP1
Chapter 7: Designing the DSP Circuit
Analyzing the DSP Circuit
Saber Examples User Guide 51
D-2010.03-SP1
8
8Designing the Power Amplifier
Describes how to design a power amplifier that amplifies the signal, with a gain
of 150, after it is filtered by the RLC filter block. The output of this block drives
the speaker block of the Audio Test System.
The power amplifier circuit demonstrates the following capabilities:
Using Noise analysis to analyze the noise contribution of the various parts
in the design
Resistors r1, r2, and re provide biasing for the transistor amplifier.
rload provides an 8 ohm load to mimic the speaker in the next stage. In order
to determine the stress on this part, the ratings property was used to specify
a maximum power dissipation (pdmax_ja) of 20 and a maximum voltage
drop (vmax) over the resistor of 30 volts.
vin provides a 100 Hz, 5Volt peak-to-peak sine wave voltage source by
using tran=(sin=(va=5,f=100,vo=0). A 1 volt AC waveform was also defined
in the voltage source.
Using Vary, Sensitivity, and Monte Carlo analyses to tune the parameters in
the design
This example uses the following process to develop and test the schematic
block:
r2 is a 1000 ohm resistor with a 10% tolerance level. This resistor uses the
uniform distribution during Monte Carlo analysis.
normal(100,0.1)
normal(25m,0.1)
normal(1u,0.1)
uniform(1k,0.1)
v1
Saber Examples User Guide 63
D-2010.03-SP1
Chapter 9: Designing the RLC Circuit
Verifying the Functionality of the RLC Filter Circuit
Verifying the Functionality of the RLC Filter Circuit
After you make a local copy of the design, you can simulate the various block
within the Audio system. The following procedure invokes Saber on the pre-
generated netlist in the RLC directory of the Audio Test System:
1. Invoke Saber
(UNIX) Enter the following command:
(Windows) Choose the following menu item:
Start > Synopsys > saber > SaberGuide
2. Open the netlist.
To open the netlist follow these steps:
a. Display the Open Design Dialog Box (File > Open > Design...).
b. Browse to the directory containing the Audio example files (path/Audio/
RLC).
c. Select the ex_rlc.sin file and open it.
Note: The remaining steps analyze the transient and frequency
domain response of the ex_rlc circuit using transient and AC
analyses and measurement capability to examine key
performance results.
3. Evaluate the DC Operating Point.
a. Display the Operating Point Analysis form (Analyses > Operating Point
> DC Operating Point...).
b. Execute the DC analysis by clicking the OK button.
This action performs a DC analysis on the circuit. You can view the
resulting DC values in the Operating Report (Results > Operating Point
Report...).
4. Determine the time-domain (transient) response.
a. Display the Time-Domain Transient Analysis form (Analyses > Time-
Domain > Transient...).
b. Edit the following fields in the Transient Analysis form:
End Time: 100m (10 cycles X 10 millisecond period)
install_home/bin/saber
64 Saber Examples User Guide
D-2010.03-SP1
Chapter 9: Designing the RLC Circuit
Verifying the Functionality of the RLC Filter Circuit
Time Step: 10n (1/100th of the periodic input signal)
Monitor Progress: 100
Plot after analysis : Yes - Open Only
Max Truncation Error (Calibration tab): 100u
c. Perform the analysis by clicking the OK button.
This command examines the effects of the first 10 cycles of the 1KHz
input sine wave and saves the resulting waveforms for each signal on
the root of the design in a Plot File with a .tr extension. It also displays
the information to the Saber Guide transcript window on every 100th
data point of the simulation.
After the analysis completes, the plot file is automatically added to the
Signal Manager.
5. Plot the output voltage (vout) waveform.
6. Measure the key time-domain performance characteristics of the output
voltage
a. Using the Measurement Tool (Tools > Measurement), measure the
overshoot by editing the following fields in the Measurement Tool and
clicking the Apply button:
Measurement: Overshoot (Time-domain > Overshoot)
Signal: vout
b. To measure the risetime, edit the following fields in the Measurement
Tool and click on the Apply button:
Measurement: risetime (Time-domain > Risetime)
Signal: vout
You can examine the rise times on the other rising edges by placing the
mouse cursor over either risetime measurement marker, holding down the
left mouse button, and sliding the mouse cursor to the next rising edge.
7. Analyzing the Frequency response.
a. Display the Small-Signal Frequency Analysis form (Analyses >
Frequency > Small-Signal AC...).
Edit the following fields in the Small-Signal Frequency Analysis form:
Start Frequency: 10
End Frequency: 100k
Number of Points: 1000
Plot after analysis: Yes - Open Only
Saber Examples User Guide 65
D-2010.03-SP1
Chapter 9: Designing the RLC Circuit
Sweeping Design Parameters
b. Perform the analysis by clicking the OK button.
c. Select and plot the vout signal.
This command examines the frequency response between 10 and
100KHz. The analysis uses 1000 logarithmically-spaced data points
and saves the resulting waveforms for each signal on the root of the
design in a Plot File called ac. After the analysis completes, the plot file
is automatically added to the Scope Signal Manager.
8. Measure the key frequency-domain performance characteristics of the filter
using the Measurement Tool.
a. To measure the break frequency, edit the following fields in the
Measurement Tool and click on the Apply button:
Measurement: Lowpass (Frequency Domain> Lowpass (3dB Point))
Signal: vout (The dB(V):f(Hz) waveform)
Offset: -3
b. Edit the following fields in the Measurement Tool and click on the Apply
button:
Measurement: Threshold (General > Threshold (At Y))
Signal: vout
Y value: -90
Trigger: falling edge icon
c. To measure the slope of the frequency roll-off, edit the following fields in
the Measurement Tool and click on the Apply button:
Measurement: Slope (Frequency Domain> Slope)
Signal: vout
X value: 10k
Option: Per Decade
Sweeping Design Parameters
To perform a parametric analysis of the RLC filter, you will sweep (vary) the
value of resistor r2 across the expected range of the potentiometer, perform a
66 Saber Examples User Guide
D-2010.03-SP1
Chapter 9: Designing the RLC Circuit
Sweeping Design Parameters
time domain simulation at each value, then use the measurement capability to
generate a performance vs. design parameter curve.
1. Vary the value of the r.r2 resistor.
a. Display the Looping Commands form (Analyses > Parametric > Vary...).
b. Define the parameter sweep by clicking on the vary loop button.
c. In the resulting Parameter Sweep form, edit the following fields:
Parameter Name: rnom(r.r2)
from 300 to 1k by 100
d. Click the Accept button to add the vary definition to the Looping
Command form.
e. Add a DC analysis to the loop (AddAnalysis > Within Loop(s) > DC
Operating Point).
f. Add a Transient analysis to the loop (AddAnalysis > Within Loop(s) >
Transient).
g. Click on the tranalysis button within the loop and edit the following
values:
End Time: 50m
Time Step: 10n (1/100th of the periodic input signal)
Monitor Progress: 100
Plot after analysis : Yes - Open Only
Max Truncation Error (Calibration tab): 100u
Plot File (Input/Output tab): tr_vary
h. Click the Accept button to add the tranalysis definition to the Looping
Command form.
To summarize, the Looping Commands form should have the following
entries:
vary: vary rnom(r.r2) from 300 to 1k by 100
dcanalysis: dc
tranalysis: tr (monitor 100,pfile tr_vary,
tend 50m,terror 100u, tstep 10n
i. You can execute the Vary loop by clicking the OK button in the Looping
Commands form.
2. Plot the multi-member vout waveform.
Saber Examples User Guide 67
D-2010.03-SP1
Chapter 9: Designing the RLC Circuit
Determining Parameter Sensitivity
a. In the Signal Manager, click the Open Plotfiles button.
b. Select the ex_rlc.tr_vary Plot File and click Open.
c. Select vout in the ex_rlc.tr_vary Plot File window and click on the Plot
button.
A multi-member waveform appears. Each member of the waveform is
associated with a resistance value from the Vary loop.
3. Measure the overshoot voltage vs. resistance of the r2 instance.
This step requires a Batch Measure license.
a. Display the Measurement Tool (Tool > Measurement).
b. Edit the following fields:
Measurement: Overshoot (Time-domain > Overshoot)
Signal: vout
Create New Waveform on Active Graph: Overshoot vs.
rnom(r.r2)
c. Create the overshoot vs. rnom(r.r2) curve by clicking on the Apply
button in the Measurement tool.
Determining Parameter Sensitivity
This topic requires an InSpecs Parametric Analysis license.
This sensitivity analysis runs multiple time domain simulations, changing
specified parameters (one at a time) by a small amount, and measuring the
resulting change in performance (overshoot). The relative influence of these
parameters is then reported. To execute the sensitivity analysis, follow these
steps:
1. Display the Sensitivity Analysis form (Analyses > Parametric > Sensitivity...).
2. Edit the following fields in the top section of the Sensitivity Analysis form:
Parameter List: r.r1/rnom r.r2/rnom c.c1/c l.l1/l
Perturbation: 0.01
Report after analysis: Yes
3. Add a DC analysis to the analysis list at the bottom of the form (AddAnalysis
> Basic > DC Operation Point).
68 Saber Examples User Guide
D-2010.03-SP1
Chapter 9: Designing the RLC Circuit
Determining Parameter Sensitivity
4. Add a Transient analysis to the analysis list at the bottom of the form
(AddAnalysis > Basic > Transient).
5. Edit the following fields in the Transient Analysis form by clicking the
tranalysis button in the analysis list at the bottom of the form.
End Time: 50m
Time Step: 10n (1/100th of the periodic input signal)
Monitor Progress: 100
Plot after analysis : No
Max Truncation Error (Calibration tab): 100u
Plot File (Input/Output tab): tr_sens
When you finished making these changes, click the Accept button in the
Transient Analysis form.
6. Add a overshoot performance measure to the analysis list at the bottom of
the form (AddAnalysis > Batch Measure).
7. Click on the measure button in the analysis list and edit the following fields
in the Batch Measurement form.
Measure: Overshoot (Select Time-Domain > Overshoot
from the pulldown menu in the Measure field)
Input Plot File: tr_sens
Curve Name: vout
When you finished making these changes, click the Accept button in the
Batch Measurement form.
In summary, the completed Sensitivity Analysis form should contain the
following entries:
Parameter List: r.r1/rnom r.r2/rnom c.c1/c l.l1/l
Perturbation: 0.01
Report after analysis: Yes
dcanalysis: dc
tranalysis: tr (monitor 100,pfile tr_sens,
tend 50m,terror 100u,testep 10n
measure: meas overshoot (cnames vout,pfin
tr_sens
Saber Examples User Guide 69
D-2010.03-SP1
Chapter 9: Designing the RLC Circuit
Analyzing the Statistical Effects of Part Variation Using Monte Carlo Analysis
Execute the Sensitivity analysis by clicking the OK button the Sensitivity
Analysis form.
This analysis runs produces a Sensitivity Report indicating that the r1 resistor
affects the overshoot measurement more than any other parameter.
Analyzing the Statistical Effects of Part Variation Using
Monte Carlo Analysis
This Monte Carlo analysis randomly assigns (within their tolerance range)
values to parameters and records these assigned values. These varied
parameters may later be checked for correlation with performance variations
using the calculator. A time domain simulation is run for each set of assigned
values, and the measurement capability is used to generate statistical design
information.
This procedure requires an InSpecs Statistical Analysis license.
The following list describes how to complete the Monte Carlo form:
1. Display the Looping Commands form (Analyses > Statistical > Monte
Carlo).
2. Edit the following fields in the Monte Carlo form by clicking the mc button in
the Looping Commands form.
Runs: 50
Seed: Constant
Parameter List: rnom(r.r1) rnom(r.r2) c(c.c1) l(l.l1)
Parameter File: pars_mc
When you finished making these changes, click the Accept button in the
Monte Carlo Analysis form.
3. Add a DC analysis to the loop body section of the Looping Commands form
(AddAnalysis > Within Loop(s) > DC Operation Point).
4. Add a Transient analysis to the loop body section of the Looping Commands
form (AddAnalysis > Within Loop(s) > Transient).
5. Edit the following fields in the Transient Analysis form by clicking the
tranalysis button to the loop body section of the Looping Commands form:
End Time: 50m
70 Saber Examples User Guide
D-2010.03-SP1
Chapter 9: Designing the RLC Circuit
Analyzing the Statistical Effects of Part Variation Using Monte Carlo Analysis
Time Step: 10n (1/100th of the periodic input signal)
Max Truncation Error (Calibration tab): 100u
Plot File (Input/Output tab): tr_mc
When you finished making these changes, click the Accept button in the
Transient Analysis form.
6. Measure the overshoot of each generated curve (AddAnalysis > After
Loop(s) > Batch Measure).
7. Click on the measure button and edit the following fields in the Batch
Measurement form.
Measure: Overshoot (Select Time-Domain > Overshoot
from the pulldown menu in the Measure field)
Input Plot File: tr_mc
Curve Name: vout
Output Plot File (Transform tab): over_mc
When you finished making these changes, click the Accept button in the
Batch Measure form.
8. Generate a Histogram of the Overshoot Measurement (AddAnalysis > After
Loop(s) > Histogram).
9. Click on the pfhistogram button and edit the following fields in the Plot File
Histogram form:
Curve Name: over(vout)
Input Plot File: over_mc
Output Plot File: over_hist
When you finished making these changes, click the Accept button in the Plot
File Histogram form.
10. Examine the completed Looping Commands form.
The finished form should contain the following entries:
mc: mc (parfile pars_mc,parlist rnom(r.r1)
rnom(r.r2) c(c.c1) l(l.l1),runs 50 seed
constant
dcanalysis: dc
Saber Examples User Guide 71
D-2010.03-SP1
Chapter 9: Designing the RLC Circuit
Analyzing the Statistical Effects of Part Variation Using Monte Carlo Analysis
tranalysis: tr (monitor 100,pfile tr_mc,
tend 50m,terror 100u,tstep 10n
end:
measure: meas overshoot (cnames vout,pfin
tr_mc,pfout over_mc
pfhistogram: pfhist (cnames over(vout),pfin
over_mc,pfout over_hist
11. Execute the Looping Commands form containing the Monte Carlo Analysis
by clicking the OK button.
12. View the resulting Plot Files in Scope Waveform Analyzer.
You can view the histogram by selecting the count signal in the
ex_rlc.over_hist Plot File window.
13. View the correlation trend, showing that as r1 increases, the value of the
overshoot tends to decrease.
a. Display the Calculator (Tools > Calculator) in Scope.
b. Enter the overshoot measurement into the calculator by displaying the
over_mc plot file, selecting the Over(vout) signal, moving the mouse
cursor to the X-register in the calculator, and pressing the middle mouse
button.
c. Enter the rnom(r.r1) waveform from the pars_mc plot file into the X-
register of the calculator.
d. The calculator should now display the Over(vout) and rnom(r.r1)
waveforms in the stack listing.
e. Select the Wave > f(x) menu item from within the calculator.
f. Plot the correlation by pressing the Graph X button in the icon bar of the
calculator.
72 Saber Examples User Guide
D-2010.03-SP1
Chapter 9: Designing the RLC Circuit
Analyzing the Statistical Effects of Part Variation Using Monte Carlo Analysis
Saber Examples User Guide 73
D-2010.03-SP1
10
10Designing the Loud Speaker Circuit
Describes how to design a loud speaker circuit for the Audio Test System
example.
This circuit models the load speaker at the end of the Audio Test System
example. This circuit demonstrates the following capabilities:
The vin instance uses the v template to implement the expected input signal
from the previous stage (power amplifier).
The susp instance uses the spring_nl template to implement the force that
pulls the voice coil back to equilibrium.
The rsrc instance uses the r template to represent the 8 ohm load of the
speaker.
The air instance uses the winddrag template to model the resistance of the
speaker cone through air.
The mdia instance uses the mass template to represent the weight of the
speaker coil.
The loudspeaker design characteristics are based on performance
specifications given in Loudspeaker and Headphone Handbook, Edited by
John Borwick, 2nd Edition, Focal Press.
mass
NL
force
v_bemf
l
r
Voice Coil
m
8
v_coil
diaphragm
vin
rsrc
mdia
susp
air
Saber Examples User Guide 75
D-2010.03-SP1
Chapter 10: Designing the Loud Speaker Circuit
Determining the Static Response of the Loudspeaker Circuit
Determining the Static Response of the Loudspeaker
Circuit
After you make a local copy of the design, you can simulate the Audio system.
The following procedure invokes Saber on the pre-generated netlist in the
Audio directory:
1. Invoke Saber
(UNIX) Enter the following command:
(Windows) Choose the following menu item:
Start > Synopsys > saber > SaberGuide
2. Open the netlist.
To open the netlist follow these steps:
a. Display the Open Design dialog box (File > Open > Design...).
b. Browse to the directory containing the Audio example files (path/Audio/
Lspkr).
c. Select the ex_lspkr file and open it.
Note: The following steps exercise the Loud Speaker (ex_lspkr)
block of the Audio Test system. These steps determine the
static response, analyze both the non-linear and linear
responses, and analyze the effects of non-linear distortion on
the design.
First, perform a static (dt) analysis to determine the
diaphragm displacement as a function of applied dc voltage.
The suspension stiffness (spring_nl) is non-linear with
displacement.
3. Determine the DC Operating Point.
a. Display the Operating Point Analysis form (Analyses > Operating Point
> DC Operating Point...).
b. Execute the DC analysis by clicking the OK button.
install_home/bin/saber
76 Saber Examples User Guide
D-2010.03-SP1
Chapter 10: Designing the Loud Speaker Circuit
Analyzing the Non-Linear Response
This action performs a DC analysis on the circuit. You can view the
resulting DC values in the Operating Report (Results > Operating Point
Report).
4. Sweep the input voltage and determine the Operating Point at each value.
a. Display the DC Transfer Analysis form (Analyses > Operating Point >
DC Transfer...).
b. Edit the following fields in the DC Transfer Analysis form:
Independent Source: v(v.vin)
[In Cadence, use v(v.vin1)]
Variation Type: Step By
from: -30 to: 30 by: 0.1
Plot after analysis: Yes - Open Only
Signal List (Input/Output tab): diaphragm
c. Perform the analysis by clicking the OK button.
This command determines the operating points when the input voltage source
is swept from -30 volts to 30 volts and saves diaphragm waveform in a Plot File
called dt. After the analysis completes, the plot file is automatically added to the
Signal Manager. By plotting the diaphragm waveform in Scope Waveform
Analyzer, you can determine the maximum movement of the diaphragm.
Analyzing the Non-Linear Response
Perform a small signal ac analysis and compare to the fft results. Note there is
considerable difference in shape near the resonance peak. This is largely due
to the non-linear damping effect of the air-drag on the moving diaphragm,
which is not accounted for in the ac result.
This section assumes that you already invoked Saber on the lspkr design and
found the DC operating point.
1. Determine the time-domain (transient) analysis.
Now perform a transient impulse response test. A 4kv pulse with unity area
is applied, and the diaphragm response is observed.
a. Display the Time-Domain Transient Analysis form (Analyses > Time-
Domain > Transient...).
Saber Examples User Guide 77
D-2010.03-SP1
Chapter 10: Designing the Loud Speaker Circuit
Analyzing the Non-Linear Response
b. Edit the following fields in the Transient Analysis form:
End Time: 1
Time Step: 100n
Monitor Progress: 300
Plot after analysis: Yes - Open Only
Max Truncation Error (Calibration tab): 10u
Max Time Step (Integration Control tab): 0.2m
Plot File: (Input/Output tab): tr
c. Perform the analysis by clicking the OK button.
This command examines the transient response over the first second of
operation and saves the resulting waveforms for each signal on the root
of the design in a Plot File called tr. It also displays the information to the
Saber Guide Transcript Window on every 300th data point of the
simulation. After the analysis completes, the plot file is automatically
added to the Signal Manager and opened. Plot the diaphragm response
by selecting the diaphragm signal in the Plot File window and clicking on
the Plot button.
2. Determine the frequency components at the diaphragm and vin nodes.
a. Display the FFT Transform form (Analyses > Fourier > FFT...).
b. Edit the following fields in the FFT form:
Number of Points: 4096
Plot after analysis: Yes - Open Only
Signals to Transform (Input/Output tab): diaphragm
vin
Input Plot File: (Input/Output tab): tr
Output Plot File: (Input/Output tab): fft
c. Perform the analysis by clicking the OK button.
This command determines the frequency components of the diaphragm
and vin signals and saves the resulting waveform in a Plot File called fft.
After the analysis completes, the plot file is automatically added to the
Signal Manager and opened. You can plot the results of the analysis by
selecting diaphragm and vin in the Plot File window and then clicking on
the Plot button.
78 Saber Examples User Guide
D-2010.03-SP1
Chapter 10: Designing the Loud Speaker Circuit
Analyzing the Non-Linear Response
3. Double the AC magnitude of the v.vin source to mimic the fft frequency
foldover.
The fft displays spectral amplitude at non-zero frequencies as the sum of the
positive and negative frequency components. As these are equal for
physical systems, the values are twice the expected single-sided levels. This
is observed by looking at the spectrum of the input impulse, which is flat at
6 dB (rather than 0 dB) beyond 1kHz.
a. Display the Alter Design form (Edit > Alter...).
b. Select the Netlist tab.
c. Select the v.vin [in Cadence, v.vin1] instance from the Hierarchical
Instance listbox.
d. Click the Edit button in the Alter Design form.
This action displays the Edit Values form.
e. Change the mag parameter to 2.
f. Click on the OK button to change the value in the in-memory netlist.
4. Determine the linear frequency response.
a. Display the Small-Signal Analysis form (Analyses > Frequency > Small-
Signal AC...).
b. Edit the following fields in the AC Analysis form:
Start Frequency: 1
End Frequency: 1k
Number of Points: 1024
Plot after analysis: Yes - Open Only
c. Perform the analysis by clicking the OK button.
This command examines the frequency response between 1 and 1KHz.
The analysis uses 1024 logarithmically-spaced data points and saves
the resulting waveforms for each signal on the root of the design in a
Plot File called ac. Later in this example, you will transform the
diaphragm waveform produced by the AC analysis into the time-domain
using the iFFT transform. Because the iFFT requires the number of
input data point to be a power of 2, the number of data point in the AC
analysis was set to the default value used by the iFFT transform (1024).
Saber Examples User Guide 79
D-2010.03-SP1
Chapter 10: Designing the Loud Speaker Circuit
Analyzing the Linear Response
After the analysis completes, the plot file is automatically added to the
Scope Signal Manager and opened. Plot the diaphragm response by
selecting the diaphragm signal in the Plot File window and clicking on
the Plot button.
Analyzing the Linear Response
In this section, you will linearize the system by zeroing the non-linear
parameters of both the spring and the air-damping effect. Repeat the impulse
response and the fft analysis, and compare this new spectrum with the small
signal ac results. Also, perform an inverse fft analysis on both the fft generated
spectrum and the ac generated spectrum, and compare these with the (linear)
transient impulse response.
The following steps assume that you already have Saber invoked on the
ex_lspkr design.
1. Zero out the non-linear parameters.
a. Display the Alter Design form (Edit > Alter...).
b. Select the Netlist tab.
c. Select the spring_nl.susp and winddrag.air instances from the
Hierarchical Instance listbox.
d. Click the Edit button in the Alter Design form.
This action displays the Edit Values form.
e. Change the following parameters:
spring_nl.susp: Change k3 to 0
winddrag.air: Change w to 0
f. Click on the OK button to change the value in the in-memory netlist.
2. Determine the time-domain (transient) response
a. Display the Time-Domain Transient Analysis form (Analyses > Time-
Domain > Transient...).
b. Edit the following fields in the Transient Analysis form.
End Time: 1
Time Step: 100n
Monitor Progress: 300
80 Saber Examples User Guide
D-2010.03-SP1
Chapter 10: Designing the Loud Speaker Circuit
Analyzing the Linear Response
Plot after analysis: Yes - Open Only
Plot File: (Input/Output tab): tr_lin
Max Truncation Error (Calibration tab): 10u
Max Time Step (Integration Control tab): 0.2m
c. Perform the analysis by clicking the OK button.
This command examines the transient response over the first second of
operation without the non-linear parameters and saves the resulting
waveforms for each signal on the root of the design in a Plot File called
tr_lin. It also displays the information to the Saber Guide Transcript
Window on every 300th data point of the simulation.
After the analysis completes, the plot file is automatically added to the
Signal Manager and opened.
3. Determine the frequency components at the diaphragm node
a. Display the FFT Transform form (Analyses > Fourier > FFT...).
b. Edit the following fields in the FFT form.
Plot after analysis: Yes - Open Only
Signals to Transform (Input/Output tab): diaphragm
Input Plot File: tr_lin
Output Plot File: fft_lin
c. Perform the analysis by clicking the OK button.
This command determines the frequency components of the diaphragm
signal without the non-linear system parameters set and saves the
resulting waveform in a Plot File called fft_lin. After the analysis
completes, the plot file is automatically added to the Signal Manager.
In the next two steps, you will transform the FFT results from the linear
transient response and the previous AC analysis run. Because both plot
files sources are from linear frequency responses, the transform time-
domain results should be similar.
4. Transform the linear frequency response of the diaphragm signal into the
time-domain.
a. Display the IFFT Transform form (Analyses > Fourier > IFFT...).
b. Edit the following fields in the IFFT form:
Plot after analysis: Yes - Open Only
Saber Examples User Guide 81
D-2010.03-SP1
Chapter 10: Designing the Loud Speaker Circuit
Analyzing the Distortion Effects
Signals to Transform (Input/Output tab): diaphragm
Input Plot File: fft_lin
Output Plot File: ifft_fft
c. Perform the analysis by clicking the OK button.
This command determines the time-domain response of the diaphragm
signal using the previous FFT analysis as input. This command saves
the resulting waveform in a Plot File called ifft_fft. The plot file is added
to the Signal Manager and opened.
5. Transform the linear frequency response of the diaphragm signal into the
time-domain.
a. Display the IFFT Transform form (Analyses > Fourier > IFFT...).
b. Edit the following fields in the IFFT form:
Plot after analysis: Yes - Open Only
Signals to Transform (Input/Output tab): diaphragm
Input Plot File: ac
Output Plot File: ifft_ac
c. Perform the analysis by clicking the OK button.
This command determines the time-domain response of the diaphragm
signal using the previous AC analysis as input. This command also
saves the resulting waveform in a Plot File called ifft_ac.
The plot file is added to the Signal Manager and opened. You should
now be able to compare the diaphragm curve from the ifft_ac and ifft_fft
plot files.
Analyzing the Distortion Effects
In this topic, you will use distortion analysis and the Fourier transform to
determine distortion effects in the loud speaker design.
1. Add the non-linear parameters.
82 Saber Examples User Guide
D-2010.03-SP1
Chapter 10: Designing the Loud Speaker Circuit
Analyzing the Distortion Effects
Restore the original non-linearities that were removed during the non-linear
analysis of the design. Also, apply a DC bias, set the input voltage to a
sinusoid, and setup the ac source to be the same amplitude as the transient
source.
a. Display the Alter Design form (Edit > Alter...).
b. Select the Netlist tab.
c. Select the spring_nl.susp, winddrag.air, and v.vin [in Cadence, v.vin1]
instances from the Hierarchical Instance listbox.
d. Click the Edit button in the Alter Design form.
This action displays the Edit Values form.
e. Change the following parameters:
spring_nl.susp: Change k3 to 95meg
winddrag.air: Change w to 0.1
v.vin [in Cadence, v.v1]: Change to ac=(5,0),
tran=(sin=(va=5,f=33,vo=15))
f. Click on the OK button to change the value in the in-memory netlist.
2. Determine the DC Operating Point.
a. Display the Operating Point Analysis form (Analyses > Operating Point
> DC Operating Point).
b. Execute the DC analysis by clicking the OK button.
This action performs a DC analysis on the circuit. You can view the
resulting DC values in the Operating Report (Results > Operating Point
Report...).
3. Determine the distortion products at the diaphragm signal.
a. Display the Distortion Analysis form (Analyses > Frequency >
Distortion...)
b. Edit the following fields in the Small-Signal Distortion Analysis form:
Start Frequency: 1
End Frequency: 1k
Number of Points: 1000
Output Signal List: diaphragm
Plot after analysis: Yes - Open Only
Saber Examples User Guide 83
D-2010.03-SP1
Chapter 10: Designing the Loud Speaker Circuit
Analyzing the Distortion Effects
Compute Desensitization (Input/Output tab): Yes
c. Perform the analysis by clicking the OK button.
This command determines the distortion products of the diaphragm
signal and saves the resulting waveforms in a Plot File called ds. The
plot file is added to the Signal Manager and opened. Select and plot the
signals.
d. Select the Graph > Members... menu choice. The Member Attributes
dialog box appears. The distortion types are listed by their signal
names, in this case HD2, HD3, CMP2, and CMP3.
4. Determine the time-domain (transient) response of the system.
In this step, you will determine the time-domain response of the loud
speaker design. You will then determine the frequency spectrum of the
diaphragm waveform using the Fourier transform and compare the
harmonics produced by the fourier and distortion analyses.
a. Display the Time-Domain Transient Analysis form (Analyses > Time-
Domain > Transient...).
b. Edit the following fields in the Transient Analysis form:
End Time: 300m
Time Step: 100n
Monitor Progress: 300
Plot after analysis: Yes - Open Only
Max Truncation Error (Calibration tab): 10u
Max Time Step (Integration Control tab): 1m
Plot File: (Input/Output tab): tr_bias
c. Perform the analysis by clicking the OK button.
This command determines the transient response and saves the
resulting waveforms for each signal on the root of the design in a Plot
File called tr_bias. It also displays the information to the Saber Guide
Transcript Window on every 300th data point of the simulation.
After the analysis completes, the plot file is automatically added to the
Signal Manager and opened.
5. Determine the frequency components at the diaphragm node.
a. Display the Fourier Transform form (Analyses > Fourier > Fourier...).
84 Saber Examples User Guide
D-2010.03-SP1
Chapter 10: Designing the Loud Speaker Circuit
Analyzing the Distortion Effects
b. Edit the following fields in the Fourier Analysis form:
Number of Harmonics: 5
Fundamental Frequency: 33
Period End: end
Plot after analysis: Yes - Open Only
Input Data File (Input/Output tab): tr
Output Plot File: fou
c. Perform the analysis by clicking the OK button.
This command transforms the time-domain signals into the frequency
spectrum. This transform determines the 6 values (the fundamental
frequency plus the first five harmonics) and saves the resulting
waveform in a Plot File called fou. After the analysis completes, the plot
file is automatically added to the Signal Manager and opened.
6. Determine the average voltage at the diaphragm node.
With the diaphragm waveform from the tr_bias plot file displayed in Scope,
you can measure the average voltage at the diaphragm node by following
these steps:
a. Display the Measurement tool (Tools > Measurement).
b. Edit the following fields in the Measurement Tool and click on the Apply
button:
Measurement: Levels (average)(Levels > Average)
Signal: diaphragm
7. Analyze the results in Scope Waveform Analyzer.
The static (dc) position of the diaphragm is 1.624 mm with the 15 volts bias.
The measured average position of the diaphragm for the 33 Hz transient
(dynamic) analysis is 1.593 mm. The difference is due to compression, as
indicated by the distortion analysis value of CMP2 at 33 Hz (-26.1 dB). This
value, de-normalized by the fundamental amplitude at 33 Hz (0.586 mm),
yields the dc compression of 0.03 mm. Also, compare the 2nd harmonic
predicted by the small signal distortion analysis vs. the actual (large signal)
results of the Fourier analysis. Both show the 2nd harmonic (at 66Hz)
approximately -10 dB down from the fundamental.
Saber Examples User Guide 85
D-2010.03-SP1
11
11Designing an Electrohydraulic Brake System
Describes how to design an electro-hydraulic brake system. The brake system
example illustrates the various analysis capabilities of Saber and InSpecs, as
applied to multi-technology (mechatronic) design.
The brake system example is a brake-by-wire system that includes a
proportional solenoid valve and other hydraulic and mechanical elements, as
well as electrical and electronic devices for sensing and control. This example
is the basis for an SAE Technical Paper (No. 940184) titled Design Analysis of
an Electronically Controlled Hydraulic Braking System Using the Saber
Simulator.
The example shows the benefit of including all of the interdependent pieces of
a design, in order to analyze important interactions among them that often drive
design performance and overall system cost. InSpecs analyses are used
extensively for that purpose.
To run this example you must have the following licenses: Saber, Component
Library, Digital Simulation, Stress and Sensitivity
The following libraries are required: STL, OTL, CL
ViewDraw: ViewLogic Frameway license
Design Architect: Falcon Frameway license
This section covers the following topics:
Invoking Saber
Running Vary
Viewing and Preparing the Gate-Level Range Design in Saber Sketch and
Saber/Verilog
Specification
Vout: 15VDC
Iout: 0.05A to 2A
Other specifications:
Efficiency 85%
For Windows
the 1825 PWM model, connected in the voltage mode, that also replaces the
modulation circuitry and the error amplifier used in the Closed Loop Circuit
the IRF250 (200 volt) MOSFET model to replace the ideal switches