oaModInst Class Reference

Inheritance diagram for oaModInst:

oaModObject oaDesignObject oaObject oaModDesignInst oaModModuleInst oaModBitInst oaModVectorInst oaModModuleBitInst oaModModuleVectorInst oaModScalarInst oaModVectorInstBit oaModModuleScalarInst oaModModuleVectorInstBit


Public Methods

void destroy ()
oaModulegetMasterModule () const
void getName (oaSimpleName &name) const
void getName (const oaNameSpace &ns, oaString &name) const
oaUInt4 getNumBits () const
oaBoolean isBound () const
oaBoolean isImplicit () const
oaBoolean isModDesignInst () const
oaBoolean isModModuleInst () const
oaBoolean usesTermPositions () const
void scalarize ()
oaCollection< oaModInstTerm, oaModInst > getInstTerms (oaUInt4 filterFlags=oacInstTermIterNotImplicit) const
oaCollection< oaModAssignment, oaModInst > getAssignments () const
oaCollection< oaOccInst, oaModInst > getOccInsts (const oaOccurrence *top) const

Static Public Methods

oaModInst * find (const oaModule *module, const oaSimpleName &name)

Public Types

enum  { dtIndex = oacInstDataType }

Detailed Description

The oaModInst class is an abstract base class for module instances. An instance represents the inclusion of one module (or a design containing a top module) as a part of the contents of another. The module containing the instance is the parent module, and the module that is included is the master module of the instance.

oaModInst objects are always in the module domain. An oaModInst can have an equivalent oaInst in the block domain and will always have an equivalent oaOccInst in the occurrence hierarchy.

Note that oaModInst::getOccInsts will return oaOccInsts only if the occurrence hierarchy has been expanded to include those objects. See Working in the Occurrence Domain for more details.

Instances can create hierarchical designs. The master of an instance can contain instances of other masters. This hierarchy can continue for as many levels as needed to express a complete design.

All instances have names. These names can be assigned by the creator. For scalar modules, instance names can be automatically assigned by the database.

Module instances always have an InstHeader, which contains the attributes that are constant for all instances of a given master module. However, the InstHeader class for oaModModuleInsts is oaModModuleInstHeader and the InstHeader class for oaModDesignInsts is oaModInstHeader. An oaModModuleInstHeader collects all the same oaModModuleInsts for a given parent module, while an oaModInstHeader collects all of the same oaModDesignInsts across an oaDesign for all parent modules.

Instances of pCells include a set of parameter values used to tailor the pCell for each specific instance.

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


Member Function Documentation

void oaModInst::destroy  
 

Removes this modInst from the database. If this was the last instance of the module or design that is its master then the oaModInstHeader that it belongs to is destroyed as well.

oaModInst * oaModInst::find const oaModule *    module,
const oaSimpleName &    name
[static]
 

This function searches the specified module for an instance with the specified name. If the name is hierarchical, then this function searches for the instance as specified in the hierarchical path name. If found, the instance is returned. Otherwise, NULL is returned.

Parameters:
module The module to search
name The instance name to find
Returns:
A pointer to the module instance, if found; otherwise, NULL

oaCollection oaModInst::getAssignments   const
 

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

oaCollection oaModInst::getInstTerms oaUInt4    filterFlags = oacInstTermIterNotImplicit const
 

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

  • When oacInstTermIterNotImplicit is included in filterFlags, the collection will only contain explicit instTerms associated with the instance
  • When oacInstTermIterSingleBit is included in filterFlags, the collection will only contain instTerms that make a single-bit connection to the instance

Parameters:
filterFlags Specifies which types of instTerms to include in the collection

oaModule * oaModInst::getMasterModule   const
 

This function returns the master module of this instance. NULL is returned if the module master can not be bound.

void oaModInst::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 oaModInst::getName oaSimpleName &    name const
 

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

Parameters:
name The returned instance name

oaUInt4 oaModInst::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.

oaCollection oaModInst::getOccInsts const oaOccurrence *    top const
 

This function returns a collection of occurrence instances associated with this instance in the design hierarchy under the specified 'top' occurrence. It is an error if the specified top occurrence is not in the same design as this module instance is in.

oaBoolean oaModInst::isBound   const
 

This function returns a boolean value indicating whether 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 oaModInst::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 oaModInst::isModDesignInst   const
 

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

oaBoolean oaModInst::isModModuleInst   const
 

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

void oaModInst::scalarize  
 

This function insures that the bitInsts associated with this instance have been promoted to the explicit state so that they can support implementation data.

If this instance is a multibit instance, this function insures that all constituent bitInsts are promoted to the explicit state. The multibit instance is then demoted to the implicit state so that no implementation data can be associated with it. When an instance is demoted to the implicit state, associated implementation data is removed from it.

When an instance is scalarized, all of its connections are also scalarized. Each bit of any multi-bit connection associated with the instance is promoted to the explicit state and is available for editing.

Exceptions:
oacCannotScalarizeImplicitInst 

oaBoolean oaModInst::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