oaVectorInstDef Class Reference

Inheritance diagram for oaVectorInstDef:

oaBlockObject oaDesignObject oaObject


Public Methods

void destroy ()
oaUInt4 getMinIndex () const
oaUInt4 getMaxIndex () const
oaUInt4 getNumBits () const
void getName (oaScalarName &name) const
void getName (const oaNameSpace &ns, oaString &name) const
oaBitOrder getBitOrder () const
oaBoolean isImplicit () const
void setBitOrder (oaBitOrder order)
oaCollection< oaVectorInst, oaVectorInstDef > getVectorInsts () const
oaCollection< oaVectorInstBit, oaVectorInstDef > getVectorInstBits () const

Static Public Methods

oaVectorInstDef * create (const oaBlock *block, const oaScalarName &name, oaBitOrder order)
oaVectorInstDef * find (const oaBlock *block, const oaScalarName &name)

Public Types

enum  { dtIndex = oacVectorInstDefDataType }

Detailed Description

The oaVectorInstDef class implements the definition of a vectorInst, including its name and bit-range. All vectorInsts in a block with the same base name are managed by the same vectorInst definition. The oaVectorInstDef class tracks the minimum and maximum indices referred to by all of its corresponding vectorInst objects.

A vectorInstDef is automatically created if necessary whenever applications create vectorInsts. Implicitly created vectorInst definitions have no bitOrder. Applications may explicitly create a vectorInst definition in order to specify that it has a specific bitOrder.

The bit order of an explicit oaVectorInstDef is independent of the order within individual oaVectorInsts with the same base name. Verilog requires a single wire declaration for a given base name, and the range of that declaration covers all of the bit indices used by the sub-ranges that correspond to oaVectorInsts.

Implicitly created vectorInst definitions are automatically destroyed when the last vectorInst with the same base name is destroyed. Explicitly created vectorInst definitions must be explicitly destroyed.

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


Member Function Documentation

oaVectorInstDef * oaVectorInstDef::create const oaBlock *    block,
const oaScalarName &    name,
oaBitOrder    order
[static]
 

This function creates an oaVectorInstDef in the specified block with the given base name and bit order. An exception is thrown if an oaVectorInstDef already exists with the specified name. Explicitly creating an oaVectorInstDef also means that the vectorInst definition must be explicitly destroyed.

Parameters:
block The block to create the oaVectorInstDef object in
name The base name for the oaVectorInstDef
order The bit order for the oaVectorInstDef
Exceptions:
oacVectorInstDefAlreadyExists 

void oaVectorInstDef::destroy  
 

This function destroys this oaVectorInstDef, removing it from the database. An exception is thrown if the oaVectorInstDef is implicit or if there are still oaVectorInsts associated with it.

Exceptions:
oacCannotDestroyImplicitVectorInstDef 
oacCannotDestroyVectorInstDefWithInsts 

oaVectorInstDef * oaVectorInstDef::find const oaBlock *    block,
const oaScalarName &    name
[static]
 

This function searches the specified block for a vectorInstDef with the specified name. The function returns the vectorInstDef if it finds it. Otherwise, NULL is returned.

oaBitOrder oaVectorInstDef::getBitOrder   const
 

This function returns the bitOrder associated with this oaVectorInstDef object.

oaUInt4 oaVectorInstDef::getMaxIndex   const
 

This function returns the largest bit number in use for this oaVectorInstDef object. This is the largest index used across all vectorInsts associated with this oaVectorInstDef object.

oaUInt4 oaVectorInstDef::getMinIndex   const
 

This function returns the smallest bit number in use for this oaVectorInstDef object. This is the smallest index used across all vectorInsts associated with this oaVectorInstDef object.

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

This function returns the name string of this oaVectorInstDef object in the specified nameSpace.

Parameters:
ns The nameSpace to use when getting the name string
name Returns the string name of this oaVectorInstDef

void oaVectorInstDef::getName oaScalarName &    name const
 

This function returns the name of this oaVectorInstDef object.

Parameters:
name The scalar name in which to return the oaVectorInstDef object name

oaUInt4 oaVectorInstDef::getNumBits   const
 

This function returns the number of bits covered by the vectorInsts in this oaVectorInstDef. The number of bits is equal to abs(maxIndex - minIndex) + 1.

oaCollection oaVectorInstDef::getVectorInstBits   const
 

This function returns a collection of oaVectorInstBit objects associated with this oaVectorInstDef object.

oaCollection oaVectorInstDef::getVectorInsts   const
 

This function returns a collection of oaVectorInst objects associated with this oaVectorInstDef object.

void oaVectorInstDef::isImplicit   const
 

This function returns a boolean indicating whether this oaVectorInstDef was implicitly created or not.

void oaVectorInstDef::setBitOrder oaBitOrder    order
 

This function changes the bitOrder value associated with the oaVectorInstDef. An exception is thrown if this vectorInstDef was implicitly created.

Parameters:
order The new bitOrder value for this vectorInstDef
Exceptions:
oacBitOrderVectorInstDefImplicit 


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
dtIndex 


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

Return to top of page