oaOccInstTerm Class Reference

Inheritance diagram for oaOccInstTerm:

oaOccObject oaDesignObject oaObject


Public Methods

oaOccInstTerm * getBit (oaUInt4 bitIndex) const
oaOccNetgetNet (oaBoolean preferred=false) const
oaOccInstgetInst () const
oaOccTermgetTerm (oaBoolean expand=true) const
oaOccTermgetTerm (oaBoolean expand, oaDomain d) const
void getTermName (oaName &name) const
void getTermName (const oaNameSpace &ns, oaString &name) const
oaUInt4 getTermPosition () const
oaUInt4 getNumBits () const
oaOccNetgetAssignedNet (oaBoolean ignoreDefault=false) const
oaOccNetgetAssignedNet (oaAssignedNetSpec &spec, oaBoolean ignoreDefault=false) const
oaInstTermgetInstTerm () const
oaModInstTermgetModInstTerm () const
oaOccInstTerm * getReflection (oaDomain d) const
oaBoolean isBound () const
oaBoolean isBound (oaDomain d) const
oaBoolean isImplicit () const
oaBoolean usesTermPosition () const

Static Public Methods

oaOccInstTerm * find (const oaOccInst *inst, const oaOccTerm *term)
oaOccInstTerm * find (const oaOccInst *inst, const oaModTerm *term)
oaOccInstTerm * find (const oaOccInst *inst, const oaTerm *term)
oaOccInstTerm * find (const oaOccInst *inst, const oaName &termName)
oaOccInstTerm * find (const oaOccInst *inst, oaUInt4 termPosition)
oaOccInstTerm * find (const oaOccInst *inst, const oaOccTerm *term, oaDomain domain)
oaOccInstTerm * find (const oaOccInst *inst, const oaName &termName, oaDomain domain)
oaOccInstTerm * find (const oaOccInst *inst, oaUInt4 termPosition, oaDomain domain)

Public Types

enum  { dtIndex = oacInstTermDataType }

Detailed Description

The oaOccInstTerm class is an abstract base class for all types of connections between a net and a terminal in the master of an instance in the occurrence domain. The connection is proper if the number of bits in the net is equal to the number of bits implied by the instTerm's terminal name. In the case of oaOccVectorInsts, the net width must be multiplied by the number of bits represented by the instance name.

When oaInstTerm objects are created in the block domain and oaModInstTerm objects are created in the module domain, corresponding oaOccInstTerm objects are automatically created in the occurrence domain. Each oaOccInstTerm can correspond to one oaModInstTerm, or one oaInstTerm, or one of each.

oaOccInstTerms may exist that do not have a proper corresponding terminal in the master of its oaOccInst. This allows instTerms to be created when the instance master is not read in, and it allows changes to instTerms that happen before the master is updated. The traversal from an instTerm to its corresponding terminal will not succeed unless a terminal with an exactly matching name is present in the master.

oaModInstTerm, oaOccInstTerm, and oaInstTerm each represent instances of terminals in different hierarchy domains, where in each case the instance master represents a level of hierarchy in the design.

For oaOccInstTerm, its instance's master is an oaOccurrence, and each oaOccInst of an oaOccurrence will have a set of zero or more occInstTerms. For oaModInstTerm, the instance master is an oaModule. For oaInstTerm, the master is an oaBlock.

When an instTerm is created by specifying a terminal or terminal name, the instTerm is said to connect by name. Binding is done to the named terminal if it exists in the instance master. The width of the connection must match the width of the associated net. When an instTerm is created by specifying a terminal position, the instTerm is said to connect by position. Binding is to the terminal in the master that is assigned to the position and if the resulting connection width matches the width of the corresponding net. To avoid confusion, the instTerms associated with a particular instance must either all be connected by name or all by connected by position.

The oaOccInstTerm class can be observed by deriving from oaObserver<oaOccInstTerm>.


Member Function Documentation

oaOccInstTerm * oaOccInstTerm::find const oaOccInst *    inst,
oaUInt4    termPosition,
oaDomain    d
[static]
 

This function searches all of the instTerms associated with the specified instance and returns the one that makes a connection to the specified terminal position. NULL is returned if no terminal exists in the instance master at the specified position. If the reflected block domain terminal was hidden and overridden, the domain argument determines whether the returned terminal corresponds to the hidden (oacModDomain) or overriding (oacBlockDomain) object. The default is to return the override terminal.

