oaOccInst Class Reference

Inheritance diagram for oaOccInst:

oaOccObject oaDesignObject oaObject oaOccDesignInst oaOccModuleInst oaOccBitInst oaOccVectorInst oaOccModuleBitInst oaOccModuleVectorInst oaOccArrayInst oaOccScalarInst oaOccVectorInstBit oaOccModuleScalarInst oaOccModuleVectorInstBit


Public Methods

oaOccurrencegetMasterOccurrence (oaBoolean expand=true) const
void getName (oaSimpleName &name) const
void getName (const oaNameSpace &ns, oaString &name) const
void getPathName (oaSimpleName &pathName) const
void getPathName (const oaNameSpace &ns, oaString &pathName) const
oaInstgetInst () const
oaModInstgetModInst () const
oaUInt4 getNumBits () const
oaBoolean isBound () const
oaBoolean isImplicit () const
oaBoolean isOccDesignInst () const
oaBoolean isOccModuleInst () const
oaBoolean usesTermPositions () const
oaCollection< oaOccInstTerm, oaOccInst > getInstTerms (oaUInt4 filterFlags=oacInstTermIterNotImplicit) const
oaCollection< oaOccAssignment, oaOccInst > getAssignments () const

Static Public Methods

oaOccInst * find (const oaOccurrence *occurrence, const oaSimpleName &name)

Public Types

enum  { dtIndex = oacInstDataType }

Detailed Description

The oaOccInst class is an abstract base class for occurrence instances. An occurrence instance is the reflection of either an oaModInst or an oaInst in the occurrence hierarchy. The occurrence hierarchy is the completely unfolded version of the union of the module and block hierarchies. See Understanding OpenAccess Embedded Module Hierarchy in the Programmers Guide for a discussion of the occurrence hierarchy.

An oaOccInst may correspond to an oaModInst, an oaInst, or both:

An oaOccInst will always have an oaOccurrence that is its parent.

An oaOccInst will always have an oaOccurrence that is its master except at the frontier which is the bottom level of the occurrence hierarchy.

All occurrence instances have names. These names are non-hierarchical names that are scoped relative to the parent occurrence. For an occInst that is an occurrence of an oaModInst its name is the name of the oaModInst. For an occurrence of an oaInst that doesn't have an oaModInst (a physical-only instance) its name is the name of that oaInst.

OccInsts always have an InstHeader which is one of oaOccInstHeader or oaOccModuleInstHeader. This header contains the attributes that are common for all of the occInsts with the same master within the same parent occurrence.

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


Member Function Documentation

oaOccInst * oaOccInst::find const oaOccurrence *    occurrence,
const oaSimpleName &    name
[static]
 

This function searches the specified occurrence looking for an instance with the specified name. If name is hierarchical, this function will descend into lower levels of occurrence hierarchy, expanding the hierarchy and binding the master designs as needed. The instance is returned if found, otherwise NULL is returned.

Parameters:
occurrence The occurrence domain to search
name The instance name to find
Returns:
A pointer to an oaOccInst

oaCollection oaOccInst::getAssignments   const
 

This function returns a collection of occurrence assignments associated with this instance.

oaInst * oaOccInst::getInst   const
 

This function returns the corresponding instance in the block domain. NULL will be returned if the master design for this instance does not have a top block.

Returns:
A pointer to an oaInst

Reimplemented in oaOccArrayInst, oaOccScalarInst, oaOccVectorInst, and oaOccVectorInstBit.

oaCollection oaOccInst::getInstTerms oaUInt4    filterFlags = oacInstTermIterNotImplicit const
 

This function returns a collection of occurrence instTerms associated with this instance.

Parameters:
filterFlags Specifies what the collection contains. The bits flags are defined as follows:
  • oacInstTermIterNotImplicit: the collection will only contain instTerms that were explicitly created
  • oacInstTermIterSingleBit: the collection will only contain instTerms that make a single-bit connection

oaOccurrence * oaOccInst::getMasterOccurrence oaBoolean    expand = true const
 

This function attempts to return the master associated with this instance. If expand is true and the instance cannot be bound, NULL is returned. An exception will be thrown if the instance is a vectorInst or an implicit vectorInstBit, as there is no occurrence hierarchy beneath those types of instances.

An application will generally make a pass over the occurrence hierarchy calling getMasterOccurrence with expand set to true to expand the hierarchy to the desired depth. Later traversals will set expand to false so the traversal does not cause additional expansion. See oaOccTraverser for a utility class that can simplify walking the occurrence hierarchy

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

oaModInst * oaOccInst::getModInst   const
 

This function returns the corresponding instance in the module domain. NULL will be returned if this instance is an occurrence of a physical-only instance.

Returns:
A pointer to an oaModInst

Reimplemented in oaOccModuleInst, oaOccModuleScalarInst, oaOccModuleVectorInst, oaOccModuleVectorInstBit, oaOccScalarInst, oaOccVectorInst, and oaOccVectorInstBit.

void oaOccInst::getName const oaNameSpace &    ns,
oaString &    name
const
 

This function fills out name with the name of this instance. The name is mapped according to the specified nameSpace.

Parameters:
ns The nameSpace used to map the name
name The returned instance name

void oaOccInst::getName oaSimpleName &    name const
 

This function fills out name with the name of this instance.

Parameters:
name The returned instance name

oaUInt4 oaOccInst::getNumBits   const
 

This function returns the number of bits of this instance. This function always returns '1' for scalar and array instances. The function can return '1' or more for vector instances.

void oaOccInst::getPathName const oaNameSpace &    ns,
oaString &    pathName
const
 

This function returns the full path name of this instance in the specified nameSpace in the specified pathName string. The pathName is relative to the top occurrence in the occurrence hierarchy containing this instance.

Parameters:
ns The nameSpace in which to return the name
pathName The path name of the instance

void oaOccInst::getPathName oaSimpleName &    pathName const
 

This function fills out pathName with the full path name of this instance, relative to the top occurrence in the occurrence hierarchy containing this instance.

Parameters:
pathName The path name of the instance

oaBoolean oaOccInst::isBound   const
 

This function returns a boolean value that indicates if this instance is currently bound to its master. An instance is bound to its master if some traversal is made from the instance to the master or an object in the master. If the instance is bound, then its master is in memory and the linkage from the instance to the master is established.

Returns:
true if the instance is bound, otherwise false

oaBoolean oaOccInst::isImplicit   const
 

This function returns a boolean value that indicates if this instance is implicit, having been automatically created as a result of the creation of a vectorInst.

oaBoolean oaOccInst::isOccDesignInst   const
 

This function determines if this object is an instance of one of the classes derived from the oaOccDesignInst class. The function returns a boolean value of true if the oaOccInst is an oaOccDesignInst.

oaBoolean oaOccInst::isOccModuleInst   const
 

This function determines if this object is an instance of one of the classes derived from the oaOccModuleInst class. The function returns a boolean value of true if the oaOccInst is an oaOccModuleInst.

oaBoolean oaOccInst::usesTermPositions   const
 

This function returns a boolean indicating how connections to this instance have been made. If the instTerms associated with this instance connect to terminal positions, this function returns 'true'. Otherwise, this function returns 'false'. Note that if the collection of instTerms for this instance is empty, this function will also return 'false'.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
dtIndex 


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

Return to top of page