oaNet Class Reference

Inheritance diagram for oaNet:

oaBlockObject oaDesignObject oaObject oaBitNet oaBundleNet oaBusNet oaBusNetBit oaScalarNet


Public Methods

void destroy ()
oaBoolean isEmpty () const
oaBoolean isImplicit () const
oaBoolean isGlobal () const
oaUInt4 getNumBits () const
oaBitNetgetBit (oaUInt4 bitIndex) const
void getName (oaName &name) const
void getName (const oaNameSpace &ns, oaString &name) const
oaSigType getSigType () const
oaInt4 getPriority () const
oaSource getSource () const
void setGlobal (oaBoolean isGlobal)
void setSigType (const oaSigType &sigType)
void setPriority (oaInt4 priority)
void setSource (oaSource source)
oaBoolean hasDefaultConstraintGroup () const
oaConstraintGroupgetDefaultConstraintGroup () const
void transfer (oaNet *fromNet)
void merge (oaNet *fromNet)
void scalarize ()
oaOccNetgetOccNet () const
oaCollection< oaGuide, oaNet > getGuides (oaBoolean includeRouteGuides=true) const
oaCollection< oaInstTerm, oaNet > getInstTerms (oaUInt4 filterFlags=oacInstTermIterNotImplicit) const
oaCollection< oaOccNet, oaNet > getOccNets (const oaOccurrence *top) const
oaCollection< oaPin, oaNet > getPins () const
oaCollection< oaRoute, oaNet > getRoutes () const
oaCollection< oaShape, oaNet > getShapes (oaUInt4 filterFlags=oacShapeIterNetRoutes) const
oaCollection< oaBitNet, oaNet > getSingleBitMembers () const
oaCollection< oaSteiner, oaNet > getSteiners () const
oaCollection< oaTerm, oaNet > getTerms (oaUInt4 filterflags=oacTermIterNotImplicit) const
oaCollection< oaVia, oaNet > getVias (oaUInt4 filterFlags=oacViaIterNetRoutes) const
oaMemNetCollection getMemberNets (oaBoolean unique=true) const

Static Public Methods

oaNet * create (oaBlock *block, const oaName &name, oaSigType sigType=oacSignalSigType, oaBoolean isGlobal=false, oaBlockDomainVisibility view=oacInheritFromTopBlock)
oaNet * find (const oaBlock *block, const oaName &name)
oaBoolean isValidName (const oaBlock *block, const oaName &name)

Public Types

enum  { dtIndex = oacNetDataType }

Detailed Description

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

oaNet objects are always in the block domain. Nets span the domains in a design. An oaNet may have one or more equivalent oaModNet's in the module hierarchy and will have an equivalent oaOccNet in the occurrence hierarchy.

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

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 busNets with the same root name are managed by an oaBusNetDef. The busNetDef tracks:

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

Bundle nets can contain scalar nets or buses. When an oaBundleNet is created, the constituent scalarNets and busNets are automatically created in addition to the bundleNet itself.

All automatically created net objects are considered "implicit." Filter flags can be used by net iterators so that implicit nets are not visited when traversing. Implicit nets are more restricted in terms of the operations that are allowed to work with them. Implicit nets can not be explicitly destroyed by the user. Certain attributes can only be set on explicit net objects--for example, parasitic confidence. Implicit nets can become explicit when a caller explicitly creates a net with the same name.

Names are normally associated with nets. 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, 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 are traversed separately or logically as the same net. You can only set single-bit nets equivalent to each other.

You can associate geometric oaConnFig objects with nets: shapes, routes and guides. Nets are required in order to create other connectivity objects such as oaTerm objects.

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


Member Function Documentation

oaNet * oaNet::create oaBlock *    block,
const oaName &    name,
oaSigType    sigType = oacSignalSigType,
oaBoolean    isGlobal = false,
oaBlockDomainVisibility    view = oacInheritFromTopBlock
[static]
 

This function creates a net in the specified design with the specified name. The type of net (oaScalarNet, oaBusNetBit, oaBusNet, or oaBundleNet) created is determined by the specified name. If the specified name is hierarchical, and the hierarchical portion of the path exists, and no oaOccNet with the specified name already exists, the net is created in the occurrence specifed by the path.

