oaModBusNetDef Class Reference

Inheritance diagram for oaModBusNetDef:

oaModObject 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< oaModBusNet, oaModBusNetDef > getBusNets () const
oaCollection< oaModBusNetBit, oaModBusNetDef > getBusNetBits () const

Static Public Methods

oaModBusNetDef * create (const oaModule *module, const oaScalarName &name, oaBitOrder order)
oaModBusNetDef * find (const oaModule *module, const oaScalarName &name)

Public Types

enum  { dtIndex = oacBusNetDefDataType }

Detailed Description

The oaModBusNetDef class implements the definition of a module busNet, including its base name and bit-range. All busNets in a module with the same base name are managed by the same busNet definition. The oaModBusNetDef class tracks the minimum and maximum indices referred to by all of its corresponding busNet and busNetBit 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 busNetDef 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 oaModBusNetDef is independent of the order within individual oaModBusNets 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 oaModBusNets.

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


Member Function Documentation

oaModBusNetDef * oaModBusNetDef::create const oaModule *    module,
const oaScalarName &    name,
oaBitOrder    order
[static]
 

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

Parameters:
module The module to create the oaModBusNetDef object in
name The base name for the oaModBusNetDef
order The bit order for the oaModBusNetDef
Exceptions:
oacBusNetDefAlreadyExists 

void oaModBusNetDef::destroy  
 

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

Exceptions:
oacCannotDestroyImplicitBusNetDef 
oacCannotDestroyBusNetDefWithNets 

oaModBusNetDef * oaModBusNetDef::find const oaModule *    module,
const oaScalarName &    name
[static]
 

This function searches the specified module for an oaModBusNetDef with the specified name. The oaModBusNetDef is returned if found. Otherwise, NULL is returned.

Parameters:
module The module to search for the oaModBusNetDef object
name The name of the oaModBusNetDef to find

oaBitOrder oaModBusNetDef::getBitOrder   const
 

This function returns the bitOrder associated with this oaModBusNetDef.

oaCollection oaModBusNetDef::getBusNetBits   const
 

This function returns a collection of oaModBusNetBit objects in this oaModBusNetDef object.

oaCollection oaModBusNetDef::getBusNets   const
 

This function returns a collection of oaModBusNet objects in this oaModBusNetDef object.

oaUInt4 oaModBusNetDef::getMaxIndex   const
 

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

oaUInt4 oaModBusNetDef::getMinIndex   const
 

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

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

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

Parameters:
ns The nameSpace to search
name The oaModBusNetDef object to return

void oaModBusNetDef::getName oaScalarName &    name const
 

This function returns the name of this oaModBusNetDef object.

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

oaUInt4 oaModBusNetDef::getNumBits   const
 

This function returns the number of bits covered by the busses in this oaModBusNetDef. 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 oaModBusNetDef::getBusNetBits().getCount()

void oaModBusNetDef::isImplicit   const
 

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

void oaModBusNetDef::setBitOrder oaBitOrder    order
 

This function changes the bitOrder value associated with the oaModBusNetDef. 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