Layout Extraction and Design Rules Check

According to Cadence recommendations, Layout Extraction and Design Rules Check diva scripts are placed in one file, which is available here.

Do Layout extraction to extract schematics view from Layout view to:
  • compare it with original schematics (LVS);
  • check for floating parts that are not connected to the ground or power (ERC);
  • probe the layout connectivity - visually check for short circuits.

    Execution of drcExtractRules depends on several input parameters. Parameters 'drc' and 'extract' are passed automatically when user invokes DRC or Extract commands. Parameters 'lvs' and 'lmeter' can be supplied from the Extraction dialog.
  • Supply 'lvs' switch if the extracted view will be used for LVS verification. This results in extraction of inductance values.
  • Do not supply this switch if you are going to perform Probe testing.

    Install rsfq.basic library to successfully run this extraction script.

  • ;;;########################################################
    ;;;#
    ;;;#	SUNY at Stony Brook RSFQ Laboratory
    ;;;#    Author: A. Rylyakov,
    ;;;#         based on original code by P. Shevchenko and S. Polonsky
    ;;;#    Date: June 14, 1995
    ;;;#          Jan-Feb 1996 - a major revision: inductances now extracted as
    ;;;#                         parasitic resistors
    ;;;#    Date: October 14, 2001
    ;;;#          N. Joukov: Ported to Cadence v. 4.4.5.
    ;;;#
    ;;;#    Description:
    ;;;#        DRC rules, Layer preprocessing for L-Meter,
    ;;;#        Layout extraction
    ;;;#
    ;;;#########################################################
    ;;; Comment:
    ;;; 1. the following original graphics layers are expected to be defined:
    ;;;tfcDefineLayer
    ;;;;( LayerName         Purpose  Layer# FillStyle     Priority Vis Sel Blink Valid)
    ;;; ( m0                drawing  10     outlineStipple 0       t   t   nil   t    )
    ;;; ( i0                drawing  11     outlineStipple 1       t   t   nil   t    )
    ;;; ( i0                net      11     outlineStipple 2       t   t   nil   nil  )
    ;;; ( m1                drawing  12     outlineStipple 3       t   t   nil   t    )
    ;;; ( m1                net      12     outlineStipple 4       t   t   nil   nil  )
    ;;; ( i1b               drawing  15     outlineStipple 5       t   t   nil   t    )
    ;;; ( i1b               net      15     outlineStipple 6       t   t   nil   nil  )
    ;;; ( m2                drawing  16     outlineStipple 7       t   t   nil   t    )
    ;;; ( m2                net      16     outlineStipple 8       t   t   nil   nil  )
    ;;; ( r2                drawing  14     outlineStipple 9       t   t   nil   t    )
    ;;; ( i2                drawing  17     outlineStipple 10      t   t   nil   t    )
    ;;; ( i2                net      17     outlineStipple 11      t   t   nil   nil  )
    ;;; ( m3                drawing  18     outlineStipple 12      t   t   nil   t    )
    ;;; ( m3                net      18     outlineStipple 13      t   t   nil   nil  )
    ;;; ( r3                drawing  20     outlineStipple 14      t   t   nil   t    )
    ;;; ( m3x               drawing  19     outlineStipple 15      t   t   nil   t    )
    ;;; ( m1l               drawing  51     outlineStipple 16      t   t   nil   t    )
    ;;; ( m2l               drawing  52     outlineStipple 17      t   t   nil   t    )
    ;;; ( m3l               drawing  53     outlineStipple 18      t   t   nil   t    )
    ;;; ( i1a               drawing  13     outlineStipple 19      t   t   nil   t    )
    ;;; ( term              drawing  127    X              20      t   t   nil   t    )
    ;;; ( text              drawing  230    solid          21      t   t   nil   t    )
    ;;;;;;;;; IMPORTANT: do not change LayerName or Layer#.
    
    drcExtractRules((width = 20) 
        (bkgnd = geomBkgnd()) 
        (m0 = geomOr("m0")) 
        (m0x = geomNot(m0)) 
        (i0 = geomOr("i0"))
        (m1 = geomOr("m1"))
    (i1a = geomOr("i1a")) (r2 = geomOr("r2")) (i1b = geomOr("i1b")) (m2 = geomOr("m2")) (i2 = geomOr("i2"))
    (m3 = geomOr("m3"))
    (r3 = geomOr("r3"))
    (i1bm2 = geomAnd(i1b m2)) (res = geomGetTexted(geomEnclose(r2 i1bm2) "r2" "." "bias")) (m2m3via = geomAnd(i2 geomAnd(m2 m3) )) ivIf((switch "drc?") then (i0c = geomXor(i0 geomAnd(i0 geomAnd(m0x m1) ) )) (r2cm0 = geomAnd(geomStraddle(r2 m0) m0))
    (r2ci0 = geomAnd(geomStraddle(r2 i0) i0)) (r2cm1 = geomAnd(geomStraddle(r2 m1) m1)) (r2a = geomAndNot(r2 res)) (i1bir2 = geomInside(i1b r2)) (i1bc = geomXor(i1b geomAnd(i1b geomAnd(geomOr(m1 r2) m2) ) )) (i2c = geomXor(i2 m2m3via)) drc(m0 (width < 2.0) "min m0 width 2.0" ) drc(m0 (sep < 2.0) "min m0 m0 sep 2.0" ) drc(m0 (notch < 2.0) "min m0 m0 notch 2.0" ) drc(m0 i0 (sep < 1.5) "min m0 i0 sep 1.5" ) drc(i0 (width < 3.0) "min i0 width 3.0" ) drc(i0 (sep < 3.0) "min i0 i0 sep 3.0" ) drc(i0 (notch < 3.0) "min i0 i0 notch 3.0" ) saveDerived(i0c "i0 must be enclosed by m0 and m1") drc(m1 (width < 2.5) "min m1 width 2.5" ) drc(m1 (sep < 2.5) "min m1 m1 sep 2.5" ) drc(m1 (notch < 2.5) "min m1 m1 notch 2.5" ) drc(m1 i1a (enc < 2.5) "min enclosure of i1a by m1 2.5" ) drc(m1 i0 (enc < 1.5) "min enclosure of i0 by m1 1.5" ) drc(i1a (width < 3.0) "min i1a width 3.0" ) drc(i1a (sep < 2.0) "min i1a i1a sep 2.0" ) drc(i1a (notch < 2.0) "min i1a i1a notch 2.0" ) drc(i0 i1a (sep < 1.5) "min i0 i1a sep 1.5" ) drc(r2a (width < 5.0) "min r2 width 5.0" ) drc(r2 (sep < 2.0) "min r2 r2 sep 2.0" ) drc(r2 (notch < 2.0) "min r2 r2 notch 2.0" ) drc(r2 m0 (sep < 1.5) "min r2 m0 sep 1.5" ) drc(r2 m1 (sep < 1.5) "min r2 m1 sep 1.5" ) drc(r2 i0 (sep < 1.5) "minimum r2 i0 sep 1.5" ) saveDerived(r2cm0 "r2 must not cross any edges") saveDerived(r2ci0 "r2 must not cross any edges") saveDerived(r2cm1 "r2 must not cross any edges")
    drc(i1b (width < 2.0) "min i1b width 2.0" ) drc(i1b (sep < 3.0) "min i1b i1b sep 3.0" ) drc(i1b (notch < 3.0) "min i1b i1b notch 3.0" ) drc(r2 i1bir2 (enc < 1.5) "min enclosure of i1b inside r2 by r2 1.5" ) drc(i1b i1a (enc < 0.75) "min enclosure of i1a by i1b 0.75" ) drc(m1 i1b (enc < 1.75) "min enclosure of i1b by m1 1.75" ) saveDerived(i1bc "i1b must be enclosed by m1 (or r2) and m2") drc(m2 (width < 2.0) "min m2 width 2.0" ) drc(m2 (sep < 2.0) "min m2 m2 sep 2.0" ) drc(m2 (notch < 2.0) "min m2 m2 notch 2.0" ) drc(m2 i2 (enc < 1.25) "min enclosure of i2 by m2 1.25" ) drc(m2 i1b (enc < 1.5) "min enclosure of i1b by m2 1.5" ) drc(i2 (width < 2.0) "min i2 width 2.0" ) drc(i2 (sep < 3.0) "min i2 i2 sep 3.0" ) drc(i2 (notch < 3.0) "min i2 i2 notch 3.0" ) saveDerived(i2c "i2 must be enclosed by m2 and m3") drc(m3 (width < 2.0) "min m3 width 2.0" ) drc(m3 (sep < 2.0) "min m3 m3 sep 2.0" ) drc(m3 (notch < 2.0) "min m3 m3 notch 2.0" ) drc(m3 r3 (enc < 1.0) "min enclosure of r3 by m3 1.0" ) drc(m3 i2 (enc < 1.5) "min enclosure of i2 by m3 1.5" ) drc(r3 (width < 5.0) "min r3 width 5.0" ) drc(r3 (sep < 5.0) "min r3 r3 sep 5.0" ) drc(r3 (notch < 5.0) "min r3 r3 notch 5.0" ) ) ivIf((switch "extract?") then (m1l = geomOr("m1l")) (m2l = geomOr("m2l")) (indm1 = geomAnd(geomAnd(m1 m1l) m0x)) (indm1m0 = geomAndNot(indm1 m3))
    (indm1m0m3 = geomAnd(indm1 m3)) (indm1x = geomAndNot(m1 geomOr(indm1m0 indm1m0m3) )) (indm2 = geomAnd(geomAnd(m2 m2l) m0x)) (indm2m0 = geomAndNot(indm2 m3)) (indm2m0m3 = geomAnd(indm2 m3)) (indm2x = geomAndNot(m2 geomOr(indm2m0 indm2m0m3) )) (jj = geomAnd(indm1x geomAnd(indm2x geomOr(i1a geomInside(i1b i1a) ) ) )) (m0m1via = geomAnd(geomAnd(m0x i0) m1)) (i1bm2 = geomAnd(i1b m2)) (m1m2via = geomAndNot(geomAnd(m1 i1bm2) geomOr(i1a r2) )) (resvia = geomAnd(i1bm2 res)) (indm1m0 = geomSize(indm1m0 -0.0478)) (indm1m0m3 = geomSize(indm1m0m3 -0.2688)) (indm2m0 = geomSize(indm2m0 0.44075)) (indm2m0m3 = geomSize(indm2m0m3 -0.0083)) (m1x1 = geomSize(drc(indm1x indm1m0 (sep < 0.1) ) 0.1 )) (m113 = geomSize(drc(indm1m0 indm1m0m3 (sep < 0.4) ) 0.1 )) (m1x3 = geomSize(drc(indm1x indm1m0m3 (sep < 0.3) ) 0.1 )) (m1x1xvia = geomAnd(m1x1 indm1x)) (m1x11via = geomAnd(m1x1 indm1m0)) (m1131via = geomAnd(m113 indm1m0)) (m1133via = geomAnd(m113 indm1m0m3)) (m1x3xvia = geomAnd(m1x3 indm1x)) (m1x33via = geomAnd(m1x3 indm1m0m3)) (m2x3 = geomSize(drc(indm2x indm2m0m3 (sep < 0.1) ) 0.1 )) (m2x3xvia = geomAnd(m2x3 indm2x)) (m2x33via = geomAnd(m2x3 indm2m0m3)) (m2m2via1 = geomAnd(indm2m0 indm2x)) (m2m2via2 = geomAnd(indm2m0 indm2m0m3)) ;----------------------------------------------- ; Extract inductances for lvs and do not extract for probing ; (supply switch in the extraction dialog) ;----------------------------------------------- ivIf((switch "lvs") then measureResistance(indm1m0 "ind2 ivpcell rsfq.basic" 0.1605 "L" (ignore < 0.01) (save "m1" fracture) ) measureResistance(indm1m0m3 "ind2 ivpcell rsfq.basic" 0.1156 "L" (ignore < 0.01) (save "m1" fracture) ) measureResistance(indm2m0 "ind2 ivpcell rsfq.basic" 0.2556 "L" (ignore < 0.01) (save "m2" fracture) ) measureResistance(indm2m0m3 "ind2 ivpcell rsfq.basic" 0.1419 "L" (ignore < 0.01) (save "m2" fracture) ) ) measureResistance(res "res ivpcell rsfq.basic" 0.42 "R" (save "r2" fracture) ) ;------------------------------------- ; mark special nets for ERC ;------------------------------------- groundNet("GND!") joinableNet("vdd!" "GND!") geomConnect((via m0m1via m0x indm1x) (via m0m1via m0x indm1m0) (via m0m1via m0x indm1m0m3)
    (via m1x1xvia indm1x m1x1) (via m1x11via indm1m0 m1x1) (via m1131via indm1m0 m113) (via m1133via indm1m0m3 m113) (via m1x3xvia indm1x m1x3) (via m1x33via indm1m0m3 m1x3) (via m2x3xvia indm2x m2x3) (via m2x33via indm2m0m3 m2x3) (via m2m2via1 indm2m0 indm2x) (via m2m2via2 indm2m0 indm2m0m3) (via m1m2via indm1x indm2x) (via m1m2via indm1x indm2m0) (via m1m2via indm1x indm2m0m3) (via m1m2via indm1m0 indm2x) (via m1m2via indm1m0 indm2m0)
    (via m1m2via indm1m0 indm2m0m3) (via m1m2via indm1m0m3 indm2x) (via m1m2via indm1m0m3 indm2m0) (via m1m2via indm1m0m3 indm2m0m3) (via m2m3via indm2x m3) (via m2m3via indm2m0 m3) (via m2m3via indm2m0m3 m3) (via resvia res indm2x) (via resvia res indm2m0) (via resvia res indm2m0m3) ) saveInterconnect((m0m1via "i0") (m1m2via "i1b") (m2m3via "i2") (resvia "i1b") m0 m3 (indm1x "m1") (indm2x "m2") (indm1m0 "m1")
    (indm1m0m3 "m1") (indm2m0 "m2") (indm2m0m3 "m2") r2 i1a ) extractDevice(jj (indm1x "DOWN") (indm2x "UP") "jj ivpcell rsfq.basic" ) (Area = measureParameter(area (jj) 1.0 )) (Ic = calculateParameter(((Area - 2) * 0.08))) saveParameter(Ic "Ic") ;-------------------------------------------------- ; mark extracted device JJ on extracted view ;-------------------------------------------------- saveRecognition(jj "i1a") ) ivIf((switch "lmeter?") then (lm_i1b = geomAnd(geomAndNot(i1b r2) geomAndNot(i1b i1a) )) geomErase("m0") geomErase("i0") geomErase("m1")
    geomErase("i1a") geomErase("r2") geomErase("i1b")
    geomErase("m2") geomErase("i2") geomErase("m3") geomErase("r3") geomErase("m1l")
    geomErase("m2l") (m1 = geomSize(m1 -0.5)) saveDerived(m0 ("m0" "drawing") ) saveDerived(i0 ("i0" "drawing") ) saveDerived(m1 ("m1" "drawing") ) saveDerived(lm_i1b ("i1b" "drawing") ) saveDerived(m2 ("m2" "drawing") ) saveDerived(i2 ("i2" "drawing") ) saveDerived(m3 ("m3" "drawing") ) ) )

    [Cadence IntegrationCadence Integration][ERC][LVS]

    Nikolai Joukov (kolya@rsfq1.physics.sunysb.edu) KTRACK statistics engine