Parameters:
block The block 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
view Specifies whether this net is visible in the module domain
Returns:
A pointer to an oaNet
Exceptions:
oacBusNetBaseNameMatchesScalarName 
oacBusNetNameMatchesAutoName 
oacInvalidNetName 
oacNetExists 
oacScalarNetNameMatchesBusBaseName 
oacHierPathDoesNotExist 
oacHierPathCrossDesign 

void oaNet::destroy  
 

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

Exceptions:
oacCannotDestroyImplicitNet 
oacCannotDestroyNetInNonUniqueSpan 
oacCannotDestroyNetOnHiddenTerm 

oaNet * oaNet::find const oaBlock *    block,
const oaName &    name
[static]
 

This function searches the specified block for a net with the specified name. If found, the function returns the net. Otherwise, NULL is returned. The path portion of the name must specify the path to an existing occurrence in the design. A hierarchical name is considered an alias that identifies an oaOccNet in the occurrence domain. If the specified name is hierarchical, the return value is the canonical net in the block domain for the specified alias.

Parameters:
block The block to search
name The net name to match

oaBitNet * oaNet::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 oaNet
Exceptions:
oacInvalidBusNetBitIndex 
oacInvalidNetIndex 

oaConstraintGroup * oaNet::getDefaultConstraintGroup   const
 

This function returns the constraint group for this oaNet. Constraints in this constraint group apply to all of the objects that make up the oaNet such as shapes, routes, pins and terminals. A new group is created if no constraints exist on the net.

oaCollection oaNet::getGuides oaBoolean    includeRouteGuides = true const
 

This function returns a collection of guides associated with this net. An optional boolean parameter 'includeRouteGuides' allows the application to customize the collection of guides by either including or excluding the guides that are part of routes on this net. The default behavior is to return all guides that may be explicitly or implicitly on this net.

Parameters:
includeRouteGuides Allows application to include or exclude the guides that may be part of routes on this net

oaCollection oaNet::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 

oaMemNetCollection oaNet::getMemberNets oaBoolean    unique = true const
 

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

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 oaNet::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 oaNet::getName oaName &    name const
 

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

oaUInt4 oaNet::getNumBits   const
 

This function returns the number of bits in this net.

oaOccNet oaNet::getOccNet   const
 

This function returns the occurrence net that is the reflection of this block net in the context of the top occurrence of the design that contains the net. There may be multiple occurrences of the block net, but only one is selected as the representative occurrence net. The choice will remain consistent until the connectivity of the net (either in the block or the module domains) changes.

oaCollection oaNet::getOccNets const oaOccurrence *    top const
 

This function returns a collection of the occurrences of this net in the occurrence hierarchy with the specified top occurrence.

Parameters:
top The top Occurrence in the hierarchy from which the collection of occurrence nets is to be obtained for this net

oaCollection oaNet::getPins   const
 

This function returns a collection of pins on this net.

oaInt4 oaNet::getPriority   const
 

This function returns the priority value of this net. If a priority has never been set, it will return 0.

oaCollection oaNet::getRoutes   const
 

This function returns a collection of routes in this net.

oaCollection oaNet::getShapes oaUInt4    filterFlags = oacShapeIterNetRoutes const
 

This function returns a collection of shapes on this net. An application can customize the collection of shapes on a net to include shapes (pathSegs) that are part of routes on the same net or shapes that implement pins on all the terminals on that net. The default is to include shapes in routes on the same net. The collection always includes shapes that are explicitly on that net.

The filter flags can be specified as a bit-wise OR combination of the following: oacShapeIterNetOnly, oacShapeIterNetRoutes or oacShapeIterNetPins. oacShapeIterNetOnly is for stand-alone use only when a collection of shapes explicitly on the net is required. It is implied for oacShapeIterNetRoutes and oacShapeIterNetPins which can be used together and return the shapes in routes on this net or shapes implementing pins on this net's terminals. Note that the collection will never include shapes contained within vias associated with the net or the net's routes, and it will never include shapes contained within vias or instances associated with the net’s pins.

Parameters:
filterFlags This value specifies the customization required by an application

oaSigType oaNet::getSigType   const
 

This function returns the signal type of this net.

