You can use the .AC statement in several different formats, depending on the application, as shown in the examples below. The parameters are described below.
.AC type np fstart fstop <SWEEP var start stop incr>
.AC type np fstart fstop <SWEEP var type np start stop>
.AC var1 START = <param_expr1> STOP = <param_expr2>
+ STEP = <param_expr3>
.AC var1 START = start1 STOP = stop1 STEP = incr1
.AC type np fstart fstop <SWEEP DATA = datanm>
.AC DATA = datanm OPTIMIZE = opt_par_fun RESULTS = measnames
+ MODEL = optmod
.AC type np fstart fstop <SWEEP MONTE = val>
The .AC statement keywords and parameters have the following descriptions:
|
voltage, current, element or model parameter increment value NOTE: If "type" variation is used, the "np" (number of points) is specified instead of "incr". |
|
|
NOTE: If type variation "POI" (list of points) is used, a list of frequency values is specified instead of "fstart fstop". |
|
|
Produces a number val of randomly-generated values that are used to select parameters from a distribution. The distribution can be Gaussian , Uniform , or Random Limit. See Performing Monte Carlo Analysis for more information. |
|
|
Number of points per decade or per octave, or just number of points, depending on the preceding keyword |
|
|
Starting voltage, current, any element or model parameter value |
|
|
Final voltage, current, any element or model parameter value |
|
|
Keyword to indicate a second sweep is specified in the .AC statement |
|
|
Name of an independent voltage or current source, any element or model parameter, or the keyword TEMP (indicating a temperature sweep). Star-Hspice supports source value sweep, referring to the source name (SPICE style). However, if parameter sweep, a .DATA statement, and temperature sweep are selected, a parameter name must be chosen for the source value and subsequently referred to in the .AC statement. The parameter name can not start with V or I. |
The following example performs a frequency sweep by 10 points per decade from 1 kHz to 100 MHz.
The next line calls for a 100 point frequency sweep from 1 Hz to 100 Hz.
The following example performs an AC analysis for each value of cload, which results from a linear sweep of cload between 1 pF and 10 pF (20 points), sweeping frequency by 10 points per decade from 1 Hz to 10 kHz.
.AC DEC 10 1 10K SWEEP cload LIN 20 1pf 10pf
The following example performs an AC analysis for each value of rx, 5 k and 15 k, sweeping frequency by 10 points per decade from 1 Hz to 10 kHz.
.AC DEC 10 1 10K SWEEP rx n POI 2 5k 15k
The next example uses the DATA statement to perform a series of AC analyses modifying more than one parameter. The parameters are contained in the file datanm .
.AC DEC 10 1 10K SWEEP DATA = datanm
The following example illustrates a frequency sweep along with a Monte Carlo analysis with 30 trials.
.AC DEC 10 1 10K SWEEP MONTE = 30
When an .AC statement is included in the input file, Star-Hspice performs an AC analysis of the circuit over the specified frequency range for each parameter value specified in the second sweep.
For an AC analysis, at least one independent AC source element statement must be in the data file (for example, VI INPUT GND AC 1V). Star-Hspice checks for this condition and reports a fatal error if no such AC sources have been specified (see Using Sources and Stimuli).