首页 / design / oaModVectorInstDef

oaModVectorInstDef

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

概览

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

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

详细说明

The oaModVectorInstDef class implements the definition of a module vectorInst, including its base name and bit-range。 All vectorInsts in a module with the same base name are managed by the same vectorInst definition。 The oaModvectorInstDef class tracks the minimum and maximum indices referred to by all of its corresponding vectorInst objects。 A vectorInstDef can be 'sparse' (have missing bits)。 Vectors do not have to start or end at zero。 For example, a[22:25] is a legal vectorInst name。 Vector indexes must be non-negative。 An vectorInstDef is automatically created if necessary whenever applications create vectorInsts。 Implicitly created vectorInst definitions have no bitOrder。 Applications may explicitly create a vectorInst definition in order to specify that it has a specific bitOrder。 The bit order of an explicit oaModVectorInstDef is independent of the order within individual oaModVectorInsts with the same base name。 Verilog requires a single wire declaration for a given base name, and the range of that declaration covers all of the bit indices used by the sub-ranges that correspond to oaModVectorInsts。 Implicitly created vectorInst definitions are automatically destroyed when the last vectorInst with the same base name is destroyed。 Explicitly created vectorInst definitions must be explicitly destroyed。 The oaModVectorInstDef class can be observed by deriving from oaObserver

方法总览

状态 Python 调用
obj.destroy()
obj.getMinIndex()
obj.getMaxIndex()
obj.getNumBits()
obj.getName(name)
obj.getName(ns, name)
obj.getBitOrder()
obj.isImplicit()
obj.setBitOrder(order)
obj.getVectorInsts()
obj.getVectorInstBits()
_design.oaModVectorInstDef.create(module, name, order)
_design.oaModVectorInstDef.find(module, name)

方法说明

obj.destroy()

绑定状态: 已绑定

Python 调用: obj.destroy()

This function destroys this oaModVectorInstDef, removing it from the database。 An exception is thrown if the oaModVectorInstDef is implicit or if there are still oaModVectorInsts associated with it。

异常

  • oacCannotDestroyImplicitVectorInstDef
  • oacCannotDestroyVectorInstDefWithInsts

Python 示例

from oapy._oa import _design

# assume obj is a oaModVectorInstDef
obj.destroy()

obj.getMinIndex()

绑定状态: 已绑定

Python 调用: obj.getMinIndex()

This function returns the smallest bit number in use for this oaModVectorInstDef object。 This is the smallest index used across all vectorInsts associated with this oaModVectorInstDef object。

Python 示例

from oapy._oa import _design

# assume obj is a oaModVectorInstDef
obj.getMinIndex()

obj.getMaxIndex()

绑定状态: 已绑定

Python 调用: obj.getMaxIndex()

This function returns the largest bit number in use for this oaModVectorInstDef object。 This is the largest index used across all vectorInsts associated with this oaModVectorInstDef object。

Python 示例

from oapy._oa import _design

# assume obj is a oaModVectorInstDef
obj.getMaxIndex()

obj.getNumBits()

绑定状态: 已绑定

Python 调用: obj.getNumBits()

This function returns the number of bits covered by the vectorInsts in this oaModVectorInstDef。 The number of bits is equal to abs(maxIndex - minIndex) + 1。

Python 示例

from oapy._oa import _design

# assume obj is a oaModVectorInstDef
obj.getNumBits()

obj.getName(name)

绑定状态: 已绑定

Python 调用: obj.getName(name)

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

参数

  • ns: The nameSpace to use when getting the name string。
  • name: Returns the string name of this oaModVectorInstDef。

Python 示例

from oapy._oa import _design

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

obj.getName(ns, name)

绑定状态: 已绑定

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

This function returns the name of this oaModVectorInstDef object。

参数

  • name: The scalar name in which to return the oaModVectorInstDef object name。

Python 示例

from oapy._oa import _design

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

obj.getBitOrder()

绑定状态: 已绑定

Python 调用: obj.getBitOrder()

This function returns the bitOrder associated with this oaModVectorInstDef object。

Python 示例

from oapy._oa import _design

# assume obj is a oaModVectorInstDef
obj.getBitOrder()

obj.isImplicit()

绑定状态: 已绑定

Python 调用: obj.isImplicit()

This function returns a boolean indicating whether this oaModVectorInstDef was implicitly created or not。

Python 示例

from oapy._oa import _design

# assume obj is a oaModVectorInstDef
obj.isImplicit()

obj.setBitOrder(order)

绑定状态: 已绑定

Python 调用: obj.setBitOrder(order)

This function changes the bitOrder value associated with the oaModVectorInstDef。 An exception is thrown if this vectorInstDef was implicitly created。

参数

  • order: The new bitOrder value for this vectorInstDef。

异常

  • oacBitOrderVectorInstDefImplicit

Python 示例

from oapy._oa import _design

# assume obj is a oaModVectorInstDef
obj.setBitOrder(order)

obj.getVectorInsts()

绑定状态: 已绑定

Python 调用: obj.getVectorInsts()

This function returns a collection of oaModVectorInst and oaModModuleVectorInst objects associated with this oaModVectorInstDef object。

Python 示例

from oapy._oa import _design

# assume obj is a oaModVectorInstDef
obj.getVectorInsts()

obj.getVectorInstBits()

绑定状态: 已绑定

Python 调用: obj.getVectorInstBits()

This function returns a collection of oaModVectorInstBit and oaModModuleVectorInstBit objects associated with this oaModVectorInstDef object。

Python 示例

from oapy._oa import _design

# assume obj is a oaModVectorInstDef
obj.getVectorInstBits()

_design.oaModVectorInstDef.create(module, name, order)

绑定状态: 已绑定

Python 调用: _design.oaModVectorInstDef.create(module, name, order)

This function creates an oaModVectorInstDef in the specified module with the given base name and bit order。 An exception is thrown if an oaModVectorInstDef already exists with the specified name。 Explicitly creating an oaModVectorInstDef also means that the vectorInst definition must be explicitly destroyed。

参数

  • module: The module to create the oaModVectorInstDef object in。
  • name: The base name for the oaModVectorInstDef。
  • order: The bit order for the oaModVectorInstDef。

异常

  • oacVectorInstDefAlreadyExists

Python 示例

from oapy._oa import _design

_design.oaModVectorInstDef.create(module, name, order)

_design.oaModVectorInstDef.find(module, name)

绑定状态: 已绑定

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

This function searches the specified module for a vectorInstDef with the specified name。 The function returns the vectorInstDef if it finds it。 Otherwise, NULL is returned。

Python 示例

from oapy._oa import _design

_design.oaModVectorInstDef.find(module, name)