当前位置:文档之家› saber仿真软件tdsa模块使用说明

saber仿真软件tdsa模块使用说明

tdsa tdsa (MX-Scan)Associated Symbols:tdsaLicense Requirements:MODEL_SYNTHESISPart Category:Analog Model Synthesis Templates Related Topics:Analog Model Synthesis Overview Functional DescriptionThe tdsa template uses sine wave stimulus techniques to obtain phase and gain information for a large-signal circuit. You connect the output as a source for the design under test, and the input to the output of the design. When you run a transient analysis, tdsa simulates the design, measures its output, and calculates phase and gain information, which it stores in a plot file. It also offers an optional bandpass input filter, and includes a source for a standard AC analysis.Template Description SectionsConnection PointsSymbol PropertiesPost-Processing InformationModel DescriptionUsage NotesExampletdsa Connection PointsName Type Descriptionoutp electrical positive output of sinusoidal source outm electrical negative output of sinusoidal source inp electrical positive input for measurements inm electrical negative input for measurements enbl logic_4enable input for frequency sweepMX Scan (tdsa)tdsa tdsa Symbol PropertiesPropertyprimitive Description:This symbol calls the templatetdsa. The template will create anAC or complex plot file for thecircuit under test during atransient analysis. This is notmeant to replace the standard ACanalysis, but to allow AC resultsto be obtained for circuits thatwill not work with the standardAC analysis. An example isswitching circuits.WARNING! Since a template andnot the simulator creates the plotfile, analyses with looping (suchas vary and mc) will not functionas expected. Only the AC dataobtained from the last loop will bein the plot file created by the tdsatemplate.ref Description:Suffix appended to a templatename that uniquely identifies apart in a schematic.Default: If not specified will be assignedby Schematic Capture ToolExampleCan be any alpha-numeric stringInput:fbegin Description:Starting frequency value for thefrequency sweep. A value isrequired and it must be > 0.Default (units):value required (Hz)ExampleInput:100fend Description:Ending frequency value for thefrequency sweep. A value isrequired and it must be > 0.Default (units):value required (Hz)ExampleInput:10kpfile Description:Name of the plot file created bytdsa template. File identifier(suffix) identifying AC plot fileshowing the frequency responsedetermined by tdsa.Default(units):ac_tdsaExample Input: Can be any alpha-numeric string in quotes. ac_1 Plot file generated: design.ac_1Propertytdsa ampl Description:Peak amplitude of output sinewave relative to DC offset.Default (units): 100m (V)ExampleInput:200moffset Description:Offset voltage of the outputwaveform.Default (units): 0 (V)ExampleInput:2npoints Description:Number of frequency steps totake during the frequency sweepfrom fbegin to fend. Must be aninteger > 0.Default (units): 100 (—)Example Input: 200Propertymode Description:Type of frequency sweep to beperformed.Default (units):logswp (—)Values:linswp Linear spacing offrequency points. All points areequally spaced from fbegin tofend.logswp Log base 10 spacing offrequency points. All points areequally spaced on a log scale.rlogswp1-log base 10 spacing offrequency points. Distribution ofpoints is weighted toward fendon a log scale.Example Input:logswpPropertytdsa max_err Description:Maximum error allowed forwriting data to the plot file andgoing to the next frequency pointin the sweep. Error is calculatedfor gain and phase and both mustbe less then max_err to continueon to next frequency point. Mustbe > 0.Default (units): 0.01 (—)ExampleInput:0.005max_nper Description:Maximum number of periodsallowed before switching to thenext frequency point, even if theerror is larger then max_err.Data gets written to the plot fileand a warning is sent to thescreen. Must be an integer >= 3.Default (units): 30 (—)Example Input: 40Propertymin_nper Description:Minimum number of periodsrequired before switching to thenext frequency even if the error isless than max_err. Must beinteger >= 3 and < max_nper.Default (units): 3 (—)ExampleInput:4min_tspp Description:Minimum number of time stepstaken during a period. Forcircuits with very little switchingyou need to insure a reasonablenumber of time steps are takenper period. Must be >= 20. Thisaffects the accuracy of the phaseinformation obtained. A largernumber increases the accuracybut can slow down the simulation.Default (units): 40 (—)Example Input: 35Propertytdsa a0 Description:The gain of the input bandpassfilter. Can be positive or negativeif you want to invert the inputsignal.Default (units): 1 (—)ExampleInput:1q0 Description:The quality factor of the inputbandpass filter. A larger valuewill cause longer settling timesand longer simulations. Thequality factor effects thebandwidth of the filter as well asthe settling time.Quality = Center Frequency/BandWidthDefault (units): 10 (—)Example Input: 10Propertyfilter Description:The input signal can be ranthrough a second order bandpassfilter. The gain and qualityfactors are controlled by theparameters a0 and q0. The centerfrequency of the filter changes asthe frequency is swept fromfbegin to fend. For circuits withswitching and/or Non-linearcomponents the prefilter shouldbe used to filter out unwantedharmonics. If the circuit undertest already has filtering then useof the input filter is optional.Default (units): yes (—)Values: yes(Filter the input signal)no(Do not Filter the input signal)Example Input: noPropertyac Description:Specify parameters for a standardAC analysis.Default (units): [mag=1,phase=0] (V, degrees)ExampleInput:1,0enbl_init Description:Used to internally enable thetdsa. If _1 is specified, then thetdsa will be enabled even thoughthe enable pin is not connected.Other values imply the tdsa isnot enabled. If the enable pin isconnected, then events on thatpin will override the effect of theinternal enable.Default: _1Values:_0 logic 0_1 logic 1_x logic x_z logic zExample Input: _xPropertytdsa Post Processing InformationName Type Units Descriptionvin V input differential voltage (vin =v(inp) - v(inm))vout V output differential voltage (vout =v(outp) - v(outm))gain_err V calculated gain error for the inputsignalphase_err rad calculated phase error for the inputsignalcycle_cnt—number of complete sine waveperiods taken to obtain a gain andphase error less than max_err tdsa_info—grouping of signals (vin, vout,gain_err, phase_err,cycle_cnt)tdsa Model DescriptionThe tdsa template uses sine wave stimulus techniques to obtain phase and gain information for a circuit. Note that output impedance is zero and input impedance is infinite. A sine wave from the output stimulates the circuit under test. The output response from the circuit under test is measured and phase, gain information are calculated.tdsa The on/off input is digital and turns a sweep on or off. Each time on/off goes high a new sweep is started. Keep in mind that any previous sweep data will be deleted. If you want to perform multiple sweeps you need to halt the simulation alter the pfile parameter of the tdsa template and then restart the simulation.To use the template connect the output of our source to the portion of the circuit under test that you want to stimulate. Then connect the input or measurement pins to the output of the circuit under test that you want the AC results for. If you leave the on/off input unconnected the sweep will start at the beginning of the tr analysis. Otherwise the sweep will start when on/off goes high.A set of signals have been grouped together under the name tdsa_info. These can be useful in determining what is actually happening during the tr analysis. Use the extraction command to extract these signals and view them after the tr analysis has completed.tdsa Usage NotesThe tdsa template is useful for performing an AC analysis in cases where the standard analysis techniques do not produce useful information (some examples are switching power supplies, sigma delta A/D converters, and mixed technology systems). The template has a set of output ports for simulating a design and a set of input ports for measuring the response of the design. It also has an enable port (labeled ON/OFF on the symbol) to which you can connect a device to control how and when it is enabled.During a transient (time domain) simulation, the template stimulates the design with a sine wave over a range of frequency points. For each frequency, it measures the output of the design and calculates the phase shift and gain. From the data points generated for all the frequencies it constructs a frequency response, which it writes to a plot file. Normally, good results can be produced for signal attenuation down to -80 dB.By adjusting the max_err, max_nper and min_nper arguments, you can instruct the tdsa template how to determine when and if it has a reliable response from the design and when to move on to the next frequency point. By setting the offset property value to match the steady-state voltage level of the circuit, you can maintain the design’s typical operating conditions while it is being simulated (tdsa detects a measurable response only when the signal from the circuit crosses this threshold value).When you invoke the simulator on a design that includes tdsa, or change the values of the properties of tdsa, it calculates the maximum and estimated TEnd (Time End) for the simulation, and alerts you with a message on the screen. As the simulation run proceeds, status messages tell you how much of the simulation period has elapsed. When you compare this to the “real” time that has elapsed, you can estimate how long it will take your computer to complete the entire simulation run. This is useful information (particularly for switched systems) for simulation runs that can take hours, depending on the switching frequency and the sweep arguments.tdsa Because a template is creating the plot file (rather than the simulator), the analyses with looping (such as “vary” or “Monte Carlo”) do not produce multi-segment signals in the plot file, unlike a plot file generated by the simulator. Only the AC data obtained from the last loop is recorded in the plot file created by tdsa. If you want to perform multiple frequency sweeps during the same simulation session, rename the plot files between sweeps to avoid overwriting the previously-generated one.The tdsa template automatically halts a simulation when the frequency sweep is completed. You can stop a sweep before the last frequency point is reached by using the enbl input (labeled ON/OFF on the symbol). If you do this, the simulation continues but stops taking measurements. The simulation also stops if tdsa cannot obtain valid results due to a lack of threshold crossings on the measurement input.Several tdsa arguments affect accuracy and simulation time: npoints determines how many frequency points will bemeasured. Increasing this value increases theresolution of the results, but also increasesimulation time.max_err sets the maximum allowable error of the phase and gain. It is calculated by keeping a running averageof the last 3 phase and gain measurements andcomparing it to the current phase and gain. Whenthe calculated measurement error is belowmax_err, data is written to the plot file and thenext frequency point is started.Large-signal systems may produce unwanted harmonics. You can use the bandpass filter to remove these unwanted harmonics from the input waveform. The filter automatically changes its center frequency to each frequency point during the sweep. The filter section uses a second-order filter of the form:max_nper and min_nper sets upper and lower bounds on the number of periods tdsa can continue generating a signal at a given frequency . If npoints is large, the error insome circuits will be less than max_err within 3 to4 periods. However, the phase and gain error is stillaffected by values from the previous frequency .Setting min_nper = 5 ensures that all the phaseand gain values used to calculate the phase andgain error are based on the current frequency value.The max_nper argument is supplied to help limitsimulation times. It overrides the max_errargument, causing the template to go to the nextfrequency , even if the calculated measurement erroris still too large.min_tspp sets minimum time steps per period, which affectsthe accuracy of the phase. Because tdsa calculatesphase information from zero crossings, the moretime steps per period, the more accurate the zerocrossing calculation. Increasing this number yieldsmore accurate phase information but slowssimulation. The default value of 40 gives goodresults for most circuits.tdsaThe arguments a0 and q0 let you control filter gain and quality, respectively. The bandwidth is determined by f0/q0, so a larger q0narrows the bandwidth, but increases the input settling time, which can increase simulation time. In some switched circuits, if the switching noise is large compared to the stimulus signal, a high q0 value can actually reduce simulation time.If you do not connect the enbl input (labeled ON/OFF on the symbol) and you set the argument enbl_init to a value of _1 (enabling tdsa), it initiates a frequency sweep at the beginning of a transient simulation. If you connect the enbl input, it controls when a sweep starts and stops.If no threshold crossings occur for the input signal at a given frequency, tdsa cannot obtain accurate AC data, and does not write any data to the plot file for that frequency point. If this occurs, a warning message is sent and the simulation proceeds to the next frequency point. This can happen if you set tdsa to take large frequency steps (a small npoints value) and/or you set the max_nper value too low. If tdsa skips three consecutive frequency points due to lack of threshold crossings, it assumes no valid phase and gain information can be obtained after that point, at which time it halts the simulation and alerts you with a warning message.。

相关主题