48 #include <Xyce_config.h>
52 #include <N_UTL_Misc.h>
77 #include <N_LAS_Vector.h>
78 #include <N_LAS_Matrix.h>
91 .setDescription(
"internal Resistance");
98 .setDescription(
"Lower limit of ADC voltage range");
102 .setDescription(
"Upper limit of ADC voltage range");
106 .setDescription(
"Settling time");
139 :
DeviceInstance(instance_block, configuration.getInstanceParameters(), factory_block),
145 outputBitVectorWidth_(1),
151 APosEquPosNodeOffset(-1),
152 APosEquNegNodeOffset(-1),
153 ANegEquPosNodeOffset(-1),
154 ANegEquNegNodeOffset(-1)
186 if (
R != 0.0)
G = 1.0/
R;
213 const std::vector<int> & extLIDVecRef)
220 Xyce::dout() << std::endl << section_divider << std::endl;
221 Xyce::dout() <<
" ADCInstance::registerLIDs" << std::endl;
222 Xyce::dout() <<
" name = " <<
getName() << std::endl;
236 Xyce::dout() <<
" li_Pos = " <<
li_Pos << std::endl;
241 Xyce::dout() <<
" li_Neg = " <<
li_Neg << std::endl;
244 Xyce::dout() << section_divider << std::endl;
299 bool bsuccess =
true;
348 TVVEC_Out.insert(TVVEC_Out.end(),
TVVEC.begin(),
TVVEC.end());
366 std::vector< std::pair<double,double> >::iterator itVec;
369 itVec = lower_bound(
TVVEC.begin(),
TVVEC.end(),std::pair<double,double>(earliestTime,0.0));
388 bool bsuccess =
true;
415 bool bsuccess =
true;
421 Xyce::dout() << subsection_divider <<std::endl;
422 Xyce::dout() <<
" name = " <<
getName() << std::endl;
423 Xyce::dout() <<
" G = " <<
G << std::endl;
448 bool bsuccess =
true;
462 double deltaV(0.0), vFrac(0.0);
504 Xyce::dout() <<
"In Instance::getInstanceBreakPoints. deltaV = " << deltaV
505 <<
" and output state is " << newState
506 <<
" vFrac = " << vFrac <<
" nQuantLevels = " <<
nQuantLevels_ << std::endl;
512 long long int timeInFS =
static_cast<long long int>(
516 #ifdef Xyce_OLD_PRE_ROLLBACK
517 breakPointTimes.push_back( Util::BreakPoint(timeInFS*1e-15,PAUSE_BREAKPOINT));
529 TVVEC.push_back(std::pair<double,double>(timeInFS*1e-15,deltaV));
534 Xyce::dout() <<
"ADC ----------------------------------------" << std::endl;
535 Xyce::dout() <<
"ADC Debug output. name = " <<
getName() << std::endl;
536 Xyce::dout() <<
"ADC setting pause breakpoint for " << currentTime << std::endl;
537 double approxTime = timeInFS*1e-15;
538 Xyce::dout() <<
"ADC Approximated time, to nearest femptosecond: " << approxTime << std::endl;
539 Xyce::dout() <<
"ADC Time value pairs: " << std::endl;
541 std::vector< std::pair<double, double> >::iterator beg =
TVVEC.begin();
542 std::vector< std::pair<double, double> >::iterator end =
TVVEC.end();
543 std::vector< std::pair<double, double> >::iterator itTV = beg;
545 for (; itTV!=end; ++itTV)
547 std::pair<double, double> & tvPair = *itTV;
548 Xyce::dout() <<
"ADC time: " << tvPair.first <<
" value: " << tvPair.second << std::endl;
551 Xyce::dout() <<
"ADC ----------------------------------------" << std::endl;
568 double vPos(0.0), vNeg(0.0), deltaV(0.0), vFrac(0.0);
579 TVVEC.push_back(std::pair<double,double>(0.0,deltaV));
607 std::vector<Instance*>::iterator iter;
611 for (iter=first; iter!=last; ++iter)
613 (*iter)->processParams();
655 for (
int i=0; i<width;++i)
660 Xyce::dout() <<
"Instance::setBitVectorWidth name = "
661 <<
getName() <<
" width = " << width
679 :
DeviceModel(model_block, configuration.getModelParameters(), factory_block),
680 lowerVoltageLimit_(0.0),
681 upperVoltageLimit_(5.0),
709 std::vector<Instance*>::iterator iter;
713 for (iter=first; iter!=last; ++iter)
729 std::vector<Instance*>::const_iterator iter;
735 os <<
" name\t\tmodelName\tParameters" << std::endl;
737 for (i = 0, iter = first; iter != last; ++iter, ++i)
739 os <<
" " << i <<
": " << (*iter)->getName() <<
"\t";
750 for (std::vector<Instance *>::const_iterator it = instanceContainer.begin(); it != instanceContainer.end(); ++it)
800 bool Master::loadDAEVectors (
double * solVec,
double * fVec,
double *qVec,
double * bVec,
double * storeLeadF,
double * storeLeadQ)
849 bool bsuccess =
true;
854 bsuccess = bsuccess && tmpBool;
870 .registerDevice(
"adc", 1)
871 .registerModelType(
"adc", 1);