Xyce  6.1
N_DEV_VDMOS.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // Copyright Notice
3 //
4 // Copyright 2002 Sandia Corporation. Under the terms
5 // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
6 // Government retains certain rights in this software.
7 //
8 // Xyce(TM) Parallel Electrical Simulator
9 // Copyright (C) 2002-2015 Sandia Corporation
10 //
11 // This program is free software: you can redistribute it and/or modify
12 // it under the terms of the GNU General Public License as published by
13 // the Free Software Foundation, either version 3 of the License, or
14 // (at your option) any later version.
15 //
16 // This program is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, see <http://www.gnu.org/licenses/>.
23 //-----------------------------------------------------------------------------
24 
25 //-----------------------------------------------------------------------------
26 // Filename : $RCSfile: N_DEV_VDMOS.h,v $
27 //
28 // Purpose : Vertical, double-dffused power MOSFET
29 // This device model is based on the Uniform Charge Control
30 // Model of Fjeldly, et. al.
31 //
32 // Special Notes :
33 //
34 // Creator : Eric R. Keiter, SNL, Parallel Computational Sciences
35 //
36 // Creation Date : 02/28/00
37 //
38 // Revision Information:
39 // ---------------------
40 //
41 // Revision Number: $Revision: 1.85 $
42 //
43 // Revision Date : $Date: 2015/04/08 19:18:24 $
44 //
45 // Current Owner : $Author: tvrusso $
46 //-----------------------------------------------------------------------------
47 
48 #ifndef Xyce_N_DEV_VDMOS_h
49 #define Xyce_N_DEV_VDMOS_h
50 
51 // ---------- Xyce Includes ----------
52 #include <N_DEV_Configuration.h>
53 #include <N_DEV_DeviceMaster.h>
54 #include <N_DEV_DeviceInstance.h>
55 #include <N_DEV_DeviceModel.h>
56 #include <N_DEV_DeviceBlock.h>
57 
58 #include <N_DEV_MOSFET1.h>
59 
60 namespace Xyce {
61 namespace Device {
62 namespace VDMOS {
63 
64 // ---------- Forward Declarations -------
65 class Model;
66 class Instance;
67 
68 struct Traits : public DeviceTraits<Model, Instance, MOSFET1::Traits>
69 {
70  static const char *name() {return "Power MOSFET";}
71  static const char *deviceTypeName() {return "M level 18";}
72  static int numNodes() {return 4;}
73  static bool modelRequired() {return true;}
74  static bool isLinearDevice() {return false;}
75 
76  static Device *factory(const Configuration &configuration, const FactoryBlock &factory_block);
77  static void loadModelParameters(ParametricData<Model> &model_parameters);
78  static void loadInstanceParameters(ParametricData<Instance> &instance_parameters);
79 };
80 
81 //-----------------------------------------------------------------------------
82 // Class : Instance
83 // Purpose :
84 // Special Notes :
85 // Creator : pmc
86 // Creation Date : 1/16/2004
87 //-----------------------------------------------------------------------------
88 class Instance : public DeviceInstance
89 {
90  friend class ParametricData<Instance>;
91  friend class Model;
92  friend class Traits;friend class Master;
93 
94 public:
95 
96  Instance(
97  const Configuration & configuration,
98  const InstanceBlock & IB,
99  Model & Miter,
100  const FactoryBlock & factory_block);
101 
102  ~Instance();
103 
104 private:
105  Instance(const Instance &);
106  Instance &operator=(const Instance &);
107 
108 public:
109  void registerLIDs( const std::vector<int> & intLIDVecRef,
110  const std::vector<int> & extLIDVecRef );
111  void registerStateLIDs( const std::vector<int> & staLIDVecRef);
112  void registerStoreLIDs( const std::vector<int> & stoLIDVecRef);
113 
114  void loadNodeSymbols(Util::SymbolTable &symbol_table) const; // override
115 
116  const std::vector< std::vector<int> > & jacobianStamp() const;
117  void registerJacLIDs( const std::vector< std::vector<int> > & jacLIDVec );
118 
119  // load functions, residual:
120  bool loadDAEQVector ();
121  bool loadDAEFVector ();
122 
123  // load functions, Jacobian:
124  bool loadDAEdQdx ();
125  bool loadDAEdFdx ();
126 
127  void setupPointers();
128 
129  bool updateIntermediateVars ();
130  bool updatePrimaryState ();
131  bool updateSecondaryState ();
132 
133  bool processParams ();
134  bool updateTemperature(const double & temp_tmp);
135 
136  bool UCCMqmeyer(double vgps, double vgpdd, double vgpb, double von_local,
137  double vddsat_local, double & capgs_local, double & capgdd_local,
138  double & capgb_local, double phi, double cox );
139 
140  bool UCCMMeyercap(double vgps, double vgpdd, double vgpb,
141  double & cgs, double & cgd, double & cgb);
142  bool UCCMCharges(double vgps, double vgpdd, double vgpb,
143  double & qD, double & qS, double & qB);
144  bool UCCMcvon(double vbs_local, double & von_local, double & dvonvbs_local);
145  bool UCCMmosa1(double vgps, double vdds, double dvonvbs,
146  double & cdraindrift_loc, double & vsate);
147  bool UCCMmosa2(double vgps, double vdds, double dvonvbs,
148  double & cdraindrift_loc, double & vsate);
149 
150  inline bool isConverged();
151 
152 public:
153  // iterator reference to the model which owns this instance.
154  // Getters and setters
156  {
157  return model_;
158  }
159 
160 private:
161 
162  Model & model_; //< Owning model
163 
164  int states; // index into state table for this device
165  int dNode; // number of the gate node of the mosfet
166  int gNode; // number of the gate node of the mosfet
167  int sNode; // number of the source node of the mosfet
168  int bNode; // number of the bulk node of the mosfet
169  int dNodePrime; // number of the internal drain node of the mosfet
170  int gNodePrime; // number of the internal gate node of the mosfet
171  int sNodePrime; // number of the internal source node of the mosfet
172  int dDriftNode; // number of the internal draindrift node of the mosfet
173 
174  double l; // the length of the channel region
175  double w; // the width of the channel region
176  double drainArea; // the area of the drain diffusion
177  double sourceArea; // the area of the source diffusion
178  double drainSquares; // the length of the drain in squares
179  double sourceSquares; // the length of the source in squares
182  double sourceCond; //conductance of source(or 0):set in setup
183  double gateCond; //conductance of gate(or 0):set in setup
184  double drainCond; //conductance of drain(or 0):set in setup
185  double draindriftCond; //conductance of draindrift channel
186  double numberParallel; // number simulated parallel mosfets
187  double vt; // CONSTKoverQ*temp: set in updateTemperature
188 
189  double temp; // operating temperature of this instance
190  double tSurfMob; // temperature corrected surface mobility
191  double tPhi; // temperature corrected Phi
192  double tVto; // temperature corrected Vto
193  double tSatCur; // temperature corrected saturation Cur.
194  double tSatCurDens; // temperature corrected sat. cur. density
195  double tCbd; // temperature corrected B-D Capacitance
196  double tCbs; // temperature corrected B-S Capacitance
197  double tCj; // temperature corrected Bulk bottom Cap
198  double tCjsw; // temperature corrected Bulk side Cap
199  double tBulkPot; // temperature corrected Bulk potential
200  double tDepCap; // temperature adjusted transition point in
201  // the cureve matching Fc * Vj
202  double tVbi; // temperature adjusted Vbi
203 
204  double von;
205  double vdsat;
206  double vddsat;
207  double sourceVcrit; // vcrit for pos. vds
208  double drainVcrit; // vcrit for neg. vds
209  double draindriftVcrit; // vcrit for neg. vdd
210  double cdd; // draindrift current
211  double cd; // drain current
212  double gmbs; // bulk-source transconductance
213  double gm; // transconductance
214  double gddd; // draindrift conductance
215  double dIdd_dVd; // draindrift derivative
216  double gds; // drain-source conductance
217  double gdds; // drain-source conductance
218  double gdsshunt; // drain-source shunt conductance
219  double gbs; // bulk-source conductance
220  double gbd; // bulk-drain conductance
221  double cbd;
222  double Cbd;
223  double Cbdsw;
224  double cbs;
225  double Cbs;
226  double Cbssw;
227  double f2d;
228  double f3d;
229  double f4d;
230  double f2s;
231  double f3s;
232  double f4s;
233  double n0;
234  double vp;
235  double gammas;
236  double gammal;
237  double gchi0;
238  double vtoo;
239  double vthLimit;
240 
241  int mode; // device mode : 1 = normal, -1 = inverse
242  double mode_low;
243  double mode_high;
244  bool off ; // non-zero to indicate device is off for
245  // dc analysis
248 
249  bool limitedFlag; // for convergence testing
250 
251 
252  ////////////////////////////////////////////////////////////////////
253  // these are intermediate variables added to the instance class instead
254  // of leaving them to be calculated repeatedly in the load function
255 
256  // some caluclated quantities
258  double DrainSatCur;
259  double SourceSatCur;
263  double OxideCap;
264 
265  // Solution variables and intermediate quantities
266  // drain,source,gate, bulk, drainprime and sourceprime voltages
267  double Vd;
268  double Vs;
269  double Vg;
270  double Vb;
271  double Vdp;
272  double Vgp;
273  double Vsp;
274  double Vdd;
275  double Vd1p;
276  // voltage drops between pairs of nodes
277  double Vddp; // drain-drain'
278  double Vddd; // drain-draindrift
279  double Vdddp; // draindrift-drain'
280  double Vssp; // source-source'
281  double Vbsp; // bulk-source'
282  double Vbdp; // bulk-drain'
283  double Vggp; // gate-gate'
284  double Vgpsp; // gate'-source'
285  double Vgpdp; // gate'-drain'
286  double Vgpb; // gate'-bulk
287  double Vdpsp; // drop across channel
288  double Vbdd; // bulk-draindrift
289  double D1vd; // D1prime-drain voltage drop
290 
291  // the gate-drain voltage drop isn't actually a state variable, but it
292  // is calculated at the same time and in the same manner as the state
293  // vars. So here we go, sticking it in the instance class.
294  double vgpd;
295 
296  // the variables capgs, capgd and capgb are the raw output of
297  // qmeyer. They get massaged into total capacitances in
298  // updateIntermediateVars, and get used in updatePrimaryState to get
299  // charges on the capacitors.
300 
301  double Capgs; // total gate-source capacitance
302  double Capgdd; // total gate-drain capacitance
303  double Capgb; // total gate-bulk capacitance
304 
305  // current through source and drain resistors
306  double Isource;
307  double Igate;
308  double Idrain;
309  double Idraindrift;
310  double Irdsshunt;
311  double Ird1rs;
312 
313  // ISUBMOD calculation
314  double mm1;
315  double dmm1vgs;
316  double dmm1vds;
317  double dmm1vbs;
318  double ISUB;
319  double GMSUB;
320  double GDDSSUB;
321  double GBSSUB;
322 
323  double cdrain; // the channel current
324  double cdraindrift; // the draindrift current
325 
326  // these are calculated in loadRHS and used in the jacobian load
327  double Gm,Gmbs; // we do this so we don't really need the xnrm/xrev vars
328  double revsum; // described in comments at the end of
329  double nrmsum; // updateIntermediateVars (uIVB in remaining comments)
330  double cdreq;
331 
332  // variables related to diode 1, which connects the source to the drain
333  int D1DIOoff1; // 'off' flag for diode
334  double D1DIOarea; // area factor for the diode
335  double D1DIOinitCond; // initial condition
336  double D1DIOtemp; // temperature of the instance
337  double D1DIOtJctPot; // temperature adjusted junction potential
338  double D1DIOtJctCap; // temperature adjusted junction capacitance
339  double D1DIOtDepCap; // temperature adjusted transition point in
340  // the curve matching (Fc * Vj )
341  double D1DIOtSatCur; // temperature adjusted saturation current
343  double D1DIOtVcrit; // temperature adjusted V crit
344  double D1DIOtF1; // temperature adjusted f1
346  double D1gspr; // area-scaled conductance
347  double D1gd;
348  double D1cdeq;
349  double D1vt; // K t / Q
350  double D1vte;
351 
352  // end of intermediate variables that aren't state variables
353  ////////////////////////////
354  int li_Drain;
358  int li_Gate;
360  int li_Bulk;
363 
364  // The VDMOS has a 9x9 matrix block; 35 entries are nonzero:
365  // --------------------------------------------------------------------------+
366  // | #NZ | | |
367  // | entries | | V_d V_g V_s V_b V_d' V_g' V_s' V_dd V_d1'|
368  // --------------------------------------------------------------------------+
369  // | 4 | KCL_d | aa -gs -ab A |
370  // | 2 | KCL_g | a -a |
371  // | 4 | KCL_s | -gs g h B |
372  // | 4 | KCL_b | j k i l |
373  // | 5 | KCL_d'| o p n q b |
374  // | 5 | KCL_g'| -a d e c f |
375  // | 5 | KCL_s'| s t u r v |
376  // | 3 | KCL_dd| -ab b w |
377  // | 3 |KCL_D1'| C D E |
378  // --------------------------------------------------------------------------+
379  // 35 total
380  ////////////////////////////////////////////////////////////////////
381  // Offset variables corresponding to the above declared indices.
382 
383  // Jacobian Matrix Offset:
384 
385  // V_d Row:
390 
391  // V_g Row:
394 
395  // V_s Row:
400 
401  // V_b Row:
406 
407  // V_d' Row:
413 
414  // V_g' Row:
420 
421  // V_s' Row:
427 
428  // V_dd Row:
432 
433 
434  // V_d1' row:
438 
439 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
440  ////////////////////////////////////////////////////////////////////
441 
442  // F-matrix pointers:
447 
450 
455 
460 
466 
472 
478 
482 
486 
487  // Q-matrix pointers:
492 
495 
500 
505 
511 
517 
523 
527 
531 #endif
532 
533  ////////////////////////////////////////////////////////////////////
534  // 3f5 State Variables & related quantities:
535  // voltage drops
536  double vbdd;
537  double vbs;
538  double vgpdd;
539  double vgps;
540  double vdds;
541 
542  // "original" versions of various voltage drop variables:
543  double vbdd_orig;
544  double vbs_orig;
545  double vgpdd_orig;
546  double vgps_orig;
547  double vdds_orig;
548  double D1vd_orig;
549 
550  // "old" versions of various voltage drop variables:
551  double vbdd_old;
552  double vbs_old;
553  double vgpdd_old;
554  double vgps_old;
555  double vdds_old;
556  double D1vd_old;
557 
558  // meyer capacitances
559  //gate-source capacitor
560  double capgs; //value
561  double qgs; // charge
562  double cqgs; // current
563  // gate-drain capacitor
564  double capgdd; //value
565  double qgdd; //charge
566  double cqgdd; // current
567  //gate-bulk capacitor
568  double capgb; //value
569  double qgb; //charge
570  double cqgb; //current
571 
572  // diode capacitances
573  double capbd;
574  double qbd; // bulk-drain capacitor charge
575  double cqbd; // bulk-drain capacitor current
576 
577  double capbs;
578  double qbs; // bulk-source capacitor charge
579  double cqbs; // bulk-source capacitor current
580 
581  // diode #1
584  double D1capd;
585 
586  // indices into the state vector.
592 
596 
600 
603 
604  //int li_state_cqgs;
605  //int li_state_cqgdd;
606  //int li_state_cqgb;
607 
608  //int li_state_cqbd;
609  //int li_state_cqbs;
610 
612  //int li_state_D1DIOcapCurrent;
613 
615 
616  // store vector space for lead currents
621 
622  static std::vector< std::vector<int> > jacStamp_DC_SC_GC;
623  static std::vector< std::vector<int> > jacStamp_DC_GC;
624  static std::vector< std::vector<int> > jacStamp_SC_GC;
625  static std::vector< std::vector<int> > jacStamp_DC_SC;
626  static std::vector< std::vector<int> > jacStamp_GC;
627  static std::vector< std::vector<int> > jacStamp_SC;
628  static std::vector< std::vector<int> > jacStamp_DC;
629  static std::vector< std::vector<int> > jacStamp;
630 
631  static std::vector<int> jacMap_DC_SC_GC;
632  static std::vector<int> jacMap_DC_GC;
633  static std::vector<int> jacMap_SC_GC;
634  static std::vector<int> jacMap_DC_SC;
635  static std::vector<int> jacMap_GC;
636  static std::vector<int> jacMap_SC;
637  static std::vector<int> jacMap_DC;
638  static std::vector<int> jacMap;
639 
640  static std::vector< std::vector<int> > jacMap2_DC_SC_GC;
641  static std::vector< std::vector<int> > jacMap2_DC_GC;
642  static std::vector< std::vector<int> > jacMap2_SC_GC;
643  static std::vector< std::vector<int> > jacMap2_DC_SC;
644  static std::vector< std::vector<int> > jacMap2_GC;
645  static std::vector< std::vector<int> > jacMap2_SC;
646  static std::vector< std::vector<int> > jacMap2_DC;
647  static std::vector< std::vector<int> > jacMap2;
648 
649  // duplicating all of the above, but with the RD1RS resistor nonzero
650  static std::vector< std::vector<int> > jacStamp_D1C_DC_SC_GC;
651  static std::vector< std::vector<int> > jacStamp_D1C_DC_GC;
652  static std::vector< std::vector<int> > jacStamp_D1C_SC_GC;
653  static std::vector< std::vector<int> > jacStamp_D1C_DC_SC;
654  static std::vector< std::vector<int> > jacStamp_D1C_GC;
655  static std::vector< std::vector<int> > jacStamp_D1C_SC;
656  static std::vector< std::vector<int> > jacStamp_D1C_DC;
657  static std::vector< std::vector<int> > jacStamp_D1C;
658 
659  static std::vector<int> jacMap_D1C_DC_SC_GC;
660  static std::vector<int> jacMap_D1C_DC_GC;
661  static std::vector<int> jacMap_D1C_SC_GC;
662  static std::vector<int> jacMap_D1C_DC_SC;
663  static std::vector<int> jacMap_D1C_GC;
664  static std::vector<int> jacMap_D1C_SC;
665  static std::vector<int> jacMap_D1C_DC;
666  static std::vector<int> jacMap_D1C;
667 
668  static std::vector< std::vector<int> > jacMap2_D1C_DC_SC_GC;
669  static std::vector< std::vector<int> > jacMap2_D1C_DC_GC;
670  static std::vector< std::vector<int> > jacMap2_D1C_SC_GC;
671  static std::vector< std::vector<int> > jacMap2_D1C_DC_SC;
672  static std::vector< std::vector<int> > jacMap2_D1C_GC;
673  static std::vector< std::vector<int> > jacMap2_D1C_SC;
674  static std::vector< std::vector<int> > jacMap2_D1C_DC;
675  static std::vector< std::vector<int> > jacMap2_D1C;
676 };
677 
678 //--------------------Class Model-----------------------------------
679 
680 //-----------------------------------------------------------------------------
681 // Class : Model
682 // Purpose :
683 // Special Notes :
684 // Creator : pmc
685 // Creation Date : 1/16/2004
686 //-----------------------------------------------------------------------------
687 class Model : public DeviceModel
688 {
689  typedef std::vector<Instance *> InstanceVector;
690 
691  friend class ParametricData<Model>;
692  friend class Instance;
693  friend class Traits;friend class Master;
694 
695 public:
696  Model(
697  const Configuration & configuration,
698  const ModelBlock & MB,
699  const FactoryBlock & factory_block);
700  ~Model();
701 
702 private:
703  Model();
704  Model(const Model &);
705  Model &operator=(const Model &);
706 
707 public:
708  virtual void forEachInstance(DeviceInstanceOp &op) const /* override */;
709 
710  virtual std::ostream &printOutInstances(std::ostream &os) const;
711  bool processParams ();
712  bool processInstanceParams ();
713 
714 
715 public:
716  void addInstance(Instance *instance)
717  {
718  instanceContainer.push_back(instance);
719  }
720 
721 private:
722  std::vector<Instance*> instanceContainer;
723 
724 private:
725 
726  int dtype; // device type : 1 = nmos, -1 = pmos
727  int gateType;
728 
729  double l0; // the length of the channel region
730  double w0; // the width of the channel region
731  double tnom; // temperature at which parameters measured
732  double latDiff;
733  double jctSatCurDensity; // input - use tSatCurDens
734  double jctSatCur; // input - use tSatCur instead
743  double vt0; // input - use tVto
744  double capBD; // input - use tCbs
745  double capBS; // input - use tCbd
746  double timeScale;
747  double bulkCapFactor; // input - use tCj
748  double sideWallCapFactor; // input - use tCjsw
749  double bulkJctPotential; // input - use tBulkPot
753  double phi; // input - use tPhi
754  double gamma;
755  double lambda;
759  double surfaceMobility; // input - use tSurfMob
761 
766  bool vpGiven;
767 
768  // extra parameters needed for VDMOS
769  double maxDriftVel; // max carrier drift vel.
770  double junctionDepth; // xj
771  double rdi; // intrinsic ohmic res. per unit width
772  double rsi; // intrinsic ohmic res. per unit width
773 
774  double delta;
775  double eta; // subthreshold ideality factor
776  double m;
777  double mc;
778  double sigma0; // threshold voltage coeff.
779  double vsigmat; // DIBL ouble rsub;
780  double vsigma; // DIBL parameter
781  double theta;
782  double gammas0;
783  double gammal0;
784  double lgammas;
785  double wgammas;
786  double lgammal_;
787  double wgammal;
788  double kacc;
789  double gb;
790  double knit;
791  double nitd;
792  double nits;
793  double mm;
794  double k;
795  double deltaSqr;
796  double kvt;
797  double mdtemp;
798  double kvs;
799  double tvs;
800  double mth;
801  double artd;
802  double brtd;
803  double crtd;
804  double drtd;
805  double nrtd;
806  double n2;
807 
808  // WARD-LIKE MODEL PARAMETERS
809  double xqc; // CV_mod_2 partitioning
810  double mcv; // CV_mod_2 fit parameter
811  double vfb; // Flatband voltage
812  int fpe; // select partitioning
813  double alpha;
814  // END WARD-LIKE MODEL PARAMETERS
815  int cv; // 1= Meyer, 2= Meyer-like capacitances
816  int cve; // 1= Meyer, 2= Ward capacitances
817  double ls;
818  double rsub;
819  double vp;
820  double ai;
821  double bi;
822  double delmax;
823  double md;
824  int isubmod;
825 
826  double kaccd;
827  double kaccs;
828  double invm;
829  double invmc;
830  double invmd;
831 
832  double fact1;
833  double vtnom;
834  double egfet1;
835  double pbfact1;
836 
837  // drift region parameters
838  double driftParamA;
839  double driftParamB;
840  double rdsshunt;
841 
842  // variables related to diode 1 connecting source to drain
843  double D1DIOsatCur; // saturation current
844  double D1DIOresist; // ohmic series resistance
845  double D1DIOconductance; // conductance corresponding to ohmic R
846  double D1DIOemissionCoeff; // emission coefficient (N)
847  double D1DIOtransitTime; // transit time (TT)
848  double D1DIOjunctionCap; // Junction Capacitance (Cj0)
849  double D1DIOjunctionPot; // Junction Potecomp
850  double D1DIOgradingCoeff; // grading coefficient (m)
851  double D1DIOactivationEnergy; // activation energy (EG)
852  double D1DIOsaturationCurrentExp; // Saturation current exponential (XTI)
853  double D1DIOdepletionCapCoeff; // Depletion Cap fraction coeff (FC)
854  double D1DIObreakdownVoltage; // Voltage at reverse breakdown
855  double D1DIObreakdownCurrent; // Current at above voltage
856  double D1DIOf2; // coeff for capacitance equation precomp
857  double D1DIOf3; // coeff for capacitance equation precomp
858  double D1DIOnomTemp; // nominal temperature
859  double D1DIOfNcoef;
860  double D1DIOfNexp;
861  double D1DIOikf;
862  double D1DIOisr;
863  double D1DIOnr;
865 };
866 
867 //-----------------------------------------------------------------------------
868 // Function : Instance:isConverged ()
869 // Purpose : Return whether a BSIM3 device has done something that should
870 // be interpreted as invalidating other convergence tests
871 // In case of bsim3, just do it if the limiter function
872 // pnjlim. This actually agrees with how the Check flag
873 // is used in Spice3F5 b3ld.c
874 // Special Notes :
875 // Scope : public
876 // Creator : Tom Russo, SNL, Component Information and Models
877 // Creation Date : 03/22/05
878 //-----------------------------------------------------------------------------
880 {
881  return (!limitedFlag);
882 }
883 //-----------------------------------------------------------------------------
884 // Class : Master
885 // Purpose :
886 // Special Notes :
887 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
888 // Creation Date : 11/26/08
889 //-----------------------------------------------------------------------------
890 class Master : public DeviceMaster<Traits>
891 {
892  friend class Instance;
893  friend class Model;
894 
895 public:
897  const Configuration & configuration,
898  const FactoryBlock & factory_block,
899  const SolverState & ss1,
900  const DeviceOptions & do1)
901  : DeviceMaster<Traits>(configuration, factory_block, ss1, do1)
902  {}
903 
904  virtual bool updateState (double * solVec, double * staVec, double * stoVec);
905  virtual bool updateSecondaryState (double * staDeriv, double * stoVec);
906 
907  // load functions:
908  virtual bool loadDAEVectors (double * solVec, double * fVec, double * qVec, double * bVec, double * storeLeadF, double * storeLeadQ, double * leadF, double * leadQ, double * junctionV);
909  virtual bool loadDAEMatrices (Linear::Matrix & dFdx, Linear::Matrix & dQdx);
910 
911 };
912 
913 void registerDevice();
914 
915 } // namespace VDMOS
916 } // namespace Device
917 } // namespace Xyce
918 
919 #endif
bool UCCMqmeyer(double vgps, double vgpdd, double vgpb, double von_local, double vddsat_local, double &capgs_local, double &capgdd_local, double &capgb_local, double phi, double cox)
Definition: N_DEV_VDMOS.C:4171
static std::vector< std::vector< int > > jacStamp_D1C_DC_GC
Definition: N_DEV_VDMOS.h:651
static std::vector< std::vector< int > > jacStamp_D1C
Definition: N_DEV_VDMOS.h:657
static std::vector< std::vector< int > > jacMap2_DC_SC_GC
Definition: N_DEV_VDMOS.h:640
double * q_SourcePrimeEquSourcePrimeNodePtr
Definition: N_DEV_VDMOS.h:522
static std::vector< int > jacMap_D1C_DC_SC
Definition: N_DEV_VDMOS.h:662
static std::vector< std::vector< int > > jacMap2_GC
Definition: N_DEV_VDMOS.h:644
static std::vector< std::vector< int > > jacMap2_DC_GC
Definition: N_DEV_VDMOS.h:641
static std::vector< std::vector< int > > jacMap2_D1C
Definition: N_DEV_VDMOS.h:675
Master(const Configuration &configuration, const FactoryBlock &factory_block, const SolverState &ss1, const DeviceOptions &do1)
Definition: N_DEV_VDMOS.h:896
static std::vector< std::vector< int > > jacMap2_D1C_DC_SC
Definition: N_DEV_VDMOS.h:671
bool UCCMMeyercap(double vgps, double vgpdd, double vgpb, double &cgs, double &cgd, double &cgb)
Definition: N_DEV_VDMOS.C:4268
Pure virtual class to augment a linear system.
static std::vector< std::vector< int > > jacStamp_SC_GC
Definition: N_DEV_VDMOS.h:624
double * f_SourcePrimeEquSourcePrimeNodePtr
Definition: N_DEV_VDMOS.h:477
static std::vector< std::vector< int > > jacMap2_D1C_SC
Definition: N_DEV_VDMOS.h:673
static const char * name()
Definition: N_DEV_VDMOS.h:70
static std::vector< int > jacMap_D1C_SC
Definition: N_DEV_VDMOS.h:664
bool UCCMmosa2(double vgps, double vdds, double dvonvbs, double &cdraindrift_loc, double &vsate)
Definition: N_DEV_VDMOS.C:4827
static std::vector< int > jacMap
Definition: N_DEV_VDMOS.h:638
virtual bool updateState(double *solVec, double *staVec, double *stoVec)
Updates the devices state information.
Definition: N_DEV_VDMOS.C:5219
static std::vector< std::vector< int > > jacStamp_DC_SC_GC
Definition: N_DEV_VDMOS.h:622
static std::vector< int > jacMap_SC_GC
Definition: N_DEV_VDMOS.h:633
static void loadModelParameters(ParametricData< Model > &model_parameters)
Definition: N_DEV_VDMOS.C:128
static std::vector< std::vector< int > > jacStamp_D1C_GC
Definition: N_DEV_VDMOS.h:654
static std::vector< std::vector< int > > jacStamp_DC
Definition: N_DEV_VDMOS.h:628
bool processParams()
processParams
Definition: N_DEV_VDMOS.C:1056
bool updateTemperature(const double &temp_tmp)
Definition: N_DEV_VDMOS.C:3547
static std::vector< std::vector< int > > jacStamp_D1C_SC_GC
Definition: N_DEV_VDMOS.h:652
static std::vector< std::vector< int > > jacStamp_D1C_DC
Definition: N_DEV_VDMOS.h:656
static std::vector< std::vector< int > > jacStamp_D1C_DC_SC
Definition: N_DEV_VDMOS.h:653
bool UCCMcvon(double vbs_local, double &von_local, double &dvonvbs_local)
Definition: N_DEV_VDMOS.C:4575
Instance & operator=(const Instance &)
static std::vector< int > jacMap_D1C
Definition: N_DEV_VDMOS.h:666
static std::vector< int > jacMap_DC
Definition: N_DEV_VDMOS.h:637
static std::vector< std::vector< int > > jacMap2_SC
Definition: N_DEV_VDMOS.h:645
static std::vector< std::vector< int > > jacMap2_D1C_DC_SC_GC
Definition: N_DEV_VDMOS.h:668
static std::vector< std::vector< int > > jacMap2_SC_GC
Definition: N_DEV_VDMOS.h:642
void registerStoreLIDs(const std::vector< int > &stoLIDVecRef)
Definition: N_DEV_VDMOS.C:1922
DeviceMaster instantiates a device as described by the device traits T.
static std::vector< std::vector< int > > jacMap2
Definition: N_DEV_VDMOS.h:647
double * q_SourcePrimeEquDrainPrimeNodePtr
Definition: N_DEV_VDMOS.h:520
The FactoryBlock contains parameters needed by the device, instance and model creation functions...
void addInstance(Instance *instance)
Definition: N_DEV_VDMOS.h:716
static std::vector< std::vector< int > > jacMap2_D1C_GC
Definition: N_DEV_VDMOS.h:672
static std::vector< std::vector< int > > jacMap2_D1C_DC
Definition: N_DEV_VDMOS.h:674
bool UCCMCharges(double vgps, double vgpdd, double vgpb, double &qD, double &qS, double &qB)
Definition: N_DEV_VDMOS.C:4436
static void loadInstanceParameters(ParametricData< Instance > &instance_parameters)
Definition: N_DEV_VDMOS.C:73
static std::vector< std::vector< int > > jacStamp_D1C_DC_SC_GC
Definition: N_DEV_VDMOS.h:650
virtual bool loadDAEMatrices(Linear::Matrix &dFdx, Linear::Matrix &dQdx)
Populates the device's Jacobian object with these pointers.
Definition: N_DEV_VDMOS.C:5549
const std::vector< std::vector< int > > & jacobianStamp() const
Definition: N_DEV_VDMOS.C:1945
static const char * deviceTypeName()
Definition: N_DEV_VDMOS.h:71
virtual bool loadDAEVectors(double *solVec, double *fVec, double *qVec, double *bVec, double *storeLeadF, double *storeLeadQ, double *leadF, double *leadQ, double *junctionV)
Populates the device's ExternData object with these pointers.
Definition: N_DEV_VDMOS.C:5363
static std::vector< std::vector< int > > jacStamp_GC
Definition: N_DEV_VDMOS.h:626
static std::vector< int > jacMap_DC_GC
Definition: N_DEV_VDMOS.h:632
virtual void forEachInstance(DeviceInstanceOp &op) const
Apply a device instance "op" to all instances associated with this model.
Definition: N_DEV_VDMOS.C:1041
static std::vector< std::vector< int > > jacMap2_DC_SC
Definition: N_DEV_VDMOS.h:643
Model & operator=(const Model &)
static std::vector< int > jacMap_GC
Definition: N_DEV_VDMOS.h:635
The Device class is an interface for device implementations.
Definition: N_DEV_Device.h:101
static std::vector< std::vector< int > > jacMap2_D1C_SC_GC
Definition: N_DEV_VDMOS.h:670
static std::vector< int > jacMap_D1C_DC_GC
Definition: N_DEV_VDMOS.h:660
static std::vector< int > jacMap_SC
Definition: N_DEV_VDMOS.h:636
void registerJacLIDs(const std::vector< std::vector< int > > &jacLIDVec)
Definition: N_DEV_VDMOS.C:1975
Class Configuration contains device configuration data.
bool UCCMmosa1(double vgps, double vdds, double dvonvbs, double &cdraindrift_loc, double &vsate)
Definition: N_DEV_VDMOS.C:4616
double * f_DrainPrimeEquSourcePrimeNodePtr
Definition: N_DEV_VDMOS.h:464
double * f_SourcePrimeEquDrainPrimeNodePtr
Definition: N_DEV_VDMOS.h:475
static std::vector< std::vector< int > > jacStamp_D1C_SC
Definition: N_DEV_VDMOS.h:655
virtual std::ostream & printOutInstances(std::ostream &os) const
Definition: N_DEV_VDMOS.C:1006
void registerLIDs(const std::vector< int > &intLIDVecRef, const std::vector< int > &extLIDVecRef)
Definition: N_DEV_VDMOS.C:1727
static std::vector< int > jacMap_DC_SC_GC
Definition: N_DEV_VDMOS.h:631
static std::vector< int > jacMap_D1C_DC
Definition: N_DEV_VDMOS.h:665
static std::vector< int > jacMap_D1C_DC_SC_GC
Definition: N_DEV_VDMOS.h:659
static std::vector< int > jacMap_D1C_GC
Definition: N_DEV_VDMOS.h:663
static std::vector< std::vector< int > > jacStamp
Definition: N_DEV_VDMOS.h:629
double * q_DrainPrimeEquSourcePrimeNodePtr
Definition: N_DEV_VDMOS.h:509
static std::vector< int > jacMap_D1C_SC_GC
Definition: N_DEV_VDMOS.h:661
std::vector< Instance * > instanceContainer
Definition: N_DEV_VDMOS.h:722
static bool isLinearDevice()
Definition: N_DEV_VDMOS.h:74
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
static std::vector< std::vector< int > > jacStamp_DC_GC
Definition: N_DEV_VDMOS.h:623
InstanceBlock represent a device instance line from the netlist.
static std::vector< std::vector< int > > jacStamp_DC_SC
Definition: N_DEV_VDMOS.h:625
static bool modelRequired()
Definition: N_DEV_VDMOS.h:73
std::vector< Instance * > InstanceVector
Definition: N_DEV_VDMOS.h:689
static Device * factory(const Configuration &configuration, const FactoryBlock &factory_block)
Definition: N_DEV_VDMOS.C:5862
static std::vector< std::vector< int > > jacMap2_DC
Definition: N_DEV_VDMOS.h:646
static std::vector< std::vector< int > > jacStamp_SC
Definition: N_DEV_VDMOS.h:627
bool processInstanceParams()
processInstanceParams
Definition: N_DEV_VDMOS.C:1160
virtual bool updateSecondaryState(double *staDeriv, double *stoVec)
Updates the devices secondary state information.
Definition: N_DEV_VDMOS.C:5321
static std::vector< int > jacMap_DC_SC
Definition: N_DEV_VDMOS.h:634
static std::vector< std::vector< int > > jacMap2_D1C_DC_GC
Definition: N_DEV_VDMOS.h:669
void registerStateLIDs(const std::vector< int > &staLIDVecRef)
Definition: N_DEV_VDMOS.C:1837
Instance(const Configuration &configuration, const InstanceBlock &IB, Model &Miter, const FactoryBlock &factory_block)
Definition: N_DEV_VDMOS.C:1186
void loadNodeSymbols(Util::SymbolTable &symbol_table) const
Populates and returns the store name map.
Definition: N_DEV_VDMOS.C:1804