38 #include <Xyce_config.h>
50 #include <N_ERH_ErrorMgr.h>
52 #include <N_LAS_Vector.h>
53 #include <N_LAS_Matrix.h>
54 #include <N_UTL_FeatureTest.h>
89 :
DeviceInstance(IB, configuration.getInstanceParameters(), factory_block),
101 ABraEquPosNodeOffset(-1),
102 ABraEquNegNodeOffset(-1),
103 AOutEquBraVarOffset(-1),
172 const std::vector<int> & extLIDVecRef)
174 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) )
176 Xyce::dout() << std::endl << section_divider << std::endl;
177 Xyce::dout() <<
" OpAmpInstance::registerLIDs" << std::endl;
178 Xyce::dout() <<
" name = " <<
getName() << std::endl;
183 int numInt = intLIDVecRef.size();
184 int numExt = extLIDVecRef.size();
188 std::string msg =
"Instance::registerLIDs:";
189 msg +=
"numInt != numIntVars";
190 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL_0,msg);
195 std::string msg =
"Instance::registerLIDs:";
196 msg +=
"numExt != numExtVars";
197 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL_0,msg);
213 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) )
215 Xyce::dout() <<
" li_Pos = " <<
li_Pos << std::endl;
216 Xyce::dout() <<
" li_Neg = " <<
li_Neg << std::endl;
217 Xyce::dout() <<
" li_Out = " <<
li_Out << std::endl;
218 Xyce::dout() <<
" li_Bra = " <<
li_Bra << std::endl;
219 Xyce::dout() << section_divider << std::endl;
299 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
301 Xyce::dout() << subsection_divider << std::endl;
302 Xyce::dout() <<
" Instance::updateIntermediateVars" << std::endl;
303 Xyce::dout() <<
" name = " <<
getName() <<std::endl;
304 Xyce::dout() <<
" v_pos = " <<
v_pos << std::endl;
305 Xyce::dout() <<
" v_neg = " << v_neg << std::endl;
306 Xyce::dout() <<
" v_out = " <<
v_out << std::endl;
307 Xyce::dout() <<
" i_bra = " <<
i_bra << std::endl;
308 Xyce::dout() << std::endl;
309 Xyce::dout() << subsection_divider << std::endl;
325 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
327 Xyce::dout() <<
" Instance::updatePrimaryState" << std::endl;
329 bool bsuccess =
true;
351 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
353 Xyce::dout() << subsection_divider << std::endl;
354 Xyce::dout() <<
" Instance::loadDAEFVector" << std::endl;
355 Xyce::dout() <<
" name = " <<
getName() <<std::endl;
356 Xyce::dout() <<
" Output Current = " <<
outCurrent << std::endl;
357 Xyce::dout() <<
" Delta Voltage = " <<
deltaVoltage << std::endl;
391 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
393 Xyce::dout() << subsection_divider << std::endl;
394 Xyce::dout() <<
"name = " <<
getName() << std::endl;
395 Xyce::dout() <<
"\nOPAMP dFdx LOADS\n";
396 Xyce::dout() <<
"Pos,Bra: " <<
li_Out <<
",";
398 Xyce::dout() <<
"Bra,Pos: " <<
li_Bra <<
",";
400 Xyce::dout() <<
"Bra,Neg: " <<
li_Bra <<
",";
402 Xyce::dout() <<
"DONE OPAMP dFdx LOAD\n";
428 :
DeviceModel(MB, configuration.getModelParameters(), factory_block),
446 for ( ; iter!=last; ++iter)
468 os <<
" name model name Parameters" << std::endl;
469 for (
int i=0; iter!=last; ++iter, ++i)
471 os <<
" " << i <<
": " << (*iter)->getName() <<
" ";
497 for (std::vector<Instance *>::const_iterator it = instanceContainer.begin(); it != instanceContainer.end(); ++it)
511 .registerDevice(
"opamp", 1)
512 .registerModelType(
"opamp", 1);
const InstanceName & getName() const
const SolverState & solverState_
Descriptor & addPar(const char *parName, T default_value, T U::*varPtr)
Adds the parameter description to the parameter map.
Linear::Vector * nextSolVectorPtr
Pure virtual class to augment a linear system.
void registerJacLIDs(const std::vector< std::vector< int > > &jacLIDVec)
virtual void forEachInstance(DeviceInstanceOp &op) const
Apply a device instance "op" to all instances associated with this model.
virtual std::ostream & printOutInstances(std::ostream &os) const
virtual void registerJacLIDs(const JacobianStamp &jacLIDVec)
const std::vector< std::vector< int > > & jacobianStamp() const
bool updatePrimaryState()
void setParams(const std::vector< Param > ¶ms)
const std::string & getName() const
The FactoryBlock contains parameters needed by the device, instance and model creation functions...
std::vector< Instance * > instanceContainer
const DeviceOptions & deviceOptions_
virtual void loadNodeSymbols(Util::SymbolTable &symbol_table) const
Populates and returns the store name map.
void registerLIDs(const std::vector< int > &intLIDVecRef, const std::vector< int > &extLIDVecRef)
static Config< T > & addConfiguration()
Adds the device to the Xyce device configuration.
Linear::Matrix * dFdxMatrixPtr
The Device class is an interface for device implementations.
static Device * factory(const Configuration &configuration, const FactoryBlock &factory_block)
Class Configuration contains device configuration data.
const SolverState & getSolverState() const
Instance(const Configuration &configuration, const InstanceBlock &IB, Model &iter, const FactoryBlock &factory_block)
static void loadModelParameters(ParametricData< Model > &model_parameters)
Linear::Vector * daeFVectorPtr
bool updateIntermediateVars()
static std::vector< std::vector< int > > jacStamp
const ExternData & extData
ModelBlock represents a .MODEL line from the netlist.
Manages parameter binding for class C.
InstanceBlock represent a device instance line from the netlist.
static void loadInstanceParameters(ParametricData< Instance > &instance_parameters)
std::vector< Param > params
void registerStateLIDs(const std::vector< int > &staLIDVecRef)