1 /***************************************************************************
2 JSPICE3 adaptation of Spice3e2 - Copyright (c) Stephen R. Whiteley 1992
3 Copyright 1990 Regents of the University of California.  All rights reserved.
4 Authors: 1992 Stephen R. Whiteley
5 ****************************************************************************/
6 
7 /*
8  * Data structure passed to the OUT init routines.
9  */
10 
11 struct sOUTdata {
12 
13     GENERIC *circuitPtr;
14     GENERIC *analysisPtr;
15     IFuid analName;
16     IFuid refName;
17     int refType;
18     int numNames;
19     IFuid *dataNames;
20     int dataType;
21     GENERIC **plotPtr;
22     int numPts;
23     int count;
24     double initValue;
25     double finalValue;
26     double step;
27 };
28 
29 
30 
31 /* This structure allows external control over the outputting of data
32  * for use with operating range analysis, threshold analysis, and
33  * optimization routines.
34  */
35 
36 struct sOUTcontrol {
37     int     out_check;
38     int     out_usecurplot;
39     int     out_keepplot;
40     double  *out_points;
41     int     out_index;
42     int     out_max;
43     int     out_fail;
44     char    *out_rundesc;
45 #ifdef __STDC__
46     int     (*out_evaluate)(void);
47     void    (*out_end)(void);
48     void    (*out_destroy)(void);
49 #else
50     int     (*out_evaluate)();
51     void    (*out_end)();
52     void    (*out_destroy)();
53 #endif
54 };
55 
56 
57 /*
58  * int  out_check      Set when under control of analysis driver by
59  *                     the driver, evaluate pass/fail for margin analysis.
60  *                     Keep only the latest output.
61  *
62  * int  out_usecurplot Set when under control of analysis driver by
63  *                     the driver, use current plot rather than starting
64  *                     a new one during init.
65  *
66  * int  out_keepplot   Set when under control of analysis driver by
67  *                     the driver, keep the old plot and rundesc for
68  *                     reuse.
69  *
70  * double *out_points  Pointer to an array of running variable (e.g,
71  *                     time) points at which the output conditionals
72  *                     are to be evaluated, loaded by driver. Only
73  *                     used if out_check is true.
74  *
75  * int out_index       The current index into the array, incremented
76  *                     by simulator when the running variable exceeds
77  *                     a check point. Only used if out_check is true.
78  *
79  * int out_max         The size of the check point array, set by driver.
80  *                     Only used if out_check is true;
81  *
82  * int  out_fail       Set if the conditionals failed, in the evaluate
83  *                     function or globally to stop analysis. Only used if
84  *                     out_check is true.
85  *
86  * out_evaluate();     Evaluation function, returns true on failure,
87  *                     supplied by driver. Only used if out_check is true.
88  *
89  * out_end();          Called upon completion of each margin anlysis point,
90  *                     supplied by driver.  Only used if out_check is true.
91  *
92  * out_destroy();      Called when analysis is done, performs cleanup,
93  *                     supplied by simulator.
94  */
95