Parameters:
inst The instance whose instTerms are searched
termPosition The terminal position used in the search
d The domain (oacModDomain or oacBlockDomain value) that reflects the terminal to match
Exceptions:
oacInstTermInstUsesTermPosition 
oacCannotProcessDomainArgument 

oaOccInstTerm * oaOccInstTerm::find const oaOccInst *    inst,
const oaName &    termName,
oaDomain    d
[static]
 

This function searches all of the instTerms associated with the specified instance and returns the one that is associated with the specified terminal name. NULL is returned if no such terminal exists on the instance. If the reflected block domain terminal was hidden and overridden, the domain argument determines whether the returned oaOccInstTerm corresponds to the hidden (oacModDomain) or overriding (oacBlockDomain) object. The default is to return the override terminal.

If the termName is hierarchical, then this function searches through the hierarchy path for the specified instTerm. If the termName is a bundle name, and any of its members has hierarchy, all of its members must have the same level of hierarchy or an exception is thrown.

Parameters:
inst The instance whose instTerms are searched
termName The terminal name to use in the search
d The domain (oacModDomain or oacBlockDomain value) that reflects the terminal to match
Exceptions:
oacCannotProcessDomainArgument 
oacInstTermInstUsesTermPosition 

oaOccInstTerm * oaOccInstTerm::find const oaOccInst *    inst,
const oaOccTerm *    term,
oaDomain    d
[static]
 

This function searches all of the instTerms associated with the specified instance and returns the one that is associated with the specified terminal. NULL is returned if no such terminal exists on the instance. If the reflected block domain terminal was hidden and overridden, the domain argument determines whether the returned terminal corresponds to the hidden (oacModDomain) or overriding (oacBlockDomain) object. The default is to return the override terminal.

Parameters:
inst The instance whose instTerms are searched
term The terminal to use in the search
d The domain (oacModDomain or oacBlockDomain value) that reflects the terminal to match
Exceptions:
oacInstTermInstUsesTermPosition 
oacCannotProcessDomainArgument 

oaOccInstTerm * oaOccInstTerm::find const oaOccInst *    inst,
oaUInt4    termPosition
[static]
 

This function searches all of the instTerms associated with the specified instance and returns the one that makes a connection to the specified terminal position. NULL is returned if no terminal exists in the instance master at the specified position.

Parameters:
inst The instance whose instTerms are searched
termPosition The terminal position used in the search
Exceptions:
oacInstTermInstUsesTermName 

oaOccInstTerm * oaOccInstTerm::find const oaOccInst *    inst,
const oaName &    termName
[static]
 

This function searches all of the instTerms associated with the specified instance and returns the one that is associated with the specified terminal name. NULL is returned if no such terminal exists on the instance.

If the termName is hierarchical, then this function searches through the hierarchy path for the specified instTerm. If the termName is a bundle name, and any of its members has hierarchy, all of its members must have the same level of hierarchy or an exception is thrown.

Parameters:
inst The instance whose instTerms are searched
termName The terminal name to use in the search
Exceptions:
oacInstTermInstUsesTermPosition 

oaOccInstTerm * oaOccInstTerm::find const oaOccInst *    inst,
const oaTerm *    term
[static]
 

This function returns the occInstTerm that is associated with the given oaOccInst and oaTerm. It returns NULL if no such occInstTerm exists on the instance.

Parameters:
inst The instance whose instTerms are searched.
term The terminal to use in the search.
Exceptions:
oacInstTermInstUsesTermPosition 
oacTermNotInInstMasterForInstTerm 

oaOccInstTerm * oaOccInstTerm::find const oaOccInst *    inst,
const oaModTerm *    term
[static]
 

This function returns the occInstTerm that is associated with the given oaOccInst and oaModTerm. It returns NULL if no such occInstTerm exists on the instance.

Parameters:
inst The instance whose instTerms are searched.
term The terminal to use in the search.
Exceptions:
oacInstTermInstUsesTermPosition 
oacTermNotInInstMasterForInstTerm 

oaOccInstTerm * oaOccInstTerm::find const oaOccInst *    inst,
const oaOccTerm *    term
[static]
 

This function searches all of the instTerms associated with the specified instance and returns the one that is associated with the specified terminal. NULL is returned if no such terminal exists on the instance.

Parameters:
inst The instance whose instTerms are searched
term The terminal to use in the search
Exceptions:
oacTermNotInInstMasterForInstTerm 
oacInstTermInstUsesTermPosition 

