Xyce  6.1
N_DEV_ADMSHBT_X.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_ADMSHBT_X.h,v $
29 //
30 // Purpose :
31 //
32 // Special Notes : Generated from verilog file fbhhbt-2.1_nonoise_limited_inductors_typed.va 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:31:49
39 //
40 // Revision Information:
41 // ---------------------
42 //
43 // Revision Number: $Revision: 1.56 $
44 //
45 // Revision Date : $Date: 2015/11/04 21:33:46 $
46 //
47 // Current Owner : $Author: tvrusso $
48 //-----------------------------------------------------------------------------
49 #ifndef Xyce_N_DEV_ADMSHBT_X_h
50 #define Xyce_N_DEV_ADMSHBT_X_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 ADMSHBT_X {
66 
67 // This typedef is for our automatic differentiation:
68 typedef Sacado::Fad::SFad<double,19> 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_t_ti,
187  const int admsProbeID_V_b_c,
188  const int admsProbeID_V_c_GND,
189  const int admsProbeID_V_b_GND,
190  const int admsProbeID_V_cx_bii,
191  const int admsProbeID_V_exx_bii,
192  const int admsProbeID_V_ex_bii,
193  const int admsProbeID_V_bii_bi,
194  const int admsProbeID_I_c_ci,
195  const int admsProbeID_I_e_ei,
196  const int admsProbeID_I_b_bi,
197  const int admsProbeID_V_ti_GND,
198  const int admsProbeID_V_ci_ei,
199  const int admsProbeID_V_exx_ei,
200  const int admsProbeID_V_cx_ci,
201  const int admsProbeID_V_ex_ei,
202  const int admsProbeID_V_bii_ei,
203  const int admsProbeID_V_bii_ci,
204  const int admsProbeID_V_bi_ci,
205  // node constants
206  const int admsNodeID_c,
207  const int admsNodeID_b,
208  const int admsNodeID_e,
209  const int admsNodeID_t,
210  const int admsNodeID_ei,
211  const int admsNodeID_bi,
212  const int admsNodeID_bii,
213  const int admsNodeID_ci,
214  const int admsNodeID_ti,
215  const int admsNodeID_ex,
216  const int admsNodeID_exx,
217  const int admsNodeID_cx,
218  const int admsBRA_ID_b_bi,
219  const int admsBRA_ID_e_ei,
220  const int admsBRA_ID_c_ci,
221  // instance parameters
222  // reals
223  AdmsSensFadType & instancePar_Temp,
224  bool instancePar_given_Temp,
225  AdmsSensFadType & instancePar_L,
226  bool instancePar_given_L,
227  AdmsSensFadType & instancePar_W,
228  bool instancePar_given_W,
229  // non-reals(including hidden)
230  int instancePar_N,
231  bool instancePar_given_N,
232  // model parameters
233  // reals
234  AdmsSensFadType & modelPar_Temp,
235  bool modelPar_given_Temp,
236  AdmsSensFadType & modelPar_Rth,
237  bool modelPar_given_Rth,
238  AdmsSensFadType & modelPar_Cth,
239  bool modelPar_given_Cth,
240  AdmsSensFadType & modelPar_L,
241  bool modelPar_given_L,
242  AdmsSensFadType & modelPar_W,
243  bool modelPar_given_W,
244  AdmsSensFadType & modelPar_Jsf,
245  bool modelPar_given_Jsf,
246  AdmsSensFadType & modelPar_nf,
247  bool modelPar_given_nf,
248  AdmsSensFadType & modelPar_Vg,
249  bool modelPar_given_Vg,
250  AdmsSensFadType & modelPar_Jse,
251  bool modelPar_given_Jse,
252  AdmsSensFadType & modelPar_ne,
253  bool modelPar_given_ne,
254  AdmsSensFadType & modelPar_Rbxx,
255  bool modelPar_given_Rbxx,
256  AdmsSensFadType & modelPar_Vgb,
257  bool modelPar_given_Vgb,
258  AdmsSensFadType & modelPar_Jsee,
259  bool modelPar_given_Jsee,
260  AdmsSensFadType & modelPar_nee,
261  bool modelPar_given_nee,
262  AdmsSensFadType & modelPar_Rbbxx,
263  bool modelPar_given_Rbbxx,
264  AdmsSensFadType & modelPar_Vgbb,
265  bool modelPar_given_Vgbb,
266  AdmsSensFadType & modelPar_Jsr,
267  bool modelPar_given_Jsr,
268  AdmsSensFadType & modelPar_nr,
269  bool modelPar_given_nr,
270  AdmsSensFadType & modelPar_Vgr,
271  bool modelPar_given_Vgr,
272  AdmsSensFadType & modelPar_XCjc,
273  bool modelPar_given_XCjc,
274  AdmsSensFadType & modelPar_Jsc,
275  bool modelPar_given_Jsc,
276  AdmsSensFadType & modelPar_nc,
277  bool modelPar_given_nc,
278  AdmsSensFadType & modelPar_Rcxx,
279  bool modelPar_given_Rcxx,
280  AdmsSensFadType & modelPar_Vgc,
281  bool modelPar_given_Vgc,
282  AdmsSensFadType & modelPar_Bf,
283  bool modelPar_given_Bf,
284  AdmsSensFadType & modelPar_kBeta,
285  bool modelPar_given_kBeta,
286  AdmsSensFadType & modelPar_Br,
287  bool modelPar_given_Br,
288  AdmsSensFadType & modelPar_VAF,
289  bool modelPar_given_VAF,
290  AdmsSensFadType & modelPar_VAR,
291  bool modelPar_given_VAR,
292  AdmsSensFadType & modelPar_IKF,
293  bool modelPar_given_IKF,
294  AdmsSensFadType & modelPar_IKR,
295  bool modelPar_given_IKR,
296  AdmsSensFadType & modelPar_Mc,
297  bool modelPar_given_Mc,
298  AdmsSensFadType & modelPar_BVceo,
299  bool modelPar_given_BVceo,
300  AdmsSensFadType & modelPar_kc,
301  bool modelPar_given_kc,
302  AdmsSensFadType & modelPar_BVebo,
303  bool modelPar_given_BVebo,
304  AdmsSensFadType & modelPar_Tr,
305  bool modelPar_given_Tr,
306  AdmsSensFadType & modelPar_Trx,
307  bool modelPar_given_Trx,
308  AdmsSensFadType & modelPar_Tf,
309  bool modelPar_given_Tf,
310  AdmsSensFadType & modelPar_Tft,
311  bool modelPar_given_Tft,
312  AdmsSensFadType & modelPar_Thcs,
313  bool modelPar_given_Thcs,
314  AdmsSensFadType & modelPar_Ahc,
315  bool modelPar_given_Ahc,
316  AdmsSensFadType & modelPar_Cje,
317  bool modelPar_given_Cje,
318  AdmsSensFadType & modelPar_mje,
319  bool modelPar_given_mje,
320  AdmsSensFadType & modelPar_Vje,
321  bool modelPar_given_Vje,
322  AdmsSensFadType & modelPar_Cjc,
323  bool modelPar_given_Cjc,
324  AdmsSensFadType & modelPar_mjc,
325  bool modelPar_given_mjc,
326  AdmsSensFadType & modelPar_Vjc,
327  bool modelPar_given_Vjc,
328  AdmsSensFadType & modelPar_kjc,
329  bool modelPar_given_kjc,
330  AdmsSensFadType & modelPar_Cmin,
331  bool modelPar_given_Cmin,
332  AdmsSensFadType & modelPar_J0,
333  bool modelPar_given_J0,
334  AdmsSensFadType & modelPar_XJ0,
335  bool modelPar_given_XJ0,
336  AdmsSensFadType & modelPar_Rci0,
337  bool modelPar_given_Rci0,
338  AdmsSensFadType & modelPar_Jk,
339  bool modelPar_given_Jk,
340  AdmsSensFadType & modelPar_RJk,
341  bool modelPar_given_RJk,
342  AdmsSensFadType & modelPar_Vces,
343  bool modelPar_given_Vces,
344  AdmsSensFadType & modelPar_Rc,
345  bool modelPar_given_Rc,
346  AdmsSensFadType & modelPar_Re,
347  bool modelPar_given_Re,
348  AdmsSensFadType & modelPar_Rb,
349  bool modelPar_given_Rb,
350  AdmsSensFadType & modelPar_Rb2,
351  bool modelPar_given_Rb2,
352  AdmsSensFadType & modelPar_Lc,
353  bool modelPar_given_Lc,
354  AdmsSensFadType & modelPar_Le,
355  bool modelPar_given_Le,
356  AdmsSensFadType & modelPar_Lb,
357  bool modelPar_given_Lb,
358  AdmsSensFadType & modelPar_Cq,
359  bool modelPar_given_Cq,
360  AdmsSensFadType & modelPar_Cpb,
361  bool modelPar_given_Cpb,
362  AdmsSensFadType & modelPar_Cpc,
363  bool modelPar_given_Cpc,
364  AdmsSensFadType & modelPar_Tnom,
365  bool modelPar_given_Tnom,
366  // non-reals (including hidden)
367  int modelPar_Mode,
368  bool modelPar_given_Mode,
369  int modelPar_Noise,
370  bool modelPar_given_Noise,
371  int modelPar_Debug,
372  bool modelPar_given_Debug,
373  int modelPar_DebugPlus,
374  bool modelPar_given_DebugPlus,
375  int modelPar_N,
376  bool modelPar_given_N,
377  int modelPar_dtype,
378  // basic variables
379  double admsTemperature, double adms_vt_nom, double gmin, std::vector <AdmsSensFadType> & staticContributions, std::vector <AdmsSensFadType> & dynamicContributions, const Instance & theInstance);
380 
381 void evaluateInitialInstance(
382  // instance parameters
383  // reals
384  AdmsSensFadType & instancePar_Temp,
385  bool instancePar_given_Temp,
386  AdmsSensFadType & instancePar_L,
387  bool instancePar_given_L,
388  AdmsSensFadType & instancePar_W,
389  bool instancePar_given_W,
390  // non-reals(including hidden)
391  int instancePar_N,
392  bool instancePar_given_N,
393  // model parameters
394  // reals
395  AdmsSensFadType & modelPar_Temp,
396  bool modelPar_given_Temp,
397  AdmsSensFadType & modelPar_Rth,
398  bool modelPar_given_Rth,
399  AdmsSensFadType & modelPar_Cth,
400  bool modelPar_given_Cth,
401  AdmsSensFadType & modelPar_L,
402  bool modelPar_given_L,
403  AdmsSensFadType & modelPar_W,
404  bool modelPar_given_W,
405  AdmsSensFadType & modelPar_Jsf,
406  bool modelPar_given_Jsf,
407  AdmsSensFadType & modelPar_nf,
408  bool modelPar_given_nf,
409  AdmsSensFadType & modelPar_Vg,
410  bool modelPar_given_Vg,
411  AdmsSensFadType & modelPar_Jse,
412  bool modelPar_given_Jse,
413  AdmsSensFadType & modelPar_ne,
414  bool modelPar_given_ne,
415  AdmsSensFadType & modelPar_Rbxx,
416  bool modelPar_given_Rbxx,
417  AdmsSensFadType & modelPar_Vgb,
418  bool modelPar_given_Vgb,
419  AdmsSensFadType & modelPar_Jsee,
420  bool modelPar_given_Jsee,
421  AdmsSensFadType & modelPar_nee,
422  bool modelPar_given_nee,
423  AdmsSensFadType & modelPar_Rbbxx,
424  bool modelPar_given_Rbbxx,
425  AdmsSensFadType & modelPar_Vgbb,
426  bool modelPar_given_Vgbb,
427  AdmsSensFadType & modelPar_Jsr,
428  bool modelPar_given_Jsr,
429  AdmsSensFadType & modelPar_nr,
430  bool modelPar_given_nr,
431  AdmsSensFadType & modelPar_Vgr,
432  bool modelPar_given_Vgr,
433  AdmsSensFadType & modelPar_XCjc,
434  bool modelPar_given_XCjc,
435  AdmsSensFadType & modelPar_Jsc,
436  bool modelPar_given_Jsc,
437  AdmsSensFadType & modelPar_nc,
438  bool modelPar_given_nc,
439  AdmsSensFadType & modelPar_Rcxx,
440  bool modelPar_given_Rcxx,
441  AdmsSensFadType & modelPar_Vgc,
442  bool modelPar_given_Vgc,
443  AdmsSensFadType & modelPar_Bf,
444  bool modelPar_given_Bf,
445  AdmsSensFadType & modelPar_kBeta,
446  bool modelPar_given_kBeta,
447  AdmsSensFadType & modelPar_Br,
448  bool modelPar_given_Br,
449  AdmsSensFadType & modelPar_VAF,
450  bool modelPar_given_VAF,
451  AdmsSensFadType & modelPar_VAR,
452  bool modelPar_given_VAR,
453  AdmsSensFadType & modelPar_IKF,
454  bool modelPar_given_IKF,
455  AdmsSensFadType & modelPar_IKR,
456  bool modelPar_given_IKR,
457  AdmsSensFadType & modelPar_Mc,
458  bool modelPar_given_Mc,
459  AdmsSensFadType & modelPar_BVceo,
460  bool modelPar_given_BVceo,
461  AdmsSensFadType & modelPar_kc,
462  bool modelPar_given_kc,
463  AdmsSensFadType & modelPar_BVebo,
464  bool modelPar_given_BVebo,
465  AdmsSensFadType & modelPar_Tr,
466  bool modelPar_given_Tr,
467  AdmsSensFadType & modelPar_Trx,
468  bool modelPar_given_Trx,
469  AdmsSensFadType & modelPar_Tf,
470  bool modelPar_given_Tf,
471  AdmsSensFadType & modelPar_Tft,
472  bool modelPar_given_Tft,
473  AdmsSensFadType & modelPar_Thcs,
474  bool modelPar_given_Thcs,
475  AdmsSensFadType & modelPar_Ahc,
476  bool modelPar_given_Ahc,
477  AdmsSensFadType & modelPar_Cje,
478  bool modelPar_given_Cje,
479  AdmsSensFadType & modelPar_mje,
480  bool modelPar_given_mje,
481  AdmsSensFadType & modelPar_Vje,
482  bool modelPar_given_Vje,
483  AdmsSensFadType & modelPar_Cjc,
484  bool modelPar_given_Cjc,
485  AdmsSensFadType & modelPar_mjc,
486  bool modelPar_given_mjc,
487  AdmsSensFadType & modelPar_Vjc,
488  bool modelPar_given_Vjc,
489  AdmsSensFadType & modelPar_kjc,
490  bool modelPar_given_kjc,
491  AdmsSensFadType & modelPar_Cmin,
492  bool modelPar_given_Cmin,
493  AdmsSensFadType & modelPar_J0,
494  bool modelPar_given_J0,
495  AdmsSensFadType & modelPar_XJ0,
496  bool modelPar_given_XJ0,
497  AdmsSensFadType & modelPar_Rci0,
498  bool modelPar_given_Rci0,
499  AdmsSensFadType & modelPar_Jk,
500  bool modelPar_given_Jk,
501  AdmsSensFadType & modelPar_RJk,
502  bool modelPar_given_RJk,
503  AdmsSensFadType & modelPar_Vces,
504  bool modelPar_given_Vces,
505  AdmsSensFadType & modelPar_Rc,
506  bool modelPar_given_Rc,
507  AdmsSensFadType & modelPar_Re,
508  bool modelPar_given_Re,
509  AdmsSensFadType & modelPar_Rb,
510  bool modelPar_given_Rb,
511  AdmsSensFadType & modelPar_Rb2,
512  bool modelPar_given_Rb2,
513  AdmsSensFadType & modelPar_Lc,
514  bool modelPar_given_Lc,
515  AdmsSensFadType & modelPar_Le,
516  bool modelPar_given_Le,
517  AdmsSensFadType & modelPar_Lb,
518  bool modelPar_given_Lb,
519  AdmsSensFadType & modelPar_Cq,
520  bool modelPar_given_Cq,
521  AdmsSensFadType & modelPar_Cpb,
522  bool modelPar_given_Cpb,
523  AdmsSensFadType & modelPar_Cpc,
524  bool modelPar_given_Cpc,
525  AdmsSensFadType & modelPar_Tnom,
526  bool modelPar_given_Tnom,
527  // non-reals (including hidden)
528  int modelPar_Mode,
529  bool modelPar_given_Mode,
530  int modelPar_Noise,
531  bool modelPar_given_Noise,
532  int modelPar_Debug,
533  bool modelPar_given_Debug,
534  int modelPar_DebugPlus,
535  bool modelPar_given_DebugPlus,
536  int modelPar_N,
537  bool modelPar_given_N,
538  int modelPar_dtype,
539  double admsTemperature);
540 
541 void evaluateInitialModel(
542  // model parameters
543  // reals
544  AdmsSensFadType & modelPar_Temp,
545  bool modelPar_given_Temp,
546  AdmsSensFadType & modelPar_Rth,
547  bool modelPar_given_Rth,
548  AdmsSensFadType & modelPar_Cth,
549  bool modelPar_given_Cth,
550  AdmsSensFadType & modelPar_L,
551  bool modelPar_given_L,
552  AdmsSensFadType & modelPar_W,
553  bool modelPar_given_W,
554  AdmsSensFadType & modelPar_Jsf,
555  bool modelPar_given_Jsf,
556  AdmsSensFadType & modelPar_nf,
557  bool modelPar_given_nf,
558  AdmsSensFadType & modelPar_Vg,
559  bool modelPar_given_Vg,
560  AdmsSensFadType & modelPar_Jse,
561  bool modelPar_given_Jse,
562  AdmsSensFadType & modelPar_ne,
563  bool modelPar_given_ne,
564  AdmsSensFadType & modelPar_Rbxx,
565  bool modelPar_given_Rbxx,
566  AdmsSensFadType & modelPar_Vgb,
567  bool modelPar_given_Vgb,
568  AdmsSensFadType & modelPar_Jsee,
569  bool modelPar_given_Jsee,
570  AdmsSensFadType & modelPar_nee,
571  bool modelPar_given_nee,
572  AdmsSensFadType & modelPar_Rbbxx,
573  bool modelPar_given_Rbbxx,
574  AdmsSensFadType & modelPar_Vgbb,
575  bool modelPar_given_Vgbb,
576  AdmsSensFadType & modelPar_Jsr,
577  bool modelPar_given_Jsr,
578  AdmsSensFadType & modelPar_nr,
579  bool modelPar_given_nr,
580  AdmsSensFadType & modelPar_Vgr,
581  bool modelPar_given_Vgr,
582  AdmsSensFadType & modelPar_XCjc,
583  bool modelPar_given_XCjc,
584  AdmsSensFadType & modelPar_Jsc,
585  bool modelPar_given_Jsc,
586  AdmsSensFadType & modelPar_nc,
587  bool modelPar_given_nc,
588  AdmsSensFadType & modelPar_Rcxx,
589  bool modelPar_given_Rcxx,
590  AdmsSensFadType & modelPar_Vgc,
591  bool modelPar_given_Vgc,
592  AdmsSensFadType & modelPar_Bf,
593  bool modelPar_given_Bf,
594  AdmsSensFadType & modelPar_kBeta,
595  bool modelPar_given_kBeta,
596  AdmsSensFadType & modelPar_Br,
597  bool modelPar_given_Br,
598  AdmsSensFadType & modelPar_VAF,
599  bool modelPar_given_VAF,
600  AdmsSensFadType & modelPar_VAR,
601  bool modelPar_given_VAR,
602  AdmsSensFadType & modelPar_IKF,
603  bool modelPar_given_IKF,
604  AdmsSensFadType & modelPar_IKR,
605  bool modelPar_given_IKR,
606  AdmsSensFadType & modelPar_Mc,
607  bool modelPar_given_Mc,
608  AdmsSensFadType & modelPar_BVceo,
609  bool modelPar_given_BVceo,
610  AdmsSensFadType & modelPar_kc,
611  bool modelPar_given_kc,
612  AdmsSensFadType & modelPar_BVebo,
613  bool modelPar_given_BVebo,
614  AdmsSensFadType & modelPar_Tr,
615  bool modelPar_given_Tr,
616  AdmsSensFadType & modelPar_Trx,
617  bool modelPar_given_Trx,
618  AdmsSensFadType & modelPar_Tf,
619  bool modelPar_given_Tf,
620  AdmsSensFadType & modelPar_Tft,
621  bool modelPar_given_Tft,
622  AdmsSensFadType & modelPar_Thcs,
623  bool modelPar_given_Thcs,
624  AdmsSensFadType & modelPar_Ahc,
625  bool modelPar_given_Ahc,
626  AdmsSensFadType & modelPar_Cje,
627  bool modelPar_given_Cje,
628  AdmsSensFadType & modelPar_mje,
629  bool modelPar_given_mje,
630  AdmsSensFadType & modelPar_Vje,
631  bool modelPar_given_Vje,
632  AdmsSensFadType & modelPar_Cjc,
633  bool modelPar_given_Cjc,
634  AdmsSensFadType & modelPar_mjc,
635  bool modelPar_given_mjc,
636  AdmsSensFadType & modelPar_Vjc,
637  bool modelPar_given_Vjc,
638  AdmsSensFadType & modelPar_kjc,
639  bool modelPar_given_kjc,
640  AdmsSensFadType & modelPar_Cmin,
641  bool modelPar_given_Cmin,
642  AdmsSensFadType & modelPar_J0,
643  bool modelPar_given_J0,
644  AdmsSensFadType & modelPar_XJ0,
645  bool modelPar_given_XJ0,
646  AdmsSensFadType & modelPar_Rci0,
647  bool modelPar_given_Rci0,
648  AdmsSensFadType & modelPar_Jk,
649  bool modelPar_given_Jk,
650  AdmsSensFadType & modelPar_RJk,
651  bool modelPar_given_RJk,
652  AdmsSensFadType & modelPar_Vces,
653  bool modelPar_given_Vces,
654  AdmsSensFadType & modelPar_Rc,
655  bool modelPar_given_Rc,
656  AdmsSensFadType & modelPar_Re,
657  bool modelPar_given_Re,
658  AdmsSensFadType & modelPar_Rb,
659  bool modelPar_given_Rb,
660  AdmsSensFadType & modelPar_Rb2,
661  bool modelPar_given_Rb2,
662  AdmsSensFadType & modelPar_Lc,
663  bool modelPar_given_Lc,
664  AdmsSensFadType & modelPar_Le,
665  bool modelPar_given_Le,
666  AdmsSensFadType & modelPar_Lb,
667  bool modelPar_given_Lb,
668  AdmsSensFadType & modelPar_Cq,
669  bool modelPar_given_Cq,
670  AdmsSensFadType & modelPar_Cpb,
671  bool modelPar_given_Cpb,
672  AdmsSensFadType & modelPar_Cpc,
673  bool modelPar_given_Cpc,
674  AdmsSensFadType & modelPar_Tnom,
675  bool modelPar_given_Tnom,
676  // non-reals (including hidden)
677  int modelPar_Mode,
678  bool modelPar_given_Mode,
679  int modelPar_Noise,
680  bool modelPar_given_Noise,
681  int modelPar_Debug,
682  bool modelPar_given_Debug,
683  int modelPar_DebugPlus,
684  bool modelPar_given_DebugPlus,
685  int modelPar_N,
686  bool modelPar_given_N,
687  int modelPar_dtype,
688  double admsTemperature);
689 
690 #endif // Xyce_ADMS_SENSITIVITIES
691 
692 
693 // Limited exponential --- NOT what verilog LRM says, but what qucs,
694 // ng-spice, and zspice do.
695 
696 template <typename T>
697 T limexp(const T &x)
698 {
699  if ((x) < 80.0)
700  return (exp(x));
701  else
702  return (exp(80.0)*(x-79.0));
703 }
704 
705 // Maybe this will do as a substitute for a sacado-provided "floor" and "ceil"?
706 // It is wrong to try to propagate the Sacado derivatives to the return
707 // value, as the floor and ceil functions have zero derivative w.r.t. any
708 // of the variables in the argument, except when X is an integer at which
709 // point the derivative is undefined.
710 template <typename T>
711 double ADMSfloor(const T & x)
712 {
713  return (floor(x.val()));
714 }
715 
716 template <typename T>
717 double ADMSceil(const T & x)
718 {
719  return (ceil(x.val()));
720 }
721 
722 
723 struct Traits: public DeviceTraits<Model, Instance, BJT::Traits>
724 {
725  static const char *name() {return "FBH HBT_X v2.1";}
726  static const char *deviceTypeName() {return "q level 23";}
727 
728  static int numNodes() {return 4;}
729  static bool modelRequired() {return true;}
730  static bool isLinearDevice() {return false;}
731 
732  static Device *factory(const Configuration &configuration, const FactoryBlock &factory_block);
733  static void loadModelParameters(ParametricData<Model> &model_parameters);
734  static void loadInstanceParameters(ParametricData<Instance> &instance_parameters);
735 };
736 
737 //-----------------------------------------------------------------------------
738 // Class : Instance
739 
740 //
741 // Purpose : This class represents a single instance of the
742 // device. It mainly contains indices and pointers into
743 // the matrix equation (see the resistor instance class for
744 // more details).
745 //
746 // Special Notes :
747 // Creator :
748 // Creation Date :
749 //-----------------------------------------------------------------------------
750 class Instance : public DeviceInstance
751 {
752  friend class ParametricData<Instance>;
753  friend class Model;
754 #ifdef Xyce_ADMS_SENSITIVITIES
755  friend class InstanceSensitivity;
756  friend class ModelSensitivity;
757 #endif // Xyce_ADMS_SENSITIVITIES
758  friend class Traits;
759 
760 public:
761  Instance(
762  const Configuration & configuration,
763  const InstanceBlock & instance_block,
764  Model & model,
765  const FactoryBlock & factory_block);
766 
767  ~Instance();
768 
769 private:
770  Instance(const Instance &);
771  Instance &operator=(const Instance &);
772 
773 public:
774  void registerLIDs( const LocalIdVector & intLIDVecRef,
775  const LocalIdVector & extLIDVecRef );
776  void registerStateLIDs( const LocalIdVector & staLIDVecRef );
777  void setupPointers();
778 
779  void loadNodeSymbols(Util::SymbolTable &symbol_table) const;
780 
781  const JacobianStamp & jacobianStamp() const;
782  void registerJacLIDs( const JacobianStamp & jacLIDVec );
783 
784  bool processParams();
785  bool updateTemperature ( const double & temp = -999.0 );
786  bool updateIntermediateVars ();
787  bool updatePrimaryState ();
788  bool updateSecondaryState ();
789 
790  // load functions, residual:
791  bool loadDAEQVector ();
792  bool loadDAEFVector ();
793 
794  // load functions, Jacobian:
795  bool loadDAEdQdx ();
796  bool loadDAEdFdx ();
797 
798 
799 private:
800 
801 public:
802  // iterator reference to the HBT_X model which owns this instance.
803  // Getters and setters
805  {
806  return model_;
807  }
808 
809 private:
810 
811  Model & model_; //< Owning Model
812  // Begin verilog Instance Variables
813  // Instance Parameters
814  double Temp;
815  int N;
816  double L;
817  double W;
818  // Variables of global_instance scope
819  // end verilog Instance Variables=====
820  // Nodal LID Variables
821  int li_c;
822  int li_b;
823  int li_e;
824  int li_t;
825  int li_ei;
826  int li_bi;
827  int li_bii;
828  int li_ci;
829  int li_ti;
830  int li_ex;
831  int li_exx;
832  int li_cx;
833  // end Nodal LID Variables
834  // Branch LID Variables
838  // end Branch LID Variables
839  // Jacobian pointers
966  // end of Jacobian and pointers
967  // node numbers
968  static const int admsNodeID_c = 0;
969  static const int admsNodeID_b = 1;
970  static const int admsNodeID_e = 2;
971  static const int admsNodeID_t = 3;
972  static const int admsNodeID_ei = 4;
973  static const int admsNodeID_bi = 5;
974  static const int admsNodeID_bii = 6;
975  static const int admsNodeID_ci = 7;
976  static const int admsNodeID_ti = 8;
977  static const int admsNodeID_ex = 9;
978  static const int admsNodeID_exx = 10;
979  static const int admsNodeID_cx = 11;
980  // end node numbers
981  // Additional IDs for branch equations
982  static const int admsBRA_ID_b_bi = 12;
983  static const int admsBRA_ID_e_ei = 13;
984  static const int admsBRA_ID_c_ci = 14;
985  // end branch numbers
986  // Probe numbers
987  static const int admsProbeID_V_t_ti = 0;
988  static const int admsProbeID_V_b_c = 1;
989  static const int admsProbeID_V_c_GND = 2;
990  static const int admsProbeID_V_b_GND = 3;
991  static const int admsProbeID_V_cx_bii = 4;
992  static const int admsProbeID_V_exx_bii = 5;
993  static const int admsProbeID_V_ex_bii = 6;
994  static const int admsProbeID_V_bii_bi = 7;
995  static const int admsProbeID_I_c_ci = 8;
996  static const int admsProbeID_I_e_ei = 9;
997  static const int admsProbeID_I_b_bi = 10;
998  static const int admsProbeID_V_ti_GND = 11;
999  static const int admsProbeID_V_ci_ei = 12;
1000  static const int admsProbeID_V_exx_ei = 13;
1001  static const int admsProbeID_V_cx_ci = 14;
1002  static const int admsProbeID_V_ex_ei = 15;
1003  static const int admsProbeID_V_bii_ei = 16;
1004  static const int admsProbeID_V_bii_ci = 17;
1005  static const int admsProbeID_V_bi_ci = 18;
1006  // end probe numbers
1007  // State LIDs
1011  // end state LIDs
1012  // Arrays to hold probes
1013  std::vector < AdmsFadType > probeVars;
1014  // Arrays to hold contributions
1015  // dynamic contributions are differentiated w.r.t time
1016  std::vector < AdmsFadType > staticContributions;
1017  std::vector < AdmsFadType > dynamicContributions;
1018 
1019  // This array stores the differences between original and limited variables.
1020  std::vector<double> probeDiffs;
1021  // These store the Jdxp's for F and Q, respectively
1022  std::vector<double> Jdxp_static;
1023  std::vector<double> Jdxp_dynamic;
1024 
1025  // this is what we'll use when any model uses $temperature. We'll
1026  // set it in updateTemperature, and initialize it to whatever
1027  // is in devOptions when the instance is constructed.
1029 
1030  // vt at $temperature;
1031  double adms_vt_nom;
1032 
1033 
1034  // This one is for the annoying bogus "XyceADMSInstTemp" parameter
1035  // that we need so we can set it from the device manager when there's no
1036  // "TEMP" parameter to use
1038 
1039 
1040  static std::vector< std::vector<int> > jacStamp;
1041  static std::vector<int> jacMap;
1042  static std::vector< std::vector<int> > jacMap2;
1043 };
1044 
1045 
1046 
1047 namespace AnalogFunctions
1048 {
1049 
1050 // Analog Function exp_soft
1051 template<typename ScalarT> ScalarT exp_soft(ScalarT x)
1052 {
1053 
1054 
1055  ScalarT exp_soft;
1056  ScalarT maxexp;
1057  ScalarT maxarg;
1058  {
1059  maxexp = 1.0e25;
1060  maxarg = log(maxexp);
1061  if ((x<maxarg))
1062  {
1063  exp_soft = exp(x);
1064  }
1065  else
1066  {
1067  exp_soft = (((x+1.0)-maxarg)*maxexp);
1068  }
1069  }
1070  return(exp_soft);
1071 }
1072 
1073 
1074 // Analog Function Vt
1075 template<typename RetScalarT,typename Arg1ScalarT, typename Arg2ScalarT> RetScalarT Vt(Arg1ScalarT U, Arg2ScalarT Ud)
1076 {
1077 
1078 
1079  RetScalarT Vt;
1080  Arg2ScalarT Vch;
1081  Arg2ScalarT VF;
1082  RetScalarT exparg;
1083  {
1084  Vch = (0.1*Ud);
1085  VF = (0.9*Ud);
1086  if ((U<VF))
1087  {
1088  exparg=((U-VF)/Vch);
1089  Vt = (U-(Vch*log((1.0+exp(exparg)))));
1090  }
1091  else
1092  {
1093  exparg=((VF-U)/Vch);
1094  Vt = (VF-(Vch*log((1.0+exp(exparg)))));
1095  }
1096  }
1097  return(Vt);
1098 }
1099 
1100 
1101 // Analog Function diode/
1102 // something of an abuse, we assume arg2, 5, 7 are all of compatible types
1103 template<typename RetScalarT,typename Arg1ScalarT, typename Arg2ScalarT,typename Arg3ScalarT,typename Arg4ScalarT, typename Arg5ScalarT, typename Arg6ScalarT, typename Arg7ScalarT>
1104 RetScalarT diode(Arg1ScalarT U, Arg2ScalarT Is, Arg3ScalarT Ug, Arg4ScalarT N, Arg5ScalarT AREA, Arg6ScalarT TJ, Arg7ScalarT TNOM)
1105 {
1106 
1107 
1108  RetScalarT diode;
1109  RetScalarT exparg1;
1110  RetScalarT exparg2;
1111  RetScalarT VTH0;
1112  Arg6ScalarT VTHJ;
1113  Arg7ScalarT VTHNOM;
1114  double maxi;
1115  Arg3ScalarT Tmax;
1116  Arg6ScalarT TJM;
1117  Arg6ScalarT TJM_arg1;
1118  double KDURCHQ;
1119  RetScalarT lnIs;
1120  {
1121  VTH0 = adms_vt<RetScalarT>((20.0+273.15));
1122  VTHNOM = adms_vt<Arg7ScalarT>((TNOM+273.15));
1123  KDURCHQ = 0.861708692e-4;
1124  lnIs = log((Is*AREA));
1125  maxi = log(static_cast<double>(1e6));
1126  if (((maxi<(Ug/VTHNOM))&&(U<0.0)))
1127  {
1128  Tmax = (((Ug*VTHNOM)/((Ug-(maxi*VTHNOM))*KDURCHQ))-273.15);
1129  TJM = Vt<Arg6ScalarT>(TJ,Tmax);
1130  }
1131  else
1132  {
1133  TJM = TJ;
1134  }
1135  TJM_arg1=(TJM+273.15);
1136  VTHJ = adms_vt(TJM_arg1);
1137  if ((Ug>0.0))
1138  {
1139  exparg1=((((U/(N*VTHJ))+(Ug/VTHNOM))-(Ug/VTHJ))+lnIs);
1140  exparg2=(((Ug/VTHNOM)-(Ug/VTHJ))+lnIs);
1141  diode = (exp_soft(exparg1)-exp_soft(exparg2));
1142  }
1143  else
1144  {
1145  exparg1=((U/(N*VTH0))+lnIs);
1146  diode = (exp_soft(exparg1)-(Is*AREA));
1147  }
1148  }
1149  return(diode);
1150 }
1151 
1152 
1153 // Analog Function MM
1154 template<typename ScalarT> ScalarT MM(ScalarT VBCI, ScalarT VCBO, ScalarT MC, ScalarT VCBLIN, ScalarT BF, ScalarT KC)
1155 {
1156 
1157 
1158  ScalarT MM;
1159  ScalarT FBD;
1160  ScalarT vcbi;
1161  {
1162  if ((((KC>0.0)&&(MC>0.0))&&(VCBO>0.0)))
1163  {
1164  vcbi = VBCI;
1165  FBD = (VCBLIN/VCBO);
1166  if ((VBCI>0.0))
1167  {
1168  MM = 1.0;
1169  }
1170  else
1171  {
1172  if ((VBCI>(-VCBLIN)))
1173  {
1174  if ((MC==1))
1175  {
1176  MM = (1.0/(1.0-(vcbi/(-VCBO))));
1177  }
1178  else
1179  {
1180  MM = (1.0/(1.0-pow((vcbi/(-VCBO)),MC)));
1181  }
1182  }
1183  else
1184  {
1185  if ((VBCI<=(-VCBLIN)))
1186  {
1187  if ((MC==1))
1188  {
1189  MM = ((1.0/(1.0-FBD))-((((1.0/VCBO)*1.0)/pow((1.0-FBD),2.0))*(vcbi+(FBD*VCBO))));
1190  }
1191  else
1192  {
1193  MM = ((1.0/(1.0-pow(FBD,MC)))-((((MC/VCBO)*pow(FBD,(MC-1.0)))/pow((1.0-pow(FBD,MC)),2.0))*(vcbi+(FBD*VCBO))));
1194  }
1195  }
1196  }
1197  }
1198  }
1199  else
1200  {
1201  MM = 1.0;
1202  }
1203  }
1204  return(MM);
1205 }
1206 
1207 
1208 // Analog Function charge
1209 template< typename RetScalarT, typename Arg2ScalarT, typename Arg3ScalarT, typename Arg4ScalarT, typename Arg5ScalarT> RetScalarT charge(RetScalarT U, Arg2ScalarT C0, Arg3ScalarT Ud, Arg4ScalarT m, Arg5ScalarT Area)
1210 {
1211 
1212 
1213  RetScalarT charge;
1214  RetScalarT Vj;
1215  RetScalarT Vjo;
1216  RetScalarT VF;
1217  {
1218  Vj = Vt<RetScalarT>(U,Ud);
1219  Vjo = Vt<RetScalarT>(0.0,Ud);
1220  VF = (0.9*Ud);
1221  if ((m==1.0))
1222  {
1223  charge = ((Area*C0)*((Ud*(log((1.0-(Vjo/Ud)))-log((1.0-(Vj/Ud)))))+((1.0/(1.0-(VF/Ud)))*((U-Vj)+Vjo))));
1224  }
1225  else
1226  {
1227  charge = ((Area*C0)*((((Ud/(1.0-m))*(pow((1.0-(Vjo/Ud)),(1.0-m))-pow((1.0-(Vj/Ud)),(1.0-m))))+(pow((1.0-(VF/Ud)),(-m))*((U-Vj)+Vjo)))-(Ud*(1.0/(1.0-m)))));
1228  }
1229  }
1230  return(charge);
1231 }
1232 
1233 
1234 // Analog Function Vceff
1235 template<typename ScalarT> ScalarT Vceff(ScalarT U, ScalarT VCES)
1236 {
1237 
1238 
1239  ScalarT Vceff;
1240  ScalarT Vth0;
1241  {
1242  Vth0 = 0.025;
1243  if ((U<VCES))
1244  {
1245  Vceff = (Vth0+(Vth0*log((1.0+exp((((U-VCES)/Vth0)-1.0))))));
1246  }
1247  else
1248  {
1249  Vceff = ((U-VCES)+(Vth0*log((1.0+exp((1.0-((U-VCES)/Vth0)))))));
1250  }
1251  }
1252  return(Vceff);
1253 }
1254 
1255 
1256 // Analog Function ICK
1257 template<typename ScalarT> ScalarT ICK(ScalarT U, ScalarT RCI0, ScalarT VLIM, ScalarT InvVPT, ScalarT VCES)
1258 {
1259 
1260 
1261  ScalarT ICK;
1262  ScalarT VC;
1263  ScalarT x;
1264  {
1265  VC = Vceff(U,VCES);
1266  x = ((VC-VLIM)*InvVPT);
1267  ICK = (((VC/RCI0)*(1.0/sqrt((1.0+((VC/VLIM)*(VC/VLIM))))))*(1.0+((x+sqrt(((x*x)+0.001)))/2.0)));
1268  }
1269  return(ICK);
1270 }
1271 
1272 }
1273 
1274 
1275 //-----------------------------------------------------------------------------
1276 // Class : Model
1277 
1278 // Purpose :
1279 // Special Notes :
1280 // Creator :
1281 // Creation Date :
1282 //-----------------------------------------------------------------------------
1283 class Model : public DeviceModel
1284 {
1285  typedef std::vector<Instance *> InstanceVector;
1286 
1287  friend class ParametricData<Model>;
1288  friend class Instance;
1289 #ifdef Xyce_ADMS_SENSITIVITIES
1290  friend class InstanceSensitivity;
1291  friend class ModelSensitivity;
1292 #endif // Xyce_ADMS_SENSITIVITIES
1293  friend class Traits;
1294 
1295 public:
1296  Model(
1297  const Configuration & configuration,
1298  const ModelBlock & model_block,
1299  const FactoryBlock & factory_block);
1300 
1301  ~Model();
1302 
1303 private:
1304  Model(const Model &);
1305  Model &operator=(const Model &);
1306 
1307 public:
1308  virtual void forEachInstance(DeviceInstanceOp &op) const /* override */;
1309  virtual std::ostream &printOutInstances(std::ostream &os) const;
1310  bool processParams();
1311  bool processInstanceParams();
1312 
1313 private:
1314 
1315 public:
1316  void addInstance(Instance *instance)
1317  {
1318  instanceContainer.push_back(instance);
1319  }
1320 
1321 private:
1322  std::vector<Instance*> instanceContainer;
1323 
1324 private:
1325 
1326  // This one is for the annoying bogus "XyceADMSInstTemp" parameter
1327  // that we need so we can set it from the device manager when there's no
1328  // "TEMP" model parameter to use
1329  double admsModTemp;
1330  // Begin verilog Model Variables
1331  // Model Parameters
1332  int Mode;
1333  int Noise;
1334  int Debug;
1336  double Temp;
1337  double Rth;
1338  double Cth;
1339  int N;
1340  double L;
1341  double W;
1342  double Jsf;
1343  double nf;
1344  double Vg;
1345  double Jse;
1346  double ne;
1347  double Rbxx;
1348  double Vgb;
1349  double Jsee;
1350  double nee;
1351  double Rbbxx;
1352  double Vgbb;
1353  double Jsr;
1354  double nr;
1355  double Vgr;
1356  double XCjc;
1357  double Jsc;
1358  double nc;
1359  double Rcxx;
1360  double Vgc;
1361  double Bf;
1362  double kBeta;
1363  double Br;
1364  double VAF;
1365  double VAR;
1366  double IKF;
1367  double IKR;
1368  double Mc;
1369  double BVceo;
1370  double kc;
1371  double BVebo;
1372  double Tr;
1373  double Trx;
1374  double Tf;
1375  double Tft;
1376  double Thcs;
1377  double Ahc;
1378  double Cje;
1379  double mje;
1380  double Vje;
1381  double Cjc;
1382  double mjc;
1383  double Vjc;
1384  double kjc;
1385  double Cmin;
1386  double J0;
1387  double XJ0;
1388  double Rci0;
1389  double Jk;
1390  double RJk;
1391  double Vces;
1392  double Rc;
1393  double Re;
1394  double Rb;
1395  double Rb2;
1396  double Lc;
1397  double Le;
1398  double Lb;
1399  double Cq;
1400  double Cpb;
1401  double Cpc;
1402  double Tnom;
1403  int dtype;
1404  // Variables of global_model scope
1405  // end verilog model variables=====
1406 };
1407 
1408 void registerDevice();
1409 
1410 } // namespace ADMSHBT_X
1411 } // namespace Device
1412 } // namespace Xyce
1413 #endif //Xyce_N_DEV_ADMSHBT_X_h
std::vector< AdmsFadType > probeVars
void registerLIDs(const LocalIdVector &intLIDVecRef, const LocalIdVector &extLIDVecRef)
Pure virtual class to augment a linear system.
std::vector< AdmsFadType > dynamicContributions
#define MC
virtual void forEachInstance(DeviceInstanceOp &op) const
Apply a device instance "op" to all instances associated with this model.
Model & operator=(const Model &)
void addInstance(Instance *instance)
RetScalarT Vt(Arg1ScalarT U, Arg2ScalarT Ud)
static std::vector< std::vector< int > > jacStamp
double ADMSceil(const T &x)
std::vector< AdmsFadType > staticContributions
RetScalarT charge(RetScalarT U, Arg2ScalarT C0, Arg3ScalarT Ud, Arg4ScalarT m, Arg5ScalarT Area)
RetScalarT diode(Arg1ScalarT U, Arg2ScalarT Is, Arg3ScalarT Ug, Arg4ScalarT N, Arg5ScalarT AREA, Arg6ScalarT TJ, Arg7ScalarT TNOM)
bool updateTemperature(const double &temp=-999.0)
void registerJacLIDs(const JacobianStamp &jacLIDVec)
Sacado::Fad::SFad< double, 1 > AdmsSensFadType
The FactoryBlock contains parameters needed by the device, instance and model creation functions...
void loadNodeSymbols(Util::SymbolTable &symbol_table) const
Populates and returns the store name map.
std::vector< std::vector< int > > JacobianStamp
Definition: N_DEV_fwd.h:196
static std::vector< std::vector< int > > jacMap2
std::vector< Instance * > instanceContainer
bool processParams()
processParams
bool processInstanceParams()
processInstanceParams
virtual std::ostream & printOutInstances(std::ostream &os) const
ScalarT Vceff(ScalarT U, ScalarT VCES)
Sacado::Fad::SFad< double, 19 > AdmsFadType
static const char * deviceTypeName()
The Device class is an interface for device implementations.
Definition: N_DEV_Device.h:101
IdVector LocalIdVector
Definition: N_DEV_fwd.h:198
ScalarT MM(ScalarT VBCI, ScalarT VCBO, ScalarT MC, ScalarT VCBLIN, ScalarT BF, ScalarT KC)
ScalarT ICK(ScalarT U, ScalarT RCI0, ScalarT VLIM, ScalarT InvVPT, ScalarT VCES)
static void loadInstanceParameters(ParametricData< Instance > &instance_parameters)
Class Configuration contains device configuration data.
static Tin adms_ternary_op(const bool cond, const Tin &ifTrue, const Tin &ifFalse)
const JacobianStamp & jacobianStamp() const
static Device * factory(const Configuration &configuration, const FactoryBlock &factory_block)
Model(const Configuration &configuration, const ModelBlock &model_block, const FactoryBlock &factory_block)
std::vector< double > Jdxp_dynamic
static void loadModelParameters(ParametricData< Model > &model_parameters)
double ADMSfloor(const T &x)
static T adms_vt(const T temp)
#define CONSTKoverQ
Definition: N_DEV_Const.h:58
Instance & operator=(const Instance &)
Base sensitivity functor.
Definition: N_DEV_Pars.h:148
std::vector< Instance * > InstanceVector
ModelBlock represents a .MODEL line from the netlist.
The DeviceTraits template describes the configuration of a device.
static std::vector< int > jacMap
Manages parameter binding for class C.
Definition: N_DEV_Pars.h:214
InstanceBlock represent a device instance line from the netlist.
Instance(const Configuration &configuration, const InstanceBlock &instance_block, Model &model, const FactoryBlock &factory_block)
void registerStateLIDs(const LocalIdVector &staLIDVecRef)