首页 / design / oaModNet

oaModNet

模块: oapy._oa._design 导入: from oapy._oa import _design

概览

oaModNetoapy 中可用,可通过 _design 模块访问。

本页汇总 oaModNet 当前在 oapy 中可用的 Python 接口。

详细说明

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: lowest numbered bit of all of the associated busNets highest numbered bit of all of the associated busNets busNets with the same base name associated busNetBits 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 。 For information on creating global nets in the module domain, see Creating Global Nets in the Module Domain 。

方法总览

状态 Python 调用
obj.destroy()
obj.isEmpty()
obj.isImplicit()
obj.isGlobal()
obj.getSigType()
obj.getNumBits()
obj.getName(name)
obj.getName(ns, name)
obj.getBit(bitIndex)
obj.setGlobal(isGlobal)
obj.setSigType(sigType)
obj.scalarize()
obj.getInstTerms(filterFlags=oacInstTermIterNotImplicit)
obj.getMemberNets(unique=true)
obj.getOccNets(occ)
obj.getSingleBitMembers()
obj.getTerms(filterFlags=oacTermIterNotImplicit)
_design.oaModNet.create(module, name, type=oacSignalSigType, isGlobal=false)
_design.oaModNet.find(module, name)
_design.oaModNet.isValidName(module, name)

方法说明

obj.destroy()

绑定状态: 已绑定

Python 调用: obj.destroy()

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

异常

  • oacCannotDestroyImplicitNet
  • oacCannotDestroyNetOnHiddenTerm

Python 示例

from oapy._oa import _design

# assume obj is a oaModNet
obj.destroy()

obj.isEmpty()

绑定状态: 已绑定

Python 调用: obj.isEmpty()

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

Python 示例

from oapy._oa import _design

# assume obj is a oaModNet
obj.isEmpty()

obj.isImplicit()

绑定状态: 已绑定

Python 调用: obj.isImplicit()

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。

Python 示例

from oapy._oa import _design

# assume obj is a oaModNet
obj.isImplicit()

obj.isGlobal()

绑定状态: 已绑定

Python 调用: obj.isGlobal()

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。

Python 示例

from oapy._oa import _design

# assume obj is a oaModNet
obj.isGlobal()

obj.getSigType()

绑定状态: 已绑定

Python 调用: obj.getSigType()

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

Python 示例

from oapy._oa import _design

# assume obj is a oaModNet
obj.getSigType()

obj.getNumBits()

绑定状态: 已绑定

Python 调用: obj.getNumBits()

This function returns the number of bits in this net。

Python 示例

from oapy._oa import _design

# assume obj is a oaModNet
obj.getNumBits()

obj.getName(name)

绑定状态: 已绑定

Python 调用: obj.getName(name)

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

Python 示例

from oapy._oa import _design

# assume obj is a oaModNet
obj.getName(name)

obj.getName(ns, name)

绑定状态: 已绑定

Python 调用: obj.getName(ns, name)

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

Python 示例

from oapy._oa import _design

# assume obj is a oaModNet
obj.getName(ns, name)

obj.getBit(bitIndex)

绑定状态: 已绑定

Python 调用: obj.getBit(bitIndex)

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。

参数

  • bitIndex: Specifies which bit of the net to return。

返回

  • A pointer to an oaModNet。

异常

  • oacInvalidBusNetBitIndex
  • oacInvalidNetIndex

Python 示例

from oapy._oa import _design

# assume obj is a oaModNet
obj.getBit(bitIndex)

obj.setGlobal(isGlobal)

绑定状态: 已绑定

Python 调用: obj.setGlobal(isGlobal)

This function sets the global attribute of this net。

异常

  • oacCannotSetGlobalOnImplicitNet
  • oacCannotUnsetGlobalStateOfNetInTopModule

Python 示例

from oapy._oa import _design

# assume obj is a oaModNet
obj.setGlobal(isGlobal)

obj.setSigType(sigType)

绑定状态: 已绑定

Python 调用: obj.setSigType(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。

异常

  • oacCannotSetSigTypeOnImplicitNet
  • oacInvalidSigTypeForBlockOverrideNet

Python 示例

from oapy._oa import _design

# assume obj is a oaModNet
obj.setSigType(sigType)

obj.scalarize()

绑定状态: 已绑定

Python 调用: obj.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。

异常

  • oacCannotScalarizeImplicitNet

Python 示例

from oapy._oa import _design

# assume obj is a oaModNet
obj.scalarize()

obj.getInstTerms(filterFlags=oacInstTermIterNotImplicit)

绑定状态: 已绑定

Python 调用: obj.getInstTerms(filterFlags=oacInstTermIterNotImplicit)

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。

参数

  • 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。

异常

  • oacInstTermIterFlagNotApplicableOnNets

Python 示例

from oapy._oa import _design

# assume obj is a oaModNet
obj.getInstTerms(filterFlags=oacInstTermIterNotImplicit)

obj.getMemberNets(unique=true)

绑定状态: 已绑定

Python 调用: obj.getMemberNets(unique=true)

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。

参数

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

Python 示例

from oapy._oa import _design

# assume obj is a oaModNet
obj.getMemberNets(unique=true)

obj.getOccNets(occ)

绑定状态: 已绑定

Python 调用: obj.getOccNets(occ)

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。

异常

  • oacInvalidTopOccurrence

Python 示例

from oapy._oa import _design

# assume obj is a oaModNet
obj.getOccNets(occ)

obj.getSingleBitMembers()

绑定状态: 已绑定

Python 调用: obj.getSingleBitMembers()

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。

Python 示例

from oapy._oa import _design

# assume obj is a oaModNet
obj.getSingleBitMembers()

obj.getTerms(filterFlags=oacTermIterNotImplicit)

绑定状态: 已绑定

Python 调用: obj.getTerms(filterFlags=oacTermIterNotImplicit)

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。

参数

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

Python 示例

from oapy._oa import _design

# assume obj is a oaModNet
obj.getTerms(filterFlags=oacTermIterNotImplicit)

_design.oaModNet.create(module, name, type=oacSignalSigType, isGlobal=false)

绑定状态: 已绑定

Python 调用: _design.oaModNet.create(module, name, type=oacSignalSigType, isGlobal=false)

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。

参数

  • 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。

返回

  • A pointer to an oaModNet。

异常

  • oacBusNetBaseNameMatchesScalarName
  • oacBusNetNameMatchesAutoName
  • oacInvalidNetName
  • oacNetExists
  • oacScalarNetNameMatchesBusBaseName

Python 示例

from oapy._oa import _design

_design.oaModNet.create(module, name, type=oacSignalSigType, isGlobal=false)

_design.oaModNet.find(module, name)

绑定状态: 已绑定

Python 调用: _design.oaModNet.find(module, name)

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。

异常

  • oacInvalidHierBundleNetName

Python 示例

from oapy._oa import _design

_design.oaModNet.find(module, name)

_design.oaModNet.isValidName(module, name)

绑定状态: 已绑定

Python 调用: _design.oaModNet.isValidName(module, name)

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

Python 示例

from oapy._oa import _design

_design.oaModNet.isValidName(module, name)