oaCollection oaNet::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.

oaSource oaNet::getSource   const
 

This function returns the source value of this net.

oaCollection< oaSteiner, oaNet > oaNet::getSteiners   const
 

This function returns a collection of Steiners associated with this net.

oaCollection oaNet::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

oaCollection< oaVia, oaNet > oaNet::getVias oaUInt4    filterFlags = oacViaIterNetRoutes const
 

This function returns a collection of vias associated this net.

Parameters:
filterFlags 
filterFlags Specifies what the collection contains. The bits flags are defined as follows:
  • oacViaIterNetOnly: the collection will only all vias associated with this net
  • oacViaIterNetRoutes: the collection will only contain vias that are associated with routes
  • oacViaIterNetPins: the collection will only contain the vias that are associated with pins

oaBoolean oaNet::hasDefaultConstraintGroup   const
 

This function returns a boolean indicating whether there are constraints associated with this net.

oaBoolean oaNet::isEmpty   const
 

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

oaBoolean oaNet::isGlobal   const
 

This function returns a boolean value that indicates if this net is a global net.

oaBoolean oaNet::isImplicit   const
 

This function returns a boolean value that indicates if this net is implicit, having been automatically created as a result of the creation of a bundleNet or busNet.

oaBoolean oaNet::isValidName const oaBlock *    block,
const oaName &    name
[static]
 

This function returns a boolean value that indicates whether the specified name is valid for a new oaNet in the specified block. False is returned if the name of the net is hierarchical and found in the occurrence domain. False is also returned if the name of the net is hierarchical, but there is no occurrence with the specified path name.

void oaNet::merge oaNet *    fromNet
 

This function merges the specified fromNet into this net. The two nets must have the same number of bits. All of the following objects in the fromNet are transferred to this net: terminals, instTerms, figures, guides, properties, and textDisplays.

Net attributes are merged, with the greater of the net priorities between the two nets retained. If the fromNet is global, this net is made global.

If both nets have properties of the same name, the properties on this net are retained.

If the fromNet is equivalent to other nets, those nets are also made equivalent to this net. If the nets are multi-bit nets, equivalences between scalar members are established for those members that are not implicit. For example, if there are nets "x,y", "a,b", "x", "y", "a", and "b" and "a,b" is merged into "x,y", net "a" is made equivalent to "x" and net "b" is made equivalent to "y."

The fromNet is then destroyed.

Exceptions:
oacCannotMergeToImplicitNet 
oacCannotMergeNetsWithDiffNumBits 
oacMergeNetsNotInSameBlock 
oacCannotEditNetOnHiddenTerm 
oacMergeNetsMustBeInUniqueOccHier 
oacTermMustJoinSameNet 

void oaNet::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 such as shapes and routes.

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 oaNet::setGlobal oaBoolean    isGlobal
 

This function sets the global attribute of this block net. Note that when setting a block net to be global, the net merges into the global net. The object pointer representing that global block net might not be the same as the object pointer of the original non-global block net.

Exceptions:
oacCannotSetGlobalOnImplicitNet 

void oaNet::setPriority oaInt4    priority
 

This function sets the priority value for this net. The specified priority value must be in the range of -128 to 128. The default priority is 0 if no set has been done.

Exceptions:
oacInvalidNetPriority 
oacCannotSetPriorityOnImplicitNet 

void oaNet::setSigType const oaSigType &    sigType
 

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

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

Exceptions:
oacCannotSetSigTypeOnImplicitNet 
oacInvalidSigTypeForBlockOverrideNet 

void oaNet::setSource oaSource    source
 

This function sets the source for this net to the specified value.

Exceptions:
oacCannotSetSourceOnImplicitNet 

void oaNet::transfer oaNet *    fromNet
 

This function transfers objects from the specified fromNet to this net. Shapes, routes, terminals, and instance terminals are moved from the specified net to this net. Properties are copied or merged and textDisplays are updated accordingly.

Exceptions:
oacCannotTransferToImplicitNet 
oacCannotTransferNetWithInstTerm 
oacCannotTransferNetWithTerm 
oacTransferNetsNotInSameBlock 
oacTransferNetsMustBeInUniqueOccHier 


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
dtIndex 


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

Return to top of page