oaOccNet * oaOccInstTerm::getAssignedNet oaAssignedNetSpec &    spec,
oaBoolean    ignoreDefault = false
const
 

This function returns the occurrence net assigned to this instTerm as per the inherited connections specification.

NULL will be returned in the following cases:

  • There is no effective connectDef associated with this instTerm

  • There is an effective connectDef but no matching assignment, and 'ignoreDefault' is true.

Exceptions are thrown for cases when an assignment is found but a net with that name does not exist or if the default net name needs to be used, 'ignoreDefault' is false, but there is no net that matches the default net name specified.

This version is for diagnostic use and returns the set of connectDefs and/or assignments that were looked at in the hierarchy for resolving the assigned net via the 'spec' parameter. Clients can inspect the array which will consist of pointers to either connectDef or assignment objects in the module or occurrence domains.

Parameters:
spec An array that gets populated with pointers to design objects that indicate the assigned net specification
ignoreDefault Indicates if the default net name in the specification should be ignored
Exceptions:
oacCannotFindSpecAssignedDefOccNet 
oacCannotFindSpecAssignedOccNet 

oaOccNet * oaOccInstTerm::getAssignedNet oaBoolean    ignoreDefault = false const
 

This function returns the occurrence net assigned to this instTerm as per the inherited connections specification.

NULL will be returned in the following cases:

  • There is no effective connectDef associated with this instTerm

  • There is an effective connectDef but no matching assignment, and 'ignoreDefault' is true.

Exceptions are thrown for cases when an assignment is found but a net with that name does not exist or if the default net name needs to be used, 'ignoreDefault' is false, but there is no net that matches the default net name specified.

Parameters:
ignoreDefault Indicates if the default net name in the specification should be ignored
Exceptions:
oacCannotFindSpecAssignedDefOccNet 
oacCannotFindSpecAssignedOccNet 

oaOccInstTerm * oaOccInstTerm::getBit oaUInt4    bitIndex const
 

This function returns a pointer to the occInstTerm that corresponds to the specified bitIndex bit of this occInstTerm. For single-bit instTerms, this function returns this occInstTerm if the bitIndex value is zero.

Exceptions:
oacInvalidInstTermBitIndex 

oaOccInst * oaOccInstTerm::getInst   const
 

This function returns a pointer to the occurrence instance that this instTerm is associated with.

oaInstTerm * oaOccInstTerm::getInstTerm   const
 

This function gets the oaInstTerm in the block domain that this occInstTerm corresponds to. If this occInstTerm is derived from an oaModInstTerm that is not visible to the block domain, then it will not have an oaInstTerm and this function will return NULL.

oaModInstTerm * oaOccInstTerm::getModInstTerm   const
 

This function gets the oaModInstTerm in the module domain that this occInstTerm corresponds to. If this occInstTerm is on an oaOccModuleInst then it will always have a corresponding oaModInstTerm. If it is derived from an oaInstTerm that is not visible to the module domain, then it will not have an oaModInstTerm and this function will return NULL.

oaOccNet * oaOccInstTerm::getNet oaBoolean    preferred = false const
 

This function returns the occurrence net associated with this occInstTerm. NULL is returned if the instTerm was created with a NULL net or if the instTerm has been disconnected from the net. If preferred is true, the preferred equivalent net associated with the net will be returned instead.

Parameters:
preferred indicates whether to return the preferred equivalent
Returns:
A pointer to an oaOccNet

oaUInt4 oaOccInstTerm::getNumBits   const
 

This function returns the number of bits for this instTerm. This value is equal to the number of bits in the associated net. If the instTerm has no net, the value is calculated from the number of bits in the corresponding terminal multiplied by the number of bits in the corresponding instance. If the terminal is not bound, the number of bits for the terminal is derived from the terminal name. If the terminal is not bound and the instTerm connects by position, the number of bits cannot be determined if there is no net, and a value of zero is returned.

oaOccInstTerm * oaOccInstTerm::getReflection oaDomain    d const
 

This function returns the object pointer corresponding to the reflection of the current object in the specified domain. If an object is overriden, it returns the pointer to the hidden or overriding sibling dependent on the specified domain.

Parameters:
d The domain of the reflected object, which is either oacModDomain or the default oacBlockDomain
Exceptions:
oacCannotProcessDomainArgument 

