oaBusNetDef Class Reference

Inheritance diagram for oaBusNetDef:

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< oaBusNet, oaBusNetDef > getBusNets () const
oaCollection< oaBusNetBit, oaBusNetDef > getBusNetBits () const
oaCollection< oaOccBusNet, oaBusNetDef > getOccBusNets () const
oaCollection< oaOccBusNetBit, oaBusNetDef > getOccBusNetBits () const

Static Public Methods

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

Public Types

enum  { dtIndex = oacBusNetDefDataType }

Detailed Description

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

A busNetDef 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 oaBusNetDef is automatically created if necessary whenever applications create busNets. Implicitly created busNet definitions have no bitOrder. Applications may explicitly create a busNet definition in order to specify that it has a specific bitOrder.

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

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

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


Member Function Documentation

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

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

The bit order of an explicit oaBusNetDef is independent of the order within individual oaBusNets 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 oaBusNets. If the name is hierarchical, the oaBusNetDef is created if:

  • The path already exists
  • No oaOccScalarNet with this name exists in the specified occurrence
  • No explicit oaOccBusNetDef with this name exists in the specified occurrence (implicit oaOccBusNetDefs are not considered)

Parameters:
block The block to create the oaBusNetDef object in
name The base name for the oaBusNetDef
order The bit order for the oaBusNetDef
Exceptions:
oacBusNetDefAlreadyExists 
oacHierPathDoesNotExist 
oacHierPathCrossDesign 

void oaBusNetDef::destroy  
 

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

Exceptions:
oacCannotDestroyImplicitBusNetDef 
oacCannotDestroyBusNetDefWithNets 

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

This function searches the specified block for an oaBusNetDef with the specified name. The oaBusNetDef is returned if found. Otherwise, NULL is returned. If the name is hierarchical and an oaOccBusNetDef with that name can be found, and the oaOccBusNetDef is published in the block domain, the block domain reflection of that oaOccBusNetDef is returned. If the occBusNetDef is not published in the block domain, NULL is returned.

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

oaBitOrder oaBusNetDef::getBitOrder   const
 

This function returns the bitOrder associated with this oaBusNetDef object.

oaCollection oaBusNetDef::getBusNetBits   const
 

This function returns a collection of oaBusNetBit objects in this oaBusNetDef object.

oaCollection oaBusNetDef::getBusNets   const
 

This function returns a collection of oaBusNet objects in this oaBusNetDef object.

oaUInt4 oaBusNetDef::getMaxIndex   const
 

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

oaUInt4 oaBusNetDef::getMinIndex   const
 

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

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

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

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

void oaBusNetDef::getName oaScalarName &    name const
 

This function returns the name of this oaBusNetDef object.

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

oaUInt4 oaBusNetDef::getNumBits   const
 

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

oaCollection< oaOccBusNetBit, oaBusNetDef > oaBusNetDef::getOccBusNetBits   const
 

This function returns a collection of oaOccBusNetBits in this oaBusNetDef.

oaCollection< oaOccBusNet, oaBusNetDef > oaBusNetDef::getOccBusNets   const
 

This function returns a collection of oaOccBusNets in this oaBusNetDef.

void oaBusNetDef::isImplicit   const
 

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

void oaBusNetDef::setBitOrder oaBitOrder    order
 

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

Parameters:
order The new bitOrder value for this busNetDef
Exceptions:
oacBitOrderBusNetDefImplicit 


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
dtIndex 


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

Return to top of page