Xyce  6.1
N_DEV_Digital.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_Digital.h,v $
27 //
28 // Purpose :
29 //
30 // Special Notes :
31 //
32 // Creator : Dave Shirley, PSSI
33 //
34 // Creation Date : 01/05/06
35 //
36 // Revision Information:
37 // ---------------------
38 //
39 // Revision Number: $Revision: 1.72 $
40 //
41 // Revision Date : $Date: 2015/09/11 19:16:06 $
42 //
43 // Current Owner : $Author: peshola $
44 //-----------------------------------------------------------------------------
45 
46 #ifndef Xyce_N_DEV_Digital_h
47 #define Xyce_N_DEV_Digital_h
48 
49 // ---------- Xyce Includes ----------
50 //Genie 110812
51 #include <N_UTL_fwd.h>
52 
53 #include <N_DEV_Configuration.h>
54 #include <N_DEV_DeviceMaster.h>
55 #include <N_DEV_DeviceBlock.h>
56 #include <N_DEV_DeviceInstance.h>
57 #include <N_DEV_DeviceModel.h>
58 
59 namespace Xyce {
60 namespace Device {
61 namespace Digital {
62 
63 class Model;
64 class Instance;
65 class GateData;
66 class DeviceData;
67 class InvData;
68 class AndData;
69 class NandData;
70 class OrData;
71 class NorData;
72 class AddData;
73 class XorData;
74 class NxorData;
75 class DffData;
76 class DltchData;
77 class BufData;
78 
79 // this enum is in the digital namespace so it can be used by all of
80 // Gate classes. NOT is deprecated now, and replaced by INV.
81 enum gType {INV, NOT, AND, NAND, OR, NOR, ADD, XOR, NXOR, DFF, DLTCH, BUF};
82 
83 struct Traits : public DeviceTraits<Model, Instance>
84 {
85  static const char *name() {return "Behavioral Digital";}
86  static const char *deviceTypeName() {return "Digital level 1";}
87  static int numNodes() {return 2;}
88  static int numOptionalNodes() {return 20;}
89  static bool modelRequired() {return true;}
90  static bool isLinearDevice() {return true;}
91 
92  static Device *factory(const Configuration &configuration, const FactoryBlock &factory_block);
93  static void loadModelParameters(ParametricData<Model> &model_parameters);
94  static void loadInstanceParameters(ParametricData<Instance> &instance_parameters);
95 };
96 
97 //-----------------------------------------------------------------------------
98 // Class : Instance
99 // Purpose : This class refers to a single instance of a digital
100 // device. It contains indicies into the matrix equation.
101 // See the comments for the ResistorInstance class for
102 // more details.
103 //
104 // Special Notes :
105 // Creator : Dave Shirley, PSSI
106 // Creation Date : 01/05/06
107 //-----------------------------------------------------------------------------
108 
109 class Instance : public DeviceInstance
110 {
111  friend class ParametricData<Instance>;
112  friend class Model;
113  friend class Traits;
114  friend class Master;
115  friend class GateData;
116  friend class AndData;
117  friend class NandData;
118  friend class OrData;
119  friend class NorData;
120  friend class AddData;
121  friend class XorData;
122  friend class NxorData;
123  friend class DffData;
124  friend class DltchData;
125  friend class BufData;
126 
127 public:
128 
129  Instance(
130  const Configuration & configuration,
131  const InstanceBlock & instance_block,
132  Model & model,
133  const FactoryBlock & factory_block);
134 
135 
136  ~Instance();
137 
138 private:
139  Instance(const Instance &);
140  Instance &operator=(const Instance &);
141 
142 public:
143  // Additional Public Declarations
144  void registerLIDs( const std::vector<int> & intLIDVecRef,
145  const std::vector<int> & extLIDVecRef );
146  void registerStateLIDs( const std::vector<int> & staLIDVecRef );
147 
148  void loadNodeSymbols(Util::SymbolTable &symbol_table) const; // override
149 
150  const std::vector< std::vector<int> > & jacobianStamp() const;
151  void registerJacLIDs( const std::vector< std::vector<int> > & jacLIDVec );
152 
153  bool processParams ();
154 
155  bool updateIntermediateVars () { return true; };
156  bool updatePrimaryState ();
157  bool updateSecondaryState ();
158  bool getInstanceBreakPoints(std::vector<Util::BreakPoint> &);
159 
160  // load functions, residual:
161  bool loadDAEQVector ();
162  bool loadDAEFVector ();
163 
164  // load functions, Jacobian:
165  bool loadDAEdQdx ();
166  bool loadDAEdFdx ();
167 
168  // added for debug. Allows tracking of digital device transitions since
169  // acceptStep() is only executed after a time-step is accepted by time integration
170  void acceptStep();
171 
172 public:
173  // iterator reference to the model which owns this instance.
174  // Getters and setters
176  return model_;
177  }
178 
179 private:
180 
181  Model & model_; //< Owning model
182 
183  // Data Members for Class Attributes
184  // For more explanation of these attributes
185  // see the resistor classes.
186 
187  // state variables:
188 
189  std::vector<double> qlo; // charge in the capacitor
190  std::vector<double> ilo; // current throught the capacitor
191  std::vector<double> vcaplo; // voltage drop across capacitor
192  std::vector<double> qhi;
193  std::vector<double> ihi;
194  std::vector<double> vcaphi;
195  std::vector<double> qref;
196  std::vector<double> iref;
197  std::vector<double> vcapref;
198 
199  std::vector<double> rilo;
200  std::vector<double> rihi;
201  std::vector<double> riref;
202  std::vector<double> currentOut;
203  std::vector<double> currentIn;
204 
205  std::vector<double> glo;
206  std::vector<double> ghi;
207 
208  std::vector<double> qInp; // charge in the capacitor
209  std::vector<double> iInp; // current throught the capacitor
210  std::vector<double> vcapInp; // voltage drop across capacitor
211 
212  std::vector<double> currentInp;
213 
214  // input params:
215 
216  bool ic1;
217  bool ic2;
218  bool ic3;
219 
220  int numInput; // Number of input leads
221  int numOutput; // Number of output leads
222  enum gType gate;
223 
224  //local id's (offsets)
225  int li_Lo;
226  int li_Hi;
227  int li_Ref;
228  std::vector<int> li_Inp;
229  std::vector<int> li_Out;
230 
231  // Input state vars
232  std::vector<int> li_currentStateInp;
233  std::vector<int> li_transitionTimeInp;
234  std::vector<int> li_QinpState;
235  std::vector<int> li_IinpState;
236 
237  // Output state vars
238  std::vector<int> li_currentStateOut;
239  std::vector<int> li_transitionTimeOut;
240  std::vector<int> li_QloState;
241  std::vector<int> li_IloState;
242  std::vector<int> li_QhiState;
243  std::vector<int> li_IhiState;
244 
245  std::vector<bool> inpL;
246  std::vector<double> iTime;
247  std::vector<bool> outL;
248  std::vector<double> oTime;
249 
250  double breakTime;
251 
252  // Offsets for Jacobian
253  int row_Lo;
254  int row_Hi;
255  int row_Ref;
256  std::vector< std::vector<int> > li_jac_Ref;
257  std::vector< std::vector<int> > li_jac_Lo;
258  std::vector< std::vector<int> > li_jac_Hi;
259 
260  std::vector< std::vector<int> > jacStamp;
261 
262  // added for debug purposes. Allows for tracking of input state changes
265 
266  //Genie 110812. change state var
267  //std::vector<bool> changeState;
268 
269  // added for compatibility with PSpice DIGINITSTATE
272  std::vector<bool> icGiven_;
273 
274  // added for separating each gate type into its own class
276 };
277 
278 //-----------------------------------------------------------------------------
279 // Class : Model
280 // Purpose :
281 // Special Notes :
282 // Creator : Dave Shirley, PSSI
283 // Creation Date : 01/05/06
284 //-----------------------------------------------------------------------------
285 class Model : public DeviceModel
286 {
287  typedef std::vector<Instance *> InstanceVector;
288 
289  friend class ParametricData<Model>;
290  friend class Instance;
291  friend class Traits;friend class Master;
292 
293 public:
294  Model(
295  const Configuration & configuration,
296  const ModelBlock & MB,
297  const FactoryBlock & factory_block);
298  ~Model ();
299 
300 private:
301  Model();
302  Model(const Model &);
303  Model &operator=(const Model &);
304 
305 public:
306  bool processParams ();
307  bool processInstanceParams ();
308  virtual void forEachInstance(DeviceInstanceOp &op) const /* override */;
309 
310  virtual std::ostream &printOutInstances(std::ostream &os) const;
311 
312 public:
313  void addInstance(Instance *instance) {
314  instanceContainer.push_back(instance);
315  }
316 
317 private:
318  std::vector<Instance*> instanceContainer;
319 
320 private:
321 
322  // Input Parameters
323  double vlo;
324  double vhi;
325  double vref;
326  double clo;
327  double chi;
328  double cload;
329  double rload;
330  double s0rlo;
331  double s0rhi;
332  double s0tsw;
333  double s0vlo;
334  double s0vhi;
335  double s1rlo;
336  double s1rhi;
337  double s1tsw;
338  double s1vlo;
339  double s1vhi;
340  double delay;
341 
342  // Dependent Parameters
343 
344  double gload;
345 };
346 
347 
348 //-----------------------------------------------------------------------------
349 // Class : Master
350 // Purpose :
351 // Special Notes :
352 // Creator : Genie Hsieh, SNL, Parallel Computational Sciences
353 // Creation Date : 10/23/12
354 //-----------------------------------------------------------------------------
355 class Master : public DeviceMaster<Traits>
356 {
357  friend class Instance;
358  friend class Model;
359 
360  public:
362  std::vector< std::pair<std::string,double> > & parNames,
363  const Configuration & configuration,
364  const FactoryBlock & factory_block,
365  const SolverState & ss1,
366  const DeviceOptions & do1)
367  : DeviceMaster<Traits>(configuration, factory_block, ss1, do1)
368  {}
369 
370 };
371 
372 //-----------------------------------------------------------------------------
373 // Class : DeviceData
374 // Purpose : This class implements the functions that vary based on
375 // the device type (U or Y). It will be deprecated once the
376 // Y Digital Devices are removed from Xyce
377 //
378 // Special Notes :
379 // Creator : Pete Sholander
380 // Creation Date : 08/07/15
381 //-----------------------------------------------------------------------------
383 {
384 public:
385  DeviceData(const char devLetter_);
386  virtual ~DeviceData();
387  char getDeviceLetter() {return devLetter_;}
388  virtual void updatePowerPinLi(int&, int&, int&, int&, const bool, const bool, const bool);
389 
390 private:
391  DeviceData(const DeviceData &right);
392  DeviceData &operator=(const DeviceData &right);
393 
394 protected:
395  const char devLetter_; // device type (U or Y)
396 };
397 
398 //-----------------------------------------------------------------------------
399 // Class : UDeviceData
400 // Purpose : This class implements functions specific to the U Device
401 //
402 // Special Notes :
403 // Creator : Pete Sholander
404 // Creation Date : 08/07/15
405 //-----------------------------------------------------------------------------
406 class UDeviceData : public DeviceData
407 {
408 public:
409  UDeviceData(const char devLetter_);
410  ~UDeviceData();
411  void updatePowerPinLi(int&, int&, int&, int&, const bool, const bool, const bool);
412 
413 private:
414  UDeviceData(const UDeviceData &right);
415  UDeviceData &operator=(const UDeviceData &right);
416 };
417 
418 //-----------------------------------------------------------------------------
419 // Class : YDeviceData
420 // Purpose : This class implements functions specific to the Y Device
421 //
422 // Special Notes :
423 // Creator : Pete Sholander
424 // Creation Date : 08/07/15
425 //-----------------------------------------------------------------------------
426 class YDeviceData : public DeviceData
427 {
428 public:
429  YDeviceData(const char devLetter_);
430  ~YDeviceData();
431  void updatePowerPinLi(int&, int&, int&, int&, const bool, const bool, const bool);
432 
433 private:
434  YDeviceData(const YDeviceData &right);
435  YDeviceData &operator=(const YDeviceData &right);
436 };
437 
438 //-----------------------------------------------------------------------------
439 // Class : GateData
440 // Purpose : This class implements the functions that vary based on
441 // the gate type
442 //
443 // Special Notes :
444 // Creator : Pete Sholander
445 // Creation Date : 08/06/15
446 //-----------------------------------------------------------------------------
447 class GateData
448 {
449  //friend class Instance;
450 
451 public:
452  GateData(const std::string gateType_, const char devLetter_, const int ilNumInput_);
453  virtual ~GateData();
454  int getNumInput() {return numInput_;}
455  int getNumOutput() {return numOutput_;}
456  gType getType() {return type_;}
458  // getNumIO may be deprecated
459  void getNumIO(int&, int&);
460 
461  void virtual checkErrors(const Instance&, const InstanceBlock&, const int&, const int&);
462  bool virtual isClockLine(const int);
463  void virtual setIC(Instance&, const int);
464  void virtual evalTruthTable(const std::vector<bool>, std::vector<bool>&,
465  std::vector<double>&, const double, const double,
466  const bool, const bool, const std::vector<bool>&);
467 private:
468  GateData(const GateData &right);
469  GateData &operator=(const GateData &right);
470 
471 protected:
472  const std::string gateType_; // gate type (NOT, AND, ...)
473  const char devLetter_; // device type (U or Y)
474  const int ilNumInput_; // number of inputs found on the instance line
479 };
480 
481 //-----------------------------------------------------------------------------
482 // Class : InvData
483 // Purpose : This class implements functions specific to the INV and NOT
484 // gate types
485 //
486 // Special Notes :
487 // Creator : Pete Sholander
488 // Creation Date : 08/06/15
489 //-----------------------------------------------------------------------------
490 class InvData : public GateData
491 {
492  friend class Instance;
493 public:
494  InvData(const std::string gateType_, const char devLetter_, const int ilNumInput_);
495  ~InvData();
496  void evalTruthTable(const std::vector<bool>, std::vector<bool>&,
497  std::vector<double>&, const double, const double,
498  const bool, const bool, const std::vector<bool>&);
499  void checkErrors(const Instance&, const InstanceBlock&, const int&, const int&);
500 
501 private:
502  InvData(const InvData &right);
503  InvData &operator=(const InvData &right);
504 };
505 
506 //-----------------------------------------------------------------------------
507 // Class : AndData
508 // Purpose : This class implements functions specific to the AND gate type
509 //
510 // Special Notes :
511 // Creator : Pete Sholander
512 // Creation Date : 08/06/15
513 //-----------------------------------------------------------------------------
514 class AndData : public GateData
515 {
516  friend class DeviceInstance;
517 
518 public:
519  AndData(const std::string gateType_, const char devLetter_, const int ilNumInput_);
520  ~AndData();
521  void evalTruthTable(const std::vector<bool>, std::vector<bool>&,
522  std::vector<double>&, const double, const double,
523  const bool, const bool, const std::vector<bool>&);
524  void checkErrors(const Instance&, const InstanceBlock&, const int&, const int&);
525 
526 private:
527  AndData(const InvData &right);
528  AndData &operator=(const InvData &right);
529  //gType type_;
530 };
531 
532 //-----------------------------------------------------------------------------
533 // Class : NandData
534 // Purpose : This class implements functions specific to the NAND gate type
535 //
536 // Special Notes :
537 // Creator : Pete Sholander
538 // Creation Date : 08/06/15
539 //-----------------------------------------------------------------------------
540 class NandData : public GateData
541 {
542 public:
543  NandData(const std::string gateType_, const char devLetter_, const int ilNumInput_);
544  ~NandData();
545  void evalTruthTable(const std::vector<bool>, std::vector<bool>&,
546  std::vector<double>&, const double, const double,
547  const bool, const bool, const std::vector<bool>&);
548  void checkErrors(const Instance&, const InstanceBlock&, const int&, const int&);
549 
550 private:
551  NandData(const InvData &right);
552  NandData &operator=(const InvData &right);
553 };
554 
555 //-----------------------------------------------------------------------------
556 // Class : OrData
557 // Purpose : This class implements functions specific to the OR gate type
558 //
559 // Special Notes :
560 // Creator : Pete Sholander
561 // Creation Date : 08/06/15
562 //-----------------------------------------------------------------------------
563 class OrData : public GateData
564 {
565 public:
566  OrData(const std::string gateType_, const char devLetter_, const int ilNumInput_);
567  ~OrData();
568  void evalTruthTable(const std::vector<bool>, std::vector<bool>&,
569  std::vector<double>&, const double, const double,
570  const bool, const bool, const std::vector<bool>&);
571  void checkErrors(const Instance&, const InstanceBlock&, const int&, const int&);
572 
573 private:
574  OrData(const InvData &right);
575  OrData &operator=(const InvData &right);
576 };
577 
578 //-----------------------------------------------------------------------------
579 // Class : NorData
580 // Purpose : This class implements functions specific to the NOR gate type
581 //
582 // Special Notes :
583 // Creator : Pete Sholander
584 // Creation Date : 08/06/15
585 //-----------------------------------------------------------------------------
586 class NorData : public GateData
587 {
588 public:
589  NorData(const std::string gateType_, const char devLetter_, const int ilNumInput_);
590  ~NorData();
591  void evalTruthTable(const std::vector<bool>, std::vector<bool>&,
592  std::vector<double>&, const double, const double,
593  const bool, const bool, const std::vector<bool>&);
594  void checkErrors(const Instance&, const InstanceBlock&, const int&, const int&);
595 
596 private:
597  NorData(const InvData &right);
598  NorData &operator=(const InvData &right);
599 };
600 
601 //-----------------------------------------------------------------------------
602 // Class : AddData
603 // Purpose : This class implements functions specific to the ADD gate type
604 //
605 // Special Notes :
606 // Creator : Pete Sholander
607 // Creation Date : 08/06/15
608 //-----------------------------------------------------------------------------
609 class AddData : public GateData
610 {
611 public:
612  AddData(const std::string gateType_, const char devLetter_, const int ilNumInput_);
613  ~AddData();
614  void evalTruthTable(const std::vector<bool>, std::vector<bool>&,
615  std::vector<double>&, const double, const double,
616  const bool, const bool, const std::vector<bool>&);
617 
618 private:
619  AddData(const InvData &right);
620  AddData &operator=(const InvData &right);
621 };
622 
623 //-----------------------------------------------------------------------------
624 // Class : XorData
625 // Purpose : This class implements functions specific to the XOR gate type
626 //
627 // Special Notes :
628 // Creator : Pete Sholander
629 // Creation Date : 08/06/15
630 //-----------------------------------------------------------------------------
631 class XorData : public GateData
632 {
633 public:
634  XorData(const std::string gateType_, const char devLetter_, const int ilNumInput_);
635  ~XorData();
636  void evalTruthTable(const std::vector<bool>, std::vector<bool>&,
637  std::vector<double>&, const double, const double,
638  const bool, const bool, const std::vector<bool>&);
639 
640 private:
641  XorData(const InvData &right);
642  XorData &operator=(const InvData &right);
643 };
644 
645 //-----------------------------------------------------------------------------
646 // Class : NxorData
647 // Purpose : This class implements functions specific to the NXOR gate type
648 //
649 // Special Notes :
650 // Creator : Pete Sholander
651 // Creation Date : 08/06/15
652 //-----------------------------------------------------------------------------
653 class NxorData : public GateData
654 {
655 public:
656  NxorData(const std::string gateType_, const char devLetter_, const int ilNumInput_);
657  ~NxorData();
658  void evalTruthTable(const std::vector<bool>, std::vector<bool>&,
659  std::vector<double>&, const double, const double,
660  const bool, const bool, const std::vector<bool>&);
661 
662 private:
663  NxorData(const InvData &right);
664  NxorData &operator=(const InvData &right);
665 };
666 
667 //-----------------------------------------------------------------------------
668 // Class : DffData
669 // Purpose : This class implements functions specific to the DFF gate type
670 //
671 // Special Notes :
672 // Creator : Pete Sholander
673 // Creation Date : 08/06/15
674 //-----------------------------------------------------------------------------
675 class DffData : public GateData
676 {
677 public:
678  DffData(const std::string gateType_, const char devLetter_, const int ilNumInput_);
679  ~DffData();
680  void evalTruthTable(const std::vector<bool>, std::vector<bool>&,
681  std::vector<double>&, const double, const double,
682  const bool, const bool, const std::vector<bool>&);
683  bool isClockLine(const int);
684  void setIC(Instance&, const int);
685 
686 private:
687  DffData(const InvData &right);
688  DffData &operator=(const InvData &right);
689  int clockPin_; // used within the isClockLine() function
690 };
691 
692 //-----------------------------------------------------------------------------
693 // Class : DltchData
694 // Purpose : This class implements functions specific to the DLTCH gate type
695 //
696 // Special Notes :
697 // Creator : Pete Sholander
698 // Creation Date : 08/06/15
699 //-----------------------------------------------------------------------------
700 class DltchData : public GateData
701 {
702 public:
703  DltchData(const std::string gateType_, const char devLetter_, const int ilNumInput_);
704  ~DltchData();
705 
706  void setIC(Instance&, const int);
707  void evalTruthTable(const std::vector<bool>, std::vector<bool>&,
708  std::vector<double>&, const double, const double,
709  const bool, const bool, const std::vector<bool>&);
710 
711 private:
712  DltchData(const InvData &right);
713  DltchData &operator=(const InvData &right);
714 };
715 
716 //-----------------------------------------------------------------------------
717 // Class : BufData
718 // Purpose : This class implements functions specific to the Buf gate type
719 //
720 // Special Notes :
721 // Creator : Pete Sholander
722 // Creation Date : 08/06/15
723 //-----------------------------------------------------------------------------
724 class BufData : public GateData
725 {
726 public:
727  BufData(const std::string gateType_, const char devLetter_, const int ilNumInput_);
728  ~BufData();
729  void evalTruthTable(const std::vector<bool>, std::vector<bool>&,
730  std::vector<double>&, const double, const double,
731  const bool, const bool, const std::vector<bool>&);
732 
733 private:
734  BufData(const InvData &right);
735  BufData &operator=(const InvData &right);
736 };
737 
738 void registerDevice();
739 
740 } // namespace Digital
741 } // namespace Device
742 } // namespace Xyce
743 
744 #endif
std::vector< int > li_QinpState
NorData & operator=(const InvData &right)
std::vector< double > vcaplo
void evalTruthTable(const std::vector< bool >, std::vector< bool > &, std::vector< double > &, const double, const double, const bool, const bool, const std::vector< bool > &)
std::vector< double > iref
std::vector< double > rihi
std::vector< double > currentInp
void evalTruthTable(const std::vector< bool >, std::vector< bool > &, std::vector< double > &, const double, const double, const bool, const bool, const std::vector< bool > &)
void evalTruthTable(const std::vector< bool >, std::vector< bool > &, std::vector< double > &, const double, const double, const bool, const bool, const std::vector< bool > &)
std::vector< int > li_IhiState
void evalTruthTable(const std::vector< bool >, std::vector< bool > &, std::vector< double > &, const double, const double, const bool, const bool, const std::vector< bool > &)
NxorData & operator=(const InvData &right)
std::vector< Instance * > instanceContainer
std::vector< int > li_QloState
AndData & operator=(const InvData &right)
void registerJacLIDs(const std::vector< std::vector< int > > &jacLIDVec)
Pure virtual class to augment a linear system.
AndData(const std::string gateType_, const char devLetter_, const int ilNumInput_)
std::vector< std::vector< int > > jacStamp
std::vector< double > vcaphi
std::vector< double > qlo
void addInstance(Instance *instance)
const std::vector< std::vector< int > > & jacobianStamp() const
std::vector< double > qInp
std::vector< double > ihi
void evalTruthTable(const std::vector< bool >, std::vector< bool > &, std::vector< double > &, const double, const double, const bool, const bool, const std::vector< bool > &)
std::vector< int > li_IloState
void evalTruthTable(const std::vector< bool >, std::vector< bool > &, std::vector< double > &, const double, const double, const bool, const bool, const std::vector< bool > &)
DffData(const std::string gateType_, const char devLetter_, const int ilNumInput_)
std::vector< int > li_IinpState
void evalTruthTable(const std::vector< bool >, std::vector< bool > &, std::vector< double > &, const double, const double, const bool, const bool, const std::vector< bool > &)
virtual bool isClockLine(const int)
std::vector< Instance * > InstanceVector
virtual void setIC(Instance &, const int)
std::vector< bool > icGiven_
Master(std::vector< std::pair< std::string, double > > &parNames, const Configuration &configuration, const FactoryBlock &factory_block, const SolverState &ss1, const DeviceOptions &do1)
DeviceMaster instantiates a device as described by the device traits T.
std::vector< double > qref
UDeviceData & operator=(const UDeviceData &right)
bool getInstanceBreakPoints(std::vector< Util::BreakPoint > &)
virtual std::ostream & printOutInstances(std::ostream &os) const
static void loadModelParameters(ParametricData< Model > &model_parameters)
Definition: N_DEV_Digital.C:86
The FactoryBlock contains parameters needed by the device, instance and model creation functions...
std::vector< double > iInp
std::vector< double > oTime
static const char * deviceTypeName()
Definition: N_DEV_Digital.h:86
void checkErrors(const Instance &, const InstanceBlock &, const int &, const int &)
std::vector< double > vcapInp
InvData(const std::string gateType_, const char devLetter_, const int ilNumInput_)
void setIC(Instance &, const int)
std::vector< int > li_transitionTimeOut
BufData & operator=(const InvData &right)
static const char * name()
Definition: N_DEV_Digital.h:85
GateData & operator=(const GateData &right)
std::vector< double > currentOut
DeviceData & operator=(const DeviceData &right)
std::vector< double > ilo
std::vector< double > riref
Instance(const Configuration &configuration, const InstanceBlock &instance_block, Model &model, const FactoryBlock &factory_block)
std::vector< double > qhi
std::vector< double > rilo
InvData & operator=(const InvData &right)
XorData & operator=(const InvData &right)
The Device class is an interface for device implementations.
Definition: N_DEV_Device.h:101
void updatePowerPinLi(int &, int &, int &, int &, const bool, const bool, const bool)
void updatePowerPinLi(int &, int &, int &, int &, const bool, const bool, const bool)
std::vector< double > glo
DffData & operator=(const InvData &right)
virtual void updatePowerPinLi(int &, int &, int &, int &, const bool, const bool, const bool)
static Device * factory(const Configuration &configuration, const FactoryBlock &factory_block)
void checkErrors(const Instance &, const InstanceBlock &, const int &, const int &)
NandData(const std::string gateType_, const char devLetter_, const int ilNumInput_)
void checkErrors(const Instance &, const InstanceBlock &, const int &, const int &)
YDeviceData & operator=(const YDeviceData &right)
Class Configuration contains device configuration data.
virtual void evalTruthTable(const std::vector< bool >, std::vector< bool > &, std::vector< double > &, const double, const double, const bool, const bool, const std::vector< bool > &)
std::vector< double > iTime
Model & operator=(const Model &)
void evalTruthTable(const std::vector< bool >, std::vector< bool > &, std::vector< double > &, const double, const double, const bool, const bool, const std::vector< bool > &)
std::vector< std::vector< int > > li_jac_Ref
void checkErrors(const Instance &, const InstanceBlock &, const int &, const int &)
NorData(const std::string gateType_, const char devLetter_, const int ilNumInput_)
DltchData(const std::string gateType_, const char devLetter_, const int ilNumInput_)
virtual void forEachInstance(DeviceInstanceOp &op) const
Apply a device instance "op" to all instances associated with this model.
std::vector< double > ghi
BufData(const std::string gateType_, const char devLetter_, const int ilNumInput_)
YDeviceData(const char devLetter_)
bool processParams()
processParams
NxorData(const std::string gateType_, const char devLetter_, const int ilNumInput_)
NandData & operator=(const InvData &right)
static void loadInstanceParameters(ParametricData< Instance > &instance_parameters)
Definition: N_DEV_Digital.C:73
GateData(const std::string gateType_, const char devLetter_, const int ilNumInput_)
void registerStateLIDs(const std::vector< int > &staLIDVecRef)
std::vector< int > li_QhiState
DltchData & operator=(const InvData &right)
std::vector< double > vcapref
std::vector< std::vector< int > > li_jac_Hi
AddData(const std::string gateType_, const char devLetter_, const int ilNumInput_)
void evalTruthTable(const std::vector< bool >, std::vector< bool > &, std::vector< double > &, const double, const double, const bool, const bool, const std::vector< bool > &)
std::vector< int > li_currentStateInp
ModelBlock represents a .MODEL line from the netlist.
The DeviceTraits template describes the configuration of a device.
UDeviceData(const char devLetter_)
Manages parameter binding for class C.
Definition: N_DEV_Pars.h:214
void evalTruthTable(const std::vector< bool >, std::vector< bool > &, std::vector< double > &, const double, const double, const bool, const bool, const std::vector< bool > &)
void loadNodeSymbols(Util::SymbolTable &symbol_table) const
Populates and returns the store name map.
OrData & operator=(const InvData &right)
InstanceBlock represent a device instance line from the netlist.
virtual void checkErrors(const Instance &, const InstanceBlock &, const int &, const int &)
DeviceData(const char devLetter_)
std::vector< int > li_currentStateOut
AddData & operator=(const InvData &right)
void checkErrors(const Instance &, const InstanceBlock &, const int &, const int &)
std::vector< double > currentIn
Instance & operator=(const Instance &)
void evalTruthTable(const std::vector< bool >, std::vector< bool > &, std::vector< double > &, const double, const double, const bool, const bool, const std::vector< bool > &)
void registerLIDs(const std::vector< int > &intLIDVecRef, const std::vector< int > &extLIDVecRef)
std::vector< int > li_transitionTimeInp
XorData(const std::string gateType_, const char devLetter_, const int ilNumInput_)
void setIC(Instance &, const int)
bool processInstanceParams()
processInstanceParams
OrData(const std::string gateType_, const char devLetter_, const int ilNumInput_)
std::vector< std::vector< int > > li_jac_Lo