• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Detecting objects outside TOP LEVEL layout cell; Virtuoso...

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 143
  • Views 14258
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Detecting objects outside TOP LEVEL layout cell; Virtuoso, prBoundary OBJECT

DannyRitt
DannyRitt over 10 years ago

Hello,

I would like to detect all objects (Shapes) outside the TOP LEVEL layout block, prBoundary.

Support solution #20309046 works well for small cells. If the block is larger and includes large amount of objects (VIAs for example) it will take vast amount of time to run, (Hours) which makes it unusable.

There are few other solutions on Cadence support site and the community that simply do not do the job.

A robust solution is needed for efficient detection of objects outside TOP LEVEL block only, prBoundary object.

Cadence 6.1.x.

Many Thanks!

Danny

  • Cancel
Parents
  • DannyRitt
    DannyRitt over 10 years ago

    Cadence Support provided an efficient solution for the case. Below is the SKILL code for the community benefit.

    -------------------------------------------------------------------------------------------------------------

    /*

    You can use the attached SKILL code in the layout window. It creates a menu item with the different submenus under it as shown in the below snapshot.

    1. Load the SKILL code in CIW:

    load "CCScheckOutsidePRB.il"

    2. Open Desired Layout in Layout-L or Layout-XL mode a new Menu 'DOB', gets added with the following choices as defined by the 'CCSUserPostInstallTriggerDOB'. Click on the Check Data Out of prBoundary option to create the markers in the layout design.

    2.1. "Check Data Out of prBoundary"

    2.2. "Find Marker by Zoom"

    2.3. "Explain Individual Marker"

    2.4. "Delete All Markers"

    3. Click on the "Find Marker by Zoom" and select the zoom to marker option to move to the specific marker.

    4. Menu item "Delete All Markers", deletes all the markers in the design.

    You may need to change the following two variables in the SKILL code as per your technology to define the purpose and layers to search for and avoid while checking;

    validPurpose = list("drawing" "pin")

    inValidLpp = list("text")

    */

    /*************************************************************************

    * DISCLAIMER: The following code is provided for Cadence customers *

    * to use at their own risk. The code may require modification to *

    * satisfy the requirements of any user. The code and any modifications *

    * to the code may not be compatible with current or future versions of *

    * Cadence products. THE CODE IS PROVIDED "AS IS" AND WITH NO WARRANTIES, *

    * INCLUDING WITHOUT LIMITATION ANY EXPRESS WARRANTIES OR IMPLIED *

    * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. *

    *************************************************************************/

    procedure(CCSTransformBBox(shape)

    let((flatList y)

    flatList = nil

    while(listp(shape)

    y = car(shape)

    flatList = append(flatList list(y))

    shape = cadr(shape) ; next shape

    );while

    if(flatList then

    geTransformUserBBox(shape~>bBox geGetInstTransform(flatList))

    else shape~>bBox)

    );let

    );procedure

    procedure(CCSTransformShapeBBox(cv box layer stopLevel)

    let(( finalList shapes att_list)

    shapes = dbGetOverlaps(cv box layer 0:stopLevel nil)

    finalList = nil

    foreach(shape shapes

    att_list = CCSTransformBBox(shape)

    if(att_list then

    finalList = append(finalList list(att_list))

    )

    ) ;foreach

    finalList

    ) ;let

    ) ;procedure

    procedure(CCSmakeMessageMarker(shpType bBoxLLX bBoxLLY bBoxURX bBoxURY layerName layerPurpose cvId shapebBox)

    let(( message)

    ;println(shapebBox)

    warn("%s Shape with bBox %L on LPP = (%s %s) is Outside prBoundary Object bBox = ((%f %f) (%f %f)).\n\n" shpType shapebBox layerName layerPurpose bBoxLLX bBoxLLY bBoxURX bBoxURY)

    message = sprintf(nil "Database Out of prBoundary at LPP %s %s and bBox %L" layerName layerPurpose shapebBox)

    geCreateMarkerByBBox(cvId "warning" "Obj_Outside" message "" shapebBox)

    ); let

    ); procedure

    procedure(CCScheckDbOutPrBoundary(shpType bBoxLLX bBoxLLY bBoxURX bBoxURY shapebBox layerName layerPurpose cvId "tfffflttd")

    let((shpbBoxLL shpbBoxUR shpbBoxLLX shpbBoxLLY shpbBoxURX shpbBoxURY )

    ;println(shapebBox)

    shpbBoxLL = lowerLeft(shapebBox)

    shpbBoxUR = upperRight(shapebBox)

    shpbBoxLLX = xCoord(shpbBoxLL)

    shpbBoxLLY = yCoord(shpbBoxLL)

    shpbBoxURX = xCoord(shpbBoxUR)

    shpbBoxURY = yCoord(shpbBoxUR)

    printf("Checking Shape on LPP: (%L %L) with bBox %L...\n" layerName layerPurpose shapebBox)

    if(lessp(shpbBoxLLX bBoxLLX) == t then

    printf("\tshpbBoxLLX < bBoxLLX : %f < %f \n" shpbBoxLLX bBoxLLX)

    CCSmakeMessageMarker(shpType bBoxLLX bBoxLLY bBoxURX bBoxURY layerName layerPurpose cvId shapebBox)

    ); shpbBoxLLX < bBoxLLX

    if(lessp(shpbBoxLLY bBoxLLY) == t then

    printf("\tshpbBoxLLY < bBoxLLY : %f < %f \n" shpbBoxLLY bBoxLLY)

    CCSmakeMessageMarker(shpType bBoxLLX bBoxLLY bBoxURX bBoxURY layerName layerPurpose cvId shapebBox)

    ); shpbBoxLLY < bBoxLLY

    if(greaterp(shpbBoxURX bBoxURX) == t then

    printf("\tshpbBoxURX > bBoxURX : %f < %f \n" shpbBoxURX bBoxURX)

    CCSmakeMessageMarker(shpType bBoxLLX bBoxLLY bBoxURX bBoxURY layerName layerPurpose cvId shapebBox)

    ); shpbBoxURX > bBoxURX

    if(greaterp(shpbBoxURY bBoxURY) == t then

    printf("\tshpbBoxURY > bBoxURY : %f < %f \n" shpbBoxURY bBoxURY)

    CCSmakeMessageMarker(shpType bBoxLLX bBoxLLY bBoxURX bBoxURY layerName layerPurpose cvId shapebBox)

    ); shpbBoxURY > bBoxURY

    ); let

    ); procedure

    procedure(CCSDOB(@optional (cvId geGetWindowCellView()) "g")

    let(( boxWidth prBBox bBoxLL bBoxUR bBoxLLX bBoxLLY bBoxURX bBoxURY validPurpose inValidLpp allShapesTop allShapesBottom allShapesLeft allShapesRight )

    prBBox = cvId~>prBoundary~>bBox

    bBoxLL = lowerLeft(prBBox)

    bBoxUR = upperRight(prBBox)

    bBoxLLX = xCoord(bBoxLL)

    bBoxLLY = yCoord(bBoxLL)

    bBoxURX = xCoord(bBoxUR)

    bBoxURY = yCoord(bBoxUR)

    validPurpose = list("drawing" "pin")

    inValidLpp = list("text")

    printf("********************************\n")

    printf("Checking all Hierarchical Shapes\n")

    printf("********************************\n")

    ; Hierarchy Shapes

    foreach(layer cvId~>lpps

    if(member(layer~>purpose validPurpose) && !member(layer~>layerName inValidLpp)

    then

    ;;printf("LPP: (%L %L)...\n" layer~>layerName layer~>purpose)

    /* Checking within 5 micron of prBoundary, replace the value of boxWidth with new numbers if required*/

    boxWidth=5.0

    allShapesTop = CCSTransformShapeBBox(cvId list(bBoxLLX:bBoxURY bBoxURX:bBoxURY+boxWidth) list(layer~>layerName layer~>purpose) 32)

    allShapesBottom = CCSTransformShapeBBox(cvId list(bBoxLLX:bBoxLLY-boxWidth bBoxURX:bBoxLLY) list(layer~>layerName layer~>purpose) 32)

    allShapesLeft = CCSTransformShapeBBox(cvId list(bBoxLLX-boxWidth:bBoxLLY-boxWidth bBoxLLX:bBoxURY+boxWidth) list(layer~>layerName layer~>purpose) 32)

    allShapesRight = CCSTransformShapeBBox(cvId list(bBoxURX:bBoxLLY-boxWidth bBoxURX+boxWidth:bBoxURY+boxWidth) list(layer~>layerName layer~>purpose) 32)

    foreach(shpbBox allShapesTop

    CCScheckDbOutPrBoundary("Above PrBoundary" bBoxLLX bBoxLLY bBoxURX bBoxURY shpbBox layer~>layerName layer~>purpose cvId )

    ); foreach

    foreach(shpbBox allShapesBottom

    CCScheckDbOutPrBoundary("Below PrBoundary" bBoxLLX bBoxLLY bBoxURX bBoxURY shpbBox layer~>layerName layer~>purpose cvId )

    ); foreach

    foreach(shpbBox allShapesLeft

    CCScheckDbOutPrBoundary("Left of PrBoundary" bBoxLLX bBoxLLY bBoxURX bBoxURY shpbBox layer~>layerName layer~>purpose cvId )

    ); foreach

    foreach(shpbBox allShapesRight

    CCScheckDbOutPrBoundary("Right of PrBoundary" bBoxLLX bBoxLLY bBoxURX bBoxURY shpbBox layer~>layerName layer~>purpose cvId )

    ); foreach

    ); if

    ); foreach

    printf("\n\n");

    ); let

    ); procedure

    ;CCSDOB()

    procedure(CCSRemoveMarkers()

    if(geHasMarker(geGetWindowCellView()) == t then

    geDeleteAllMarker(geGetWindowCellView())

    ); if

    ); procedure

    procedure(CCSDOBMenu()

    let((no MenuItem CreateMenuItem)

    no = 0

    no = no + 1

    MenuItem = hiCreateMenuItem(

    ?name concat("Item" no)

    ?itemText "Delete All Markers"

    ?callback "CCSRemoveMarkers()"

    ); hiCreateMenuItem

    CreateMenuItem = cons(MenuItem CreateMenuItem )

    no = no + 1

    MenuItem = hiCreateMenuItem(

    ?name concat("Item" no)

    ?itemText "Explain Individual Marker"

    ?callback "geHiExplainMarker()"

    ); hiCreateMenuItem

    CreateMenuItem = cons(MenuItem CreateMenuItem )

    no = no + 1

    MenuItem = hiCreateMenuItem(

    ?name concat("Item" no)

    ?itemText "Find Marker by Zoom"

    ?callback "geHiCommonFindMarker()"

    ); hiCreateMenuItem

    CreateMenuItem = cons(MenuItem CreateMenuItem )

    no = no + 1

    MenuItem = hiCreateMenuItem(

    ?name concat("Item" no)

    ?itemText "Check Data Out of prBoundary"

    ?callback "CCSDOB()"

    ); hiCreateMenuItem

    CreateMenuItem = cons(MenuItem CreateMenuItem )

    hiCreatePulldownMenu(

    'CCSlayoutPulldownMenuDOB

    "DOB"

    CreateMenuItem

    ); hiCreatePulldownMenu

    ); let

    ); procedure

    procedure( CCSUserPostInstallTriggerDOB(args)

    hiInsertBannerMenu(

    args->window

    CCSDOBMenu()

    length( hiGetBannerMenus( args->window))

    ); hiInsertBannerMenu

    ) ; procedure

    deRegUserTriggers("maskLayout" nil nil 'CCSUserPostInstallTriggerDOB)

    deRegUserTriggers("maskLayoutXL" nil nil 'CCSUserPostInstallTriggerDOB)

    ------------------------------------------------------------------------------------

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • DannyRitt
    DannyRitt over 10 years ago

    Cadence Support provided an efficient solution for the case. Below is the SKILL code for the community benefit.

    -------------------------------------------------------------------------------------------------------------

    /*

    You can use the attached SKILL code in the layout window. It creates a menu item with the different submenus under it as shown in the below snapshot.

    1. Load the SKILL code in CIW:

    load "CCScheckOutsidePRB.il"

    2. Open Desired Layout in Layout-L or Layout-XL mode a new Menu 'DOB', gets added with the following choices as defined by the 'CCSUserPostInstallTriggerDOB'. Click on the Check Data Out of prBoundary option to create the markers in the layout design.

    2.1. "Check Data Out of prBoundary"

    2.2. "Find Marker by Zoom"

    2.3. "Explain Individual Marker"

    2.4. "Delete All Markers"

    3. Click on the "Find Marker by Zoom" and select the zoom to marker option to move to the specific marker.

    4. Menu item "Delete All Markers", deletes all the markers in the design.

    You may need to change the following two variables in the SKILL code as per your technology to define the purpose and layers to search for and avoid while checking;

    validPurpose = list("drawing" "pin")

    inValidLpp = list("text")

    */

    /*************************************************************************

    * DISCLAIMER: The following code is provided for Cadence customers *

    * to use at their own risk. The code may require modification to *

    * satisfy the requirements of any user. The code and any modifications *

    * to the code may not be compatible with current or future versions of *

    * Cadence products. THE CODE IS PROVIDED "AS IS" AND WITH NO WARRANTIES, *

    * INCLUDING WITHOUT LIMITATION ANY EXPRESS WARRANTIES OR IMPLIED *

    * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. *

    *************************************************************************/

    procedure(CCSTransformBBox(shape)

    let((flatList y)

    flatList = nil

    while(listp(shape)

    y = car(shape)

    flatList = append(flatList list(y))

    shape = cadr(shape) ; next shape

    );while

    if(flatList then

    geTransformUserBBox(shape~>bBox geGetInstTransform(flatList))

    else shape~>bBox)

    );let

    );procedure

    procedure(CCSTransformShapeBBox(cv box layer stopLevel)

    let(( finalList shapes att_list)

    shapes = dbGetOverlaps(cv box layer 0:stopLevel nil)

    finalList = nil

    foreach(shape shapes

    att_list = CCSTransformBBox(shape)

    if(att_list then

    finalList = append(finalList list(att_list))

    )

    ) ;foreach

    finalList

    ) ;let

    ) ;procedure

    procedure(CCSmakeMessageMarker(shpType bBoxLLX bBoxLLY bBoxURX bBoxURY layerName layerPurpose cvId shapebBox)

    let(( message)

    ;println(shapebBox)

    warn("%s Shape with bBox %L on LPP = (%s %s) is Outside prBoundary Object bBox = ((%f %f) (%f %f)).\n\n" shpType shapebBox layerName layerPurpose bBoxLLX bBoxLLY bBoxURX bBoxURY)

    message = sprintf(nil "Database Out of prBoundary at LPP %s %s and bBox %L" layerName layerPurpose shapebBox)

    geCreateMarkerByBBox(cvId "warning" "Obj_Outside" message "" shapebBox)

    ); let

    ); procedure

    procedure(CCScheckDbOutPrBoundary(shpType bBoxLLX bBoxLLY bBoxURX bBoxURY shapebBox layerName layerPurpose cvId "tfffflttd")

    let((shpbBoxLL shpbBoxUR shpbBoxLLX shpbBoxLLY shpbBoxURX shpbBoxURY )

    ;println(shapebBox)

    shpbBoxLL = lowerLeft(shapebBox)

    shpbBoxUR = upperRight(shapebBox)

    shpbBoxLLX = xCoord(shpbBoxLL)

    shpbBoxLLY = yCoord(shpbBoxLL)

    shpbBoxURX = xCoord(shpbBoxUR)

    shpbBoxURY = yCoord(shpbBoxUR)

    printf("Checking Shape on LPP: (%L %L) with bBox %L...\n" layerName layerPurpose shapebBox)

    if(lessp(shpbBoxLLX bBoxLLX) == t then

    printf("\tshpbBoxLLX < bBoxLLX : %f < %f \n" shpbBoxLLX bBoxLLX)

    CCSmakeMessageMarker(shpType bBoxLLX bBoxLLY bBoxURX bBoxURY layerName layerPurpose cvId shapebBox)

    ); shpbBoxLLX < bBoxLLX

    if(lessp(shpbBoxLLY bBoxLLY) == t then

    printf("\tshpbBoxLLY < bBoxLLY : %f < %f \n" shpbBoxLLY bBoxLLY)

    CCSmakeMessageMarker(shpType bBoxLLX bBoxLLY bBoxURX bBoxURY layerName layerPurpose cvId shapebBox)

    ); shpbBoxLLY < bBoxLLY

    if(greaterp(shpbBoxURX bBoxURX) == t then

    printf("\tshpbBoxURX > bBoxURX : %f < %f \n" shpbBoxURX bBoxURX)

    CCSmakeMessageMarker(shpType bBoxLLX bBoxLLY bBoxURX bBoxURY layerName layerPurpose cvId shapebBox)

    ); shpbBoxURX > bBoxURX

    if(greaterp(shpbBoxURY bBoxURY) == t then

    printf("\tshpbBoxURY > bBoxURY : %f < %f \n" shpbBoxURY bBoxURY)

    CCSmakeMessageMarker(shpType bBoxLLX bBoxLLY bBoxURX bBoxURY layerName layerPurpose cvId shapebBox)

    ); shpbBoxURY > bBoxURY

    ); let

    ); procedure

    procedure(CCSDOB(@optional (cvId geGetWindowCellView()) "g")

    let(( boxWidth prBBox bBoxLL bBoxUR bBoxLLX bBoxLLY bBoxURX bBoxURY validPurpose inValidLpp allShapesTop allShapesBottom allShapesLeft allShapesRight )

    prBBox = cvId~>prBoundary~>bBox

    bBoxLL = lowerLeft(prBBox)

    bBoxUR = upperRight(prBBox)

    bBoxLLX = xCoord(bBoxLL)

    bBoxLLY = yCoord(bBoxLL)

    bBoxURX = xCoord(bBoxUR)

    bBoxURY = yCoord(bBoxUR)

    validPurpose = list("drawing" "pin")

    inValidLpp = list("text")

    printf("********************************\n")

    printf("Checking all Hierarchical Shapes\n")

    printf("********************************\n")

    ; Hierarchy Shapes

    foreach(layer cvId~>lpps

    if(member(layer~>purpose validPurpose) && !member(layer~>layerName inValidLpp)

    then

    ;;printf("LPP: (%L %L)...\n" layer~>layerName layer~>purpose)

    /* Checking within 5 micron of prBoundary, replace the value of boxWidth with new numbers if required*/

    boxWidth=5.0

    allShapesTop = CCSTransformShapeBBox(cvId list(bBoxLLX:bBoxURY bBoxURX:bBoxURY+boxWidth) list(layer~>layerName layer~>purpose) 32)

    allShapesBottom = CCSTransformShapeBBox(cvId list(bBoxLLX:bBoxLLY-boxWidth bBoxURX:bBoxLLY) list(layer~>layerName layer~>purpose) 32)

    allShapesLeft = CCSTransformShapeBBox(cvId list(bBoxLLX-boxWidth:bBoxLLY-boxWidth bBoxLLX:bBoxURY+boxWidth) list(layer~>layerName layer~>purpose) 32)

    allShapesRight = CCSTransformShapeBBox(cvId list(bBoxURX:bBoxLLY-boxWidth bBoxURX+boxWidth:bBoxURY+boxWidth) list(layer~>layerName layer~>purpose) 32)

    foreach(shpbBox allShapesTop

    CCScheckDbOutPrBoundary("Above PrBoundary" bBoxLLX bBoxLLY bBoxURX bBoxURY shpbBox layer~>layerName layer~>purpose cvId )

    ); foreach

    foreach(shpbBox allShapesBottom

    CCScheckDbOutPrBoundary("Below PrBoundary" bBoxLLX bBoxLLY bBoxURX bBoxURY shpbBox layer~>layerName layer~>purpose cvId )

    ); foreach

    foreach(shpbBox allShapesLeft

    CCScheckDbOutPrBoundary("Left of PrBoundary" bBoxLLX bBoxLLY bBoxURX bBoxURY shpbBox layer~>layerName layer~>purpose cvId )

    ); foreach

    foreach(shpbBox allShapesRight

    CCScheckDbOutPrBoundary("Right of PrBoundary" bBoxLLX bBoxLLY bBoxURX bBoxURY shpbBox layer~>layerName layer~>purpose cvId )

    ); foreach

    ); if

    ); foreach

    printf("\n\n");

    ); let

    ); procedure

    ;CCSDOB()

    procedure(CCSRemoveMarkers()

    if(geHasMarker(geGetWindowCellView()) == t then

    geDeleteAllMarker(geGetWindowCellView())

    ); if

    ); procedure

    procedure(CCSDOBMenu()

    let((no MenuItem CreateMenuItem)

    no = 0

    no = no + 1

    MenuItem = hiCreateMenuItem(

    ?name concat("Item" no)

    ?itemText "Delete All Markers"

    ?callback "CCSRemoveMarkers()"

    ); hiCreateMenuItem

    CreateMenuItem = cons(MenuItem CreateMenuItem )

    no = no + 1

    MenuItem = hiCreateMenuItem(

    ?name concat("Item" no)

    ?itemText "Explain Individual Marker"

    ?callback "geHiExplainMarker()"

    ); hiCreateMenuItem

    CreateMenuItem = cons(MenuItem CreateMenuItem )

    no = no + 1

    MenuItem = hiCreateMenuItem(

    ?name concat("Item" no)

    ?itemText "Find Marker by Zoom"

    ?callback "geHiCommonFindMarker()"

    ); hiCreateMenuItem

    CreateMenuItem = cons(MenuItem CreateMenuItem )

    no = no + 1

    MenuItem = hiCreateMenuItem(

    ?name concat("Item" no)

    ?itemText "Check Data Out of prBoundary"

    ?callback "CCSDOB()"

    ); hiCreateMenuItem

    CreateMenuItem = cons(MenuItem CreateMenuItem )

    hiCreatePulldownMenu(

    'CCSlayoutPulldownMenuDOB

    "DOB"

    CreateMenuItem

    ); hiCreatePulldownMenu

    ); let

    ); procedure

    procedure( CCSUserPostInstallTriggerDOB(args)

    hiInsertBannerMenu(

    args->window

    CCSDOBMenu()

    length( hiGetBannerMenus( args->window))

    ); hiInsertBannerMenu

    ) ; procedure

    deRegUserTriggers("maskLayout" nil nil 'CCSUserPostInstallTriggerDOB)

    deRegUserTriggers("maskLayoutXL" nil nil 'CCSUserPostInstallTriggerDOB)

    ------------------------------------------------------------------------------------

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information