Jspice3
sensdefs.h
Go to the documentation of this file.
1 /***************************************************************************
2 JSPICE3 adaptation of Spice3f2 - Copyright (c) Stephen R. Whiteley 1992
3 Copyright 1990 Regents of the University of California. All rights reserved.
4 Authors: UCB CAD Group
5  1993 Stephen R. Whiteley
6 ****************************************************************************/
7 
8 #ifndef SENS_DEFS
9 #define SENS_DEFS
10 
11 #include "analysis.h"
12 
13  /* structures used to describe an Adjoint Sensitivity analysis */
14 
15 
16 /* internal data */
17 struct sSENSint {
19  double *dIr, *dIi, *dIdYr, *dIdYi;
20  int size;
22  double *o_values;
23 };
24 
25 
26 typedef struct st_output Output;
27 typedef struct st_nodes Nodes;
29 typedef struct st_modsenlist ModSenList;
30 typedef struct st_devsenlist DevSenList;
31 
32 typedef struct {
33  int JOBtype;
34  JOB *JOBnextJob; /* pointer to next thing to do */
35  char *JOBname; /* name of this job */
36 
38 
39  CKTnode *SENSoutPos; /* output positive node */
40  CKTnode *SENSoutNeg; /* output reference node */
41  IFuid SENSoutSrc; /* output source UID */
42  GENERIC *SENSoutSrcDev;/* pointer to output device */
43  char *SENSoutName; /* name of output, e.g. v(1,2) */
44  double SENSdefTol; /* default tolerance */
45  double SENSdefPert; /* default perturbation */
46  unsigned SENSpct :1; /* flag to indicate pct change */
47  GENERIC *SENSplot; /* pointer to plot */
48  struct sSENSint ST; /* internal variables, pass to subroutines */
49  struct sACprms AC; /* AC parameter storage */
50  struct sDCTprms DC; /* DC parameter storage */
51 
52 } SENSAN;
53 
54 struct st_output {
55  int type;
56  int pos, neg;
57 };
58 
59 struct st_nodes {
60  int pos, neg;
61 };
62 
65  int param_no;
66  double delta, tol;
67 };
68 
69 struct st_modsenlist {
71  int mod_no;
73 };
74 
75 struct st_devsenlist {
77  int dev_no;
79 };
80 
81 
82 #define SENS_POS 2
83 #define SENS_NEG 3
84 #define SENS_SRC 4
85 #define SENS_NAME 5
86 #define SENS_DEFTOL 6
87 #define SENS_DEFPERT 7
88 #define SENS_DEFPERTURB 8
89 #define SENS_DEVDEFTOL 9
90 #define SENS_DEVDEFPERT 10
91 #define SENS_TYPE 11
92 #define SENS_DEVICE 12
93 #define SENS_PARAM 13
94 #define SENS_TOL 14
95 #define SENS_PERT 15
96 
97 
98 #ifdef __STDC__
99 extern int SENSan(GENERIC*,int);
100 extern int SENSaskQuest(GENERIC*,GENERIC*,int,IFvalue*);
101 extern int SENSparse(GENERIC*,GENERIC*,int,GENERIC*,char**,GENERIC*,GENERIC*);
102 extern int SENSsetParm(GENERIC*,GENERIC*,int,IFvalue*);
103 #else
104 extern int SENSan();
105 extern int SENSaskQuest();
106 extern int SENSparse();
107 extern int SENSsetParm();
108 #endif
109 
110 
111 #endif /* DEFS */
112 
ModSenList * first
Definition: sensdefs.h:78
ParamSenList * next
Definition: sensdefs.h:64
double * dIdYr
Definition: sensdefs.h:19
int pos
Definition: sensdefs.h:56
SMPmatrix * dY
Definition: sensdefs.h:18
int SENSsetParm()
int size
Definition: sensdefs.h:20
double SENSdefPert
Definition: sensdefs.h:45
int type
Definition: sensdefs.h:55
GENERIC * SENSoutSrcDev
Definition: sensdefs.h:42
char * SENSoutName
Definition: sensdefs.h:43
double * o_values
Definition: sensdefs.h:22
double * dIdYi
Definition: sensdefs.h:19
JOB * JOBnextJob
Definition: sensdefs.h:34
Definition: cktdefs.h:23
int SENSaskQuest()
int SENSan()
GENERIC * IFuid
Definition: ifsim.h:72
DevSenList * next
Definition: sensdefs.h:76
double * dIi
Definition: sensdefs.h:19
CKTnode * SENSoutPos
Definition: sensdefs.h:39
DevSenList * first
Definition: sensdefs.h:37
GENERIC * SENSplot
Definition: sensdefs.h:47
ModSenList * next
Definition: sensdefs.h:70
int pos
Definition: sensdefs.h:60
ParamSenList * first
Definition: sensdefs.h:72
int SENSparse()
IFcomplex * o_cvalues
Definition: sensdefs.h:21
double tol
Definition: sensdefs.h:66
CKTnode * SENSoutNeg
Definition: sensdefs.h:40
char * JOBname
Definition: sensdefs.h:35
IFuid SENSoutSrc
Definition: sensdefs.h:41
double * dIr
Definition: sensdefs.h:19
double SENSdefTol
Definition: sensdefs.h:44
int JOBtype
Definition: sensdefs.h:33
#define SMPmatrix
Definition: smpdefs.h:11
char GENERIC
Definition: ifsim.h:27