首页 / design / oaOccInstTerm

oaOccInstTerm

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

概览

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

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

详细说明

The oaOccInstTerm class is an abstract base class for all types of connections between a net and a terminal in the master of an instance in the occurrence domain。 The connection is proper if the number of bits in the net is equal to the number of bits implied by the instTerm's terminal name。 In the case of oaOccVectorInsts, the net width must be multiplied by the number of bits represented by the instance name。 When oaInstTerm objects are created in the block domain and oaModInstTerm objects are created in the module domain, corresponding oaOccInstTerm objects are automatically created in the occurrence domain。 Each oaOccInstTerm can correspond to one oaModInstTerm , or one oaInstTerm , or one of each。 oaOccInstTerms may exist that do not have a proper corresponding terminal in the master of its oaOccInst 。 This allows instTerms to be created when the instance master is not read in, and it allows changes to instTerms that happen before the master is updated。 The traversal from an instTerm to its corresponding terminal will not succeed unless a terminal with an exactly matching name is present in the master。 oaModInstTerm , oaOccInstTerm, and oaInstTerm each represent instances of terminals in different hierarchy domains, where in each case the instance master represents a level of hierarchy in the design。 For oaOccInstTerm, its instance's master is an oaOccurrence , and each oaOccInst of an oaOccurrence will have a set of zero or more occInstTerms。 For oaModInstTerm , the instance master is an oaModule 。 For oaInstTerm , the master is an oaBlock 。 When an instTerm is created by specifying a terminal or terminal name, the instTerm is said to connect by name。 Binding is done to the named terminal if it exists in the instance master。 The width of the connection must match the width of the associated net。 When an instTerm is created by specifying a terminal position, the instTerm is said to connect by position。 Binding is to the terminal in the master that is assigned to the position and if the resulting connection width matches the width of the corresponding net。 To avoid confusion, the instTerms associated with a particular instance must either all be connected by name or all by connected by position。 The oaOccInstTerm class can be observed by deriving from oaObserver

方法总览

状态 Python 调用
obj.getBit(bitIndex)
obj.getNet(preferred=false)
obj.getInst()
obj.getTerm(expand=true)
obj.getTerm(expand, d)
obj.getTermName(name)
obj.getTermName(ns, name)
obj.getTermPosition()
obj.getNumBits()
obj.getAssignedNet(ignoreDefault=false)
obj.getAssignedNet(spec, ignoreDefault=false)
obj.getInstTerm()
obj.getModInstTerm()
obj.getReflection(d)
obj.isBound()
obj.isBound(d)
obj.isImplicit()
obj.usesTermPosition()
_design.oaOccInstTerm.find(inst, term)
_design.oaOccInstTerm.find(inst, term)
_design.oaOccInstTerm.find(inst, term)
_design.oaOccInstTerm.find(inst, termName)
_design.oaOccInstTerm.find(inst, termPosition)
_design.oaOccInstTerm.find(inst, term, domain)
_design.oaOccInstTerm.find(inst, termName, domain)
_design.oaOccInstTerm.find(inst, termPosition, domain)

方法说明

obj.getBit(bitIndex)

绑定状态: 已绑定

Python 调用: obj.getBit(bitIndex)

This function returns a pointer to the occInstTerm that corresponds to the specified bitIndex bit of this occInstTerm。 For single-bit instTerms, this function returns this occInstTerm if the bitIndex value is zero。

异常

  • oacInvalidInstTermBitIndex

Python 示例

from oapy._oa import _design

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

obj.getNet(preferred=false)

绑定状态: 已绑定

Python 调用: obj.getNet(preferred=false)

This function returns the occurrence net associated with this occInstTerm。 NULL is returned if the instTerm was created with a NULL net or if the instTerm has been disconnected from the net。 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 oaOccNet。

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInstTerm
obj.getNet(preferred=false)

obj.getInst()

绑定状态: 已绑定

Python 调用: obj.getInst()

This function returns a pointer to the occurrence instance that this instTerm is associated with。

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInstTerm
obj.getInst()

obj.getTerm(expand=true)

绑定状态: 已绑定

Python 调用: obj.getTerm(expand=true)

This function returns the terminal associated with this instTerm。 An attempt is made to bind the master if the instTerm is unbound。 By default, the terminal reflected in the block domain is traversed。 NULL is returned if the instance is unbound, the terminal is not found in the master, or the corresponding term in the block domain is hidden but not overridden。 An exception is thrown if the instance for this instTerm is a vectorInst or an implicit vectorInstBit since there is no occurrence hierarchy beneath those types of instances。

参数

  • expand: Specifies whether to expand the occurrence hierarchy to include the master occurrence for this occInstTerm, if it is not already expanded in the current session。
  • d: The domain to traverse。 Either oacModDomain or the default oacBlockDomain。

