torc::generic::Instance Class Reference

Represents an instantiation of a cell view in the view of another cell. More...

#include <Instance.hpp>

Inheritance diagram for torc::generic::Instance:

Inheritance graph
[legend]
Collaboration diagram for torc::generic::Instance:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ParameterContext getParameterContext () const throw ()
virtual ParameterMapSharedPtr getParameters () const throw (Error)
ViewSharedPtr getMaster () const throw ()
virtual void bindToMasterView (const ViewSharedPtr &inMaster, bool inMapPortReferences=true) throw (Error)
virtual void addPortReference (const PortReferenceSharedPtr &inPortRef) throw (Error)
virtual PortReferenceSharedPtr findPortReference (const std::string &inPortRef) throw (Error)
virtual NetReferenceSharedPtr findNetReference (const std::string &inNetRef) throw (Error)
virtual void removePortReference (const std::string &inName) throw (Error)
virtual void getPortReferences (std::vector< PortReferenceSharedPtr > &) const throw ()
virtual void setPortReferences (const std::vector< PortReferenceSharedPtr > &inSource) throw (Error)
template<typename _Action>
void applyOnAllPortReferences (const _Action &action) throw (Error)
const std::string getDesignator () const throw ()
void setDesignator (const std::string &inSource) throw ()
const TimingSharedPtr getTiming () const throw ()
void setTiming (const TimingSharedPtr &inSource) throw ()
virtual void flatten () throw (Error)

Protected Member Functions

void setMaster (const ViewSharedPtr &inMaster) throw ()

Private Member Functions

 Instance (const Instance &source) throw ()
Instanceoperator= (const Instance &source) throw ()

Private Attributes

ViewSharedPtr mMaster
SymTab< std::string,
PortReferenceSharedPtr > 
mPortReferences
ParameterContext mMyContext
std::string mDesignator
TimingSharedPtr mTiming
SymTab< std::string,
NetReferenceSharedPtr > 
mNetReferences

Classes

struct  MasterData


Detailed Description

Represents an instantiation of a cell view in the view of another cell.

The Instance class is used to represent the use of a cell in another cell. EDIF supoorts single instances and instance arrays. The Intstance acts as a base class for these the acutal scalar and vector representations of instances. Parameters defined in a cell declaration can be overridden in an Instance.

Definition at line 56 of file Instance.hpp.


Member Function Documentation

ParameterContext torc::generic::Instance::getParameterContext (  )  const throw () [virtual]

Returns the context that will be used to get parameters from the parameter map. For an unbound instance, this will return an invalid value

Reimplemented in torc::generic::InstanceArrayMember.

Definition at line 98 of file Instance.cpp.

ParameterMapSharedPtr torc::generic::Instance::getParameters (  )  const throw (Error) [virtual]

Get the ParameterMap corresponding to this instance and it's master

Returns:
A ParameterMap consisiting of only the overridden parameters.

Reimplemented in torc::generic::InstanceArrayMember.

Definition at line 103 of file Instance.cpp.

ViewSharedPtr torc::generic::Instance::getMaster (  )  const throw () [inline]

Get the master view for this instance.

Returns:
Master view for this instance.

Definition at line 318 of file Instance.hpp.

void torc::generic::Instance::bindToMasterView ( const ViewSharedPtr &  inMaster,
bool  inMapPortReferences = true 
) throw (Error) [virtual]

Bind an instance to it's master. Instance binding consists of two steps:

  • Bind instance to cell
  • Bind existing port references to ports of the cell
Note:
Instances can be bound in two states, namely, immediately, with no port reference bindings, or delayed, when all used port references are bound to master ports. There is no port binding for extern views.
Parameters:
[in] inMaster Source Master view for this instance.
[in] inMapPortReferences Whether port references are to be mapped to ports of the new master
Exceptions:
Error If there is any kind of mismatch between ports etc.
Bind an instance to it's master. Instance binding consists of two steps:
  • Bind instance to cell
  • Bind port references to ports of the cell

Parameters:
[in] inMaster Source Master view for this instance.
Exceptions:
Error If there is any kind of mismatch between ports etc.

Reimplemented in torc::generic::InstanceArray.

Definition at line 128 of file Instance.cpp.

