1 /**********
2 Copyright 1990 Regents of the University of California.  All rights reserved.
3 Author: 1985 Thomas L. Quarles
4 Modified: 1999 Paolo Nenzi
5 **********/
6 /*
7  */
8 #ifndef ngspice_TRCVDEFS_H
9 #define ngspice_TRCVDEFS_H
10 
11 
12 #include "ngspice/jobdefs.h"
13 #include "ngspice/tskdefs.h"
14 #include "ngspice/gendefs.h"
15     /*
16      * structures used to describe D.C. transfer curve analyses to
17      * be performed.
18      */
19 
20 #define TRCVNESTLEVEL 2 /* depth of nesting of curves - 2 for spice2 */
21 
22 /* PN: The following define is for temp sweep */
23 /* Courtesy of: Serban M. Popescu */
24 #ifndef TEMP_CODE
25 #define TEMP_CODE 1023
26 #endif
27 
28 typedef struct {
29     int JOBtype;
30     JOB *JOBnextJob;
31     char *JOBname;
32     double TRCVvStart[TRCVNESTLEVEL];   /* starting voltage/current */
33     double TRCVvStop[TRCVNESTLEVEL];    /* ending voltage/current */
34     double TRCVvStep[TRCVNESTLEVEL];    /* voltage/current step */
35     double TRCVvSave[TRCVNESTLEVEL];    /* voltage of this source BEFORE
36                                          * analysis-to restore when done */
37     int TRCVgSave[TRCVNESTLEVEL];    /* dcGiven flag; as with vSave */
38     IFuid TRCVvName[TRCVNESTLEVEL];     /* source being varied */
39     GENinstance *TRCVvElt[TRCVNESTLEVEL];   /* pointer to source */
40     int TRCVvType[TRCVNESTLEVEL];   /* type of element being varied */
41     int TRCVset[TRCVNESTLEVEL];     /* flag to indicate this nest level used */
42     int TRCVnestLevel;      /* number of levels of nesting called for */
43     int TRCVnestState;      /* iteration state during pause */
44 } TRCV;
45 
46 enum {
47     DCT_START1 = 1,
48     DCT_STOP1,
49     DCT_STEP1,
50     DCT_NAME1,
51     DCT_TYPE1,
52     DCT_START2,
53     DCT_STOP2,
54     DCT_STEP2,
55     DCT_NAME2,
56     DCT_TYPE2,
57 };
58 
59 #endif
60