首页 / design / oaModBusTermDef

oaModBusTermDef

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

概览

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

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

详细说明

The oaModBusTermDef class defines an object that manages all oaModBusTerms with the same base name in the module domain。 An oaModBusTermDef also tracks the least significant and most significant bits of all of its oaModBusTerms, as well as all of the corresponding oaModBusTermBits。 A bus definition can be 'sparse' (have missing bits)。 Busses do not have to start or end at zero。 For example, a<22:25> is a legal bus name。 Bus indexes must be non-negative。 An oaModBusTermDef is automatically created if necessary whenever applications create oaModBusTerms。 Implicitly created oaModBusTermDefs have no bitOrder。 Applications may explicitly create an oaModBusTermDef in order to specify that it has a specific bitOrder。 The bit order of an explicit oaModBusTermDef is independent of the order within individual oaModBusTerms 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 oaModBusTerms。 Implicitly created busTerm definitions are automatically destroyed when the last busTerm with the same base name is destroyed。 Explicitly created busTerm definitions must be explicitly destroyed。 oaModBusTermDef, oaOccBusTermDef , and oaBusTermDef each manage the bus terminals on a different kind of master, where in each case the master represents a level of hierarchy in the design。 For oaModBusTermDef, the master is an oaModule , and each module in a design will have a set of zero or more modBusTermDefs。 For oaOccBusTerm , the master is an oaOccurrence 。 For oaBusTermDef , the master is an oaBlock , and the top block for the design will have a set of zero or more modBusTermDefs。 Typically, many of the oaBusTermDefs on the top oaBlock have a corresponding oaModBusTermDef on the top oaModule 。 All of the oaBusTerms on the top oaBlock have a corresponding oaOccBusTerm on the top oaOccurrence 。 OpenAccess requires a consistent definition of bus terminals shared between the top module and the top block in a design。 When an oaBusTerm has been created that is not visible in the module domain, it is not possible to create an oaModBusTerm that uses the same base name。

方法总览

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

方法说明

obj.destroy()

绑定状态: 已绑定

Python 调用: obj.destroy()

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

异常

  • oacCannotDestroyImplicitBusTermDef
  • oacCannotDestroyBusTermDefWithTerms

Python 示例

from oapy._oa import _design

# assume obj is a oaModBusTermDef
obj.destroy()

obj.getMinIndex()

绑定状态: 已绑定

Python 调用: obj.getMinIndex()

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

Python 示例

from oapy._oa import _design

# assume obj is a oaModBusTermDef
obj.getMinIndex()

obj.getMaxIndex()

绑定状态: 已绑定

Python 调用: obj.getMaxIndex()

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

Python 示例

from oapy._oa import _design

# assume obj is a oaModBusTermDef
obj.getMaxIndex()

obj.getNumBits()

绑定状态: 已绑定

Python 调用: obj.getNumBits()

This function returns the number of bits covered by the busses in this oaModBusTermDef。 The number of bits is equal to abs(maxIndex - minIndex) + 1; it is not necessarily the number of busTermBits present in this busTermDef。 To get the number of busTermBits in this busTermDef, use oaModBusTermDef::getBusTermBits() .getCount() 。

Python 示例

from oapy._oa import _design

# assume obj is a oaModBusTermDef
obj.getNumBits()

obj.getName(name)

绑定状态: 已绑定

Python 调用: obj.getName(name)

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

参数

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

Python 示例

from oapy._oa import _design

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

obj.getName(ns, name)

绑定状态: 已绑定

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

This function returns the name of this oaModBusTermDef object。

参数

  • name: The scalar name in which to return the name of this oaModBusTermDef。

Python 示例

from oapy._oa import _design

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

obj.getBitOrder()

绑定状态: 已绑定

Python 调用: obj.getBitOrder()

This function returns the bitOrder associated with this oaModBusTermDef object。

Python 示例

from oapy._oa import _design

# assume obj is a oaModBusTermDef
obj.getBitOrder()

obj.isImplicit()

绑定状态: 已绑定

Python 调用: obj.isImplicit()

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

Python 示例

from oapy._oa import _design

# assume obj is a oaModBusTermDef
obj.isImplicit()

obj.setBitOrder(order)

绑定状态: 已绑定

Python 调用: obj.setBitOrder(order)

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

参数

  • order: The new bitOrder value for this busTermDef。

异常

  • oacBitOrderBusTermDefImplicit

Python 示例

from oapy._oa import _design

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

obj.getBusTerms()

绑定状态: 已绑定

Python 调用: obj.getBusTerms()

This function returns a collection of busTerms in this busTermDef。

Python 示例

from oapy._oa import _design

# assume obj is a oaModBusTermDef
obj.getBusTerms()

obj.getBusTermBits()

绑定状态: 已绑定

Python 调用: obj.getBusTermBits()

This function returns a collection of busTermBits in this busTermDef。

Python 示例

from oapy._oa import _design

# assume obj is a oaModBusTermDef
obj.getBusTermBits()

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

绑定状态: 已绑定

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

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

参数

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

异常

  • oacBusTermDefAlreadyExists

Python 示例

from oapy._oa import _design

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

_design.oaModBusTermDef.find(module, name)

绑定状态: 已绑定

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

This function searches the specified design for a busTermDef with the specified name。 The busTermDef is returned if found。 Otherwise, NULL is returned。

Python 示例

from oapy._oa import _design

_design.oaModBusTermDef.find(module, name)