Initial version of donated sources by Avertec, 3.4p5.
[tas-yagle.git] / distrib / sources / tas / mcc / mcc_mod_spice.h
1 /******************************************************************************/
2 /* */
3 /* Chaine de CAO & VLSI AVERTEC */
4 /* */
5 /* Fichier : mcc_mod_spice.h */
6 /* */
7 /* */
8 /* (c) copyright 2001 AVERTEC */
9 /* Tous droits reserves */
10 /* */
11 /* Auteur(s) : Marc KUOCH */
12 /*----------------------------------------------------------------------------*/
13 /* */
14 /* */
15 /*----------------------------------------------------------------------------*/
16
17 /******************************************************************************/
18 /* includes */
19 /******************************************************************************/
20
21 /******************************************************************************/
22 /* defines */
23 /******************************************************************************/
24
25 /******************************************************************************/
26 /* structures */
27 /******************************************************************************/
28
29 /******************************************************************************/
30 /* globals */
31 /******************************************************************************/
32
33 /******************************************************************************/
34 /* functions */
35 /******************************************************************************/
36
37 void mcc_cleanmodel( mcc_modellist *model );
38 extern double mcc_integfordw ( double c, double vbd0, double vbd1, double p, double m);
39 extern int mcc_getmodeltype (char *technoname) ;
40 extern int mcc_get_modeltype (mcc_modellist *ptmodel,char *name) ;
41 extern void mcc_deltechnofile(char *technoname) ;
42 extern mcc_technolist *mcc_gettechnofile (char *technoname) ;
43
44 extern void mcc_initallparam(char *technoname) ;
45 extern void mcc_initmodel (mcc_modellist *ptmodel) ;
46
47 extern double mcc_getLMIN (char *technoname, char *transname,
48 int transtype, int transcase, double L, double W) ;
49
50 extern double mcc_getLMAX (char *technoname, char *transname,
51 int transtype, int transcase, double L, double W) ;
52
53 extern double mcc_getWMIN (char *technoname, char *transname,
54 int transtype, int transcase, double L, double W) ;
55
56 extern double mcc_getWMAX (char *technoname, char *transname,
57 int transtype, int transcase, double L, double W) ;
58
59 extern double mcc_calcCGPO( char *technoname, char *transname,
60 int transtype, int transcase, double L, double W,
61 double temp, double vg,
62 double vd1, double vd2,
63 elp_lotrs_param *lotrsparam );
64 extern double mcc_calcDL (char *technoname, char *transname,
65 int transtype, int transcase, double L, double W, elp_lotrs_param *lotrsparam) ;
66
67 extern double mcc_calcDW (char *technoname, char *transname,
68 int transtype, int transcase,
69 double L, double W, elp_lotrs_param *lotrsparam) ;
70
71 extern double mcc_calcDWCJ (char *technoname, char *transname,
72 int transtype, int transcase,
73 double L, double W, elp_lotrs_param *lotrsparam, double temp) ;
74
75 extern double mcc_calcDLC (char *technoname, char *transname,
76 int transtype, int transcase, double L, double W, elp_lotrs_param *lotrsparam) ;
77
78 extern double mcc_calcDWC (char *technoname, char *transname,
79 int transtype, int transcase,
80 double L, double W, elp_lotrs_param *lotrsparam) ;
81
82 extern double mcc_calcVTH(char *technoname, char *transname,
83 int transtype, int transcase, double L, double W,
84 double temp, double vbs, double vds,elp_lotrs_param*,int mcclog) ;
85
86 extern double mcc_calcIDS(char *technoname, char *transname,
87 int transtype, int transcase, double vbs, double vgs,
88 double vds, double L, double W,
89 double temp,elp_lotrs_param *lotrsparam) ;
90
91 extern double mcc_calcVDDDEG(char *technoname, char *transname,
92 int transtype, int transcase, double L, double W,
93 double vdd, double temp,
94 double step,elp_lotrs_param *lotrsparam) ;
95
96 extern double mcc_calcVSSDEG(char *technoname, char *transname,
97 int transtype, int transcase, double L, double W,
98 double vdd, double temp,
99 double step,elp_lotrs_param *lotrsparam) ;
100
101 extern double mcc_calcCGD(char *technoname, char *transname,
102 int transtype, int transcase, double L, double W,
103 double temp, double vgs0, double vgs1, double vbs, double vds,
104 elp_lotrs_param *lotrsparam) ;
105
106 extern double mcc_calcCGSI(char *technoname, char *transname,
107 int transtype, int transcase, double L, double W,
108 double temp, double vgs, double vbs, double vds,
109 elp_lotrs_param *lotrsparam) ;
110
111 extern double mcc_calcCGP(char *technoname, char *transname,
112 int transtype, int transcase, double L, double W,
113 double vgx, double *ptQov, elp_lotrs_param *lotrsparam, double temp) ;
114
115 extern double mcc_calcCGPU (char *technoname, char *transname,
116 int transtype, int transcase, double L, double W,
117 double vdd) ;
118
119 extern double mcc_calcCGPD (char *technoname, char *transname,
120 int transtype, int transcase, double L, double W,
121 double vdd) ;
122
123 extern double mcc_calcCDS(char *technoname, char *transname, int transtype,
124 int transcase, double L, double W, double temp,
125 double vbx1, double vbx2, elp_lotrs_param *lotrsparam) ;
126
127 extern double mcc_calcCDP(char *technoname, char *transname, int transtype,
128 int transcase, double L, double W,
129 double temp, double vbx1, double vbx2,
130 elp_lotrs_param *lotrsparam) ;
131
132 extern double mcc_calcCDW(char *technoname, char *transname, int transtype,
133 int transcase, double L, double W, double temp,
134 double vbx1, double vbx2, double vgx,
135 elp_lotrs_param *lotrsparam) ;
136
137 extern double mcc_calcCSS(char *technoname, char *transname, int transtype,
138 int transcase, double L, double W, double temp,
139 double vbx1, double vbx2, elp_lotrs_param *lotrsparam) ;
140
141 extern double mcc_calcCSP(char *technoname, char *transname, int transtype,
142 int transcase, double L, double W,
143 double temp, double vbx1, double vbx2, elp_lotrs_param *lotrsparam) ;
144
145 extern double mcc_calcCSW(char *technoname, char *transname, int transtype,
146 int transcase, double L, double W, double temp,
147 double vbx1, double vbx2, double vgx,
148 elp_lotrs_param *lotrsparam) ;
149
150 extern double mcc_gettechnolevel(char *technoname ) ;
151
152 extern int mcc_gettransindex(char *technoname, char *transname,
153 int transtype, int transcase, double L, double W) ;
154
155 extern char *mcc_getmodelname(char *technoname, char *transname,
156 int transtype, int transcase, double L, double W) ;
157
158 extern double mcc_getXL (char *technoname, char *transname,
159 int transtype, int transcase, double L, double W) ;
160
161 extern double mcc_getXW (char *technoname, char *transname,
162 int transtype, int transcase, double L, double W) ;
163
164 extern double mcc_calcCGS_com(mcc_modellist *ptmodel) ;
165 extern double mcc_calcCGP_com(mcc_modellist *ptmodel) ;
166 extern double mcc_calcCDS_com(mcc_modellist *ptmodel, double temp, double vbx1, double vbx2) ;
167 extern double mcc_calcCDP_com(mcc_modellist *ptmodel, double temp, double vbx1, double vbx2) ;
168 extern double mcc_calcCDW_com(mcc_modellist *ptmodel, double temp, double vbx1, double vbx2,
169 double vgx, double L, double W) ;
170 extern double mcc_calcDL_com (mcc_modellist *ptmodel) ;
171 extern double mcc_calcDW_com (mcc_modellist *ptmodel) ;
172
173
174 extern void mcc_initparam_com (mcc_modellist *ptmodel) ;
175 extern void mcc_initparam_diode (mcc_modellist *ptmodel) ;
176
177 extern double mcc_calcRapIdsTemp(char *technoname, char *transname, int transtype,
178 int transcase, double L, double W, double vdd, double T0, double T1) ;
179 extern double mcc_calcRapIdsVolt(char *technoname, char *transname, int transtype,
180 int transcase, double L, double W, double temp, double V0, double V1) ;
181 extern double mcc_calcVDDDEG_com (mcc_modellist *ptmodel, char *transname,double L, double W,
182 double vdd, double temp, double step,
183 elp_lotrs_param *lotrsparam) ;
184 extern double mcc_calcVSSDEG_com (mcc_modellist *ptmodel, char *transname,double L, double W,
185 double vdd, double temp, double step,
186 elp_lotrs_param *lotrsparam);
187 extern void mcc_PrintQint (char *technoname, char *transname,
188 int transtype, int transcase, double L, double W,
189 double temp, double vdd,elp_lotrs_param *lotrsparam, char *optnamevdd, char *optnamevss, int usechannel, char location);
190 extern void mcc_DisplayInfos (char *technoname, char *transname,
191 int transtype, int transcase, double L, double W,
192 double temp, double vgs, double vbs, double vds,
193 double vdd,elp_lotrs_param *lotrsparam);
194 extern void mcc_calcQint (char *technoname, char *transname,
195 int transtype, int transcase, double L, double W,
196 double temp, double vgs,double vbs, double vds,
197 double *ptQg,double *ptQs, double *ptQd, double *ptQb,
198 elp_lotrs_param *lotrsparam);
199 extern double mcc_calcCGSD (char *technoname, char *transname,
200 int transtype, int transcase, double L, double W,
201 double temp, double vdd, double vfinal,int vdsnull,elp_lotrs_param *lotrsparam);
202 extern double mcc_calcCGSU (char *technoname, char *transname,
203 int transtype, int transcase, double L, double W,
204 double temp, double vdd, double vfinal,int vdsnull,elp_lotrs_param *lotrsparam);
205 double mcc_calcCGS( char *technoname, char *transname, int transtype, int transcase, double L, double W, double temp, double vgsi, double vgsf, double vdsi, double vdsf, elp_lotrs_param *lotrsparam );
206 extern void mcc_GetInputCapa ( char *technoname, char *transname,
207 int transtype, int transcase, double L, double W,
208 double temp, double vg1, double vg2,
209 double vd1, double vd2, double vs1, double vs2,
210 elp_lotrs_param *lotrsparam,
211 double *ptcgs, double *ptcgd, double *ptcgp);
212 extern double mcc_calc_vt (double temp);
213 extern double mcc_calc_eg (double temp);
214 extern double mcc_calcDioCapa ( char *technoname, char *dioname,
215 int modtype, int modcase,
216 double Va, double Vc, double temp,
217 double area, double perim
218 );
219 extern double mcc_dio_calcCapa ( mcc_modellist *ptmodel,
220 double Va, double Vc, double temp,
221 double area, double perim
222 );
223 extern double mcc_dio_calcCapa_l1 ( mcc_modellist *ptmodel,
224 double Va, double Vc, double temp,
225 double area, double perim
226 );
227 extern double mcc_dio_calcCapa_l2 ( mcc_modellist *ptmodel,
228 double Va, double Vc,
229 double temp,
230 double area
231 );
232 extern double mcc_dio_calcCapa_l3 ( mcc_modellist *ptmodel,
233 double area
234 );
235 extern double mcc_dio_calcCapa_l8 ( mcc_modellist *ptmodel,
236 double Va,double Vc,
237 double temp,
238 double area, double perim
239 );
240 extern double mcc_calcIgb (char *technoname, char *transname,
241 int transtype, int transcase,
242 double vbs, double vgs, double vds,
243 double L, double W,
244 double temp,elp_lotrs_param *lotrsparam);
245 extern void mcc_calcIgixl (char *technoname, char *transname,
246 int transtype, int transcase,
247 double vbs, double vgs, double vds,
248 double L, double W, double temp,
249 double *ptIgidl, double *ptIgisl,
250 elp_lotrs_param *lotrsparam);
251 extern void mcc_calcIxb (char *technoname, char *transname,
252 int transtype, int transcase,
253 double vbs, double vds,
254 double L, double W, double temp,
255 double AD, double PD, double AS, double PS,
256 double *ptIdb, double *ptIsb,
257 elp_lotrs_param *lotrsparam) ;
258 extern void mcc_calcIgx (char *technoname, char *transname,
259 int transtype, int transcase,
260 double vds, double vgs,
261 double L, double W, double temp,
262 double *ptIgd, double *ptIgs,
263 elp_lotrs_param *lotrsparam);
264 extern void mcc_calcIgcx (char *technoname, char *transname,
265 int transtype, int transcase,
266 double vds, double vgs, double vbs,
267 double L, double W, double temp,
268 double *ptIgcd, double *ptIgcs,
269 elp_lotrs_param *lotrsparam);
270 extern void mcc_compute_RD_RS ( mcc_modellist *ptmodel, double Weff,
271 double *ptRS, double *ptRD, elp_lotrs_param *lotrsparam );
272 extern double mcc_calcILeakage (char *technoname, char *transname,
273 int transtype, int transcase,
274 double vbs, double vds, double vgs,
275 double L, double W, double temp,
276 double AD, double PD, double AS, double PS,
277 double *BLeak, double *DLeak, double *SLeak,
278 elp_lotrs_param *lotrsparam);
279 extern double mcc_calcVTI (char *technoname, char *transname,
280 int transtype, int transcase, double L, double W,
281 double vdd, double temp,
282 double step, elp_lotrs_param *lotrsparam);
283 extern void mcc_calcPAfromgeomod( lotrs_list *lotrs,
284 char *modelname,
285 int type,
286 int lotrscase,
287 double vdd,
288 elp_lotrs_param *lotrsparam,
289 double *as,
290 double *ad,
291 double *ps,
292 double *pd
293 );
294
295 void mcc_calcRACCESS( char *technoname, char *transname,
296 int transtype, int transcase, double L, double W,
297 elp_lotrs_param *lotrsparam,
298 double *RS, double *RD
299 );
300 int mcc_getspicetechno( char *technoname, char *transname, int transtype, int transcase, double L, double W );
301 void mcc_check_capa_print( char trans, char *technoname, char *transname, int transtype, int transcase, double L, double W, double temp, double vdd, elp_lotrs_param *lotrsparam );
302 int mcc_get_swjuncap( char *technoname, char *transname, int transtype, int transcase, double L, double W );
303 void mcc_check_quick_param_namealloc();