oaBusTermDef Class Reference

Inheritance diagram for oaBusTermDef:

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< oaBusTerm, oaBusTermDef > getBusTerms () const
oaCollection< oaBusTermBit, oaBusTermDef > getBusTermBits () const

Static Public Methods

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

Public Types

enum  { dtIndex = oacBusTermDefDataType }

Detailed Description

The oaBusTermDef class implements the definition of an oaBusTerm, including its base name and bit-range. All oaBusTerms and oaBusTermBits in a block with the same base name are managed by the same oaBusTermDef. The oaBusTermDef class tracks the minimum and maximum indices refered to by all of its corresponding busTermBit objects.

A bus definition can be 'sparse' (have missing bits). Busses do not have to start or end at zero. For example, a<22:25> is a legal bus name. Bus indexes must be non-negative.

An oaBusTermDef is automatically created if necessary whenever applications create oaBusTerms. Implicitly created oaBusTermDef have no bitOrder. Applications may explicitly create a oaBusTermDef in order to specify that it has a specific bitOrder.

The bit order of an explicit oaBusTermDef is independent of the order within individual oaBusTerms 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 oaBusTerms.

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

oaModBusTermDef, oaOccBusTermDef, and oaBusTermDef each manage the bus terminals on a different kind of master, where in each case the master represents a level of hierarchy in the design.

For oaModBusTermDef, the master is an oaModule, and each module in a design will have a set of zero or more modBusTermDefs. For oaOccBusTerm, the master is an oaOccurrence.

For oaBusTermDef, the master is an oaBlock, and the top block for the design will have a set of zero or more modBusTermDefs. Typically, many of the oaBusTermDefs on the top oaBlock have a corresponding oaModBusTermDef on the top oaModule. All of the oaBusTerms on the top oaBlock have a corresponding oaOccBusTerm on the top oaOccurrence.

OpenAccess requires a consistent definition of bus terminals shared between the top module and the top block in a design. When an oaBusTerm has been created that is not visible in the module domain, it is not possible to create an oaModBusTerm that uses the same base name.

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


Member Function Documentation

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

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

Parameters:
block The block to create the oaBusTermDef object in
name The base name for the oaBusTermDef
order The bit order for the oaBusTermDef
Exceptions:
oacBusTermDefAlreadyExists 

void oaBusTermDef::destroy  
 

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

Exceptions:
oacCannotDestroyImplicitBusTermDef 
oacCannotDestroyBusTermDefWithTerms 

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

This function searches the specified design for a busTermDef with the specified name. The busTermDef is returned if found. Otherwise, NULL is returned.

Parameters:
block The block to search for the oaBusTermDef object
name The name of the oaBusTermDef to find

oaBitOrder oaBusTermDef::getBitOrder   const
 

This function returns the bitOrder associated with this oaBusTermDef object.

oaCollection oaBusTermDef::getBusTermBits   const
 

This function returns a collection of oaBusTermBits in this oaBusTermDef object.

oaCollection oaBusTermDef::getBusTerms   const
 

This function returns a collection of oaBusTerm objects in this oaBusTermDef object.

oaUInt4 oaBusTermDef::getMaxIndex   const
 

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

oaUInt4 oaBusTermDef::getMinIndex   const
 

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

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

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

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

void oaBusTermDef::getName oaScalarName &    name const
 

This function returns the name of this oaBusTermDef object.

Parameters:
name The scalar name in which to return the name of this oaBusTermDef

oaUInt4 oaBusTermDef::getNumBits   const
 

This function returns the number of bits covered by the busses in this oaBusTermDef. The number of bits is equal to abs(maxIndex - minIndex) + 1; it is not necessarily the number of busTermBits present in this busTermDef. To get the number of busTermBits in this busTermDef, use oaBusTermDef::getBusNetBits().getCount().

void oaBusTermDef::isImplicit   const
 

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

void oaBusTermDef::setBitOrder oaBitOrder    order
 

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

Parameters:
order The new bitOrder value for this busTermDef
Exceptions:
oacBitOrderBusTermDefImplicit 


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
dtIndex 


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

Return to top of page