Xyce
6.1
|
DeviceMaster instantiates a device as described by the device traits T. More...
#include <N_DEV_DeviceMaster.h>
Public Types | |
typedef T::ModelType | ModelType |
Make the model begin defined available. More... | |
typedef T::InstanceType | InstanceType |
Make the instance being define available. More... | |
Public Member Functions | |
DeviceMaster (const Configuration &configuration, const FactoryBlock &factory_block, const SolverState &solver_state, const DeviceOptions &device_options) | |
Constructs a device. More... | |
virtual | ~DeviceMaster () |
Destroys the device. More... | |
virtual const std::string & | getName () const |
Returns the name of this device. More... | |
virtual const std::string & | getDefaultModelName () const |
Returns the default model name to use if the instance being created does not specify one. More... | |
virtual DeviceModel * | findModel (const ModelName &model_name) |
Returns a pointer to the model or model model with the specified name. More... | |
virtual const DeviceModel * | findModel (const ModelName &model_name) const |
Returns a pointer to the model or model model with the specified name. More... | |
virtual DeviceEntity * | findInstance (const InstanceName &instance_name) |
Returns a pointer to the model or instance entity with the specified name. More... | |
virtual const DeviceEntity * | findInstance (const InstanceName &instance_name) const |
Returns a pointer to the model or instance entity with the specified name. More... | |
virtual bool | isLinearDevice () const |
Returns true if this device is a linear device. More... | |
virtual bool | isPDEDevice () const |
Returns true if this device is a PDE device. More... | |
virtual void | forEachModel (DeviceModelOp &op) const |
Executes operator op, passing its DeviceModel pointer, for each device model. More... | |
virtual void | forEachInstance (DeviceInstanceOp &op) const |
Executes operator op, passing its DeviceInstance pointer, for each device instance. More... | |
virtual ModelType * | addModel (const ModelBlock &MB, const FactoryBlock &factory_block) |
Creates a device model and adds it to the device's list of models. More... | |
virtual InstanceType * | addInstance (const InstanceBlock &instance_block, const FactoryBlock &factory_block) |
Creates a device instance and adds to the device model's instance list. More... | |
virtual bool | updateSources () |
Updates the devices source information. More... | |
virtual bool | updateState (double *solVec, double *staVec, double *stoVec) |
Updates the devices state information. More... | |
virtual bool | updateSecondaryState (double *staDerivVec, double *stoVec) |
Updates the devices secondary state information. More... | |
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. More... | |
virtual bool | loadDAEMatrices (Linear::Matrix &dFdx, Linear::Matrix &dQdx) |
Populates the device's Jacobian object with these pointers. More... | |
![]() | |
Device () | |
virtual | ~Device () |
Protected Types | |
typedef std::vector< InstanceType * > | InstanceVector |
typedef unordered_map< std::string, ModelType *, HashNoCase, EqualNoCase > | ModelMap |
typedef unordered_map< std::string, InstanceType *, HashNoCase, EqualNoCase > | InstanceMap |
Protected Member Functions | |
const SolverState & | getSolverState () const |
Returns the solver state given during device construction. More... | |
const DeviceOptions & | getDeviceOptions () const |
Returns the device options given during device construction. More... | |
InstanceVector::const_iterator | getInstanceBegin () const |
Returns an iterator to the beginning of the vector of all instances created for this device. More... | |
InstanceVector::const_iterator | getInstanceEnd () const |
Returns an iterator to the ending of the vector of all instances created for this device. More... | |
bool | isModelRequired () const |
Returns true if the model name must be specified for each instance. More... | |
Private Member Functions | |
DeviceMaster (const DeviceMaster &right) | |
No copying. More... | |
DeviceMaster (const Device &) | |
Eh? More... | |
DeviceMaster & | operator= (const DeviceMaster &right) |
No assignments. More... | |
virtual bool | getBreakPoints (std::vector< Util::BreakPoint > &breakPointTimes) |
Private Attributes | |
const std::string | deviceName_ |
const std::string | defaultModelName_ |
const Configuration & | configuration_ |
const SolverState & | solverState_ |
const DeviceOptions & | deviceOptions_ |
ModelMap | modelMap_ |
InstanceVector | instanceVector_ |
InstanceMap | instanceMap_ |
DeviceMaster instantiates a device as described by the device traits T.
The Device Traits are described in in the device configuration.
T | device traits class |
Definition at line 114 of file N_DEV_DeviceMaster.h.
|
protected |
Definition at line 123 of file N_DEV_DeviceMaster.h.
typedef T::InstanceType Xyce::Device::DeviceMaster< T >::InstanceType |
Make the instance being define available.
Definition at line 118 of file N_DEV_DeviceMaster.h.
|
protected |
Definition at line 121 of file N_DEV_DeviceMaster.h.
|
protected |
Definition at line 122 of file N_DEV_DeviceMaster.h.
typedef T::ModelType Xyce::Device::DeviceMaster< T >::ModelType |
Make the model begin defined available.
Definition at line 117 of file N_DEV_DeviceMaster.h.
|
inline |
Constructs a device.
When a device is constructed, a default model is created.
configuration | const reference to device configuration |
factory_block | const reference to the factory provided parameters |
solver_state | const reference to the solver state to use for the device |
device_options | const reference to the device options to use for the device |
Definition at line 139 of file N_DEV_DeviceMaster.h.
|
inlinevirtual |
Destroys the device.
Delete the models created by this device. The model will handle deleting the instances.
Definition at line 165 of file N_DEV_DeviceMaster.h.
|
private |
No copying.
|
private |
Eh?
|
virtual |
Creates a device instance and adds to the device model's instance list.
instance_block | const reference to the model block describing the instance to create |
factory_block | const reference to the factory data needed to create the instance |
Implements Xyce::Device::Device.
Definition at line 464 of file N_DEV_DeviceMaster.h.
|
virtual |
Creates a device model and adds it to the device's list of models.
model_block | const reference to the model block describing the model to create |
factory_block | const reference to the factory data needed to create the model |
Implements Xyce::Device::Device.
Definition at line 536 of file N_DEV_DeviceMaster.h.
|
inlinevirtual |
Returns a pointer to the model or instance entity with the specified name.
instance_name | const reference to the entity name |
Implements Xyce::Device::Device.
Definition at line 253 of file N_DEV_DeviceMaster.h.
|
inlinevirtual |
Returns a pointer to the model or instance entity with the specified name.
instance_name | const reference to the entity name |
Implements Xyce::Device::Device.
Definition at line 272 of file N_DEV_DeviceMaster.h.
|
inlinevirtual |
Returns a pointer to the model or model model with the specified name.
model_name | const reference to the model name |
Implements Xyce::Device::Device.
Definition at line 215 of file N_DEV_DeviceMaster.h.
|
inlinevirtual |
Returns a pointer to the model or model model with the specified name.
model_name | const reference to the model name |
Implements Xyce::Device::Device.
Definition at line 234 of file N_DEV_DeviceMaster.h.
|
inlinevirtual |
Executes operator op, passing its DeviceInstance pointer, for each device instance.
Since the instance information is managed in a map of InstanceType pointers, it is not possible to return the map as an association to DeviceInstance pointers. This function iterates over the instances and passes it the DeviceInstance pointer for each.
op | functor taking a DeviceInstance pointer as an argument |
Implements Xyce::Device::Device.
Definition at line 337 of file N_DEV_DeviceMaster.h.
|
inlinevirtual |
Executes operator op, passing its DeviceModel pointer, for each device model.
Since the model information is managed in a map of ModelType pointers, it is not possible to return the map as an association to DeviceModel pointers. This function iterates over the models and passes it the DeviceModel pointer for each.
op | functor taking a DeviceModel pointer as an argument |
Implements Xyce::Device::Device.
Definition at line 319 of file N_DEV_DeviceMaster.h.
|
privatevirtual |
Reimplemented in Xyce::Device::ADC::Master.
Definition at line 605 of file N_DEV_DeviceMaster.h.
|
inlinevirtual |
Returns the default model name to use if the instance being created does not specify one.
Implements Xyce::Device::Device.
Definition at line 200 of file N_DEV_DeviceMaster.h.
|
inlineprotected |
Returns the device options given during device construction.
Definition at line 376 of file N_DEV_DeviceMaster.h.
|
inlineprotected |
Returns an iterator to the beginning of the vector of all instances created for this device.
While a device instance is created, the device model owns the pointer to the device. The instanceVector_ gets a copy so that all instances of this device may be iterated over without needing to go through the model.
Definition at line 392 of file N_DEV_DeviceMaster.h.
|
inlineprotected |
Returns an iterator to the ending of the vector of all instances created for this device.
While a device instance is created, the device model owns the pointer to the device. The instanceVector_ gets a copy so that all instances of this device may be iterated over without needing to go through the model.
Definition at line 408 of file N_DEV_DeviceMaster.h.
|
inlinevirtual |
Returns the name of this device.
Implements Xyce::Device::Device.
Definition at line 187 of file N_DEV_DeviceMaster.h.
|
inlineprotected |
Returns the solver state given during device construction.
Definition at line 363 of file N_DEV_DeviceMaster.h.
|
inlinevirtual |
Returns true if this device is a linear device.
Implements Xyce::Device::Device.
Definition at line 289 of file N_DEV_DeviceMaster.h.
|
inlineprotected |
Returns true if the model name must be specified for each instance.
Definition at line 421 of file N_DEV_DeviceMaster.h.
|
inlinevirtual |
Returns true if this device is a PDE device.
Implements Xyce::Device::Device.
Definition at line 302 of file N_DEV_DeviceMaster.h.
|
virtual |
Populates the device's Jacobian object with these pointers.
THIS FUNCTION MUST BE CALLED AFTER CALLING loadDAEVectors.
dFdx | pointer to the analysis dFdx matrix |
dQdx | pointer to the analysis dQdx matrix |
Reimplemented from Xyce::Device::Device.
Reimplemented in Xyce::Device::MOSFET_B3SOI::Master, Xyce::Device::MOSFET_B4::Master, Xyce::Device::MOSFET_B3::Master, Xyce::Device::VDMOS::Master, Xyce::Device::MOSFET1::Master, Xyce::Device::BJT::Master, Xyce::Device::MOSFET2::Master, Xyce::Device::MOSFET3::Master, Xyce::Device::MOSFET6::Master, Xyce::Device::Diode::Master, Xyce::Device::LTRA::Master, Xyce::Device::JFET::Master, Xyce::Device::MESFET::Master, Xyce::Device::Resistor::Master, Xyce::Device::MemristorTEAM::Master, Xyce::Device::Capacitor::Master, Xyce::Device::MutIndNonLin::Master, Xyce::Device::MutIndLin::Master, Xyce::Device::Vsrc::Master, Xyce::Device::Inductor::Master, Xyce::Device::Resistor3::Master, Xyce::Device::Bsrc::Master, Xyce::Device::SW::Master, Xyce::Device::ThermalResistor::Master, Xyce::Device::Synapse4::Master, Xyce::Device::ROM::Master, Xyce::Device::ISRC::Master, Xyce::Device::DAC::Master, Xyce::Device::ADC::Master, Xyce::Device::Vcvs::Master, and Xyce::Device::VCCS::Master.
Definition at line 721 of file N_DEV_DeviceMaster.h.
|
virtual |
Populates the device's ExternData object with these pointers.
THIS FUNCTION MUST BE CALLED PRIOR TO CALLING loadDAEMatrices.
solVec | pointer to the analysis solution vector for this device |
fVec | pointer to the analysis f vector for this device |
qVec | pointer to the analysis q vector for this device |
storeLeadF | pointer to the analysis lead store f vector for this device |
storeLeadQ | poitner to the analysis load store q vector for this device |
Reimplemented from Xyce::Device::Device.
Reimplemented in Xyce::Device::MOSFET_B3SOI::Master, Xyce::Device::MOSFET_B4::Master, Xyce::Device::MOSFET_B3::Master, Xyce::Device::VDMOS::Master, Xyce::Device::MOSFET1::Master, Xyce::Device::BJT::Master, Xyce::Device::MOSFET2::Master, Xyce::Device::MOSFET3::Master, Xyce::Device::MOSFET6::Master, Xyce::Device::Diode::Master, Xyce::Device::LTRA::Master, Xyce::Device::JFET::Master, Xyce::Device::MESFET::Master, Xyce::Device::Resistor::Master, Xyce::Device::MemristorTEAM::Master, Xyce::Device::Capacitor::Master, Xyce::Device::MutIndLin::Master, Xyce::Device::MutIndNonLin::Master, Xyce::Device::Vsrc::Master, Xyce::Device::Inductor::Master, Xyce::Device::Resistor3::Master, Xyce::Device::Bsrc::Master, Xyce::Device::SW::Master, Xyce::Device::ThermalResistor::Master, Xyce::Device::Synapse4::Master, Xyce::Device::ROM::Master, Xyce::Device::ISRC::Master, Xyce::Device::DAC::Master, Xyce::Device::ADC::Master, Xyce::Device::Vcvs::Master, and Xyce::Device::VCCS::Master.
Definition at line 694 of file N_DEV_DeviceMaster.h.
|
private |
No assignments.
|
virtual |
Updates the devices secondary state information.
This function is called by the analysis subsystem when it is time to update the device secondary state information.
Reimplemented from Xyce::Device::Device.
Reimplemented in Xyce::Device::VDMOS::Master, Xyce::Device::BJT::Master, Xyce::Device::LTRA::Master, Xyce::Device::MutIndNonLin::Master, Xyce::Device::Inductor::Master, Xyce::Device::Bsrc::Master, Xyce::Device::SW::Master, Xyce::Device::Synapse4::Master, Xyce::Device::DAC::Master, Xyce::Device::Synapse::Master, Xyce::Device::Synapse2::Master, and Xyce::Device::ADC::Master.
Definition at line 673 of file N_DEV_DeviceMaster.h.
|
virtual |
Updates the devices source information.
This function is called by the analysis subsystem when it is time to update the device source information.
Reimplemented from Xyce::Device::Device.
Definition at line 633 of file N_DEV_DeviceMaster.h.
|
virtual |
Updates the devices state information.
This function is called by the analysis subsystem when it is time to update the device state information.
Reimplemented from Xyce::Device::Device.
Reimplemented in Xyce::Device::MOSFET_B3SOI::Master, Xyce::Device::MOSFET_B4::Master, Xyce::Device::MOSFET_B3::Master, Xyce::Device::VDMOS::Master, Xyce::Device::MOSFET1::Master, Xyce::Device::BJT::Master, Xyce::Device::MOSFET2::Master, Xyce::Device::MOSFET3::Master, Xyce::Device::MOSFET6::Master, Xyce::Device::Diode::Master, Xyce::Device::LTRA::Master, Xyce::Device::JFET::Master, Xyce::Device::MESFET::Master, Xyce::Device::Neuron::Master, Xyce::Device::Neuron9::Master, Xyce::Device::Resistor::Master, Xyce::Device::MemristorTEAM::Master, Xyce::Device::Capacitor::Master, Xyce::Device::MutIndLin::Master, Xyce::Device::MutIndNonLin::Master, Xyce::Device::Vsrc::Master, Xyce::Device::Inductor::Master, Xyce::Device::Resistor3::Master, Xyce::Device::Bsrc::Master, Xyce::Device::SW::Master, Xyce::Device::ThermalResistor::Master, Xyce::Device::Synapse4::Master, Xyce::Device::ROM::Master, Xyce::Device::ISRC::Master, Xyce::Device::DAC::Master, Xyce::Device::Synapse::Master, Xyce::Device::Synapse2::Master, Xyce::Device::ADC::Master, Xyce::Device::Vcvs::Master, and Xyce::Device::VCCS::Master.
Definition at line 652 of file N_DEV_DeviceMaster.h.
|
private |
Definition at line 432 of file N_DEV_DeviceMaster.h.
|
private |
Definition at line 431 of file N_DEV_DeviceMaster.h.
|
private |
Definition at line 430 of file N_DEV_DeviceMaster.h.
|
private |
Definition at line 434 of file N_DEV_DeviceMaster.h.
|
private |
Definition at line 437 of file N_DEV_DeviceMaster.h.
|
private |
Definition at line 436 of file N_DEV_DeviceMaster.h.
|
private |
Definition at line 435 of file N_DEV_DeviceMaster.h.
|
private |
Definition at line 433 of file N_DEV_DeviceMaster.h.