oaModInstTerm Class Reference

Inheritance diagram for oaModInstTerm:

oaModObject oaDesignObject oaObject


Public Methods

void destroy ()
oaModInstTerm * getBit (oaUInt4 bitIndex) const
oaModNetgetNet (oaBoolean preferred=false) const
oaModInstgetInst () const
oaModTermgetTerm () const
void getTermName (oaName &name) const
void getTermName (const oaNameSpace &ns, oaString &name) const
oaUInt4 getTermPosition () const
oaUInt4 getNumBits () const
oaBoolean isBound () const
oaBoolean isImplicit () const
oaBoolean usesTermPosition () const
void addToNet (oaModNet *net)
void removeFromNet ()
void scalarize ()
oaCollection< oaOccInstTerm, oaModInstTerm > getOccInstTerms (const oaOccurrence *top) const

Static Public Methods

oaModInstTerm * create (oaModNet *net, oaModInst *inst, oaModTerm *term)
oaModInstTerm * create (oaModNet *net, oaModInst *inst, const oaName &termName)
oaModInstTerm * create (oaModNet *net, oaModInst *inst, oaUInt4 termPosition)
void create (oaModInst *inst, const oaModNetTermArray &connData)
void create (oaModInst *inst, const oaModNetTermNameArray &connData)
void create (oaModInst *inst, const oaModNetTermPosArray &connData)
oaModInstTerm * find (const oaModInst *inst, const oaModTerm *term)
oaModInstTerm * find (const oaModInst *inst, const oaName &termName)
oaModInstTerm * find (const oaModInst *inst, oaUInt4 termPosition)

Public Types

enum  { dtIndex = oacInstTermDataType }

Detailed Description

The oaModInstTerm class is an abstract base for all types of connections between a net and a terminal in the master of an instance in the module 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 oaModVectorInsts the net width must be multiplied by the number of bits represented by the instance name.

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

For oaModInstTerm, the master is an oaModule, and each instance of a module in a design will have a set of zero or more modInstTerms. For oaOccInstTerm, the master is an oaOccurrence. For oaInstTerm, the master is an oaBlock.

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

oaModInstTerms may exist that do not have a proper corresponding terminal in the master of the instance. 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.

When oaInstTerm objects are created in the block domain, corresponding oaModInstTerm objects are automatically created in the module domain for oaInsts that are visible in the module domain.

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 oaModInstTerm class can be observed by deriving from oaObserver<oaModInstTerm>.


Member Function Documentation

void oaModInstTerm::addToNet oaModNet *    net
 

This function adds this instTerm to the specified net. If this instTerm is already connected to another net, it detaches first.

Parameters:
net The new net to which to attach the instTerm
Exceptions:
oacNetAndInstNotInSameModule 
oacNetInstTermWidthMismatchForInstTerm 
oacCannotModifyImplicitInstTerm 
oacCannotEditOverriddenInstTerm 

void oaModInstTerm::create oaModInst *    inst,
const oaModNetTermPosArray &    connData
[static]
 

This function creates a set of modInstTerms, connecting the specified instance's terminals to the specified nets. The specifications for which nets are connected to which terminals are stored in an oaModNetTermPosArray (which associates net pointers with term positions).

Exceptions are thrown if any net and the given instance are not in the same design, if any net is an implicit net, if any terminal is not in the instance master design, if an instance of any terminal already exists where the net is not NULL, or if a connection width does not match the number of bits in the net (if one is specified).

Parameters:
inst The instance on which the instTerms are created
connData An array of instTerm specifications where each entry in the array describes a specification that is used to create a single instTerm.
Exceptions:
oacInstTermBatchCreateHasInstTerms 

void oaModInstTerm::create oaModInst *    inst,
const oaModNetTermNameArray &    connData
[static]
 

This function creates a set of modInstTerms, connecting the specified instance's terminals to the specified nets. The specifications for which nets are connected to which terminals are stored in an oaModNetTermNameArray (which associates net pointers with term names).

Exceptions are thrown if any net and the given instance are not in the same design, if any net is an implicit net, if any terminal is not in the instance master design, if an instance of any terminal already exists where the net is not NULL, or if a connection width does not match the number of bits in the net (if one is specified).

Parameters:
inst The instance on which the instTerms are created
connData An array of instTerm specifications where each entry in the array describes a specification that is used to create a single instTerm.
Exceptions:
oacInstTermBatchCreateHasInstTerms 

void oaModInstTerm::create oaModInst *    inst,
const oaModNetTermArray &    connData
[static]
 

This function creates a set of modInstTerms, connecting the specified instance's terminals to the specified nets. The specifications for which nets are connected to which terminals are stored in an oaModNetTermArray (which associates net and term pointers).

Exceptions are thrown if any net and the given instance are not in the same design, if any net is an implicit net, if any terminal is not in the instance master design, if an instance of any terminal already exists where the net is not NULL, or if a connection width does not match the number of bits in the net (if one is specified).

