oaVectorBitName
模块: oapy._oa._base
导入: from oapy._oa import _base
概览
oaVectorBitName 在 oapy 中可用,可通过 _base 模块访问。
本页汇总 oaVectorBitName 当前在 oapy 中可用的 Python 接口。
详细说明
The oaVectorBitName utility class represents the name for an object that has a base name and a single index number。 This will be the name of an object that is a single bit of a vector。 The name can be hierarchical。 In conjunction with oaNameSpace objects, this class facilitates mapping names from one nameSpace to another。 See the Name Mapping Section of the Programmers Guide for more information about mapping names between different namespaces。 A vector bit name has a base name and an index。 An example of an oaVectorBitName in the Verilog namespace is test[3] , where the base name is test and the index is 3 。
构造函数
_base.oaVectorBitName()
obj = _base.oaVectorBitName()
_base.oaVectorBitName(nSpace, in)
obj = _base.oaVectorBitName(nSpace, in)
_base.oaVectorBitName(nSpace, in, index)
obj = _base.oaVectorBitName(nSpace, in, index)
_base.oaVectorBitName(in, index)
obj = _base.oaVectorBitName(in, index)
_base.oaVectorBitName(name)
obj = _base.oaVectorBitName(name)
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.init(nSpace, in, baseOnly=false) |
| ✅ | obj.get(nSpace, out) |
| ✅ | obj.get(out) |
| ✅ | obj.getBaseName(nSpace, out) |
| ✅ | obj.getBaseName(out) |
| ✅ | obj.getBaseName(out) |
| ✅ | obj.getIndex() |
| ✅ | obj.getNumBits() |
| ✅ | obj.setIndex(val) |
| ✅ | obj.operator=(name) |
| ✅ | obj.operator==(name) |
| ✅ | obj.operator!=(name) |
方法说明
obj.init(nSpace, in, baseOnly=false)
绑定状态: 已绑定
Python 调用: obj.init(nSpace, in, baseOnly=false)
This function allows reuse of the oaVectorBitName object in order to improve application performance and capacity。 This function initializes the name by clearing any previously stored name data, then re-initializing its value to the string specified by in, evaluating the string in the specified namespace。 The optional boolean argument baseOnly indicates if the input name is interpreted as the base portion of the vectorbit name or as the entire name -- for example, with nSpace set to the oaVerilog namespace, baseOnly equal to true, and in specified as "abc[3]"。
参数
nSpace: The oaNameSpace in which to evaluate the string。in: The input string, which may specify the base name only (if baseOnly is true) or the entire name (if baseOnly is false)。baseOnly: A boolean value that indicates if the input string is an entire vectorbit name or only the base portion。
异常
oacInvalidNameLength。oacInvalidNameSyntax。
Python 示例
from oapy._oa import _base
# assume obj is a oaVectorBitName
obj.init(nSpace, in, baseOnly=false)
obj.get(nSpace, out)
绑定状态: 已绑定
Python 调用: obj.get(nSpace, out)
This function returns this name mapped into the oaNative nameSpace。
参数
out: The string in which to output the mapped name。
Python 示例
from oapy._oa import _base
# assume obj is a oaVectorBitName
obj.get(nSpace, out)
obj.get(out)
绑定状态: 已绑定
Python 调用: obj.get(out)
This function returns this name mapped into the specified nameSpace。
参数
nSpace: The nameSpace in which to map this name。out: The string in which to output the mapped name。
Python 示例
from oapy._oa import _base
# assume obj is a oaVectorBitName
obj.get(out)
obj.getBaseName(nSpace, out)
绑定状态: 已绑定
Python 调用: obj.getBaseName(nSpace, out)
This function returns the base value of this name。
参数
out: The oaScalarName in which to output the base value of this name。
Python 示例
from oapy._oa import _base
# assume obj is a oaVectorBitName
obj.getBaseName(nSpace, out)
obj.getBaseName(out)
绑定状态: 已绑定
Python 调用: obj.getBaseName(out)
This function returns the base value of this name mapped into the oaNative nameSpace。
参数
out: The string in which to output the base value of this name。
Python 示例
from oapy._oa import _base
# assume obj is a oaVectorBitName
obj.getBaseName(out)
obj.getBaseName(out)
绑定状态: 已绑定
Python 调用: obj.getBaseName(out)
This function returns the base value of this name mapped into the specified nameSpace。
参数
nSpace: The nameSpace in which to map the base value of this name。out: The string in which to output the mapped name。
Python 示例
from oapy._oa import _base
# assume obj is a oaVectorBitName
obj.getBaseName(out)
obj.getIndex()
绑定状态: 已绑定
Python 调用: obj.getIndex()
This function returns the bit index of this vectorbit name。
Python 示例
from oapy._oa import _base
# assume obj is a oaVectorBitName
obj.getIndex()
obj.getNumBits()
绑定状态: 已绑定
Python 调用: obj.getNumBits()
This function returns the number of bits this name represents。
Python 示例
from oapy._oa import _base
# assume obj is a oaVectorBitName
obj.getNumBits()
obj.setIndex(val)
绑定状态: 已绑定
Python 调用: obj.setIndex(val)
This function sets the bit value for this oaVectorBitName to the specified value。
Python 示例
from oapy._oa import _base
# assume obj is a oaVectorBitName
obj.setIndex(val)
obj.operator=(name)
绑定状态: 已绑定
Python 调用: obj.operator=(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaVectorBitName
obj.operator=(name)
obj.operator==(name)
绑定状态: 已绑定
Python 调用: obj.operator==(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaVectorBitName
obj.operator==(name)
obj.operator!=(name)
绑定状态: 已绑定
Python 调用: obj.operator!=(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaVectorBitName
obj.operator!=(name)