45 #include <Xyce_config.h>
48 #include <N_UTL_Math.h>
60 #include <N_ERH_ErrorMgr.h>
61 #include <N_LAS_Matrix.h>
62 #include <N_LAS_Vector.h>
63 #include <N_UTL_BreakPoint.h>
64 #include <N_UTL_FeatureTest.h>
80 .setDescription(
"Vector of initial values for output(s)");
91 .setDescription(
"Internal low state supply voltage");
95 .setDescription(
"Internal high state supply voltage");
99 .setDescription(
"Internal reference voltage for inputs");
103 .setDescription(
"Capacitance between output node and low reference");
107 .setDescription(
"Capacitance between output node and high reference");
111 .setDescription(
"Capacitance between input node and input reference");
115 .setDescription(
"Resistance between input node and input reference");
119 .setDescription(
"Low state resistance between output node and low reference");
123 .setDescription(
"Low state resitance between output node and high reference");
127 .setDescription(
"Switching time transition to low state");
131 .setDescription(
"Minimum voltage to switch to low state");
135 .setDescription(
"Maximum voltage to switch to low state");
139 .setDescription(
"High state resistance between output node and low reference");
143 .setDescription(
"High state resistance between output node and high reference");
147 .setDescription(
"Switching time transition to high state");
151 .setDescription(
"Minimum voltage to switch to high state");
155 .setDescription(
"Maximum voltage to switch to high state");
159 .setDescription(
"Delay time of device");
193 :
DeviceInstance(instance_block, configuration.getInstanceParameters(), factory_block),
203 supportsXState_(false)
207 if ( digInitState_ < 0 || digInitState_ > 3 )
212 <<
". Setting to default DIGINITSTATE: " <<
digInitState_ << std::endl;
217 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
223 int dev_numInputs = 0;
234 if (dev_letter ==
'U') {
245 UserWarning(*
this)<<
"VLO model parameter ignored for U digital device";
249 UserWarning(*
this)<<
"VHI model parameter ignored for U digital device";
253 UserWarning(*
this)<<
"VREF model parameter ignored for U digital device";
256 else if (dev_letter ==
'Y')
260 UserWarning(*
this)<<
"Y-type digital device is deprecated. Consider using U-type digital device instead.";
289 if (dev_type ==
"NOT" || dev_type ==
"INV")
293 else if (dev_type ==
"AND")
297 else if (dev_type ==
"NAND")
301 else if (dev_type ==
"OR")
305 else if (dev_type ==
"NOR")
309 else if (dev_type ==
"ADD")
313 else if (dev_type ==
"XOR")
317 else if (dev_type ==
"NXOR")
321 else if (dev_type ==
"DFF")
325 else if (dev_type ==
"DLTCH")
329 else if (dev_type ==
"BUF")
335 UserError0(*
this) <<
"Unknown digital device type " << dev_type;
349 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
351 Xyce::dout() <<
"Digital Device " <<
getName() <<
" has iBase = " <<
352 iBase <<
", oBase = " << oBase <<
", numExtVars = " <<
379 qlo.resize(numOutput);
380 ilo.resize(numOutput);
382 qhi.resize(numOutput);
383 ihi.resize(numOutput);
385 qref.resize(numInput);
386 iref.resize(numInput);
388 rilo.resize(numOutput);
389 rihi.resize(numOutput);
390 riref.resize(numInput);
393 glo.resize(numOutput);
394 ghi.resize(numOutput);
396 qInp.resize(numInput);
397 iInp.resize(numInput);
401 inpL.resize(numInput);
402 iTime.resize(numInput);
403 outL.resize(numOutput);
404 oTime.resize(numOutput);
424 if (dev_letter ==
'U')
469 else if (dev_letter ==
'Y')
539 jacStamp[iBase+i].push_back(iBase+i);
559 jacStamp[oBase+i].push_back(oBase+i);
601 const std::vector<int> & extLIDVecRef)
608 int numInt = intLIDVecRef.size();
609 int numExt = extLIDVecRef.size();
613 msg =
"Instance::registerLIDs:";
614 msg +=
"numInt != numIntVars";
615 N_ERH_ErrorMgr::report( N_ERH_ErrorMgr::DEV_FATAL,msg);
620 msg =
"Instance::registerLIDs:";
621 msg +=
"numExt != numExtVars";
622 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, msg);
637 if (dev_letter ==
'U')
646 else if (dev_letter ==
'Y')
683 int numSta = staLIDVecRef.size();
687 msg =
"Instance::registerStateLIDs:";
688 msg +=
"numSta != numStateVars";
689 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, msg);
754 int lo_present, hi_present;
756 (
row_Lo < 0) ? (lo_present = 0) : (lo_present = 1);
757 (
row_Hi < 0) ? (hi_present = 0) : (hi_present = 1);
763 if (dev_letter ==
'U')
767 UserError0(*
this) <<
"Internal error in Instance::registerJacLIDs() for " <<
getName();
774 li_jac_Ref[i][2] = jacLIDVec[li_jac_Ref[i][0]][li_jac_Ref[i][2]];
775 li_jac_Ref[i][4] = jacLIDVec[li_jac_Ref[i][3]][li_jac_Ref[i][4]];
776 li_jac_Ref[i][5] = jacLIDVec[li_jac_Ref[i][3]][li_jac_Ref[i][5]];
782 li_jac_Lo[i][2] = jacLIDVec[li_jac_Lo[i][0]][li_jac_Lo[i][2]];
783 li_jac_Lo[i][4] = jacLIDVec[li_jac_Lo[i][3]][li_jac_Lo[i][4]];
784 li_jac_Lo[i][5] = jacLIDVec[li_jac_Lo[i][3]][li_jac_Lo[i][5]];
790 li_jac_Hi[i][2] = jacLIDVec[li_jac_Hi[i][0]][li_jac_Hi[i][2]];
791 li_jac_Hi[i][4] = jacLIDVec[li_jac_Hi[i][3]][li_jac_Hi[i][4]];
792 li_jac_Hi[i][5] = jacLIDVec[li_jac_Hi[i][3]][li_jac_Hi[i][5]];
796 else if (dev_letter ==
'Y')
812 li_jac_Ref[i][2] = jacLIDVec[li_jac_Ref[i][0]][li_jac_Ref[i][2]];
813 li_jac_Ref[i][4] = jacLIDVec[li_jac_Ref[i][3]][li_jac_Ref[i][4]];
814 li_jac_Ref[i][5] = jacLIDVec[li_jac_Ref[i][3]][li_jac_Ref[i][5]];
832 li_jac_Lo[i][2] = jacLIDVec[li_jac_Lo[i][0]][li_jac_Lo[i][2]];
833 li_jac_Lo[i][4] = jacLIDVec[li_jac_Lo[i][3]][li_jac_Lo[i][4]];
834 li_jac_Lo[i][5] = jacLIDVec[li_jac_Lo[i][3]][li_jac_Lo[i][5]];
852 li_jac_Hi[i][2] = jacLIDVec[li_jac_Hi[i][0]][li_jac_Hi[i][2]];
853 li_jac_Hi[i][4] = jacLIDVec[li_jac_Hi[i][3]][li_jac_Hi[i][4]];
854 li_jac_Hi[i][5] = jacLIDVec[li_jac_Hi[i][3]][li_jac_Hi[i][5]];
875 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
880 bool bsuccess =
true;
881 double v_poslo, v_poshi, v_posref, v_neg;
882 double elapsed, time, frac, lastT;
884 double transitionTime;
885 bool changeState =
false;
886 bool clocking =
false;
894 std::vector<bool> oldState;
919 v_neg = solVector[
li_Inp[i]];
922 elapsed = time - transitionTime;
936 oldStaVector[li_transitionTimeInp[i]] = transitionTime;
939 iTime[i] = transitionTime;
941 staVector[li_transitionTimeInp[i]] = transitionTime;
943 if (currentState == 0)
950 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
967 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
982 inpL[i] = (currentState == 1);
983 (li_Ref >= 0) ? (vOld = oldSolVector[li_Ref]) : (vOld =
model_.
vref);
984 vOld = oldSolVector[li_Inp[i]] - vOld;
985 if (fabs(
vcapref[i]+vOld) < 1.e-12)
998 staVector[li_transitionTimeInp[i]] = time - del;
1005 if (
iTime[i] > lastT)
1009 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
1043 if (currentState == 1)
1048 if (curr !=
outL[i])
1050 if (
oTime[i] <= time)
1052 currentState = 1-currentState;
1053 transitionTime =
oTime[i];
1065 staVector[li_transitionTimeOut[i]] = transitionTime;
1068 v_neg = solVector[
li_Out[i]];
1070 elapsed = time - transitionTime;
1072 if (currentState == 0)
1074 else if (currentState == 1)
1078 std::string msg(
"Instance::updateSecondaryState: unrecognized state");
1079 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, msg);
1082 frac = exp(-elapsed);
1083 if (transitionTime == 0)
1107 else if (currentState == 0)
1118 rilo[i] =
glo[i]*(v_poslo-v_neg);
1119 rihi[i] =
ghi[i]*(v_poshi-v_neg);
1121 vcaplo[i] = v_poslo-v_neg;
1122 vcaphi[i] = v_poshi-v_neg;
1146 bool bsuccess =
true;
1187 std::vector<Util::BreakPoint> & breakPointTimes)
1212 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
1221 Xyce::dout() <<
"Device " <<
getName() <<
" changed state & accepted time step at "
1223 <<
"change at Device " <<
getName() <<
" at time "
1225 << delta << std::endl << std::endl;
1249 bool bsuccess =
true;
1251 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1253 Xyce::dout() << subsection_divider << std::endl;
1254 Xyce::dout() <<
" Instance::loadDAEQVector" << std::endl;
1255 Xyce::dout() <<
" name = " <<
getName() <<std::endl;
1260 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1262 Xyce::dout() <<
" qlo[" << i <<
"] = " <<
qlo[i] << std::endl;
1263 Xyce::dout() <<
" qhi[" << i <<
"] = " <<
qhi[i] << std::endl;
1287 Xyce::dout() <<
" qref[" << i <<
"] = " <<
qref[i] << std::endl;
1317 bool bsuccess =
true;
1323 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1325 Xyce::dout() << subsection_divider << std::endl;
1326 Xyce::dout() <<
" Instance::loadDAEFVector" << std::endl;
1327 Xyce::dout() <<
" name = " <<
getName() <<std::endl;
1332 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1334 Xyce::dout() <<
" rilo[" << i <<
"] = " <<
rilo[i] << std::endl;
1335 Xyce::dout() <<
" rihi[" << i <<
"] = " <<
rihi[i] << std::endl;
1359 Xyce::dout() <<
" riref[" << i <<
"] = " <<
riref[i] << std::endl;
1374 Xyce::dout() << subsection_divider << std::endl;
1397 bool bsuccess =
true;
1401 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1403 Xyce::dout() << subsection_divider <<std::endl;
1404 Xyce::dout() <<
" Instance::loadDAEdQdx" << std::endl;
1405 Xyce::dout() <<
" name = " <<
getName() << std::endl;
1408 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1410 Xyce::dout() <<
"\nLoading DIGITAL dQdx matrix\n";
1411 Xyce::dout() <<
"Capacitance lo: " <<
model_.
clo << std::endl;
1412 Xyce::dout() <<
"Capacitance hi: " <<
model_.
chi << std::endl;
1413 Xyce::dout() <<
"Capacitance load: " <<
model_.
cload << std::endl;
1414 Xyce::dout() <<
"DONE DIGITAL dQdx matrix LOAD\n";
1491 bool bsuccess =
true;
1494 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1496 Xyce::dout() << subsection_divider <<std::endl;
1497 Xyce::dout() <<
" Instance::loadDAEdFdx" << std::endl;
1522 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1524 Xyce::dout() <<
" glo[" << i <<
"] = " <<
glo[i] << std::endl;
1525 Xyce::dout() <<
" ghi[" << i <<
"] = " <<
ghi[i] << std::endl;
1533 (*dFdxMatPtr)[
li_Lo][li_jac_Lo[i][2]] -=
glo[i];
1535 (*dFdxMatPtr)[
li_Out[i]][li_jac_Lo[i][4]] -=
glo[i];
1537 (*dFdxMatPtr)[
li_Out[i]][li_jac_Lo[i][5]] +=
glo[i];
1549 (*dFdxMatPtr)[
li_Hi][li_jac_Hi[i][2]] -=
ghi[i];
1551 (*dFdxMatPtr)[
li_Out[i]][li_jac_Hi[i][4]] -=
ghi[i];
1553 (*dFdxMatPtr)[
li_Out[i]][li_jac_Hi[i][5]] +=
ghi[i];
1596 std::vector<Instance*>::iterator iter;
1600 for (iter=first; iter!=last; ++iter)
1602 (*iter)->processParams();
1621 :
DeviceModel(MB, configuration.getModelParameters(), factory_block)
1639 UserError0(*
this) <<
"Zero load resistance in inputs";
1657 std::vector<Instance*>::iterator iter;
1661 for (iter=first; iter!=last; ++iter)
1679 std::vector<Instance*>::const_iterator iter;
1687 os <<
"Number of digital instances: " << isize << std::endl;
1688 os <<
" name\t\tmodelName\tParameters" << std::endl;
1690 for (i = 0, iter = first; iter != last; ++iter, ++i)
1692 os <<
" " << i <<
": " << (*iter)->getName() <<
"\t";
1719 for (std::vector<Instance *>::const_iterator it = instanceContainer.begin(); it != instanceContainer.end(); ++it)
1734 .registerDevice(
"inv", 1)
1735 .registerDevice(
"not",1)
1736 .registerDevice(
"and", 1)
1737 .registerDevice(
"nand", 1)
1738 .registerDevice(
"or", 1)
1739 .registerDevice(
"nor", 1)
1740 .registerDevice(
"add", 1)
1741 .registerDevice(
"xor", 1)
1742 .registerDevice(
"nxor", 1)
1743 .registerDevice(
"dff", 1)
1744 .registerDevice(
"buf", 1)
1745 .registerDevice(
"dltch", 1)
1746 .registerModelType(
"dig", 1);
1783 int& numExtVars,
const bool vlo_given,
const bool vhi_given,
1784 const bool vref_given)
1823 int& numExtVars,
const bool vlo_given,
const bool vhi_given,
1824 const bool vref_given)
1880 int& numExtVars,
const bool vlo_given,
const bool vhi_given,
1881 const bool vref_given)
1939 std::vector<double>& oTime,
const double lastT,
const double delay,
1940 const bool dcopFlag,
const bool clocking,
const std::vector<bool>& oldState)
1954 const int& iBase,
const int& dev_numInputs)
1958 UserError0(instance) <<
"Incorrect number of nodes in digital device."
1988 if (instance.
given(
"IC1"))
1990 instance.
outL[pinNum] = instance.
ic1;
1998 else if (pinNum == 1)
2000 if (instance.
given(
"IC2"))
2002 instance.
outL[pinNum] = instance.
ic2;
2012 std::string msg(
"Insufficient initial conditions supported in digital device");
2013 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, msg);
2040 GateData(gateType_,devLetter_,ilNumInput_)
2068 std::vector<double>& oTime,
const double lastT,
const double delay,
2069 const bool dcopFlag,
const bool clocking,
const std::vector<bool>& oldState)
2072 oTime[0] = lastT + delay;
2084 const int& iBase,
const int& dev_numInputs)
2088 UserWarning(instance)<<
"NOT gate type (" << instance.
getName() <<
") is deprecated. Consider using INV instead.";
2102 GateData(gateType_,devLetter_,ilNumInput_)
2104 numInput_ = (devLetter_ ==
'Y') ? 2 : ilNumInput_;
2130 std::vector<double>& oTime,
const double lastT,
const double delay,
2131 const bool dcopFlag,
const bool clocking,
const std::vector<bool>& oldState)
2133 outL[0] = !(count(inpL.begin(),inpL.end(),
false) > 0);
2134 oTime[0] = lastT + delay;
2146 const int& iBase,
const int& dev_numInputs)
2150 UserError0(instance) <<
"this device must have more than one input.";
2152 if ( (dev_numInputs != 0) && (instance_block.
numExtVars - iBase - instance.
numOutput != dev_numInputs) )
2154 UserError0(instance) <<
"too few I/O nodes on instance line.";
2168 GateData(gateType_,devLetter_,ilNumInput_)
2170 numInput_ = (devLetter_ ==
'Y') ? 2 : ilNumInput_;
2196 std::vector<double>& oTime,
const double lastT,
const double delay,
2197 const bool dcopFlag,
const bool clocking,
const std::vector<bool>& oldState)
2199 outL[0] = (count(inpL.begin(),inpL.end(),
false) > 0);
2200 oTime[0] = lastT + delay;
2212 const int& iBase,
const int& dev_numInputs)
2216 UserError0(instance) <<
"this device must have more than one input.";
2218 if ( (dev_numInputs != 0) && (instance_block.
numExtVars - iBase - instance.
numOutput != dev_numInputs) )
2220 UserError0(instance) <<
"too few I/O nodes on instance line.";
2233 OrData::OrData(
const std::string gateType_,
const char devLetter_,
const int ilNumInput_):
2234 GateData(gateType_,devLetter_,ilNumInput_)
2236 numInput_ = (devLetter_ ==
'Y') ? 2 : ilNumInput_;
2262 std::vector<double>& oTime,
const double lastT,
const double delay,
2263 const bool dcopFlag,
const bool clocking,
const std::vector<bool>& oldState)
2265 outL[0] = outL[0] = (count(inpL.begin(),inpL.end(),
true) > 0);
2266 oTime[0] = lastT + delay;
2278 const int& iBase,
const int& dev_numInputs)
2282 UserError0(instance) <<
"this device must have more than one input.";
2284 if ( (dev_numInputs != 0) && (instance_block.
numExtVars - iBase - instance.
numOutput != dev_numInputs) )
2286 UserError0(instance) <<
"too few I/O nodes on instance line.";
2300 GateData(gateType_,devLetter_,ilNumInput_)
2302 numInput_ = (devLetter_ ==
'Y') ? 2 : ilNumInput_;
2328 std::vector<double>& oTime,
const double lastT,
const double delay,
2329 const bool dcopFlag,
const bool clocking,
const std::vector<bool>& oldState)
2331 outL[0] = !(count(inpL.begin(),inpL.end(),
true) > 0);
2332 oTime[0] = lastT + delay;
2344 const int& iBase,
const int& dev_numInputs)
2348 UserError0(instance) <<
"this device must have more than one input.";
2350 if ( (dev_numInputs != 0) && (instance_block.
numExtVars - iBase - instance.
numOutput != dev_numInputs) )
2352 UserError0(instance) <<
"too few I/O nodes on instance line.";
2366 GateData(gateType_,devLetter_,ilNumInput_)
2394 std::vector<double>& oTime,
const double lastT,
const double delay,
2395 const bool dcopFlag,
const bool clocking,
const std::vector<bool>& oldState)
2397 outL[0] = inpL[0] ^ inpL[1] ^ inpL[2];
2399 outL[1] = (inpL[0] & inpL[1]) | (inpL[1] & inpL[2]) | (inpL[0] & inpL[2]);
2401 oTime[0] = lastT+delay;
2402 oTime[1] = lastT+delay;
2414 GateData(gateType_,devLetter_,ilNumInput_)
2442 std::vector<double>& oTime,
const double lastT,
const double delay,
2443 const bool dcopFlag,
const bool clocking,
const std::vector<bool>& oldState)
2445 outL[0] = inpL[0] ^ inpL[1];
2446 oTime[0] = lastT + delay;
2458 GateData(gateType_,devLetter_,ilNumInput_)
2486 std::vector<double>& oTime,
const double lastT,
const double delay,
2487 const bool dcopFlag,
const bool clocking,
const std::vector<bool>& oldStaVector)
2489 outL[0] = !(inpL[0] ^ inpL[1]);
2490 oTime[0] = lastT + delay;
2502 GateData(gateType_,devLetter_,ilNumInput_)
2531 std::vector<double>& oTime,
const double lastT,
const double delay,
2532 const bool dcopFlag,
const bool clocking,
const std::vector<bool>& oldState)
2539 if (clocking && inpL[2] ==1)
2541 if (inpL[0] == 1 && inpL[1] == 1)
2544 outL[1] = !(inpL[3]);
2547 else if (clocking && inpL[2] ==0)
2549 if (inpL[0] == 1 && inpL[1] == 1)
2553 outL[0] = oldState[0];
2554 outL[1] = oldState[1];
2559 if (inpL[0] == 1 && inpL[1] == 0)
2564 else if (inpL[0] == 0 && inpL[1] == 1)
2569 else if (inpL[0] == 0 && inpL[1] == 0)
2581 else if (outL[1] == outL[0])
2596 oTime[0] = lastT+delay;
2597 oTime[1] = lastT+delay;
2612 return inputPin ==
clockPin_ ?
true :
false;
2627 if (instance.
given(
"IC1"))
2629 instance.
outL[pinNum] = instance.
ic1;
2634 instance.
outL[pinNum] = 0;
2639 instance.
outL[pinNum] = 1;
2647 else if (pinNum == 1)
2649 if (instance.
given(
"IC2"))
2651 instance.
outL[pinNum] = instance.
ic2;
2656 instance.
outL[pinNum] = 1;
2661 instance.
outL[pinNum] = 0;
2671 std::string msg(
"Insufficient initial conditions supported in digital device");
2672 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, msg);
2685 GateData(gateType_,devLetter_,ilNumInput_)
2713 std::vector<double>& oTime,
const double lastT,
const double delay,
2714 const bool dcopFlag,
const bool clocking,
const std::vector<bool>& oldState)
2718 if ((inpL[0] == 1) && (inpL[1] == 0))
2722 oTime[0] = lastT+delay;
2723 oTime[1] = lastT+delay;
2725 else if ((inpL[0] == 0) && (inpL[1] == 1))
2729 oTime[0] = lastT+delay;
2730 oTime[1] = lastT+delay;
2732 else if ((inpL[0] == 0) && (inpL[1] == 0))
2737 oTime[0] = lastT+delay;
2738 oTime[1] = lastT+delay;
2740 else if (inpL[2] == 1)
2744 oTime[0] = lastT+delay;
2745 oTime[1] = lastT+delay;
2754 else if (outL[1] == outL[0])
2757 oTime[1] = lastT+delay;
2777 if (instance.
given(
"IC1"))
2779 instance.
outL[pinNum] = instance.
ic1;
2784 instance.
outL[pinNum] = 0;
2789 instance.
outL[pinNum] = 1;
2797 else if (pinNum == 1)
2799 if (instance.
given(
"IC2"))
2801 instance.
outL[pinNum] = instance.
ic2;
2806 instance.
outL[pinNum] = 1;
2811 instance.
outL[pinNum] = 0;
2821 std::string msg(
"Insufficient initial conditions supported in digital device");
2822 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, msg);
2835 GateData(gateType_,devLetter_,ilNumInput_)
2863 std::vector<double>& oTime,
const double lastT,
const double delay,
2864 const bool dcopFlag,
const bool clocking,
const std::vector<bool>& oldState)
2867 oTime[0] = lastT + delay;
const InstanceName & getName() const
std::vector< int > li_QinpState
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 > &)
bool updateDependentParameters()
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 > &)
const SolverState & solverState_
void evalTruthTable(const std::vector< bool >, std::vector< bool > &, std::vector< double > &, const double, const double, const bool, const bool, const std::vector< bool > &)
Descriptor & addPar(const char *parName, T default_value, T U::*varPtr)
Adds the parameter description to the parameter map.
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 > &)
const std::string gateType_
Linear::Vector * currSolVectorPtr
double currTimeStep_
Region, BJT, Digital, ThermalResistor, ROM, Charon, Others.
Linear::Vector * nextSolVectorPtr
std::vector< Instance * > instanceContainer
std::vector< int > li_QloState
std::vector< int > devConMap
bool given(const std::string ¶meter_name) const
void registerJacLIDs(const std::vector< std::vector< int > > &jacLIDVec)
Linear::Vector * daeQVectorPtr
Pure virtual class to augment a linear system.
AndData(const std::string gateType_, const char devLetter_, const int ilNumInput_)
void makeVector(const std::string &cname, int len)
Allows the parameter to be specified as a vector.
std::vector< std::vector< int > > jacStamp
bool updateSecondaryState()
virtual void registerJacLIDs(const JacobianStamp &jacLIDVec)
std::vector< double > vcaphi
std::vector< double > qlo
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 > &)
std::vector< Param > params
Parameters from the line.
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)
virtual void setIC(Instance &, const int)
std::vector< bool > icGiven_
void setParams(const std::vector< Param > ¶ms)
std::vector< double > qref
const std::string & getName() const
bool getInstanceBreakPoints(std::vector< Util::BreakPoint > &)
virtual std::ostream & printOutInstances(std::ostream &os) const
static void loadModelParameters(ParametricData< Model > &model_parameters)
The FactoryBlock contains parameters needed by the device, instance and model creation functions...
std::vector< double > iInp
std::vector< double > oTime
void checkErrors(const Instance &, const InstanceBlock &, const int &, const int &)
std::vector< int > li_Inp
const DeviceOptions & getDeviceOptions() const
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
const DeviceOptions & deviceOptions_
std::vector< double > currentOut
std::vector< double > ilo
Linear::Vector * nextStaVectorPtr
std::vector< double > riref
Instance(const Configuration &configuration, const InstanceBlock &instance_block, Model &model, const FactoryBlock &factory_block)
std::vector< double > qhi
static Config< T > & addConfiguration()
Adds the device to the Xyce device configuration.
std::vector< double > rilo
Linear::Matrix * dFdxMatrixPtr
The Device class is an interface for device implementations.
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
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 &)
char getDeviceLetter() const
Return the first letter of the device specification after the subcircuit.
double prevInputStateChangeTime_
NandData(const std::string gateType_, const char devLetter_, const int ilNumInput_)
void checkErrors(const Instance &, const InstanceBlock &, const int &, const int &)
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
bool updatePrimaryState()
void evalTruthTable(const std::vector< bool >, std::vector< bool > &, std::vector< double > &, const double, const double, const bool, const bool, const std::vector< bool > &)
int digInitState
used to initialize all of the digital gates in a circuit
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
std::vector< int > li_Out
void getNumIO(int &, int &)
const SolverState & getSolverState() const
NxorData(const std::string gateType_, const char devLetter_, const int ilNumInput_)
static void loadInstanceParameters(ParametricData< Instance > &instance_parameters)
GateData(const std::string gateType_, const char devLetter_, const int ilNumInput_)
void registerStateLIDs(const std::vector< int > &staLIDVecRef)
Linear::Vector * currStaVectorPtr
std::vector< int > li_QhiState
Linear::Vector * daeFVectorPtr
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
const ExternData & extData
ModelBlock represents a .MODEL line from the netlist.
UDeviceData(const char devLetter_)
Manages parameter binding for class C.
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.
bool isClockLine(const int)
InstanceBlock represent a device instance line from the netlist.
double currTime_
DeviceEntity for expression time, breakpoints DeviceMgr for dependent parameters, breakpoints...
virtual void checkErrors(const Instance &, const InstanceBlock &, const int &, const int &)
std::vector< Param > params
int getNumInputs() const
For the U device, return the number of inputs which have been encoded into the device name...
const std::string & getDeviceType() const
Decodes the device type.
Linear::Matrix * dQdxMatrixPtr
DeviceData(const char devLetter_)
std::vector< int > li_currentStateOut
void checkErrors(const Instance &, const InstanceBlock &, const int &, const int &)
std::vector< double > currentIn
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
Linear::Vector * nextStaDerivVectorPtr
void setModParams(const std::vector< Param > ¶ms)
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