异常

  • oacCannotProcessDomainArgument
  • oacCannotGetVectorInstOccurrence
  • oacCannotGetImplicitInstOccurrence

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInstTerm
obj.getTerm(expand=true)

obj.getTerm(expand, d)

绑定状态: 已绑定

Python 调用: obj.getTerm(expand, d)

This function returns the occurrence terminal associated with this instTerm。 If expand is true, and the instTerm is currently unbound, this function attempts to bind the master。 NULL is returned if the instance cannot be bound or the terminal is not found in the master。 An exception is thrown if the instance is a vectorInst or an implicit vectorInstBit because there is no occurrence hierarchy beneath these types of instances。 Use caution when the expand argument is set to the default value of true。 Expanding the occurrence hierarchy into all the leaf instances of many designs requires large amounts of memory to hold all the referenced occurrence objects。 At the leaf level, information should be referenced in the block or the module instead。 For example, to get the terminal and its oaTermType for any oaOccInstTerm pointed to by a variable occITerm , you might use code such as: oaModInstTerm modITerm occITerm-> getModInstTerm() ; oaModTerm modTerm = modITerm-> getTerm() ; if (modTerm) { oaTermType termType = modTerm->getTermType(); } Or oaInstTerm blkITerm = occITerm-> getInstTerm() ; oaTerm blkTerm = blkITerm-> getTerm() ; if (blkTerm) { oaTermType termType = blkTerm->getTermType(); }。

参数

  • expand: Specifies whether to expand the occurrence hierarchy to include the master occurrence for this occInstTerm, if it has not yet been expanded in the current session。

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInstTerm
obj.getTerm(expand, d)

obj.getTermName(name)

绑定状态: 已绑定

Python 调用: obj.getTermName(name)

This function returns the name of the terminal associated with this instTerm in the nameSpace specified。 A name is returned even if the instTerm is not bound。 The existence of a terminal name does not necessarily guarantee that the corresponding terminal exists in the instance master。

参数

  • ns: The nameSpace for processing the name。
  • name: The string that the terminal name is returned in。

异常

  • oacInstTermConnectsByPosition

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInstTerm
obj.getTermName(name)

obj.getTermName(ns, name)

绑定状态: 已绑定

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

This function returns the name of the terminal associated with this instTerm in the given name argument。 A name is returned even if the instTerm is not bound。 The existence of a terminal name does not guarantee that the terminal exists in the corresponding instance master。

参数

  • name: The name object to return the terminal name in。

异常

  • oacInstTermConnectsByPosition

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInstTerm
obj.getTermName(ns, name)

obj.getTermPosition()

绑定状态: 已绑定

Python 调用: obj.getTermPosition()

This function returns the terminal position that this instTerm connects to。 If this instTerm is not bound by position, the value oacNullIndex is returned。

异常

  • oacInstTermConnectsByName

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInstTerm
obj.getTermPosition()

obj.getNumBits()

绑定状态: 已绑定

Python 调用: obj.getNumBits()

This function returns the number of bits for this instTerm。 This value is equal to the number of bits in the associated net。 If the instTerm has no net, the value is calculated from the number of bits in the corresponding terminal multiplied by the number of bits in the corresponding instance。 If the terminal is not bound, the number of bits for the terminal is derived from the terminal name。 If the terminal is not bound and the instTerm connects by position, the number of bits cannot be determined if there is no net, and a value of zero is returned。

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInstTerm
obj.getNumBits()

obj.getAssignedNet(ignoreDefault=false)

绑定状态: 已绑定

Python 调用: obj.getAssignedNet(ignoreDefault=false)

This function returns the occurrence net assigned to this instTerm as per the inherited connections specification。 NULL will be returned in the following cases: There is no effective connectDef associated with this instTerm There is an effective connectDef but no matching assignment, and 'ignoreDefault' is true。 Exceptions are thrown for cases when an assignment is found but a net with that name does not exist or if the default net name needs to be used, 'ignoreDefault' is false, but there is no net that matches the default net name specified。 This version is for diagnostic use and returns the set of connectDefs and/or assignments that were looked at in the hierarchy for resolving the assigned net via the 'spec' parameter。 Clients can inspect the array which will consist of pointers to either connectDef or assignment objects in the module or occurrence domains。

参数

  • spec: An array that gets populated with pointers to design objects that indicate the assigned net specification。
  • ignoreDefault: Indicates if the default net name in the specification should be ignored。

异常

  • oacCannotFindSpecAssignedDefOccNet
  • oacCannotFindSpecAssignedOccNet

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInstTerm
obj.getAssignedNet(ignoreDefault=false)

obj.getAssignedNet(spec, ignoreDefault=false)

