oaBundleNet
模块: oapy._oa._design
导入: from oapy._oa import _design
概览
oaBundleNet 在 oapy 中可用,可通过 _design 模块访问。
本页汇总 oaBundleNet 当前在 oapy 中可用的 Python 接口。
详细说明
This class implements a multi-bit net composed of one or more scalar nets, bus nets, or a combination of both。 When an oaBundleNet is created, all member nets specified as part of the bundle name expression are added to it。 The constituent scalar nets and bus nets are automatically created as implicit nets if they do not already exist。 Refer to oaNet documentation for a general description of implicit nets。 An oaBundleNet object can be viewed as a collection of single bit net members and represents a collection of logical connections。 The index and ordering of each member of a bundle net is indicated by the bundle name representation (refer to oaBundleName documentation for general description)。 For example, a bundle net with the name of '2A,2B[5],2*C[1:0]' in the oaNative namespace consists of 8 single bit members: A A B[5] B[5] C[1] C[0] C[1] and C[0]。 The single bit net 'C[1]' is the 5th member of that bundle net, it is also the 7th member because the busName representation 'C[1:0]' is set to have a repeat value of 2。
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.getNumMembers() |
| ✅ | obj.getRepeat(index) |
| ✅ | obj.getMember(index) |
| ✅ | obj.getName(name) |
| ✅ | obj.getMembers() |
| ✅ | obj.getOccMembers() |
| ✅ | obj.getName(name) |
| ✅ | obj.getName(ns, name) |
| ✅ | _design.oaBundleNet.create(block, name, sigType=oacSignalSigType, isGlobal=false, view=oacInheritFromTopBlock) |
| ✅ | _design.oaBundleNet.find(block, name) |
| ✅ | _design.oaBundleNet.isValidName(block, name) |
方法说明
obj.getNumMembers()
绑定状态: 已绑定
Python 调用: obj.getNumMembers()
This function returns the number of members in this oaBundleNet。 Each member net in an oaBundleNet can repeat。 Example: Assume an oaBundleNet with a oaCdbaNS bundleName of "a,2*b,c<5:0>"。 oaBundleNet::getNumMembers will return 3。
Python 示例
from oapy._oa import _design
# assume obj is a oaBundleNet
obj.getNumMembers()
obj.getRepeat(index)
绑定状态: 已绑定
Python 调用: obj.getRepeat(index)
This function returns the repeat count for the specified member of this oaBundleNet。 For example, for oaBundleNet a,b,c , the repeat count for each member is one。 An oaBundleNet x,100*y[0:1] contains two members, and the repeat count for the second member is 100。 The number of bits for the net is 201。
参数
memIndex: The member number for which to return the repeat count。
返回
- An unsigned value indicating the repeat count for the specified member of the oaBundleNet。
异常
oacInvalidBundleNetMemberIndex。
Python 示例
from oapy._oa import _design
# assume obj is a oaBundleNet
obj.getRepeat(index)
obj.getMember(index)
绑定状态: 已绑定
Python 调用: obj.getMember(index)
This function returns the specified member of this net at the specified bundle member index。
参数
memIndex: The bundle member index of the net to be returned。
返回
- A pointer to an oaNet。
异常
oacInvalidBundleNetMemberIndex。
Python 示例
from oapy._oa import _design
# assume obj is a oaBundleNet
obj.getMember(index)
obj.getName(name)
绑定状态: 已绑定
Python 调用: obj.getName(name)
This function returns the name of this oaBundleNet。
参数
name: The name of the oaBundleNet returned。
Python 示例
from oapy._oa import _design
# assume obj is a oaBundleNet
obj.getName(name)
obj.getMembers()
绑定状态: 已绑定
Python 调用: obj.getMembers()
This function returns a collection of the member nets in this oaBundleNet。
Python 示例
from oapy._oa import _design
# assume obj is a oaBundleNet
obj.getMembers()
obj.getOccMembers()
绑定状态: 已绑定
Python 调用: obj.getOccMembers()
This function returns a collection of occNets in this oaBundleNet。
Python 示例
from oapy._oa import _design
# assume obj is a oaBundleNet
obj.getOccMembers()
obj.getName(name)
绑定状态: 已绑定
Python 调用: obj.getName(name)
Python 示例
from oapy._oa import _design
# assume obj is a oaBundleNet
obj.getName(name)
obj.getName(ns, name)
绑定状态: 已绑定
Python 调用: obj.getName(ns, name)
Python 示例
from oapy._oa import _design
# assume obj is a oaBundleNet
obj.getName(ns, name)
_design.oaBundleNet.create(block, name, sigType=oacSignalSigType, isGlobal=false, view=oacInheritFromTopBlock)
绑定状态: 已绑定
Python 调用: _design.oaBundleNet.create(block, name, sigType=oacSignalSigType, isGlobal=false, view=oacInheritFromTopBlock)
This function creates an oaBundleNet object in the specified block with the specified attributes。 The name specifies the members of the oaBundleNet object and these member nets are automatically created if they do not already exist in the specified block。 If all the members of the specified bundleName are hierarchical, they have the same path, and the path already exists in the occurrence domain, the net is created in the occurrence specified by the path。 An exception is thrown if an oaBundleNet object with the specified name already exists。
参数
block: The block in which to create the oaBundleNet。name: The name of this oaBundleNet。 The members of the BundleNet are derived from the name。sigType: The signal type to associate with this net。isGlobal: Specifies if this is a global net。view: Specifies whether this net is visible in the module domain。
返回
- A pointer to an oaBundleNet。
异常
oacNetExists。oacHierPathDoesNotExist。oacHierPathCrossDesign。oacDiffHierPathOfBundleMembers。
Python 示例
from oapy._oa import _design
_design.oaBundleNet.create(block, name, sigType=oacSignalSigType, isGlobal=false, view=oacInheritFromTopBlock)
_design.oaBundleNet.find(block, name)
绑定状态: 已绑定
Python 调用: _design.oaBundleNet.find(block, name)
This function searches the specified block for an oaBundleNet with the specified name。 If a bundle with the specified name cannot be found directly, and all the members of the name have the same hierarchical path, the canonical net of the bundle reflected in the block domain is returned。 A hierarchical name is considered an alias that identifies an oaOccNetBundle in the occurrence domain。
参数
block: The block to search。name: The name of the oaBundleNet to find。
返回
- A pointer to an oaBundleNet; NULL is returned if not found。
Python 示例
from oapy._oa import _design
_design.oaBundleNet.find(block, name)
_design.oaBundleNet.isValidName(block, name)
绑定状态: 已绑定
Python 调用: _design.oaBundleNet.isValidName(block, name)
This function returns a boolean value that indicates whether the specified name is valid for a new oaBundleNet in the specified block。 The return value is true if all the members specifed by the given bundle name are in the same occurrence, and a bundle net combining those oaOccNets does not already exist。 If the name of any member is hierarchical, and there is no occurrence with that path name, the function returns false。
参数
block: The block in which to check the oaBundleNet name。name: The name of the new oaBundleNet that might be created。
Python 示例
from oapy._oa import _design
_design.oaBundleNet.isValidName(block, name)