oaModNet Class Reference

Inheritance diagram for oaModNet:

oaModObject oaDesignObject oaObject oaModBitNet oaModBundleNet oaModBusNet oaModBusNetBit oaModScalarNet


Public Methods

void destroy ()
oaBoolean isEmpty () const
oaBoolean isImplicit () const
oaBoolean isGlobal () const
oaSigType getSigType () const
oaUInt4 getNumBits () const
void getName (oaName &name) const
void getName (const oaNameSpace &ns, oaString &name) const
oaModBitNetgetBit (oaUInt4 bitIndex) const
void setGlobal (oaBoolean isGlobal)
void setSigType (oaSigType sigType)
void scalarize ()
oaCollection< oaModInstTerm, oaModNet > getInstTerms (oaUInt4 filterFlags=oacInstTermIterNotImplicit) const
oaModMemNetCollection getMemberNets (oaBoolean unique=true) const
oaCollection< oaOccNet, oaModNet > getOccNets (const oaOccurrence *occ) const
oaCollection< oaModBitNet, oaModNet > getSingleBitMembers () const
oaCollection< oaModTerm, oaModNet > getTerms (oaUInt4 filterFlags=oacTermIterNotImplicit) const

Static Public Methods

oaModNet * create (oaModule *module, const oaName &name, oaSigType type=oacSignalSigType, oaBoolean isGlobal=false)
oaModNet * find (const oaModule *module, const oaName &name)
oaBoolean isValidName (const oaModule *module, const oaName &name)

Public Types

enum  { dtIndex = oacNetDataType }

Detailed Description

The oaModNet class is an abstract base class for scalar and multi-bit nets that are part of the design's logical description. Nets represent the logical connectivity within a module of a design. Nets connect to terminals, which are the logical connection points to nets in the parent module. Nets also connect to instTerms that represent connections to the lower-level instances in the net's module.

oaModNet, oaOccNet, and oaNet each represent nets in a different kind of master, where in each case, the master represents a level of hierarchy in the design.

Note that oaModNet::getOccNets will return oaOccNets only if the occurrence hierarchy has been expanded to include those objects. See Working in the Occurrence Domain for more details.

For oaModNet, the master is an oaModule, and each module in a design will contain a set of zero or more modNets.

For a typical hierarchy where the oaNets in the block are visible in the module hierarchy each oaNet will have a corresponding oaModNet in the top oaModule. When oaNets are created in such a block, the corresponding oaModNets are automatically created on the top oaModule.

All module nets have names. These names can be assigned by the creator. For scalar nets, a name can be automatically assigned by the database.

There must be a consistent definition of single and multi-bit nets shared between the top module and the top block in a design. When an oaBusNet has been created that is not visible to the module domain, it is not possible to create an oaModBusNet that uses the same base name. Similarly, it is not possible to create an oaModScalarNet whose name would conflict with any oaScalarNet or oaBusNet in the block domain.

Multi-bit nets represent a collection of logical connections. Nets can include busNets having a single base name with an index range, or they can include bundleNets, which are a more complex grouping of nets. Multi-bit nets can have overlapping names. For example, busNets addr<7:0> and addr<3:0>.

All ModBusNets with the same root name are managed by an oaModBusNetDef. The modBusNetDef tracks:

The modBusNetBits are automatically created for each bit of a modBusNet, if they do not already exist. They are available for those applications performing scalarized connectivity traversal of the data.

The modBundleNets can contain modScalarNets or modBusNets. When a modBundleNet is created, the constituent modScalarNets and modBusNets are automatically created in addition to the modBundleNet itself. All automatically created net objects are considered "implicit." Implicit nets are more restricted in terms of the operations that are allowed to work with them.

The various net objects take and return names through the general oaName object but also use the oaScalarName, oaVectorBitName, oaVectorName, and oaBundleName objects. These name objects manage the mapping of names from one nameSpace to another. For example, where a net is created using the name in CDBA nameSpace; another application can retrieve the net's name in the Verilog nameSpace.

You can have two or more nets that are equivalent. Equivalent nets can be traversed separately or logically as the same net. You can only set single-bit nets equivalent to each other.

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

For information on creating global nets in the module domain, see Creating Global Nets in the Module Domain.


Member Function Documentation

oaModNet * oaModNet::create oaModule *    module,
const oaName &    name,
oaSigType    sigType = oacSignalSigType,
oaBoolean    isGlobal = false
[static]
 

This function creates a net in the specified module with the specified name. The type of net (scalarNet, busNetBit, busNet, or bundleNet) created is determined by the specified name.

Parameters:
module The module in which to create the net
name The name of the net
sigType The signal type to associate with the net; if not specified, the default is oacSignalSigType
isGlobal Specifies if this net is considered global; if not specified, the default is false
Returns:
A pointer to an oaModNet
Exceptions:
oacBusNetBaseNameMatchesScalarName 
oacBusNetNameMatchesAutoName 
oacInvalidNetName 
oacNetExists 
oacScalarNetNameMatchesBusBaseName 

void oaModNet::destroy  
 

This function destroys this net, removing it from the database.

Exceptions:
oacCannotDestroyImplicitNet 
oacCannotDestroyNetOnHiddenTerm 

oaModNet * oaModNet::find const oaModule *    module,
const oaName &    name
[static]
 

This function searches the specified module for a net with the specified name. If the name is hierarchical, then this function searches through the hierarchy path for the specified net. If the name is a bundle name, and any of its members has hierarchy, all of its members must have the same level of hierarchy or an exception is thrown. If the net is found, the function returns the net. Otherwise, NULL is returned.

