6.3. pyopus.design.wcd
— Worst case distance computation
Worst case distance analysis (PyOPUS subsystem name: WCD)
Computes the worst case distances of the circuit’s performances. Statistical parameters are assumed to be independent with zero mean and standard deviation equal to 1.
- class pyopus.design.wcd.WorstCaseDistance(heads, analyses, measures, corners, statParamDesc, opParamDesc, fixedParams={}, variables={}, debug=0, sigmaBox=10, linearWc=True, alternating=True, maxPass=20, wcStepTol=0.01, stepTol=0.01, constrTol=0.01, angleTol=15, stepScaling=4, perturbationScaling=64, maximalStopperStep=0.5, evaluatorOptions={}, sensOptions={}, screenOptions={'contribThreshold': 0.01, 'cumulativeThreshold': 0.25, 'squared': True, 'useSens': False}, opOptimizerOptions={}, optimizerOptions={}, spawnerLevel=1)[source]
Performs worst case distance analysis.
See the
PerformanceEvaluator
class for details on heads, analyses, measures, and variables.corners is the dictionary of corner definitions, exactly one corner for every head. These are prototype corners and do not specify any operating or statistical parameters.
Performance measures that are vectors can also be a subject of worst case distance analysis.
See the
WorstCase
class for the explanation of statParamDesc, opParamDesc, fixedParams, maxPass, wcStepTol, stepTol, constrTol, angleTol, stepScaling, perturbationScaling, maximalStopperStep, evaluatorOptions, sensOptions, screenOptions, opOptimizarOptions, optimizerOptions, and spawnerLevel options.Setting debug to a value greater than 0 turns on debug messages. The verbosity is proportional to the specified number.
sigmaBox is the box constraint on normalized statistical parameters (i.e. normalized to N(0,1)).
If linearWc is set to
True
the initial point in the space of the statistical parameters is computed using linear worst case distance analysis.If alternating is set to
True
the worst case is computed by alternating optimizations in the operating and statistical parameter space.This is a callable object with an optional argument specifying which worst case distances to compute. If given, the argument must be a list of entries. Every entry is
a tuple of the form (name,type), where name is the measure name and type is
lower
orupper
a string specifying the measure name. In this case the type of computed worst case distance is given by the presence of the
lower
and theupper
entries in the measure’s description.
If no argument is specified, all worst case distances corresponding to lower/upper bounds of all measures are computed.
The results are stored in the
results
member. They are represented as a list of dictionaries with the following members:name
- name of the performance measurecomponent
- index of the performance measure’s componentNone
for scalar performance measurestype
-lower
orupper
passes
- number of algorithm passesevals
- number of evaluationsstatus
-OK
,FAILED
,OUTSIDE+
,OUTSIDE-
,SENS+
, orSENS-
nominal
- nominal performancenominal_wcop
- performance at nominal statistical parameters and initial worst case operating parameterslinwc
- performance at the linearized worst case distance pointwc
- performance at the worst case distance pointlindist
- linearized worst case distancedist
- worst case distanceop
- operating parameter values at the worst case distance pointstat
- statistical parameter values at the worst case distance pointmodules
- input file modules from the corner where the measure was evaluatedhead
- name of the head used for evaluating this measure
Status FAILED means that the algorithm failed to converge in maxPass passes.
Status OUTSIDE+ means that the algorithm faield to find a point satisfying the WCD search constraint for positive WCD. This means that the WCD is a large positive value.
Status OUTSIDE- means that the algorithm faield to find a point satisfying the WCD search constraint for negative WCD. This means that the WCD is a large negative value.
SENS+ and SENS- are similar to OUTSIDE+ and OUTSIDE-, except that they occur when the sensitivity to statistical parameters is very small (i.e. linear WCD point is at a distance greater than half the sigmaBox diagonal).
SENS0 indicates the norm of the sensitivity is zero and the linear worst case distance point is not computed. If the computed worst case distance is zero then it should be considered as not valid.
Objects of this type store the number of analyses performed during the last call to the object in a dictionary stored in the
analysisCount
member.The return value of a call to an object of this class is a tuple holding the results structure and the analysis count dictionary.
- formatResults(results=None, nMeasureName=10, nResult=15, nPrec=5, nEvalPrec=4, details=False)[source]
Formats the results as a string.
nMeasureName specifies the formatting width for the performance measure name.
nResult and nPrec specify the formatting width and the number of significant digits for the performance measure values.
nEvalPrec is the number of spaces reserved for the evaluations count.
If details is
True
the nominal performance, the performance the worst case operating parameters and the nominal statistical parameters, and the linear worst case distance are also formatted.