首页 / design / oaVectorInst

oaVectorInst

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

概览

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

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

详细说明

The oaVectorInst class implements a vector instance in a block hierarchy。 A vector instance represents several copies of the instance master with a range of index numbers to differentiate them。 oaVectorInst objects are always in the block domain。 They may be physical-only instances that are only in the block hierarchy, or they can be cross-domain instances that directly correspond to an oaModVectorInst in the module domain and an oaOccVectorInst in the occurrence domain。 Note that there are many differences between the structure of VectorInsts and BusNets。 A single VectorInst must have contiguous index numbers。 While there can be multiple VectorInsts with the same base name, they must have no overlapping index numbers。 A gap between the index numbers is allowed。 For example, a block may have instances Ireg<3:0> and Ireg<7:6> (in a namespace that uses <> for bit indexes)。 However, it may not also have Ireg<5:3> since that would create 2 copies of Ireg<3>。

方法总览

状态 Python 调用
obj.getDef()
obj.getStart()
obj.getStop()
obj.getBit(bitIndex)
obj.getName(name)
obj.setBaseName(baseName)
obj.setRange(start, stop)
obj.copy(baseName, xform)
obj.copy(baseName, xform, block)
obj.getName(name)
obj.getName(ns, name)
_design.oaVectorInst.create(block, master, baseName, start, stop, xform, params=NULL, view=oacInheritFromTopBlock, status=oacNonePlacementStatus)
_design.oaVectorInst.create(block, libName, cellName, viewName, baseName, start, stop, xform, params=NULL, view=oacInheritFromTopBlock, status=oacNonePlacementStatus)
_design.oaVectorInst.find(block, baseName, start, stop)
_design.oaVectorInst.isValidName(block, baseName, start, stop)

方法说明

obj.getDef()

绑定状态: 已绑定

Python 调用: obj.getDef()

This function returns the vectorInstDef for this vectorInst。 The vectorInstDef is used to access all vectorInts with the same baseName。

Python 示例

from oapy._oa import _design

# assume obj is a oaVectorInst
obj.getDef()

obj.getStart()

绑定状态: 已绑定

Python 调用: obj.getStart()

This function returns the start index of this vectorInst。

Python 示例

from oapy._oa import _design

# assume obj is a oaVectorInst
obj.getStart()

obj.getStop()

绑定状态: 已绑定

Python 调用: obj.getStop()

This function returns the stop index of this vectorInst。

Python 示例

from oapy._oa import _design

# assume obj is a oaVectorInst
obj.getStop()

obj.getBit(bitIndex)

绑定状态: 已绑定

Python 调用: obj.getBit(bitIndex)

This function returns a pointer to the vectorInstBit that corresponds to the specified bitIndex bit of this vectorInst。 For example, if this is a vectorInst "i[7:0]" and bitIndex is zero, this function will return the vectorInstBit corresponding to "i[7]"。

参数

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

返回

  • A pointer to an oaVectorInstBit。

异常

  • oacInvalidBitIndexIntoInst

Python 示例

from oapy._oa import _design

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

obj.getName(name)

绑定状态: 已绑定

Python 调用: obj.getName(name)

This function returns the vectorName of this vectorInst。

参数

  • name: The vectorName of the vectorInst to return。

Python 示例

from oapy._oa import _design

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

obj.setBaseName(baseName)

绑定状态: 已绑定

Python 调用: obj.setBaseName(baseName)

This function changes the base name of this vectorInst。 Exceptions are thrown if the new name is the name of an existing scalar, an arrayInst, or if another vectorInst exists whose indices overlap with this vectorInst, or if the given baseName matches the form of the system-generated scalarInst name。

参数

  • baseName: The new base name to give this instance。

异常

  • oacCannotSetNameOfImplicitInst

Python 示例

from oapy._oa import _design

# assume obj is a oaVectorInst
obj.setBaseName(baseName)

obj.setRange(start, stop)

绑定状态: 已绑定

Python 调用: obj.setRange(start, stop)

This function sets the start and stop bit indices of this vectorInst。

参数

  • start: The new start value to give this instance。
  • stop: The new stop value to give this instance。

异常

  • oacInstNameOverlapsOtherInst
  • oacCannotSetNameOfImplicitInst
  • oacInvalidBusStartStopRange

Python 示例

from oapy._oa import _design

# assume obj is a oaVectorInst
obj.setRange(start, stop)

obj.copy(baseName, xform)

绑定状态: 已绑定

Python 调用: obj.copy(baseName, xform)