绑定状态: 已绑定

Python 调用: obj.getAssignedNet(spec, ignoreDefault=false)

This function returns the occurrence net assigned to this instTerm as per the inherited connections specification。 NULL will be returned in the following cases: There is no effective connectDef associated with this instTerm There is an effective connectDef but no matching assignment, and 'ignoreDefault' is true。 Exceptions are thrown for cases when an assignment is found but a net with that name does not exist or if the default net name needs to be used, 'ignoreDefault' is false, but there is no net that matches the default net name specified。

参数

  • ignoreDefault: Indicates if the default net name in the specification should be ignored。

异常

  • oacCannotFindSpecAssignedDefOccNet
  • oacCannotFindSpecAssignedOccNet

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInstTerm
obj.getAssignedNet(spec, ignoreDefault=false)

obj.getInstTerm()

绑定状态: 已绑定

Python 调用: obj.getInstTerm()

This function gets the oaInstTerm in the block domain that this occInstTerm corresponds to。 If this occInstTerm is derived from an oaModInstTerm that is not visible to the block domain, then it will not have an oaInstTerm and this function will return NULL。

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInstTerm
obj.getInstTerm()

obj.getModInstTerm()

绑定状态: 已绑定

Python 调用: obj.getModInstTerm()

This function gets the oaModInstTerm in the module domain that this occInstTerm corresponds to。 If this occInstTerm is on an oaOccModuleInst then it will always have a corresponding oaModInstTerm 。 If it is derived from an oaInstTerm that is not visible to the module domain, then it will not have an oaModInstTerm and this function will return NULL。

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInstTerm
obj.getModInstTerm()

obj.getReflection(d)

绑定状态: 已绑定

Python 调用: obj.getReflection(d)

This function returns the object pointer corresponding to the reflection of the current object in the specified domain。 If an object is overriden, it returns the pointer to the hidden or overriding sibling dependent on the specified domain。

参数

  • d: The domain of the reflected object, which is either oacModDomain or the default oacBlockDomain。

异常

  • oacCannotProcessDomainArgument

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInstTerm
obj.getReflection(d)

obj.isBound()

绑定状态: 已绑定

Python 调用: obj.isBound()

This function returns a boolean value that indicates whether the associated terminal exists in the instance master and whether the instance associated with this instTerm is bound with respect to the specified domain。

参数

  • d: The domain for which binding is checked。 Either oacModDomain or the default oacBlockDomain。

异常

  • oacCannotProcessDomainArgument

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInstTerm
obj.isBound()

obj.isBound(d)

绑定状态: 已绑定

Python 调用: obj.isBound(d)

This function returns a boolean value that indicates whether the instance associated with this instTerm is bound and whether the associated terminal exists in the instance master。

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInstTerm
obj.isBound(d)

obj.isImplicit()

绑定状态: 已绑定

Python 调用: obj.isImplicit()

This function returns a boolean value indicating whether this instTerm is implicit, having been created as a result of the creation of a multi-bit instTerm。

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInstTerm
obj.isImplicit()

obj.usesTermPosition()

绑定状态: 已绑定

Python 调用: obj.usesTermPosition()

This function returns a boolean indicating whether this instTerm was created to connect to a terminal position。 This function returns 'true' if this instTerm binds to a particular terminal position。 It returns 'false' if this instTerm binds to a terminal by name。

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInstTerm
obj.usesTermPosition()

_design.oaOccInstTerm.find(inst, term)

绑定状态: 已绑定

Python 调用: _design.oaOccInstTerm.find(inst, term)

This function searches all of the instTerms associated with the specified instance and returns the one that makes a connection to the specified terminal position。 NULL is returned if no terminal exists in the instance master at the specified position。 If the reflected block domain terminal was hidden and overridden, the domain argument determines whether the returned terminal corresponds to the hidden (oacModDomain) or overriding (oacBlockDomain) object。 The default is to return the override terminal。

参数

  • inst: The instance whose instTerms are searched。
  • termPosition: The terminal position used in the search。
  • d: The domain (oacModDomain or oacBlockDomain value) that reflects the terminal to match。

异常

  • oacInstTermInstUsesTermPosition
  • oacCannotProcessDomainArgument

Python 示例

from oapy._oa import _design

_design.oaOccInstTerm.find(inst, term)

_design.oaOccInstTerm.find(inst, term)

绑定状态: 已绑定

Python 调用: _design.oaOccInstTerm.find(inst, term)

This function searches all of the instTerms associated with the specified instance and returns the one that is associated with the specified terminal name。 NULL is returned if no such terminal exists on the instance。 If the reflected block domain terminal was hidden and overridden, the domain argument determines whether the returned oaOccInstTerm corresponds to the hidden (oacModDomain) or overriding (oacBlockDomain) object。 The default is to return the override terminal。 If the termName is hierarchical, then this function searches through the hierarchy path for the specified instTerm。 If the termName is a bundle name, and any of its members has hierarchy, all of its members must have the same level of hierarchy or an exception is thrown。

