oaTerm
模块: oapy._oa._design
导入: from oapy._oa import _design
概览
oaTerm 在 oapy 中可用,可通过 _design 模块访问。
本页汇总 oaTerm 当前在 oapy 中可用的 Python 接口。
详细说明
The oaTerm class is an abstract base class for all scalar and multi-bit terminals。 Terminals represent the logical connection points for a block。 The pins associated with terminals represent the physical connection points。 The nets associated with the terminals are logically exported through the terminals to the next higher level in a design hierarchy。 All terminals are required to have a net even if there is nothing else attached to that net。 Multi-bit terminals represent a group of logical connections to import or export from the block。 The terminals can consist of busTerms having a single root name with an index range, or they can include bundleTerms that are a more complex grouping of terminals。 Multi-bit terminals can have overlapping names。 For example, you can have the busTerms "addr<7:0>" and "addr<3:0>" as long as the overlapping bits are connected to the same nets。 All busTerms with the same root name are managed by a busTermDef。 The busTermDef tracks the least significant and most significant bits of all the associated busTerms, all of the busTerms with the same base name, and all of the associated busTermBits。 BusTermBits are automatically created for each bit of a busTerm, if they do not already exist。 BusTermBits are available for those applications performing scalarized connectivity traversal of the data。 BundleTerms can contain scalarTerms and busTerms。 When a bundleTerm is created, the constituent scalarTerms and busTermBits are automatically created in addition to the bundleTerm itself。 All automatically created terminal objects are considered implicit。 Names are associated with terminals。 The various terminal objects take and return names through the general oaName object but also use the oaScalarName , oaVectorBitName , oaVectorName , and oaBundleName objects。 These name objects manage the mapping of names from one nameSpace to another。 For example, you can create a terminal using a name in the CDBA nameSpace。 Another application can retrieve the terminal name in the Verilog nameSpace directly from the database。 oaTerm objects are always in the block domain。 oaTerms may be physical-only terminals that are only in the block hierarchy, or they can be cross-domain terminals that directly correspond to an oaModTerm in the module domain and an oaOccTerm in the occurrence domain。 The oaTerm class can be observed by deriving from oaObserver
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.destroy() |
| ✅ | obj.isImplicit() |
| ✅ | obj.isInterface() |
| ✅ | obj.getNet(preferred=false) |
| ✅ | obj.getBit(bitIndex) |
| ✅ | obj.getNumBits() |
| ✅ | obj.getTermType() |
| ✅ | obj.getPosition() |
| ✅ | obj.getName(name) |
| ✅ | obj.getName(ns, name) |
| ✅ | obj.moveToNet(net) |
| ✅ | obj.setTermType(termType) |
| ✅ | obj.setIsInterface(isInterface) |
| ✅ | obj.setPosition(position) |
| ✅ | obj.unsetPosition() |
| ✅ | obj.scalarize() |
| ✅ | obj.getOccTerm() |
| ✅ | obj.getPins() |
| ✅ | obj.getConnRoutes() |
| ✅ | obj.getOccTerms(top) |
| ✅ | _design.oaTerm.create(net, name, termType=oacInputOutputTermType, view=oacInheritFromTopBlock) |
| ✅ | _design.oaTerm.find(block, name) |
| ✅ | _design.oaTerm.find(block, position) |
| ✅ | _design.oaTerm.isValidName(net, name) |
| ✅ | _design.oaTerm.getMaxPosition(block) |
方法说明
obj.destroy()
绑定状态: 已绑定
Python 调用: obj.destroy()
This function destroys this terminal, removing it from the database。 Calling this function on a term that is not explicit throws an exception。
异常
oacCannotDestroyImplicitTerm。
Python 示例
from oapy._oa import _design
# assume obj is a oaTerm
obj.destroy()
obj.isImplicit()
绑定状态: 已绑定
Python 调用: obj.isImplicit()
This function returns a boolean value that indicates if this terminal is implicit。 An implicit terminal is automatically created by the database as part of the explicit creation of a multi-bit terminal。
Python 示例
from oapy._oa import _design
# assume obj is a oaTerm
obj.isImplicit()
obj.isInterface()
绑定状态: 已绑定
Python 调用: obj.isInterface()
This function returns a boolean indicating whether this terminal is an interface terminal。 An interface terminal is one that was explicitly created by an application calling one of the create functions on the objects derived from oaTerm。 Explicitly created terminals define the interface to the block that contains them。 Note that an interface terminal that is scalarized is still considered an interface terminal。 Implementation data may be added to the resulting bitTerms after scalarization, but the interface terminal remains as a reference to how the interface was originally defined。 Further edits to the block may delete the interface terminal, indicating that the interface to the block has indeed changed。
Python 示例
from oapy._oa import _design
# assume obj is a oaTerm
obj.isInterface()
obj.getNet(preferred=false)
绑定状态: 已绑定
Python 调用: obj.getNet(preferred=false)
This function returns the net to which this terminal is attached。 If preferred is true, the preferred equivalent net associated with the net will be returned instead。
参数
preferred: indicates whether to return the preferred equivalent。
返回
- A pointer to an oaNet。
Python 示例
from oapy._oa import _design
# assume obj is a oaTerm
obj.getNet(preferred=false)
obj.getBit(bitIndex)
绑定状态: 已绑定
Python 调用: obj.getBit(bitIndex)
This function returns a pointer to the terminal that corresponds to the specified bitIndex bit of this terminal。 For single-bit terminals, this function returns this terminal。 For multi-bit terminals, a busTermBit is returned if this terminal is a busTerm, or a single-bit terminal is returned if this terminal is a bundleTerm。 This function returns a pointer to the oaOccBitTerm that corresponds to the domain in which the multibit occTerm has a reflection。
异常
oacInvalidTermIndex。
Python 示例
from oapy._oa import _design
# assume obj is a oaTerm
obj.getBit(bitIndex)
obj.getNumBits()
绑定状态: 已绑定
Python 调用: obj.getNumBits()
This function returns the number of bits in this terminal。
Python 示例
from oapy._oa import _design
# assume obj is a oaTerm
obj.getNumBits()
obj.getTermType()
绑定状态: 已绑定
Python 调用: obj.getTermType()
This function returns the terminal type of this terminal。
Python 示例
from oapy._oa import _design
# assume obj is a oaTerm
obj.getTermType()
obj.getPosition()
绑定状态: 已绑定
Python 调用: obj.getPosition()
This function returns the position that this terminal is assigned to。 The value oacNullIndex is returned if this terminal has not been assigned to a position。
Python 示例
from oapy._oa import _design
# assume obj is a oaTerm
obj.getPosition()
obj.getName(name)
绑定状态: 已绑定
Python 调用: obj.getName(name)
This function fills in name with the name of this terminal mapped to the specified nameSpace。
Python 示例
from oapy._oa import _design
# assume obj is a oaTerm
obj.getName(name)
obj.getName(ns, name)
绑定状态: 已绑定
Python 调用: obj.getName(ns, name)
This function fills out name with the name of this terminal。
Python 示例
from oapy._oa import _design
# assume obj is a oaTerm
obj.getName(ns, name)
obj.moveToNet(net)
绑定状态: 已绑定
Python 调用: obj.moveToNet(net)
This function moves this terminal to the specified net。
异常
oacCannotModifyImplicitTerm。oacCannotMoveToImplicitNet。oacCannotMoveToBlockOnlyNet。oacCannotTransferNetWithTerm。oacMoveToNetNotInSameBlock。oacTermNetMustBeInUniqueOccHier。oacTermMustJoinSameNet。
Python 示例
from oapy._oa import _design
# assume obj is a oaTerm
obj.moveToNet(net)
obj.setTermType(termType)
绑定状态: 已绑定
Python 调用: obj.setTermType(termType)
This function changes the terminal type for this terminal。
异常
oacCannotSetBusTermBitTermType。
Python 示例
from oapy._oa import _design
# assume obj is a oaTerm
obj.setTermType(termType)
obj.setIsInterface(isInterface)
绑定状态: 已绑定
Python 调用: obj.setIsInterface(isInterface)
This function changes the isInterface value for this terminal。 For more information, see oaTerm::isInterface 。
参数
isInterface: true or false to set un unset isInterface value。
异常
oacCannotSetIsInterfaceOfImplicitTerm。
Python 示例
from oapy._oa import _design
# assume obj is a oaTerm
obj.setIsInterface(isInterface)
obj.setPosition(position)
绑定状态: 已绑定
Python 调用: obj.setPosition(position)
This function assigns or changes the position of this terminal to the specified position。 It is an error to assign a position to an implicit terminal or to a terminal that is visible only to the block domain。 It is also an error to specify a position that is assigned to another terminal。
参数
position: The position to assign the terminal to。
异常
oacCannotSetPositionOfImplicitTerm。oacCannotSetPositionOfBlockOnlyTerm。oacTermPositionAlreadyTaken。
Python 示例
from oapy._oa import _design
# assume obj is a oaTerm
obj.setPosition(position)
obj.unsetPosition()
绑定状态: 已绑定
Python 调用: obj.unsetPosition()
This function clears the position this terminal is assigned to, freeing the position so that another terminal can be assigned to it。 Nothing is done if this terminal is not currently assigned a position。
异常
oacCannotSetPositionOfImplicitTerm。oacCannotSetPositionOfBlockOnlyTerm。
Python 示例
from oapy._oa import _design
# assume obj is a oaTerm
obj.unsetPosition()
obj.scalarize()
绑定状态: 已绑定
Python 调用: obj.scalarize()
This function insures that the bitTerms associated with this terminal have been promoted to the explicit state so that they can support implementation data such as pins and routes。 If this terminal is a multibit terminal, this function insures that all constituent bitTerms are promoted to the explicit state。 The multibit terminal is then demoted to the implicit state so that no implementation data can be associated with it。 When a terminal is demoted to the implicit state, associated implementation data is removed from it。 The demotion of a multi-bit terminal has no affect on whether the terminal is an interface terminal (a terminal that was explicitly created defines the original interface for its corresponding block)。
异常
oacCannotScalarizeImplicitTerm。
Python 示例
from oapy._oa import _design
# assume obj is a oaTerm
obj.scalarize()
obj.getOccTerm()
绑定状态: 已绑定
Python 调用: obj.getOccTerm()
This function returns the occurrence term that is the reflection of this block term in the context of the top occurrence of the design that contains the term。
Python 示例
from oapy._oa import _design
# assume obj is a oaTerm
obj.getOccTerm()
obj.getPins()
绑定状态: 已绑定
Python 调用: obj.getPins()
This function returns the collection of pins associated with this terminal。
Python 示例
from oapy._oa import _design
# assume obj is a oaTerm
obj.getPins()
obj.getConnRoutes()
绑定状态: 已绑定
Python 调用: obj.getConnRoutes()
This function returns a collection of routes that are connected to this terminal。 Each route in the collection has this terminal as either its startConn, endConn, or both。
Python 示例
from oapy._oa import _design
# assume obj is a oaTerm
obj.getConnRoutes()
obj.getOccTerms(top)
绑定状态: 已绑定
Python 调用: obj.getOccTerms(top)
This function returns a collection of occTerms on this term in the given top occurrence。
参数
top: The top occurrence。
Python 示例
from oapy._oa import _design
# assume obj is a oaTerm
obj.getOccTerms(top)
_design.oaTerm.create(net, name, termType=oacInputOutputTermType, view=oacInheritFromTopBlock)
绑定状态: 已绑定
Python 调用: _design.oaTerm.create(net, name, termType=oacInputOutputTermType, view=oacInheritFromTopBlock)
This function creates a terminal for the specified net。 This function accepts a name object and creates the corresponding terminal。 When creating a hidden term, the view argument must be set to oacExcludeFromModuleDomain。
参数
net: The net to connect to the terminal。name: The name of the terminal to create。type: The type of terminal to create。view: Specifies whether this term is visible in the module domain。
返回
- A pointer to an oaTerm。
异常
oacTermExists。oacScalarTermNameMatchesBusBaseName。oacBusTermBaseNameMatchesScalarName。oacNetTermWidthMismatch。oacTermMemberExists。oacCannotCreateTermWithImplicitNet。oacImplicitModuleTermExists。oacInvalidHierTermName。oacInvalidTermName。oacTermNetMustBeInUniqueOccHier。oacOverridingTermAlreadyExist。oacPhysOnlyTermNetMustBeInSameOcc。oacCannotBlockOverrideNetSignalType。
Python 示例
from oapy._oa import _design
_design.oaTerm.create(net, name, termType=oacInputOutputTermType, view=oacInheritFromTopBlock)
_design.oaTerm.find(block, name)
绑定状态: 已绑定
Python 调用: _design.oaTerm.find(block, name)
This function searches the specified block for a terminal assigned to the specified position。 The terminal is returned if found。 Otherwise, NULL is returned。 This function never returns a terminal that is hidden。
参数
block: The block to search for the terminal。position: The position of the terminal to match。
返回
- A pointer to an oaTerm。
Python 示例
from oapy._oa import _design
_design.oaTerm.find(block, name)
_design.oaTerm.find(block, position)
绑定状态: 已绑定
Python 调用: _design.oaTerm.find(block, position)
This function searches the specified block for a terminal with the specified name。 The terminal is returned if found。 Otherwise, NULL is returned。 This function never returns a terminal that is hidden。
参数
block: The block to search for the terminal。name: The name of the terminal to match。
返回
- A pointer to an oaTerm。
Python 示例
from oapy._oa import _design
_design.oaTerm.find(block, position)
_design.oaTerm.isValidName(net, name)
绑定状态: 已绑定
Python 调用: _design.oaTerm.isValidName(net, name)
This function returns a boolean value that indicates if the specified name, associated with the specified net, is valid for a new oaTerm object。 This function also returns true if the name corresponds to a term that was hidden but not overridden。
Python 示例
from oapy._oa import _design
_design.oaTerm.isValidName(net, name)
_design.oaTerm.getMaxPosition(block)
绑定状态: 已绑定
Python 调用: _design.oaTerm.getMaxPosition(block)
This function returns the highest position occupied by a terminal in the specified block。 If there are no terminals in the block or no position has been assigned a terminal, the value oacNullIndex is returned。
参数
block: The block to report the highest assigned terminal position from。
Python 示例
from oapy._oa import _design
_design.oaTerm.getMaxPosition(block)