Exceptions:
oacInvalidHierBundleNetName 

oaModBitNet * oaModNet::getBit oaUInt4    bitIndex const
 

This function returns a pointer to the net that corresponds to the specified bitIndex bit of this net. For scalarNets, this function simply returns the net. For busNets, the busNetBit corresponding to the bitIndex bit is returned. For example, if this net is a busNet "a[7:0]" and bitIndex is zero, this function will return the busNetBit corresponding to "a[7]". For bundleNets, a scalarNet or busNetBit is returned.

Parameters:
bitIndex Specifies which bit of the net to return
Returns:
A pointer to an oaModNet
Exceptions:
oacInvalidBusNetBitIndex 
oacInvalidNetIndex 

oaCollection oaModNet::getInstTerms oaUInt4    filterFlags = oacInstTermIterNotImplicit const
 

This function returns a collection of instTerms in this net. The filter flag bits are defined below and may be logically OR'd together to refine the contents of the collection.

Parameters:
filterFlags Specifies what the collection contains. The bits flags are defined as follows:
  • oacInstTermIterNotImplicit: the collection will only contain instTerms that were explicitly created
  • oacInstTermIterEquivNets: the collection will also contain the instTerms on the nets that are equivalent to this one
Exceptions:
oacInstTermIterFlagNotApplicableOnNets 

oaModMemNetCollection oaModNet::getMemberNets oaBoolean    unique = true const
 

This function returns a collection of module nets of which this module net is a member. For example, if a module contains both scalar net a and bundle net x,y,a this collection for net a contains both of those nets.

In particular:

  • Explicit nets are always members of themselves so the collection is never empty for such nets.
  • Implicit nets are never returned in this collection.
  • BundleNets can only be members of themselves.
  • ScalarNets and busNets are members of themselves and bundleNets.
  • BusNetBits are members of all busNets where the bit is present so busNetBit A[1] is a member of A[2:0]
  • A single-bit busNet will only return itself
  • Nets are members of bundles that contain a member that is in exactly the same form as the specified net
  • A[1:0] is not a member of A[4:0]
  • A[1:0] is not a member of A[0:1]
  • Where a net occurs multiple times in a bundle, it will occur multiple times in this collection. See oaMemNetIter for details about iterating over this collection.

Parameters:
unique Specifies that only the preferred equivalent nets are included in the collection

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

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

void oaModNet::getName oaName &    name const
 

This function returns the name of this net in the name argument.

oaUInt4 oaModNet::getNumBits   const
 

This function returns the number of bits in this net.

oaCollection oaModNet::getOccNets const oaOccurrence *    top const
 

This function returns a collection of the occurrences of this module net in the design hierarchy under the specified 'top' occurrence. It is an error if the top occurrence specified is not in the same design as the module net is in, and also if the specific "top" is not a top occurrence.

Exceptions:
oacInvalidTopOccurrence 

oaSigType oaModNet::getSigType   const
 

This function returns the signal type of this net, which indicates its usage such as clock, power or signal.

oaCollection oaModNet::getSingleBitMembers   const
 

This function returns a collection of single-bit member nets that are in this net. If this net is a single-bit net, the collection contains itself. If this net is a busNet, the collection contains all of the corresponding busNetBits.

oaCollection oaModNet::getTerms oaUInt4    filterFlags = oacTermIterNotImplicit const
 

This function returns a collection of terminals in this modNet. By default, the collection only contains explicit terminals associated with this net.

  • When oacTermIterAll is included in filterFlags, the collection will contain all terminals associated with this net, including implicit terminals.
  • When oacTermIterEquivNets is included in filterFlags, the collection will contain all terminals in the set of nets that are equivalent to this net.

Parameters:
filterFlags Specifies which types of terminals to include in the collection

oaBoolean oaModNet::isEmpty   const
 

This function returns a boolean value that indicates if this net has any objects attached to it or associated with it.

oaBoolean oaModNet::isGlobal   const
 

This function returns a boolean value that indicates if this net is a global net. All global nets of a given name are connected regardless of where they are in a hierarchy.

oaBoolean oaModNet::isImplicit   const
 

This function returns a boolean indicating whether or not this net is implicit, that is, if it was automatically created as a result of the creation of a bundleNet or busNet.

oaBoolean oaModNet::isValidName const oaModule *    module,
const oaName &    name
[static]
 

This function returns a boolean value that indicates if the specified name is valid for a new oaModNet in the specified module.

void oaModNet::scalarize  
 

This function insures that the bitNets associated with this net have been promoted to the explicit state so that they can support implementation data.

If this net is a multibit net, this function insures that all constituent bitNets are promoted to the explicit state. The multibit net is then demoted to the implicit state so that no implementation data can be associated with it. When a net is demoted to the implicit state, associated implementation data is removed from it.

Exceptions:
oacCannotScalarizeImplicitNet 

void oaModNet::setGlobal oaBoolean    isGlobal
 

This function sets the global attribute of this net.

Exceptions:
oacCannotSetGlobalOnImplicitNet 
oacCannotUnsetGlobalStateOfNetInTopModule 

void oaModNet::setSigType oaSigType    sigType
 

This function sets the sigType attribute of this net to the specified value.

Note: The sigType of an oaModNet can be different from the sigType of its corresponding oaNet. In other words, this function sets the sigType on the this net in the module domain only.

Exceptions:
oacCannotSetSigTypeOnImplicitNet 
oacInvalidSigTypeForBlockOverrideNet 


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
dtIndex 


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

Return to top of page