Product Documentation
Virtuoso Layout Suite SKILL Reference
Product Version IC23.1, November 2023

spdRegUserAbutProc

spdRegUserAbutProc(
l_abutNames
t_abutProc
t_checkProc
t_restoreProc
[ ?libName t_libName ]
[ ?description t_description ]
[ ?checkOdAbut t | nil ]
)
=> t / nil

Description

Registers callback to check the design for OD abutment.
Registers a list of user-defined abutments and related callbacks to perform these abutments in the SPD Editing or SPD Preview window or when a layout generated using SPD is brought back to the SPD Editing window. You can register them globally or by name of the library. If the design contains instances from different libraries, SPD loads the user-defined abutments and related callbacks from only one of registered libraries.

Arguments

l_abutNames

A list of user abutment names or name-integer pairs. The integer number represents the abutment strategy associated with the user abutment name.

  

The integer number should start from 2. 0 and 1 are reserved for unabutment and normal oxide diffusion abutment respectively.

  

If specified, the abutment strategy and the user abutment name can be cross-referenced later by spdGetAbutStrategy and spdGetAbutName respectively.

The user abutment name and abutment strategy are referenced only by the registered callbacks abutProc, checkProc and restoreProc to find out which abutment should be performed.

Conceptually, you can assign any value that is suitable for your requirement. However, it is recommended to use the same values defined in the foundry PDK, if available.

t_abutProc

The user callback to perform user abutment in SPD Preview.

  

abutProc(
d_lhsInst
d_rhsInst
r_abutCxt
)
=> l_chain / nil

  

where:

    • d_lhsInst is database ID of the left-hand instance.
    • d_rhsInst is database ID of the right-hand instance.
      d_lhsInst and d_rhsInst are two adjacent real devices.
    • r_abutCxt is the abutment context, which stores for each SPD window the settings that can be referenced in the user callback.

  

Use obj~>?? to query. For example, obj~>abutName returns the name of the user abutment.

  

Value Returned

    • l_chain, lists the database IDs of the chained instances.
    • nil, if abutment was unsuccessful.

t_checkProc

The user callback to reject an invalid user abutment in the SPD Edit window.

  

checkProc( 
d_lhsInst
d_rhsInst
r_abutCxt
) 
=> t / nil

  

where:

d_lhsInst is database ID of left-hand instance.

d_rhsInst is database ID of right-hand instance.

d_lhsInst and d_rhsInst are two adjacent symbolic devices.

  

r_abutCxt is the abutment context, which stores for each SPD window the settings that can be referenced in the user callback.

  

Value Returned

    • t, if the user abutment is valid.
    • nil, if abutment was unsuccessful..

t_restoreProc

The user callback to restore user abutments when a design created using SPD is brought back to the SPD Edit window from layout.

If not specified, only normal oxide diffusion abutment is restored in this process. All other abutments are unabutted in the SPD Editing window.

  

restoreProc(
d_lhsInst
d_rhsInst
[r_abutCxt]
)
=> t_abutName / t / nil

  

where:

    • d_lhsInst is database ID of left-hand-side instance.
    • d_rhsInst is database ID of right-hand-side instance.
      d_lhsInst and d_rhsInst are two adjacent real devices.
    • r_abutCxt is the abutment context, which stores for each SPD window the settings that can be referenced in the user callback.

  

Value Returned

    • abutName for user abutment.
    • t for normal oxide diffusion abutment.
    • nil for unabutment.

[?libName t_libName]

  

Name of the library associated with the user abutment names (l_abutNames) and the user abutment callback set (t_abutProc, t_checkProc, and t_restoreProc).

The default value is nil, which means that the user abutment names and the user abutment callback set is global and applies to all libraries that are not registered.

[?description t_description]

Describes the main characteristics for the user callback set. This information is useful in deciding whether the callback set upgrade is needed.

?checkOdAbut

When set to t, t_checkProc is called during OD abutment to decide whether the OD abutment in SPD Editing window is accepted.

The default value is nil.

Value Returned

t

The user abutments are registered successfully.

nil

The user abutments cannot be registered because the library is already registered. The current registration must be unregistered first.

Examples

Example 1

Check the design for OD abutment.

spdRegUserAbutProc(nil nil "myAbutCheckCB" nil)

This example works in both modes. When l_abutNames is not specified, the function checks for OD abutment. Arguments t_abutProc and t_restorProc are ignored, even if you specify them in the procedure.

Example 2

For symbolic view, inputs are symbolic devices

procedure(MyUserAbutCheckProc(lInst rInst abutCxt)
 let(((delta 1e-9) diff)
   ; Some process node do not allow dummy poly abutment for diffrent gate lengths
   diff = spdGetSymDeviceInfo(lInst)~>length - spdGetSymDeviceInfo(rInst)~>length
   if( abs(diff) >= delta then
        hiDisplayAppDBox(
            ?name               'dBox
            ?dboxBanner         "Warning"
            ?dboxText           sprintf(nil "Failed to abut '%s' and '%s' because their gate lengths are not equal." lInst~>name rInst~>name)
            ?dialogStyle        'modal
            ?dialogType         hicInformationDialog
            ?buttonLayout       'Close
        )
  nil  ; abutment rejected
 else
  t    ; abutment ok
   )
 ) ; let
)

For preview, inputs are real devices

procedure(MyUserAbutProc(lInst rInst abutCxt)
  let(((strategy "sdFirst") (abutName abutCxt->abutName))
    ; valid abutStrategies to lxChain api
    ; set env variables for user abutment 
    when(abutName == "dummyStyle"
      strategy = "dummyFirst"
    )
    spdPerformAbutment(lInst rInst 0 strategy)
    ; reset env variables for regular oxide diffusion abutment
  ); let
)

For round-trip back to SPD from layout, inputs are real devices (lInst = left, rInst = right)

procedure(MyUserAbutRestoreProc(lInst rInst)
  let((result)
    ; Change this param to match real Pcell
    when(atoi(vfoGetParam(lInst "numRightDummies")) >= 1 &&
         atoi(vfoGetParam(rInst "numLeftDummies")) >= 1
       result = "dummyStyle"
    ); when
    result
  ); let    
)
; unregister the current user abutment callback before registering a new one.
spdUnregUserAbutProc(?libName "libA")
=> t

Register user abutment functions to activate the user abutment.

spdRegUserAbutProc(list("dummyStyle") "MyUserAbutProc" "MyUserAbutCheckProc" "MyUserAbutRestoreProc" ?libName "libA" ?description "description for libA" ?checkOdAbut nil)
=> t

Related Topics

spdUnregUserAbutProc

spdGetUserAbutProc

spdGetAbutStrategy

spdGetAbutName

User-Defined Abutment Callback Functions


Return to top
 ⠀
X