Xyce  6.1
N_DEV_ADMSvbic.h
Go to the documentation of this file.
1 
2 // -*-c++-*-
3 //-----------------------------------------------------------------------------
4 // Copyright Notice
5 //
6 // Copyright 2002 Sandia Corporation. Under the terms
7 // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
8 // Government retains certain rights in this software.
9 //
10 // Xyce(TM) Parallel Electrical Simulator
11 // Copyright (C) 2002-2015 Sandia Corporation
12 //
13 // This program is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as published by
15 // the Free Software Foundation, either version 3 of the License, or
16 // (at your option) any later version.
17 //
18 // This program is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program. If not, see <http://www.gnu.org/licenses/>.
25 //-----------------------------------------------------------------------------
26 
27 //-----------------------------------------------------------------------------
28 // Filename : $RCSfile: N_DEV_ADMSvbic.h,v $
29 //
30 // Purpose :
31 //
32 // Special Notes : Generated from verilog file vbic_3T_et_cf_Xyce_typed.vla with ADMS
33 // interface for Xyce 6.4.0
34 // DO NOT EDIT THIS FILE DIRECTLY! It may be overwritten!
35 //
36 // Creator : admsXml-2.3.4
37 //
38 // Creation Date : Wed, 04 Nov 2015 13:32:34
39 //
40 // Revision Information:
41 // ---------------------
42 //
43 // Revision Number: $Revision: 1.70 $
44 //
45 // Revision Date : $Date: 2015/11/04 21:33:46 $
46 //
47 // Current Owner : $Author: tvrusso $
48 //-----------------------------------------------------------------------------
49 #ifndef Xyce_N_DEV_ADMSvbic_h
50 #define Xyce_N_DEV_ADMSvbic_h
51 
52 
53 #include <Sacado.hpp>
54 
55 #include <N_DEV_Configuration.h>
56 #include <N_DEV_Const.h>
57 #include <N_DEV_DeviceBlock.h>
58 #include <N_DEV_DeviceInstance.h>
59 #include <N_DEV_DeviceModel.h>
60 #include <N_DEV_BJT.h>
61 
62 
63 namespace Xyce {
64 namespace Device {
65 namespace ADMSvbic {
66 
67 // This typedef is for our automatic differentiation:
68 typedef Sacado::Fad::SFad<double,15> AdmsFadType;
69 typedef Sacado::Fad::SFad<double,1> AdmsSensFadType;
70 
71 class Model;
72 class Instance;
73 class InstanceSensitivity;
74 
75 #ifdef Xyce_ADMS_SENSITIVITIES
76 //-----------------------------------------------------------------------------
77 // Class : InstanceSensitivity
78 //
79 // Purpose : This class is a functor for sensitivity
80 //
81 // Special Notes :
82 // Creator :
83 // Creation Date :
84 //-----------------------------------------------------------------------------
85 class InstanceSensitivity : public baseSensitivity
86 {
87 public:
88  InstanceSensitivity() :
89  baseSensitivity() {};
90 
91  virtual ~InstanceSensitivity() {};
92 
93  virtual void operator()(
94  const ParameterBase &entity,
95  const std::string &param,
96  std::vector<double> & dfdp,
97  std::vector<double> & dqdp,
98  std::vector<double> & dbdp,
99  std::vector<int> & Findices,
100  std::vector<int> & Qindices,
101  std::vector<int> & Bindices
102  ) const ;
103 };
104 
105 static InstanceSensitivity instSens;
106 
107 
108 //-----------------------------------------------------------------------------
109 // Class : ModelSensitivity
110 //
111 // Purpose : This class is a functor for sensitivity
112 //
113 // Special Notes :
114 // Creator :
115 // Creation Date :
116 //-----------------------------------------------------------------------------
117 class ModelSensitivity : public baseSensitivity
118 {
119 public:
120  ModelSensitivity() :
121  baseSensitivity() {};
122 
123  virtual ~ModelSensitivity() {};
124 
125  virtual void operator()(
126  const ParameterBase &entity,
127  const std::string &param,
128  std::vector<double> & dfdp,
129  std::vector<double> & dqdp,
130  std::vector<double> & dbdp,
131  std::vector<int> & Findices,
132  std::vector<int> & Qindices,
133  std::vector<int> & Bindices
134  ) const ;
135 };
136 
137 static ModelSensitivity modSens;
138 #endif // Xyce_ADMS_SENSITIVITIES
139 
140 // general purpose free functions
141 // thermal voltage at kelvin temperature temp)
142 template <typename T> static inline T adms_vt(const T temp) {return(CONSTKoverQ*temp);};
143 
144 // Figure out how to template this shiznit!
145 //-----------------------------------------------------------------------------
146 
147 
148 template<typename Tin>
149 static Tin adms_ternary_op(const bool cond, const Tin &ifTrue, const Tin &ifFalse)
150 {
151  if (cond)
152  return ifTrue;
153  else
154  return ifFalse;
155 }
156 
157 template<typename Tin>
158 static Tin adms_ternary_op(const bool cond, const Tin &ifTrue, const double &ifFalse)
159 {
160  if (cond)
161  return ifTrue;
162  else
163  return Tin(ifFalse);
164 }
165 
166 template<typename Tin>
167 static Tin adms_ternary_op(const bool cond, const double &ifTrue, const Tin &ifFalse)
168 {
169  if (cond)
170  return Tin(ifTrue);
171  else
172  return ifFalse;
173 }
174 
175 
176 
177 
178 #ifdef Xyce_ADMS_SENSITIVITIES
179 //-----------------------------------------------------------------------------
180 // Free functions used by sensitivity
181 //
182 //-----------------------------------------------------------------------------
183 void evaluateModelEquations(
184  std::vector <double> & probeVars,
185  // probe constants
186  const int admsProbeID_V_ci_ei,
187  const int admsProbeID_V_b_c,
188  const int admsProbeID_V_bp_cx,
189  const int admsProbeID_V_e_ei,
190  const int admsProbeID_V_b_bx,
191  const int admsProbeID_V_bx_bi,
192  const int admsProbeID_V_cx_ci,
193  const int admsProbeID_V_c_cx,
194  const int admsProbeID_V_b_e,
195  const int admsProbeID_V_dt_GND,
196  const int admsProbeID_V_bx_bp,
197  const int admsProbeID_V_bi_cx,
198  const int admsProbeID_V_bx_ei,
199  const int admsProbeID_V_bi_ci,
200  const int admsProbeID_V_bi_ei,
201  // node constants
202  const int admsNodeID_c,
203  const int admsNodeID_b,
204  const int admsNodeID_e,
205  const int admsNodeID_dt,
206  const int admsNodeID_cx,
207  const int admsNodeID_ci,
208  const int admsNodeID_bx,
209  const int admsNodeID_bi,
210  const int admsNodeID_ei,
211  const int admsNodeID_bp,
212  // instance parameters
213  // reals
214  AdmsSensFadType & instancePar_DTEMP,
215  bool instancePar_given_DTEMP,
216  // non-reals(including hidden)
217  int instancePar_M,
218  bool instancePar_given_M,
219  // model parameters
220  // reals
221  AdmsSensFadType & modelPar_TNOM,
222  bool modelPar_given_TNOM,
223  AdmsSensFadType & modelPar_RCX,
224  bool modelPar_given_RCX,
225  AdmsSensFadType & modelPar_RCI,
226  bool modelPar_given_RCI,
227  AdmsSensFadType & modelPar_VO,
228  bool modelPar_given_VO,
229  AdmsSensFadType & modelPar_GAMM,
230  bool modelPar_given_GAMM,
231  AdmsSensFadType & modelPar_HRCF,
232  bool modelPar_given_HRCF,
233  AdmsSensFadType & modelPar_RBX,
234  bool modelPar_given_RBX,
235  AdmsSensFadType & modelPar_RBI,
236  bool modelPar_given_RBI,
237  AdmsSensFadType & modelPar_RE,
238  bool modelPar_given_RE,
239  AdmsSensFadType & modelPar_RS,
240  bool modelPar_given_RS,
241  AdmsSensFadType & modelPar_RBP,
242  bool modelPar_given_RBP,
243  AdmsSensFadType & modelPar_IS,
244  bool modelPar_given_IS,
245  AdmsSensFadType & modelPar_NF,
246  bool modelPar_given_NF,
247  AdmsSensFadType & modelPar_NR,
248  bool modelPar_given_NR,
249  AdmsSensFadType & modelPar_FC,
250  bool modelPar_given_FC,
251  AdmsSensFadType & modelPar_CBEO,
252  bool modelPar_given_CBEO,
253  AdmsSensFadType & modelPar_CJE,
254  bool modelPar_given_CJE,
255  AdmsSensFadType & modelPar_PE,
256  bool modelPar_given_PE,
257  AdmsSensFadType & modelPar_ME,
258  bool modelPar_given_ME,
259  AdmsSensFadType & modelPar_AJE,
260  bool modelPar_given_AJE,
261  AdmsSensFadType & modelPar_CBCO,
262  bool modelPar_given_CBCO,
263  AdmsSensFadType & modelPar_CJC,
264  bool modelPar_given_CJC,
265  AdmsSensFadType & modelPar_QCO,
266  bool modelPar_given_QCO,
267  AdmsSensFadType & modelPar_CJEP,
268  bool modelPar_given_CJEP,
269  AdmsSensFadType & modelPar_PC,
270  bool modelPar_given_PC,
271  AdmsSensFadType & modelPar_MC,
272  bool modelPar_given_MC,
273  AdmsSensFadType & modelPar_AJC,
274  bool modelPar_given_AJC,
275  AdmsSensFadType & modelPar_CJCP,
276  bool modelPar_given_CJCP,
277  AdmsSensFadType & modelPar_PS,
278  bool modelPar_given_PS,
279  AdmsSensFadType & modelPar_MS,
280  bool modelPar_given_MS,
281  AdmsSensFadType & modelPar_AJS,
282  bool modelPar_given_AJS,
283  AdmsSensFadType & modelPar_IBEI,
284  bool modelPar_given_IBEI,
285  AdmsSensFadType & modelPar_WBE,
286  bool modelPar_given_WBE,
287  AdmsSensFadType & modelPar_NEI,
288  bool modelPar_given_NEI,
289  AdmsSensFadType & modelPar_IBEN,
290  bool modelPar_given_IBEN,
291  AdmsSensFadType & modelPar_NEN,
292  bool modelPar_given_NEN,
293  AdmsSensFadType & modelPar_IBCI,
294  bool modelPar_given_IBCI,
295  AdmsSensFadType & modelPar_NCI,
296  bool modelPar_given_NCI,
297  AdmsSensFadType & modelPar_IBCN,
298  bool modelPar_given_IBCN,
299  AdmsSensFadType & modelPar_NCN,
300  bool modelPar_given_NCN,
301  AdmsSensFadType & modelPar_AVC1,
302  bool modelPar_given_AVC1,
303  AdmsSensFadType & modelPar_AVC2,
304  bool modelPar_given_AVC2,
305  AdmsSensFadType & modelPar_ISP,
306  bool modelPar_given_ISP,
307  AdmsSensFadType & modelPar_WSP,
308  bool modelPar_given_WSP,
309  AdmsSensFadType & modelPar_NFP,
310  bool modelPar_given_NFP,
311  AdmsSensFadType & modelPar_IBEIP,
312  bool modelPar_given_IBEIP,
313  AdmsSensFadType & modelPar_IBENP,
314  bool modelPar_given_IBENP,
315  AdmsSensFadType & modelPar_IBCIP,
316  bool modelPar_given_IBCIP,
317  AdmsSensFadType & modelPar_NCIP,
318  bool modelPar_given_NCIP,
319  AdmsSensFadType & modelPar_IBCNP,
320  bool modelPar_given_IBCNP,
321  AdmsSensFadType & modelPar_NCNP,
322  bool modelPar_given_NCNP,
323  AdmsSensFadType & modelPar_VEF,
324  bool modelPar_given_VEF,
325  AdmsSensFadType & modelPar_VER,
326  bool modelPar_given_VER,
327  AdmsSensFadType & modelPar_IKF,
328  bool modelPar_given_IKF,
329  AdmsSensFadType & modelPar_IKR,
330  bool modelPar_given_IKR,
331  AdmsSensFadType & modelPar_IKP,
332  bool modelPar_given_IKP,
333  AdmsSensFadType & modelPar_TF,
334  bool modelPar_given_TF,
335  AdmsSensFadType & modelPar_QTF,
336  bool modelPar_given_QTF,
337  AdmsSensFadType & modelPar_XTF,
338  bool modelPar_given_XTF,
339  AdmsSensFadType & modelPar_VTF,
340  bool modelPar_given_VTF,
341  AdmsSensFadType & modelPar_ITF,
342  bool modelPar_given_ITF,
343  AdmsSensFadType & modelPar_TR,
344  bool modelPar_given_TR,
345  AdmsSensFadType & modelPar_TD,
346  bool modelPar_given_TD,
347  AdmsSensFadType & modelPar_KFN,
348  bool modelPar_given_KFN,
349  AdmsSensFadType & modelPar_AFN,
350  bool modelPar_given_AFN,
351  AdmsSensFadType & modelPar_BFN,
352  bool modelPar_given_BFN,
353  AdmsSensFadType & modelPar_XRE,
354  bool modelPar_given_XRE,
355  AdmsSensFadType & modelPar_XRBI,
356  bool modelPar_given_XRBI,
357  AdmsSensFadType & modelPar_XRCI,
358  bool modelPar_given_XRCI,
359  AdmsSensFadType & modelPar_XRS,
360  bool modelPar_given_XRS,
361  AdmsSensFadType & modelPar_XVO,
362  bool modelPar_given_XVO,
363  AdmsSensFadType & modelPar_EA,
364  bool modelPar_given_EA,
365  AdmsSensFadType & modelPar_EAIE,
366  bool modelPar_given_EAIE,
367  AdmsSensFadType & modelPar_EAIC,
368  bool modelPar_given_EAIC,
369  AdmsSensFadType & modelPar_EAIS,
370  bool modelPar_given_EAIS,
371  AdmsSensFadType & modelPar_EANE,
372  bool modelPar_given_EANE,
373  AdmsSensFadType & modelPar_EANC,
374  bool modelPar_given_EANC,
375  AdmsSensFadType & modelPar_EANS,
376  bool modelPar_given_EANS,
377  AdmsSensFadType & modelPar_XIS,
378  bool modelPar_given_XIS,
379  AdmsSensFadType & modelPar_XII,
380  bool modelPar_given_XII,
381  AdmsSensFadType & modelPar_XIN,
382  bool modelPar_given_XIN,
383  AdmsSensFadType & modelPar_TNF,
384  bool modelPar_given_TNF,
385  AdmsSensFadType & modelPar_TAVC,
386  bool modelPar_given_TAVC,
387  AdmsSensFadType & modelPar_RTH,
388  bool modelPar_given_RTH,
389  AdmsSensFadType & modelPar_CTH,
390  bool modelPar_given_CTH,
391  AdmsSensFadType & modelPar_VRT,
392  bool modelPar_given_VRT,
393  AdmsSensFadType & modelPar_ART,
394  bool modelPar_given_ART,
395  AdmsSensFadType & modelPar_CCSO,
396  bool modelPar_given_CCSO,
397  AdmsSensFadType & modelPar_QBM,
398  bool modelPar_given_QBM,
399  AdmsSensFadType & modelPar_NKF,
400  bool modelPar_given_NKF,
401  AdmsSensFadType & modelPar_XIKF,
402  bool modelPar_given_XIKF,
403  AdmsSensFadType & modelPar_XRCX,
404  bool modelPar_given_XRCX,
405  AdmsSensFadType & modelPar_XRBX,
406  bool modelPar_given_XRBX,
407  AdmsSensFadType & modelPar_XRBP,
408  bool modelPar_given_XRBP,
409  AdmsSensFadType & modelPar_ISRR,
410  bool modelPar_given_ISRR,
411  AdmsSensFadType & modelPar_XISR,
412  bool modelPar_given_XISR,
413  AdmsSensFadType & modelPar_DEAR,
414  bool modelPar_given_DEAR,
415  AdmsSensFadType & modelPar_EAP,
416  bool modelPar_given_EAP,
417  AdmsSensFadType & modelPar_VBBE,
418  bool modelPar_given_VBBE,
419  AdmsSensFadType & modelPar_NBBE,
420  bool modelPar_given_NBBE,
421  AdmsSensFadType & modelPar_IBBE,
422  bool modelPar_given_IBBE,
423  AdmsSensFadType & modelPar_TVBBE1,
424  bool modelPar_given_TVBBE1,
425  AdmsSensFadType & modelPar_TVBBE2,
426  bool modelPar_given_TVBBE2,
427  AdmsSensFadType & modelPar_TNBBE,
428  bool modelPar_given_TNBBE,
429  AdmsSensFadType & modelPar_EBBE,
430  bool modelPar_given_EBBE,
431  AdmsSensFadType & modelPar_DTEMP,
432  bool modelPar_given_DTEMP,
433  AdmsSensFadType & modelPar_VERS,
434  bool modelPar_given_VERS,
435  AdmsSensFadType & modelPar_VREV,
436  bool modelPar_given_VREV,
437  // non-reals (including hidden)
438  int modelPar_dtype,
439  // basic variables
440  double admsTemperature, double adms_vt_nom, double gmin, std::vector <AdmsSensFadType> & staticContributions, std::vector <AdmsSensFadType> & dynamicContributions, const Instance & theInstance);
441 
442 void evaluateInitialInstance(
443  // instance parameters
444  // reals
445  AdmsSensFadType & instancePar_DTEMP,
446  bool instancePar_given_DTEMP,
447  // non-reals(including hidden)
448  int instancePar_M,
449  bool instancePar_given_M,
450  // model parameters
451  // reals
452  AdmsSensFadType & modelPar_TNOM,
453  bool modelPar_given_TNOM,
454  AdmsSensFadType & modelPar_RCX,
455  bool modelPar_given_RCX,
456  AdmsSensFadType & modelPar_RCI,
457  bool modelPar_given_RCI,
458  AdmsSensFadType & modelPar_VO,
459  bool modelPar_given_VO,
460  AdmsSensFadType & modelPar_GAMM,
461  bool modelPar_given_GAMM,
462  AdmsSensFadType & modelPar_HRCF,
463  bool modelPar_given_HRCF,
464  AdmsSensFadType & modelPar_RBX,
465  bool modelPar_given_RBX,
466  AdmsSensFadType & modelPar_RBI,
467  bool modelPar_given_RBI,
468  AdmsSensFadType & modelPar_RE,
469  bool modelPar_given_RE,
470  AdmsSensFadType & modelPar_RS,
471  bool modelPar_given_RS,
472  AdmsSensFadType & modelPar_RBP,
473  bool modelPar_given_RBP,
474  AdmsSensFadType & modelPar_IS,
475  bool modelPar_given_IS,
476  AdmsSensFadType & modelPar_NF,
477  bool modelPar_given_NF,
478  AdmsSensFadType & modelPar_NR,
479  bool modelPar_given_NR,
480  AdmsSensFadType & modelPar_FC,
481  bool modelPar_given_FC,
482  AdmsSensFadType & modelPar_CBEO,
483  bool modelPar_given_CBEO,
484  AdmsSensFadType & modelPar_CJE,
485  bool modelPar_given_CJE,
486  AdmsSensFadType & modelPar_PE,
487  bool modelPar_given_PE,
488  AdmsSensFadType & modelPar_ME,
489  bool modelPar_given_ME,
490  AdmsSensFadType & modelPar_AJE,
491  bool modelPar_given_AJE,
492  AdmsSensFadType & modelPar_CBCO,
493  bool modelPar_given_CBCO,
494  AdmsSensFadType & modelPar_CJC,
495  bool modelPar_given_CJC,
496  AdmsSensFadType & modelPar_QCO,
497  bool modelPar_given_QCO,
498  AdmsSensFadType & modelPar_CJEP,
499  bool modelPar_given_CJEP,
500  AdmsSensFadType & modelPar_PC,
501  bool modelPar_given_PC,
502  AdmsSensFadType & modelPar_MC,
503  bool modelPar_given_MC,
504  AdmsSensFadType & modelPar_AJC,
505  bool modelPar_given_AJC,
506  AdmsSensFadType & modelPar_CJCP,
507  bool modelPar_given_CJCP,
508  AdmsSensFadType & modelPar_PS,
509  bool modelPar_given_PS,
510  AdmsSensFadType & modelPar_MS,
511  bool modelPar_given_MS,
512  AdmsSensFadType & modelPar_AJS,
513  bool modelPar_given_AJS,
514  AdmsSensFadType & modelPar_IBEI,
515  bool modelPar_given_IBEI,
516  AdmsSensFadType & modelPar_WBE,
517  bool modelPar_given_WBE,
518  AdmsSensFadType & modelPar_NEI,
519  bool modelPar_given_NEI,
520  AdmsSensFadType & modelPar_IBEN,
521  bool modelPar_given_IBEN,
522  AdmsSensFadType & modelPar_NEN,
523  bool modelPar_given_NEN,
524  AdmsSensFadType & modelPar_IBCI,
525  bool modelPar_given_IBCI,
526  AdmsSensFadType & modelPar_NCI,
527  bool modelPar_given_NCI,
528  AdmsSensFadType & modelPar_IBCN,
529  bool modelPar_given_IBCN,
530  AdmsSensFadType & modelPar_NCN,
531  bool modelPar_given_NCN,
532  AdmsSensFadType & modelPar_AVC1,
533  bool modelPar_given_AVC1,
534  AdmsSensFadType & modelPar_AVC2,
535  bool modelPar_given_AVC2,
536  AdmsSensFadType & modelPar_ISP,
537  bool modelPar_given_ISP,
538  AdmsSensFadType & modelPar_WSP,
539  bool modelPar_given_WSP,
540  AdmsSensFadType & modelPar_NFP,
541  bool modelPar_given_NFP,
542  AdmsSensFadType & modelPar_IBEIP,
543  bool modelPar_given_IBEIP,
544  AdmsSensFadType & modelPar_IBENP,
545  bool modelPar_given_IBENP,
546  AdmsSensFadType & modelPar_IBCIP,
547  bool modelPar_given_IBCIP,
548  AdmsSensFadType & modelPar_NCIP,
549  bool modelPar_given_NCIP,
550  AdmsSensFadType & modelPar_IBCNP,
551  bool modelPar_given_IBCNP,
552  AdmsSensFadType & modelPar_NCNP,
553  bool modelPar_given_NCNP,
554  AdmsSensFadType & modelPar_VEF,
555  bool modelPar_given_VEF,
556  AdmsSensFadType & modelPar_VER,
557  bool modelPar_given_VER,
558  AdmsSensFadType & modelPar_IKF,
559  bool modelPar_given_IKF,
560  AdmsSensFadType & modelPar_IKR,
561  bool modelPar_given_IKR,
562  AdmsSensFadType & modelPar_IKP,
563  bool modelPar_given_IKP,
564  AdmsSensFadType & modelPar_TF,
565  bool modelPar_given_TF,
566  AdmsSensFadType & modelPar_QTF,
567  bool modelPar_given_QTF,
568  AdmsSensFadType & modelPar_XTF,
569  bool modelPar_given_XTF,
570  AdmsSensFadType & modelPar_VTF,
571  bool modelPar_given_VTF,
572  AdmsSensFadType & modelPar_ITF,
573  bool modelPar_given_ITF,
574  AdmsSensFadType & modelPar_TR,
575  bool modelPar_given_TR,
576  AdmsSensFadType & modelPar_TD,
577  bool modelPar_given_TD,
578  AdmsSensFadType & modelPar_KFN,
579  bool modelPar_given_KFN,
580  AdmsSensFadType & modelPar_AFN,
581  bool modelPar_given_AFN,
582  AdmsSensFadType & modelPar_BFN,
583  bool modelPar_given_BFN,
584  AdmsSensFadType & modelPar_XRE,
585  bool modelPar_given_XRE,
586  AdmsSensFadType & modelPar_XRBI,
587  bool modelPar_given_XRBI,
588  AdmsSensFadType & modelPar_XRCI,
589  bool modelPar_given_XRCI,
590  AdmsSensFadType & modelPar_XRS,
591  bool modelPar_given_XRS,
592  AdmsSensFadType & modelPar_XVO,
593  bool modelPar_given_XVO,
594  AdmsSensFadType & modelPar_EA,
595  bool modelPar_given_EA,
596  AdmsSensFadType & modelPar_EAIE,
597  bool modelPar_given_EAIE,
598  AdmsSensFadType & modelPar_EAIC,
599  bool modelPar_given_EAIC,
600  AdmsSensFadType & modelPar_EAIS,
601  bool modelPar_given_EAIS,
602  AdmsSensFadType & modelPar_EANE,
603  bool modelPar_given_EANE,
604  AdmsSensFadType & modelPar_EANC,
605  bool modelPar_given_EANC,
606  AdmsSensFadType & modelPar_EANS,
607  bool modelPar_given_EANS,
608  AdmsSensFadType & modelPar_XIS,
609  bool modelPar_given_XIS,
610  AdmsSensFadType & modelPar_XII,
611  bool modelPar_given_XII,
612  AdmsSensFadType & modelPar_XIN,
613  bool modelPar_given_XIN,
614  AdmsSensFadType & modelPar_TNF,
615  bool modelPar_given_TNF,
616  AdmsSensFadType & modelPar_TAVC,
617  bool modelPar_given_TAVC,
618  AdmsSensFadType & modelPar_RTH,
619  bool modelPar_given_RTH,
620  AdmsSensFadType & modelPar_CTH,
621  bool modelPar_given_CTH,
622  AdmsSensFadType & modelPar_VRT,
623  bool modelPar_given_VRT,
624  AdmsSensFadType & modelPar_ART,
625  bool modelPar_given_ART,
626  AdmsSensFadType & modelPar_CCSO,
627  bool modelPar_given_CCSO,
628  AdmsSensFadType & modelPar_QBM,
629  bool modelPar_given_QBM,
630  AdmsSensFadType & modelPar_NKF,
631  bool modelPar_given_NKF,
632  AdmsSensFadType & modelPar_XIKF,
633  bool modelPar_given_XIKF,
634  AdmsSensFadType & modelPar_XRCX,
635  bool modelPar_given_XRCX,
636  AdmsSensFadType & modelPar_XRBX,
637  bool modelPar_given_XRBX,
638  AdmsSensFadType & modelPar_XRBP,
639  bool modelPar_given_XRBP,
640  AdmsSensFadType & modelPar_ISRR,
641  bool modelPar_given_ISRR,
642  AdmsSensFadType & modelPar_XISR,
643  bool modelPar_given_XISR,
644  AdmsSensFadType & modelPar_DEAR,
645  bool modelPar_given_DEAR,
646  AdmsSensFadType & modelPar_EAP,
647  bool modelPar_given_EAP,
648  AdmsSensFadType & modelPar_VBBE,
649  bool modelPar_given_VBBE,
650  AdmsSensFadType & modelPar_NBBE,
651  bool modelPar_given_NBBE,
652  AdmsSensFadType & modelPar_IBBE,
653  bool modelPar_given_IBBE,
654  AdmsSensFadType & modelPar_TVBBE1,
655  bool modelPar_given_TVBBE1,
656  AdmsSensFadType & modelPar_TVBBE2,
657  bool modelPar_given_TVBBE2,
658  AdmsSensFadType & modelPar_TNBBE,
659  bool modelPar_given_TNBBE,
660  AdmsSensFadType & modelPar_EBBE,
661  bool modelPar_given_EBBE,
662  AdmsSensFadType & modelPar_DTEMP,
663  bool modelPar_given_DTEMP,
664  AdmsSensFadType & modelPar_VERS,
665  bool modelPar_given_VERS,
666  AdmsSensFadType & modelPar_VREV,
667  bool modelPar_given_VREV,
668  // non-reals (including hidden)
669  int modelPar_dtype,
670  double admsTemperature);
671 
672 void evaluateInitialModel(
673  // model parameters
674  // reals
675  AdmsSensFadType & modelPar_TNOM,
676  bool modelPar_given_TNOM,
677  AdmsSensFadType & modelPar_RCX,
678  bool modelPar_given_RCX,
679  AdmsSensFadType & modelPar_RCI,
680  bool modelPar_given_RCI,
681  AdmsSensFadType & modelPar_VO,
682  bool modelPar_given_VO,
683  AdmsSensFadType & modelPar_GAMM,
684  bool modelPar_given_GAMM,
685  AdmsSensFadType & modelPar_HRCF,
686  bool modelPar_given_HRCF,
687  AdmsSensFadType & modelPar_RBX,
688  bool modelPar_given_RBX,
689  AdmsSensFadType & modelPar_RBI,
690  bool modelPar_given_RBI,
691  AdmsSensFadType & modelPar_RE,
692  bool modelPar_given_RE,
693  AdmsSensFadType & modelPar_RS,
694  bool modelPar_given_RS,
695  AdmsSensFadType & modelPar_RBP,
696  bool modelPar_given_RBP,
697  AdmsSensFadType & modelPar_IS,
698  bool modelPar_given_IS,
699  AdmsSensFadType & modelPar_NF,
700  bool modelPar_given_NF,
701  AdmsSensFadType & modelPar_NR,
702  bool modelPar_given_NR,
703  AdmsSensFadType & modelPar_FC,
704  bool modelPar_given_FC,
705  AdmsSensFadType & modelPar_CBEO,
706  bool modelPar_given_CBEO,
707  AdmsSensFadType & modelPar_CJE,
708  bool modelPar_given_CJE,
709  AdmsSensFadType & modelPar_PE,
710  bool modelPar_given_PE,
711  AdmsSensFadType & modelPar_ME,
712  bool modelPar_given_ME,
713  AdmsSensFadType & modelPar_AJE,
714  bool modelPar_given_AJE,
715  AdmsSensFadType & modelPar_CBCO,
716  bool modelPar_given_CBCO,
717  AdmsSensFadType & modelPar_CJC,
718  bool modelPar_given_CJC,
719  AdmsSensFadType & modelPar_QCO,
720  bool modelPar_given_QCO,
721  AdmsSensFadType & modelPar_CJEP,
722  bool modelPar_given_CJEP,
723  AdmsSensFadType & modelPar_PC,
724  bool modelPar_given_PC,
725  AdmsSensFadType & modelPar_MC,
726  bool modelPar_given_MC,
727  AdmsSensFadType & modelPar_AJC,
728  bool modelPar_given_AJC,
729  AdmsSensFadType & modelPar_CJCP,
730  bool modelPar_given_CJCP,
731  AdmsSensFadType & modelPar_PS,
732  bool modelPar_given_PS,
733  AdmsSensFadType & modelPar_MS,
734  bool modelPar_given_MS,
735  AdmsSensFadType & modelPar_AJS,
736  bool modelPar_given_AJS,
737  AdmsSensFadType & modelPar_IBEI,
738  bool modelPar_given_IBEI,
739  AdmsSensFadType & modelPar_WBE,
740  bool modelPar_given_WBE,
741  AdmsSensFadType & modelPar_NEI,
742  bool modelPar_given_NEI,
743  AdmsSensFadType & modelPar_IBEN,
744  bool modelPar_given_IBEN,
745  AdmsSensFadType & modelPar_NEN,
746  bool modelPar_given_NEN,
747  AdmsSensFadType & modelPar_IBCI,
748  bool modelPar_given_IBCI,
749  AdmsSensFadType & modelPar_NCI,
750  bool modelPar_given_NCI,
751  AdmsSensFadType & modelPar_IBCN,
752  bool modelPar_given_IBCN,
753  AdmsSensFadType & modelPar_NCN,
754  bool modelPar_given_NCN,
755  AdmsSensFadType & modelPar_AVC1,
756  bool modelPar_given_AVC1,
757  AdmsSensFadType & modelPar_AVC2,
758  bool modelPar_given_AVC2,
759  AdmsSensFadType & modelPar_ISP,
760  bool modelPar_given_ISP,
761  AdmsSensFadType & modelPar_WSP,
762  bool modelPar_given_WSP,
763  AdmsSensFadType & modelPar_NFP,
764  bool modelPar_given_NFP,
765  AdmsSensFadType & modelPar_IBEIP,
766  bool modelPar_given_IBEIP,
767  AdmsSensFadType & modelPar_IBENP,
768  bool modelPar_given_IBENP,
769  AdmsSensFadType & modelPar_IBCIP,
770  bool modelPar_given_IBCIP,
771  AdmsSensFadType & modelPar_NCIP,
772  bool modelPar_given_NCIP,
773  AdmsSensFadType & modelPar_IBCNP,
774  bool modelPar_given_IBCNP,
775  AdmsSensFadType & modelPar_NCNP,
776  bool modelPar_given_NCNP,
777  AdmsSensFadType & modelPar_VEF,
778  bool modelPar_given_VEF,
779  AdmsSensFadType & modelPar_VER,
780  bool modelPar_given_VER,
781  AdmsSensFadType & modelPar_IKF,
782  bool modelPar_given_IKF,
783  AdmsSensFadType & modelPar_IKR,
784  bool modelPar_given_IKR,
785  AdmsSensFadType & modelPar_IKP,
786  bool modelPar_given_IKP,
787  AdmsSensFadType & modelPar_TF,
788  bool modelPar_given_TF,
789  AdmsSensFadType & modelPar_QTF,
790  bool modelPar_given_QTF,
791  AdmsSensFadType & modelPar_XTF,
792  bool modelPar_given_XTF,
793  AdmsSensFadType & modelPar_VTF,
794  bool modelPar_given_VTF,
795  AdmsSensFadType & modelPar_ITF,
796  bool modelPar_given_ITF,
797  AdmsSensFadType & modelPar_TR,
798  bool modelPar_given_TR,
799  AdmsSensFadType & modelPar_TD,
800  bool modelPar_given_TD,
801  AdmsSensFadType & modelPar_KFN,
802  bool modelPar_given_KFN,
803  AdmsSensFadType & modelPar_AFN,
804  bool modelPar_given_AFN,
805  AdmsSensFadType & modelPar_BFN,
806  bool modelPar_given_BFN,
807  AdmsSensFadType & modelPar_XRE,
808  bool modelPar_given_XRE,
809  AdmsSensFadType & modelPar_XRBI,
810  bool modelPar_given_XRBI,
811  AdmsSensFadType & modelPar_XRCI,
812  bool modelPar_given_XRCI,
813  AdmsSensFadType & modelPar_XRS,
814  bool modelPar_given_XRS,
815  AdmsSensFadType & modelPar_XVO,
816  bool modelPar_given_XVO,
817  AdmsSensFadType & modelPar_EA,
818  bool modelPar_given_EA,
819  AdmsSensFadType & modelPar_EAIE,
820  bool modelPar_given_EAIE,
821  AdmsSensFadType & modelPar_EAIC,
822  bool modelPar_given_EAIC,
823  AdmsSensFadType & modelPar_EAIS,
824  bool modelPar_given_EAIS,
825  AdmsSensFadType & modelPar_EANE,
826  bool modelPar_given_EANE,
827  AdmsSensFadType & modelPar_EANC,
828  bool modelPar_given_EANC,
829  AdmsSensFadType & modelPar_EANS,
830  bool modelPar_given_EANS,
831  AdmsSensFadType & modelPar_XIS,
832  bool modelPar_given_XIS,
833  AdmsSensFadType & modelPar_XII,
834  bool modelPar_given_XII,
835  AdmsSensFadType & modelPar_XIN,
836  bool modelPar_given_XIN,
837  AdmsSensFadType & modelPar_TNF,
838  bool modelPar_given_TNF,
839  AdmsSensFadType & modelPar_TAVC,
840  bool modelPar_given_TAVC,
841  AdmsSensFadType & modelPar_RTH,
842  bool modelPar_given_RTH,
843  AdmsSensFadType & modelPar_CTH,
844  bool modelPar_given_CTH,
845  AdmsSensFadType & modelPar_VRT,
846  bool modelPar_given_VRT,
847  AdmsSensFadType & modelPar_ART,
848  bool modelPar_given_ART,
849  AdmsSensFadType & modelPar_CCSO,
850  bool modelPar_given_CCSO,
851  AdmsSensFadType & modelPar_QBM,
852  bool modelPar_given_QBM,
853  AdmsSensFadType & modelPar_NKF,
854  bool modelPar_given_NKF,
855  AdmsSensFadType & modelPar_XIKF,
856  bool modelPar_given_XIKF,
857  AdmsSensFadType & modelPar_XRCX,
858  bool modelPar_given_XRCX,
859  AdmsSensFadType & modelPar_XRBX,
860  bool modelPar_given_XRBX,
861  AdmsSensFadType & modelPar_XRBP,
862  bool modelPar_given_XRBP,
863  AdmsSensFadType & modelPar_ISRR,
864  bool modelPar_given_ISRR,
865  AdmsSensFadType & modelPar_XISR,
866  bool modelPar_given_XISR,
867  AdmsSensFadType & modelPar_DEAR,
868  bool modelPar_given_DEAR,
869  AdmsSensFadType & modelPar_EAP,
870  bool modelPar_given_EAP,
871  AdmsSensFadType & modelPar_VBBE,
872  bool modelPar_given_VBBE,
873  AdmsSensFadType & modelPar_NBBE,
874  bool modelPar_given_NBBE,
875  AdmsSensFadType & modelPar_IBBE,
876  bool modelPar_given_IBBE,
877  AdmsSensFadType & modelPar_TVBBE1,
878  bool modelPar_given_TVBBE1,
879  AdmsSensFadType & modelPar_TVBBE2,
880  bool modelPar_given_TVBBE2,
881  AdmsSensFadType & modelPar_TNBBE,
882  bool modelPar_given_TNBBE,
883  AdmsSensFadType & modelPar_EBBE,
884  bool modelPar_given_EBBE,
885  AdmsSensFadType & modelPar_DTEMP,
886  bool modelPar_given_DTEMP,
887  AdmsSensFadType & modelPar_VERS,
888  bool modelPar_given_VERS,
889  AdmsSensFadType & modelPar_VREV,
890  bool modelPar_given_VREV,
891  // non-reals (including hidden)
892  int modelPar_dtype,
893  double admsTemperature);
894 
895 #endif // Xyce_ADMS_SENSITIVITIES
896 
897 
898 // Limited exponential --- NOT what verilog LRM says, but what qucs,
899 // ng-spice, and zspice do.
900 
901 template <typename T>
902 T limexp(const T &x)
903 {
904  if ((x) < 80.0)
905  return (exp(x));
906  else
907  return (exp(80.0)*(x-79.0));
908 }
909 
910 // Maybe this will do as a substitute for a sacado-provided "floor" and "ceil"?
911 // It is wrong to try to propagate the Sacado derivatives to the return
912 // value, as the floor and ceil functions have zero derivative w.r.t. any
913 // of the variables in the argument, except when X is an integer at which
914 // point the derivative is undefined.
915 template <typename T>
916 double ADMSfloor(const T & x)
917 {
918  return (floor(x.val()));
919 }
920 
921 template <typename T>
922 double ADMSceil(const T & x)
923 {
924  return (ceil(x.val()));
925 }
926 
927 
928 struct Traits: public DeviceTraits<Model, Instance, BJT::Traits>
929 {
930  static const char *name() {return "VBIC 3T et cf v1.2";}
931  static const char *deviceTypeName() {return "q level 10";}
932 
933  static int numNodes() {return 4;}
934  static int numOptionalNodes() {return 5;}
935  static bool modelRequired() {return true;}
936  static bool isLinearDevice() {return false;}
937 
938  static Device *factory(const Configuration &configuration, const FactoryBlock &factory_block);
939  static void loadModelParameters(ParametricData<Model> &model_parameters);
940  static void loadInstanceParameters(ParametricData<Instance> &instance_parameters);
941 };
942 
943 //-----------------------------------------------------------------------------
944 // Class : Instance
945 
946 //
947 // Purpose : This class represents a single instance of the
948 // device. It mainly contains indices and pointers into
949 // the matrix equation (see the resistor instance class for
950 // more details).
951 //
952 // Special Notes :
953 // Creator :
954 // Creation Date :
955 //-----------------------------------------------------------------------------
956 class Instance : public DeviceInstance
957 {
958  friend class ParametricData<Instance>;
959  friend class Model;
960 #ifdef Xyce_ADMS_SENSITIVITIES
961  friend class InstanceSensitivity;
962  friend class ModelSensitivity;
963 #endif // Xyce_ADMS_SENSITIVITIES
964  friend class Traits;
965 
966 public:
967  Instance(
968  const Configuration & configuration,
969  const InstanceBlock & instance_block,
970  Model & model,
971  const FactoryBlock & factory_block);
972 
973  ~Instance();
974 
975 private:
976  Instance(const Instance &);
977  Instance &operator=(const Instance &);
978 
979 public:
980  void registerLIDs( const LocalIdVector & intLIDVecRef,
981  const LocalIdVector & extLIDVecRef );
982  void registerStateLIDs( const LocalIdVector & staLIDVecRef );
983  void setupPointers();
984 
985  void loadNodeSymbols(Util::SymbolTable &symbol_table) const;
986 
987  const JacobianStamp & jacobianStamp() const;
988  void registerJacLIDs( const JacobianStamp & jacLIDVec );
989 
990  bool processParams();
991  bool updateTemperature ( const double & temp = -999.0 );
992  bool updateIntermediateVars ();
993  bool updatePrimaryState ();
994  bool updateSecondaryState ();
995 
996  // load functions, residual:
997  bool loadDAEQVector ();
998  bool loadDAEFVector ();
999 
1000  // load functions, Jacobian:
1001  bool loadDAEdQdx ();
1002  bool loadDAEdFdx ();
1003 
1004  void collapseNodes();
1005 
1006 private:
1007 
1008 public:
1009  // iterator reference to the vbic model which owns this instance.
1010  // Getters and setters
1012  {
1013  return model_;
1014  }
1015 
1016 private:
1017 
1018  Model & model_; //< Owning Model
1019  // Begin verilog Instance Variables
1020  // Instance Parameters
1021  double DTEMP;
1022  int M;
1023  // Variables of global_instance scope
1024  // end verilog Instance Variables=====
1025  // Nodal LID Variables
1026  int li_c;
1027  int li_b;
1028  int li_e;
1029  int li_dt;
1030  int li_cx;
1031  int li_ci;
1032  int li_bx;
1033  int li_bi;
1034  int li_ei;
1035  int li_bp;
1036  // end Nodal LID Variables
1037  // Branch LID Variables
1038  // end Branch LID Variables
1039  // Jacobian pointers
1160  // end of Jacobian and pointers
1161  // node numbers
1162  static const int admsNodeID_c = 0;
1163  static const int admsNodeID_b = 1;
1164  static const int admsNodeID_e = 2;
1165  static const int admsNodeID_dt = 3;
1166  static const int admsNodeID_cx = 4;
1167  static const int admsNodeID_ci = 5;
1168  static const int admsNodeID_bx = 6;
1169  static const int admsNodeID_bi = 7;
1170  static const int admsNodeID_ei = 8;
1171  static const int admsNodeID_bp = 9;
1172  // end node numbers
1173  // Additional IDs for branch equations
1174  // end branch numbers
1175  // Probe numbers
1176  static const int admsProbeID_V_ci_ei = 0;
1177  static const int admsProbeID_V_b_c = 1;
1178  static const int admsProbeID_V_bp_cx = 2;
1179  static const int admsProbeID_V_e_ei = 3;
1180  static const int admsProbeID_V_b_bx = 4;
1181  static const int admsProbeID_V_bx_bi = 5;
1182  static const int admsProbeID_V_cx_ci = 6;
1183  static const int admsProbeID_V_c_cx = 7;
1184  static const int admsProbeID_V_b_e = 8;
1185  static const int admsProbeID_V_dt_GND = 9;
1186  static const int admsProbeID_V_bx_bp = 10;
1187  static const int admsProbeID_V_bi_cx = 11;
1188  static const int admsProbeID_V_bx_ei = 12;
1189  static const int admsProbeID_V_bi_ci = 13;
1190  static const int admsProbeID_V_bi_ei = 14;
1191  // end probe numbers
1192  // State LIDs
1200  // end state LIDs
1201  // bools for collapsing nodes
1205  // Arrays to hold probes
1206  std::vector < AdmsFadType > probeVars;
1207  // Arrays to hold contributions
1208  // dynamic contributions are differentiated w.r.t time
1209  std::vector < AdmsFadType > staticContributions;
1210  std::vector < AdmsFadType > dynamicContributions;
1211 
1212  // This array stores the differences between original and limited variables.
1213  std::vector<double> probeDiffs;
1214  // These store the Jdxp's for F and Q, respectively
1215  std::vector<double> Jdxp_static;
1216  std::vector<double> Jdxp_dynamic;
1217 
1218  // this is what we'll use when any model uses $temperature. We'll
1219  // set it in updateTemperature, and initialize it to whatever
1220  // is in devOptions when the instance is constructed.
1222 
1223  // vt at $temperature;
1224  double adms_vt_nom;
1225 
1226  // This is used to flag whether the cx, bx, and ei nodes are exposed
1227  // on the instance line as external nodes.
1229 
1230 
1231  // This one is for the annoying bogus "XyceADMSInstTemp" parameter
1232  // that we need so we can set it from the device manager when there's no
1233  // "TEMP" parameter to use
1235 
1236 
1237  std::vector< std::vector<int> > jacStamp;
1238  std::vector<int> jacMap;
1239  std::vector< std::vector<int> > jacMap2;
1240 };
1241 
1242 
1243 
1244 namespace AnalogFunctions
1245 {
1246 
1247 // Analog Function limRTH
1248 template<typename ScalarT> ScalarT limRTH(ScalarT orig, ScalarT old)
1249 {
1250 
1251 
1252  ScalarT limRTH;
1253  ScalarT t0;
1254  ScalarT t1;
1255  ScalarT retval;
1256  {
1257  t0 = (orig-old);
1258  t1 = fabs(t0);
1259  retval = orig;
1260  if ((t1>5.0))
1261  {
1262  if ((t0>0))
1263  {
1264  retval = (old+5.0);
1265  }
1266  else
1267  {
1268  retval = (old-5.0);
1269  }
1270  }
1271  limRTH = retval;
1272  }
1273  return(limRTH);
1274 }
1275 
1276 }
1277 
1278 
1279 //-----------------------------------------------------------------------------
1280 // Class : Model
1281 
1282 // Purpose :
1283 // Special Notes :
1284 // Creator :
1285 // Creation Date :
1286 //-----------------------------------------------------------------------------
1287 class Model : public DeviceModel
1288 {
1289  typedef std::vector<Instance *> InstanceVector;
1290 
1291  friend class ParametricData<Model>;
1292  friend class Instance;
1293 #ifdef Xyce_ADMS_SENSITIVITIES
1294  friend class InstanceSensitivity;
1295  friend class ModelSensitivity;
1296 #endif // Xyce_ADMS_SENSITIVITIES
1297  friend class Traits;
1298 
1299 public:
1300  Model(
1301  const Configuration & configuration,
1302  const ModelBlock & model_block,
1303  const FactoryBlock & factory_block);
1304 
1305  ~Model();
1306 
1307 private:
1308  Model(const Model &);
1309  Model &operator=(const Model &);
1310 
1311 public:
1312  virtual void forEachInstance(DeviceInstanceOp &op) const /* override */;
1313  virtual std::ostream &printOutInstances(std::ostream &os) const;
1314  bool processParams();
1315  bool processInstanceParams();
1316 
1317 private:
1318 
1319 public:
1320  void addInstance(Instance *instance)
1321  {
1322  instanceContainer.push_back(instance);
1323  }
1324 
1325 private:
1326  std::vector<Instance*> instanceContainer;
1327 
1328 private:
1329 
1330  // This one is for the annoying bogus "XyceADMSInstTemp" parameter
1331  // that we need so we can set it from the device manager when there's no
1332  // "TEMP" model parameter to use
1333  double admsModTemp;
1334  // Begin verilog Model Variables
1335  // Model Parameters
1336  double TNOM;
1337  double RCX;
1338  double RCI;
1339  double VO;
1340  double GAMM;
1341  double HRCF;
1342  double RBX;
1343  double RBI;
1344  double RE;
1345  double RS;
1346  double RBP;
1347  double IS;
1348  double NF;
1349  double NR;
1350  double FC;
1351  double CBEO;
1352  double CJE;
1353  double PE;
1354  double ME;
1355  double AJE;
1356  double CBCO;
1357  double CJC;
1358  double QCO;
1359  double CJEP;
1360  double PC;
1361  double MC;
1362  double AJC;
1363  double CJCP;
1364  double PS;
1365  double MS;
1366  double AJS;
1367  double IBEI;
1368  double WBE;
1369  double NEI;
1370  double IBEN;
1371  double NEN;
1372  double IBCI;
1373  double NCI;
1374  double IBCN;
1375  double NCN;
1376  double AVC1;
1377  double AVC2;
1378  double ISP;
1379  double WSP;
1380  double NFP;
1381  double IBEIP;
1382  double IBENP;
1383  double IBCIP;
1384  double NCIP;
1385  double IBCNP;
1386  double NCNP;
1387  double VEF;
1388  double VER;
1389  double IKF;
1390  double IKR;
1391  double IKP;
1392  double TF;
1393  double QTF;
1394  double XTF;
1395  double VTF;
1396  double ITF;
1397  double TR;
1398  double TD;
1399  double KFN;
1400  double AFN;
1401  double BFN;
1402  double XRE;
1403  double XRBI;
1404  double XRCI;
1405  double XRS;
1406  double XVO;
1407  double EA;
1408  double EAIE;
1409  double EAIC;
1410  double EAIS;
1411  double EANE;
1412  double EANC;
1413  double EANS;
1414  double XIS;
1415  double XII;
1416  double XIN;
1417  double TNF;
1418  double TAVC;
1419  double RTH;
1420  double CTH;
1421  double VRT;
1422  double ART;
1423  double CCSO;
1424  double QBM;
1425  double NKF;
1426  double XIKF;
1427  double XRCX;
1428  double XRBX;
1429  double XRBP;
1430  double ISRR;
1431  double XISR;
1432  double DEAR;
1433  double EAP;
1434  double VBBE;
1435  double NBBE;
1436  double IBBE;
1437  double TVBBE1;
1438  double TVBBE2;
1439  double TNBBE;
1440  double EBBE;
1441  double DTEMP;
1442  double VERS;
1443  double VREV;
1444  int dtype;
1445  // Variables of global_model scope
1446  // end verilog model variables=====
1447 };
1448 
1449 void registerDevice();
1450 
1451 } // namespace ADMSvbic
1452 } // namespace Device
1453 } // namespace Xyce
1454 #endif //Xyce_N_DEV_ADMSvbic_h
static T adms_vt(const T temp)
std::vector< double > Jdxp_dynamic
void registerLIDs(const LocalIdVector &intLIDVecRef, const LocalIdVector &extLIDVecRef)
std::vector< Instance * > InstanceVector
bool processParams()
processParams
Pure virtual class to augment a linear system.
Instance & operator=(const Instance &)
Model & operator=(const Model &)
std::vector< AdmsFadType > staticContributions
static void loadModelParameters(ParametricData< Model > &model_parameters)
static const char * name()
virtual void forEachInstance(DeviceInstanceOp &op) const
Apply a device instance "op" to all instances associated with this model.
Instance(const Configuration &configuration, const InstanceBlock &instance_block, Model &model, const FactoryBlock &factory_block)
void addInstance(Instance *instance)
std::vector< std::vector< int > > jacMap2
double ADMSfloor(const T &x)
double ADMSceil(const T &x)
The FactoryBlock contains parameters needed by the device, instance and model creation functions...
Sacado::Fad::SFad< double, 1 > AdmsSensFadType
void registerJacLIDs(const JacobianStamp &jacLIDVec)
static void loadInstanceParameters(ParametricData< Instance > &instance_parameters)
std::vector< std::vector< int > > JacobianStamp
Definition: N_DEV_fwd.h:196
Model(const Configuration &configuration, const ModelBlock &model_block, const FactoryBlock &factory_block)
ScalarT limRTH(ScalarT orig, ScalarT old)
The Device class is an interface for device implementations.
Definition: N_DEV_Device.h:101
void loadNodeSymbols(Util::SymbolTable &symbol_table) const
Populates and returns the store name map.
IdVector LocalIdVector
Definition: N_DEV_fwd.h:198
std::vector< double > probeDiffs
Sacado::Fad::SFad< double, 15 > AdmsFadType
std::vector< AdmsFadType > probeVars
Class Configuration contains device configuration data.
bool processInstanceParams()
processInstanceParams
const JacobianStamp & jacobianStamp() const
std::vector< double > Jdxp_static
std::vector< Instance * > instanceContainer
void registerStateLIDs(const LocalIdVector &staLIDVecRef)
virtual std::ostream & printOutInstances(std::ostream &os) const
static Device * factory(const Configuration &configuration, const FactoryBlock &factory_block)
std::vector< AdmsFadType > dynamicContributions
#define CONSTKoverQ
Definition: N_DEV_Const.h:58
Base sensitivity functor.
Definition: N_DEV_Pars.h:148
ModelBlock represents a .MODEL line from the netlist.
The DeviceTraits template describes the configuration of a device.
Manages parameter binding for class C.
Definition: N_DEV_Pars.h:214
InstanceBlock represent a device instance line from the netlist.
static const char * deviceTypeName()
bool updateTemperature(const double &temp=-999.0)
std::vector< std::vector< int > > jacStamp
static Tin adms_ternary_op(const bool cond, const Tin &ifTrue, const Tin &ifFalse)