Parameters:
inst The instance on which the instTerms are created
connData An array of instTerm specifications where each entry in the array describes a specification that is used to create a single instTerm.
Exceptions:
oacInstTermBatchCreateHasInstTerms 

oaModInstTerm * oaModInstTerm::create oaModNet *    net,
oaModInst *    inst,
oaUInt4    termPosition
[static]
 

This function creates an instTerm connecting a terminal at the specified position in the master of the given instance to the specified net. You may specify a NULL net value.

Parameters:
net The net to use for the connection; it may be NULL
inst The instance to make the connection to
termPosition The position of a terminal in the instance master to connect to
Exceptions:
oacNetAndInstNotInSameDesign 
oacInstTermAlreadyExists 

oaModInstTerm * oaModInstTerm::create oaModNet *    net,
oaModInst *    inst,
const oaName &    termName
[static]
 

This function creates an instTerm connecting the named terminal in the master of the given instance to the specified net. You can specify a NULL net value. InstTerms can be created with names of terminals that do not exist in the instance master; these instTerms are unbound until the named terminal is created in the instance master.

An oacInstTermNetMismatchInRepeatedMembers exception is thrown if repeated bundle instTerm bits connect to different nets.

Parameters:
net The net to use for the connection; it may be NULL
inst The instance to make the connection to
termName The name of the terminal in the instance master to connect to
Returns:
A pointer to the instTerm created
Exceptions:
oacNetAndInstNotInSameDesign 
oacInstTermAlreadyExists 
oacNetInstTermWidthMismatchForInstTerm 
oacInstTermNetMismatchInRepeatedMembers 

oaModInstTerm * oaModInstTerm::create oaModNet *    net,
oaModInst *    inst,
oaModTerm *    term
[static]
 

This function creates an instTerm connecting the specified terminal in the master of the given instance to the specified net. You can specify a NULL net value.

An oacInstTermNetMismatchInRepeatedMembers exception is thrown if repeated bundle instTerm bits connect to different nets.

Parameters:
net The net to use for the connection; it may be NULL
inst The instance to make the connection to
term The terminal in the instance master to connect to
Returns:
A pointer to the instTerm created
Exceptions:
oacNetAndInstNotInSameDesign 
oacTermNotInInstMasterForInstTerm 
oacInstTermAlreadyExists 
oacNetInstTermWidthMismatchForInstTerm 
oacInstTermNetMismatchInRepeatedMembers 

void oaModInstTerm::destroy  
 

This function destroys this instTerm, removing it from the database. The reference for the instTerm is removed from the corresponding net.

Exceptions:
oacCannotDestroyImplicitInstTerm 
oacCannotDestroyOverriddenInstTerm 

oaModInstTerm * oaModInstTerm::find const oaModInst *    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 

oaModInstTerm * oaModInstTerm::find const oaModInst *    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 termName is hierarchical, then this function searches through the hierarchy path for the specified terminal. If 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 
oacCannotDestroyImplicitInstTerm 

oaModInstTerm * oaModInstTerm::find const oaModInst *    inst,
const oaModTerm *    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 

oaModInstTerm * oaModInstTerm::getBit oaUInt4    bitIndex const
 

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

Exceptions:
oacInvalidInstTermBitIndex 

oaModInst * oaModInstTerm::getInst   const
 

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

oaModNet * oaModInstTerm::getNet oaBoolean    preferred = false const
 

This function returns the net associated with this instTerm. NULL is returned if the instTerm was created with a NULL net or if the instTerm was 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 oaModNet

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

oaCollection oaModInstTerm::getOccInstTerms const oaOccurrence *    top const
 

This function returns a collection of oaOccInstTerm objects that represent this instTerm in the occurrence hierarchy specified by top.

Parameters:
top The top oaOccurrence in the occurrence hierarchy.

oaModTerm * oaModInstTerm::getTerm   const
 

This function returns the terminal associated with this instTerm. An attempt is made to bind the master if the instTerm is unbound. NULL is returned if the instance is unbound or the terminal is not found in the master.

void oaModInstTerm::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 oaModInstTerm::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 oaModInstTerm::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 oaModInstTerm::isBound   const
 

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

oaBoolean oaModInstTerm::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.

void oaModInstTerm::removeFromNet  
 

This function removes this instTerm from the net to which it is attached. If this instTerm is not attached to a net, this function does nothing.

Exceptions:
oacCannotModifyImplicitInstTerm 
oacCannotEditOverriddenInstTerm 

void oaModInstTerm::scalarize  
 

This function insures that the bits associated of the connection formed by this instTerm are explicit and available to support implementation data.

If this instTerm represents a single-bit connection, this function insures that this instTerm and its associated bitNet are explicit.

If this instTerm represents a multibit connection, this function insures all corresponding single-bit connections are scalarized. That is, for each bit of the connection, the implicit instTerm and its associated bitNet are made explicit. After processing all of the bits in the connection, the instTerm is made implicit. This insures that no implementation data can be added to the instTerm. If the instTerm becomes implicit, any associated impmentation data is removed from it.

Exceptions:
oacCannotScalarizeImplicitInstTerm 

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