参数

  • inst: The instance whose instTerms are searched。
  • termName: The terminal name to use in the search。
  • d: The domain (oacModDomain or oacBlockDomain value) that reflects the terminal to match。

异常

  • oacCannotProcessDomainArgument
  • oacInstTermInstUsesTermPosition

Python 示例

from oapy._oa import _design

_design.oaOccInstTerm.find(inst, term)

_design.oaOccInstTerm.find(inst, term)

绑定状态: 已绑定

Python 调用: _design.oaOccInstTerm.find(inst, term)

This function searches all of the instTerms associated with the specified instance and returns the one that is associated with the specified terminal。 NULL is returned if no such terminal exists on the instance。 If the reflected block domain terminal was hidden and overridden, the domain argument determines whether the returned terminal corresponds to the hidden (oacModDomain) or overriding (oacBlockDomain) object。 The default is to return the override terminal。

参数

  • inst: The instance whose instTerms are searched。
  • term: The terminal to use in the search。
  • d: The domain (oacModDomain or oacBlockDomain value) that reflects the terminal to match。

异常

  • oacInstTermInstUsesTermPosition
  • oacCannotProcessDomainArgument

Python 示例

from oapy._oa import _design

_design.oaOccInstTerm.find(inst, term)

_design.oaOccInstTerm.find(inst, termName)

绑定状态: 已绑定

Python 调用: _design.oaOccInstTerm.find(inst, termName)

This function searches all of the instTerms associated with the specified instance and returns the one that makes a connection to the specified terminal position。 NULL is returned if no terminal exists in the instance master at the specified position。

参数

  • inst: The instance whose instTerms are searched。
  • termPosition: The terminal position used in the search。

异常

  • oacInstTermInstUsesTermName

Python 示例

from oapy._oa import _design

_design.oaOccInstTerm.find(inst, termName)

_design.oaOccInstTerm.find(inst, termPosition)

绑定状态: 已绑定

Python 调用: _design.oaOccInstTerm.find(inst, termPosition)

This function searches all of the instTerms associated with the specified instance and returns the one that is associated with the specified terminal name。 NULL is returned if no such terminal exists on the instance。 If the termName is hierarchical, then this function searches through the hierarchy path for the specified instTerm。 If the termName is a bundle name, and any of its members has hierarchy, all of its members must have the same level of hierarchy or an exception is thrown。

参数

  • inst: The instance whose instTerms are searched。
  • termName: The terminal name to use in the search。

异常

  • oacInstTermInstUsesTermPosition

Python 示例

from oapy._oa import _design

_design.oaOccInstTerm.find(inst, termPosition)

_design.oaOccInstTerm.find(inst, term, domain)

绑定状态: 已绑定

Python 调用: _design.oaOccInstTerm.find(inst, term, domain)

This function returns the occInstTerm that is associated with the given oaOccInst and oaTerm 。 It returns NULL if no such occInstTerm exists on the instance。

参数

  • inst: The instance whose instTerms are searched。
  • term: The terminal to use in the search。

异常

  • oacInstTermInstUsesTermPosition
  • oacTermNotInInstMasterForInstTerm

Python 示例

from oapy._oa import _design

_design.oaOccInstTerm.find(inst, term, domain)

_design.oaOccInstTerm.find(inst, termName, domain)

绑定状态: 已绑定

Python 调用: _design.oaOccInstTerm.find(inst, termName, domain)

This function returns the occInstTerm that is associated with the given oaOccInst and oaModTerm 。 It returns NULL if no such occInstTerm exists on the instance。

参数

  • inst: The instance whose instTerms are searched。
  • term: The terminal to use in the search。

异常

  • oacInstTermInstUsesTermPosition
  • oacTermNotInInstMasterForInstTerm

Python 示例

from oapy._oa import _design

_design.oaOccInstTerm.find(inst, termName, domain)

_design.oaOccInstTerm.find(inst, termPosition, domain)

绑定状态: 已绑定

Python 调用: _design.oaOccInstTerm.find(inst, termPosition, domain)

This function searches all of the instTerms associated with the specified instance and returns the one that is associated with the specified terminal。 NULL is returned if no such terminal exists on the instance。

参数

  • inst: The instance whose instTerms are searched。
  • term: The terminal to use in the search。

异常

  • oacTermNotInInstMasterForInstTerm
  • oacInstTermInstUsesTermPosition

Python 示例

from oapy._oa import _design

_design.oaOccInstTerm.find(inst, termPosition, domain)