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... | |
DeviceMaster (const std::string &model_type_name, 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 DeviceEntity * | findEntity (const std::string &entity_name) |
Returns a pointer to the model or instance entity with the specified name. More... | |
virtual const DeviceEntity * | findEntity (const std::string &entity_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 DeviceModel * | addModel (const ModelBlock &MB, const FactoryBlock &factory_block) |
Creates a device model and adds it to the device's list of models. More... | |
virtual DeviceInstance * | 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 *storeLeadF, double *storeLeadQ) |
Populates the device's ExternData object with these pointers. More... | |
virtual bool | loadDAEMatrices (N_LAS_Matrix &dFdx, N_LAS_Matrix &dQdx) |
Populates the device's Jacobian object with these pointers. More... | |
![]() | |
Device () | |
virtual | ~Device () |
Protected Types | |
typedef std::vector < InstanceType * > | InstanceVector |
typedef std::map< std::string, ModelType *, LessNoCase > | ModelMap |
typedef std::map< std::string, DeviceEntity *, LessNoCase > | EntityMap |
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... | |
void | addEntity (const std::string &name, DeviceEntity *entity) |
Adds an entity to the mapping of model and instance name to its entity. 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_ |
EntityMap | entityMap_ |
ModelType *const | defaultModel_ |
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 103 of file N_DEV_DeviceMaster.h.
|
protected |
Definition at line 112 of file N_DEV_DeviceMaster.h.
typedef T::InstanceType Xyce::Device::DeviceMaster< T >::InstanceType |
Make the instance being define available.
Definition at line 107 of file N_DEV_DeviceMaster.h.
|
protected |
Definition at line 110 of file N_DEV_DeviceMaster.h.
|
protected |
Definition at line 111 of file N_DEV_DeviceMaster.h.
typedef T::ModelType Xyce::Device::DeviceMaster< T >::ModelType |
Make the model begin defined available.
Definition at line 106 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 128 of file N_DEV_DeviceMaster.h.
|
inline |
Constructs a device.
When a device is constructed, a default model is created.
configuration | const reference to the device configuration |
model_type_name | const reference to the model type name inserted into the ModelBlock when creating the default model |
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 162 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 193 of file N_DEV_DeviceMaster.h.
|
private |
No copying.
|
private |
Eh?
|
inlineprivate |
Adds an entity to the mapping of model and instance name to its entity.
Note that currently if the name is duplicated, the previous value is overwritten.
name | const reference to the model or instance name |
entity | pointer to the model or instance |
Definition at line 427 of file N_DEV_DeviceMaster.h.
|
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 472 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 526 of file N_DEV_DeviceMaster.h.
|
inlinevirtual |
Returns a pointer to the model or instance entity with the specified name.
entity_name | const reference to the entity name |
Implements Xyce::Device::Device.
Definition at line 242 of file N_DEV_DeviceMaster.h.
|
inlinevirtual |
Returns a pointer to the model or instance entity with the specified name.
entity_name | const reference to the entity name |
Implements Xyce::Device::Device.
Definition at line 261 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 326 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 308 of file N_DEV_DeviceMaster.h.
|
privatevirtual |
Definition at line 595 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 228 of file N_DEV_DeviceMaster.h.
|
inlineprotected |
Returns the device options given during device construction.
Definition at line 365 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 381 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 397 of file N_DEV_DeviceMaster.h.
|
inlinevirtual |
Returns the name of this device.
Implements Xyce::Device::Device.
Definition at line 215 of file N_DEV_DeviceMaster.h.
|
inlineprotected |
Returns the solver state given during device construction.
Definition at line 352 of file N_DEV_DeviceMaster.h.
|
inlinevirtual |
Returns true if this device is a linear device.
Implements Xyce::Device::Device.
Definition at line 278 of file N_DEV_DeviceMaster.h.
|
inlineprotected |
Returns true if the model name must be specified for each instance.
Definition at line 410 of file N_DEV_DeviceMaster.h.
|
inlinevirtual |
Returns true if this device is a PDE device.
Implements Xyce::Device::Device.
Definition at line 291 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::LTRA::Master, Xyce::Device::JFET::Master, Xyce::Device::MESFET::Master, Xyce::Device::Resistor::Master, Xyce::Device::Diode::Master, Xyce::Device::MutIndNonLin::Master, Xyce::Device::MutIndLin::Master, Xyce::Device::Capacitor::Master, Xyce::Device::Vsrc::Master, Xyce::Device::Resistor3::Master, Xyce::Device::Bsrc::Master, Xyce::Device::Inductor::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 707 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::LTRA::Master, Xyce::Device::JFET::Master, Xyce::Device::MESFET::Master, Xyce::Device::Resistor::Master, Xyce::Device::Diode::Master, Xyce::Device::MutIndLin::Master, Xyce::Device::MutIndNonLin::Master, Xyce::Device::Capacitor::Master, Xyce::Device::Vsrc::Master, Xyce::Device::Resistor3::Master, Xyce::Device::Bsrc::Master, Xyce::Device::Inductor::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 684 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::Bsrc::Master, Xyce::Device::Inductor::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 663 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 623 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::LTRA::Master, Xyce::Device::JFET::Master, Xyce::Device::MESFET::Master, Xyce::Device::Neuron::Master, Xyce::Device::Neuron9::Master, Xyce::Device::Resistor::Master, Xyce::Device::Diode::Master, Xyce::Device::MutIndLin::Master, Xyce::Device::MutIndNonLin::Master, Xyce::Device::Capacitor::Master, Xyce::Device::Vsrc::Master, Xyce::Device::Resistor3::Master, Xyce::Device::Bsrc::Master, Xyce::Device::Inductor::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 642 of file N_DEV_DeviceMaster.h.
|
private |
Definition at line 439 of file N_DEV_DeviceMaster.h.
|
private |
Definition at line 445 of file N_DEV_DeviceMaster.h.
|
private |
Definition at line 438 of file N_DEV_DeviceMaster.h.
|
private |
Definition at line 437 of file N_DEV_DeviceMaster.h.
|
private |
Definition at line 441 of file N_DEV_DeviceMaster.h.
|
private |
Definition at line 444 of file N_DEV_DeviceMaster.h.
|
private |
Definition at line 443 of file N_DEV_DeviceMaster.h.
|
private |
Definition at line 442 of file N_DEV_DeviceMaster.h.
|
private |
Definition at line 440 of file N_DEV_DeviceMaster.h.