void torc::generic::Instance::addPortReference ( const PortReferenceSharedPtr &  inPortRef  )  throw (Error) [virtual]

Add a port reference to this master. When a master is set using the set_master(), the list of port references is not created. It has to be extrinsically set.

Parameters:
[in] inPortRef A port reference.
Exceptions:
Error The port ref could not be added, because PortReference name is empty
  • Id : eMessageIdErrorEmptyItemName
  • Context Data
Error The port ref could not be added, because PortReference name is already exists
  • Id : eMessageIdErrorItemAlreadyExists
  • Context Data
Add a port reference to this master. When a master is set using the set_master(), the list of port references is not created. It has to be extrinsically set.

Parameters:
[in] inPortRef A port reference.
Exceptions:
Error The port ref could not be added.

Reimplemented in torc::generic::InstanceArray.

Definition at line 205 of file Instance.cpp.

PortReferenceSharedPtr torc::generic::Instance::findPortReference ( const std::string &  inName  )  throw (Error) [virtual]

Find a port reference.

Parameters:
[in] inName String containing the name of the port.

Reimplemented in torc::generic::InstanceArray.

Definition at line 232 of file Instance.cpp.

NetReferenceSharedPtr torc::generic::Instance::findNetReference ( const std::string &  inName  )  throw (Error) [virtual]

Find a Net reference.

Parameters:
[in] inName String containing the name of the Net.

Definition at line 245 of file Instance.cpp.

void torc::generic::Instance::removePortReference ( const std::string &  inName  )  throw (Error) [virtual]

Remove a given port reference.

Parameters:
inName Name of the object to be delete
Exceptions:
Error PortReference name is empty
  • Id : eMessageIdErrorEmptyItemName
  • Context Data
Error PortReference name could not be found
  • Id : eMessageIdErrorItemNotFound
  • Context Data
Remove a given port reference.

Parameters:
inName Name of the object to be delete
Exceptions:
Error PortReference name is empty
Error PortReference name could not be found

Reimplemented in torc::generic::InstanceArray.

Definition at line 261 of file Instance.cpp.

void torc::generic::Instance::getPortReferences ( std::vector< PortReferenceSharedPtr > &  outPortRefs  )  const throw () [virtual]

Get list of all port references.

Returns:
List of port references
Get list of all port references.

Parameters:
[out] outPortRefs List of port references

Reimplemented in torc::generic::InstanceArray.

Definition at line 286 of file Instance.cpp.

void torc::generic::Instance::setPortReferences ( const std::vector< PortReferenceSharedPtr > &  inSource  )  throw (Error) [virtual]

Set list of all port references.

Parameters:
[in] inSource List of port references

Reimplemented in torc::generic::InstanceArray.

Definition at line 298 of file Instance.cpp.

template<typename _Action>
void torc::generic::Instance::applyOnAllPortReferences ( const _Action &  action  )  throw (Error) [inline]

Apply action on all PortReferences.

Parameters:
[in] action Action to be applied

Definition at line 329 of file Instance.hpp.

const std::string torc::generic::Instance::getDesignator (  )  const throw () [inline]

Get the designated number.

Returns:
std::string Value representing designated number of a view interface.

Definition at line 343 of file Instance.hpp.

void torc::generic::Instance::setDesignator ( const std::string &  inSource  )  throw ()

Set the designated number.

Parameters:
[in] inSource std::string representing designated number of a view interface.

Definition at line 320 of file Instance.cpp.

const TimingSharedPtr torc::generic::Instance::getTiming (  )  const throw () [inline]

Get the pointer to the timing object

Returns:
Pointer to the timing object

Definition at line 353 of file Instance.hpp.

void torc::generic::Instance::setTiming ( const TimingSharedPtr &  inSource  )  throw ()

Set the pointer to the timing object

Parameters:
[in] inSource Pointer to the timing object

Definition at line 330 of file Instance.cpp.

void torc::generic::Instance::flatten (  )  throw (Error) [virtual]

Flatten an instance so that internal references

Reimplemented in torc::generic::InstanceArray, torc::generic::InstanceArrayMember, and torc::generic::SingleInstance.

Definition at line 335 of file Instance.cpp.


The documentation for this class was generated from the following files:

Generated on Thu Oct 13 16:50:04 2011 for TORC by  doxygen 1.5.6