oaOccTerm * oaOccInstTerm::getTerm oaBoolean    expand,
oaDomain    d
const
 

This function returns the terminal associated with this instTerm. An attempt is made to bind the master if the instTerm is unbound. By default, the terminal reflected in the block domain is traversed. NULL is returned if the instance is unbound, the terminal is not found in the master, or the corresponding term in the block domain is hidden but not overridden. An exception is thrown if the instance for this instTerm is a vectorInst or an implicit vectorInstBit since there is no occurrence hierarchy beneath those types of instances.

Parameters:
expand Specifies whether to expand the occurrence hierarchy to include the master occurrence for this occInstTerm, if it is not already expanded in the current session.
d The domain to traverse. Either oacModDomain or the default oacBlockDomain.
Exceptions:
oacCannotProcessDomainArgument 
oacCannotGetVectorInstOccurrence 
oacCannotGetImplicitInstOccurrence 

oaOccTerm * oaOccInstTerm::getTerm oaBoolean    expand = true const
 

This function returns the occurrence terminal associated with this instTerm. If expand is true, and the instTerm is currently unbound, this function attempts to bind the master. NULL is returned if the instance cannot be bound or the terminal is not found in the master. An exception is thrown if the instance is a vectorInst or an implicit vectorInstBit because there is no occurrence hierarchy beneath these types of instances.

Use caution when the expand argument is set to the default value of true. Expanding the occurrence hierarchy into all the leaf instances of many designs requires large amounts of memory to hold all the referenced occurrence objects. At the leaf level, information should be referenced in the block or the module instead. For example, to get the terminal and its oaTermType for any oaOccInstTerm pointed to by a variable occITerm, you might use code such as:

    oaModInstTerm *modITerm occITerm->getModInstTerm();
    oaModTerm     *modTerm = modITerm->getTerm(); 

    if (modTerm) {
        oaTermType    termType = modTerm->getTermType();
    }

Or

    oaInstTerm   *blkITerm = occITerm->getInstTerm();
    oaTerm       *blkTerm = blkITerm->getTerm();

    if (blkTerm) {
         oaTermType   termType = blkTerm->getTermType();
    }

Parameters:
expand Specifies whether to expand the occurrence hierarchy to include the master occurrence for this occInstTerm, if it has not yet been expanded in the current session.

void oaOccInstTerm::getTermName const oaNameSpace &    ns,
oaString &    name
const
 

This function returns the name of the terminal associated with this instTerm in the nameSpace specified. A name is returned even if the instTerm is not bound. The existence of a terminal name does not necessarily guarantee that the corresponding terminal exists in the instance master.

Parameters:
ns The nameSpace for processing the name
name The string that the terminal name is returned in
Exceptions:
oacInstTermConnectsByPosition 

void oaOccInstTerm::getTermName oaName &    name const
 

This function returns the name of the terminal associated with this instTerm in the given name argument. A name is returned even if the instTerm is not bound. The existence of a terminal name does not guarantee that the terminal exists in the corresponding instance master.

Parameters:
name The name object to return the terminal name in
Exceptions:
oacInstTermConnectsByPosition 

oaUInt4 oaOccInstTerm::getTermPosition   const
 

This function returns the terminal position that this instTerm connects to. If this instTerm is not bound by position, the value oacNullIndex is returned.

Exceptions:
oacInstTermConnectsByName 

oaBoolean oaOccInstTerm::isBound oaDomain    d const
 

This function returns a boolean value that indicates whether the associated terminal exists in the instance master and whether the instance associated with this instTerm is bound with respect to the specified domain.

Parameters:
d The domain for which binding is checked. Either oacModDomain or the default oacBlockDomain.
Exceptions:
oacCannotProcessDomainArgument 

oaBoolean oaOccInstTerm::isBound   const
 

This function returns a boolean value that indicates whether the instance associated with this instTerm is bound and whether the associated terminal exists in the instance master.

oaBoolean oaOccInstTerm::isImplicit   const
 

This function returns a boolean value indicating whether this instTerm is implicit, having been created as a result of the creation of a multi-bit instTerm.

oaBoolean oaOccInstTerm::usesTermPosition   const
 

This function returns a boolean indicating whether this instTerm was created to connect to a terminal position. This function returns 'true' if this instTerm binds to a particular terminal position. It returns 'false' if this instTerm binds to a terminal by name.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
dtIndex 


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

Return to top of page