oaModVectorInstDef Class Reference
Inheritance diagram for oaModVectorInstDef:
Detailed Description
The oaModVectorInstDef class implements the definition of a module vectorInst, including its base name and bit-range. All vectorInsts in a module with the same base name are managed by the same vectorInst definition. The oaModvectorInstDef class tracks the minimum and maximum indices referred to by all of its corresponding vectorInst objects.
A vectorInstDef can be 'sparse' (have missing bits). Vectors do not have to start or end at zero. For example, a[22:25]
is a legal vectorInst name. Vector indexes must be non-negative.
An 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 oaModVectorInstDef is independent of the order within individual oaModVectorInsts 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 oaModVectorInsts.
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 oaModVectorInstDef class can be observed by deriving from oaObserver<oaModVectorInstDef>.
Member Function Documentation
|
This function creates an oaModVectorInstDef in the specified module with the given base name and bit order. An exception is thrown if an oaModVectorInstDef already exists with the specified name. Explicitly creating an oaModVectorInstDef also means that the vectorInst definition must be explicitly destroyed.
- Parameters:
-
module | The module to create the oaModVectorInstDef object in |
name | The base name for the oaModVectorInstDef |
order | The bit order for the oaModVectorInstDef |
- Exceptions:
-
|
void oaModVectorInstDef::destroy |
( |
|
) |
|
|
|
This function destroys this oaModVectorInstDef, removing it from the database. An exception is thrown if the oaModVectorInstDef is implicit or if there are still oaModVectorInsts associated with it.
- Exceptions:
-
|
oaModVectorInstDef * oaModVectorInstDef::find |
( |
const oaModule * |
module, |
|
|
const oaScalarName & |
name |
|
) |
[static] |
|
|
This function searches the specified module for a vectorInstDef with the specified name. The function returns the vectorInstDef if it finds it. Otherwise, NULL is returned. |
oaBitOrder oaModVectorInstDef::getBitOrder |
( |
|
) |
const |
|
|
This function returns the bitOrder associated with this oaModVectorInstDef object. |
oaUInt4 oaModVectorInstDef::getMaxIndex |
( |
|
) |
const |
|
|
This function returns the largest bit number in use for this oaModVectorInstDef object. This is the largest index used across all vectorInsts associated with this oaModVectorInstDef object. |
oaUInt4 oaModVectorInstDef::getMinIndex |
( |
|
) |
const |
|
|
This function returns the smallest bit number in use for this oaModVectorInstDef object. This is the smallest index used across all vectorInsts associated with this oaModVectorInstDef object. |
|
This function returns the name string of this oaModVectorInstDef object in the specified nameSpace.
- Parameters:
-
ns | The nameSpace to use when getting the name string |
name | Returns the string name of this oaModVectorInstDef |
|
void oaModVectorInstDef::getName |
( |
oaScalarName & |
name |
) |
const |
|
|
This function returns the name of this oaModVectorInstDef object.
- Parameters:
-
name | The scalar name in which to return the oaModVectorInstDef object name |
|
oaUInt4 oaModVectorInstDef::getNumBits |
( |
|
) |
const |
|
|
This function returns the number of bits covered by the vectorInsts in this oaModVectorInstDef. The number of bits is equal to abs(maxIndex - minIndex) + 1. |
oaCollection oaModVectorInstDef::getVectorInstBits |
( |
|
) |
const |
|
void oaModVectorInstDef::isImplicit |
( |
|
) |
const |
|
|
This function returns a boolean indicating whether this oaModVectorInstDef was implicitly created or not. |
void oaModVectorInstDef::setBitOrder |
( |
oaBitOrder |
order |
) |
|
|
|
This function changes the bitOrder value associated with the oaModVectorInstDef. An exception is thrown if this vectorInstDef was implicitly created.
- Parameters:
-
order | The new bitOrder value for this vectorInstDef |
- Exceptions:
-
|
Member Enumeration Documentation
The documentation for this class was generated from the following files:
Return to top of page
Copyright © 2002 - 2010 Cadence Design Systems, Inc.
All Rights Reserved.