This function creates a copy of this instance。 The baseName of the copied instance is specified in baseName。 Note that that the start, stop and step parameters are the same as the original instance。 The new copied instance is copied to the location based on the specified transform。 This function creates a copy of the instance in the specified block which may be in a different design。

参数

  • baseName: The baseName for the new instance。
  • xform: The transform for the new instance。
  • block: The oaBlock for the new instance。

Python 示例

from oapy._oa import _design

# assume obj is a oaVectorInst
obj.copy(baseName, xform)

obj.copy(baseName, xform, block)

绑定状态: 已绑定

Python 调用: obj.copy(baseName, xform, block)

This function creates a copy of this instance。 The baseName of the copied instance is specified in baseName。 Note that that the start, stop and step parameters are the same as the original instance。 The new copied instance is copied to the location based on the specified transform。 This function creates a copy of the instance within the same block。

参数

  • baseName: The baseName for the new instance。
  • xform: The transform for the new instance。

Python 示例

from oapy._oa import _design

# assume obj is a oaVectorInst
obj.copy(baseName, xform, block)

obj.getName(name)

绑定状态: 已绑定

Python 调用: obj.getName(name)

Python 示例

from oapy._oa import _design

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

obj.getName(ns, name)

绑定状态: 已绑定

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

Python 示例

from oapy._oa import _design

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

_design.oaVectorInst.create(block, master, baseName, start, stop, xform, params=NULL, view=oacInheritFromTopBlock, status=oacNonePlacementStatus)

绑定状态: 已绑定

Python 调用: _design.oaVectorInst.create(block, master, baseName, start, stop, xform, params=NULL, view=oacInheritFromTopBlock, status=oacNonePlacementStatus)

This function creates an oaVectorInst object with the specified attributes。 The specified baseName, start, and stop indices are first checked to verify they are legal and do not specify an instance that already exists。 This form of the create specifies its library, cell, and view names so the master does not need to be open to create instances。 You can also specify an optional paramArray that will apply if the master is a pCell。 Exceptions are thrown if the new name is the name of an existing scalarInst or an arrayInst, or if another vectorInst exists whose indices overlap with this vectorInst, or if the given baseName matches the form of the system-generated scalarInst name。

异常

  • oacParamsSuppliedForNonPCellInstMaster

Python 示例

from oapy._oa import _design

_design.oaVectorInst.create(block, master, baseName, start, stop, xform, params=NULL, view=oacInheritFromTopBlock, status=oacNonePlacementStatus)

_design.oaVectorInst.create(block, libName, cellName, viewName, baseName, start, stop, xform, params=NULL, view=oacInheritFromTopBlock, status=oacNonePlacementStatus)

绑定状态: 已绑定

Python 调用: _design.oaVectorInst.create(block, libName, cellName, viewName, baseName, start, stop, xform, params=NULL, view=oacInheritFromTopBlock, status=oacNonePlacementStatus)

This function creates an oaVectorInst object with the specified attributes。 The specified baseName, start, and stop indices are first checked to verify they are legal and do not specify an instance that already exists。 This form of the create specifies the master design so the master needs to be open to use it。 You can also specify an optional paramArray if the master is a pCell。 Exceptions are thrown if the new name is the name of an existing scalar, an arrayInst, or if another vectorInst exists whose indices overlap with this vectorInst, or if the given baseName matches the form of the system generated scalarInst name。

异常

  • oacInvalidSuperMaster
  • oacParamsSuppliedForNonPCellInstMaster

Python 示例

from oapy._oa import _design

_design.oaVectorInst.create(block, libName, cellName, viewName, baseName, start, stop, xform, params=NULL, view=oacInheritFromTopBlock, status=oacNonePlacementStatus)

_design.oaVectorInst.find(block, baseName, start, stop)

绑定状态: 已绑定

Python 调用: _design.oaVectorInst.find(block, baseName, start, stop)

This function searches the specified block for a vectorInst with the specified name and start or stop bits。 The function returns the instance if it finds one。 Otherwise, NULL is returned。

Python 示例

from oapy._oa import _design

_design.oaVectorInst.find(block, baseName, start, stop)

_design.oaVectorInst.isValidName(block, baseName, start, stop)

绑定状态: 已绑定

Python 调用: _design.oaVectorInst.isValidName(block, baseName, start, stop)

This function returns a boolean value that indicates if the specified baseName, combined with the start and stop values, is a valid new oaVectorInst in the specified design。

Python 示例

from oapy._oa import _design

_design.oaVectorInst.isValidName(block, baseName, start, stop)