• 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. Finding Layer Box In a Instance

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 145
  • Views 16893
  • 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

Finding Layer Box In a Instance

harishgurram
harishgurram over 11 years ago

 Hi,

I have placed a instance in my cell view(layout). 

Is there any functions to get the bBox of a particular layer purpose pair, with out flattening the instance.

  • Cancel
Parents
  • SteffenLGF
    SteffenLGF over 8 years ago

    Andrew,

    based on what I read in the documentation the required functionality should already be implemented by the 'rodGetBBox' function.

    When I try it this function appears to be unable to deal with mosaics, though, and only the first original shape of a mosaic is found.

    • Is your code above a work-around to deal with the fact that rodGetBBox does not handle mosaics?
    • am I using the function incorrectly?
    • or do I misunderstand the description of rodGetBBox?


    Thanks in advance
    Steffen

    to deal with the fact that load("~/skill/14lpp/apmpm/v1.il")load("~/skill/14lpp/apmom/v1.il")load("/home/sloeffle/sandbox/cdt/pcell/gf7b/skill/Moonraker0p9/slCdtExt.il")load("~/skill/14lpp/apmom/v1.il")startFindercv=geGetWindowCellView()instHier = dbInstQuery(cv cv->bBox)insthierinstHiercar(instHier)nth(0 instHier)nth(1 instHier)nth(2 instHier)nth(3 instHier)nth(4 instHier)nth(5 instHier)nth(6 instHier)length(instHier)instHier = dbInstQuery(cv cv->bBox 0 1)instHier = dbInstQuery(cv cv->bBox 0 4)instHierinstHier = dbInstQuery(cv cv->bBox 0 2)instHiercar(instHoer)->cellNamecar(instHier)->cellNamecar(nth(1 instHier))->cellNameinstHier = dbInstQuery(cv cv->bBox 0 3)instHier = dbInstQuery(cv cv->bBox 0 4)instHier = dbInstQuery(cv cv->bBox 0 4)instHier = dbInstQuery(cv cv->bBox )length(instHier)wanted=setof(instPath dbInstQuery(cv cv~>bBox ) if(listp(instPath) car(last(instPath)) instPath)~>cellName=="padset_GSG_apmom")wanted=setof(instPath dbInstQuery(cv cv~>bBox 0 3) if(listp(instPath) car(last(instPath)) instPath)~>cellName=="padset_GSG_apmom")wanted=setof(instPath dbInstQuery(cv cv~>bBox 0 2) if(listp(instPath) car(last(instPath)) instPath)~>cellName=="padset_GSG_apmom")wanted=setof(instPath dbInstQuery(cv cv~>bBox 0 3) if(listp(instPath) car(last(instPath)) instPath)~>cellName=="padset_GSG_apmom")cv->cellNamep1=car(wanted)foreach(p p1 fprintf(stdout "%s\n" p->cellName))foreach(p p1 fprintf(stdout "%A\n" p->bBox))load("~/skill/14lpp/apmom/v1.il")load("~/skill/14lpp/apmom/v1.il")load("~/skill/14lpp/apmom/v1.il")dbIddbId->cellViewcvTopCellload("~/skill/14lpp/apmom/v1.il")load("~/skill/14lpp/apmom/v1.il")padsforeach(p pads p = car(last(p)))ppadsa='(1 2 3)foreach(i a printf("%S\A\n" i))foreach(i a printf("%A\n" i))foreach(i a i++ printf("%A\n" i))foreach(i a i++ printf("%A\n" i))foreach(i a i++ printf("%A\n" i))aforeach(i a i=i++ printf("%A\n" i))load("~/skill/14lpp/apmom/v1.il")padsetspadsforeach(p padsets cons(car(last(p)) pads))padsforeach(p padsets printf("%A\n" (car(last(p)))))lastpadslcar(padsets)car(padsets)last(car(padsets))car(last(car(padsets)))padsetsp1=car(padsets)cons(car(last(p)) pads)cons(car(last(p1)) pads)padsa=list(1 2)cons(3 a)aload("~/skill/14lpp/apmom/v1.il")load("~/skill/14lpp/apmom/v1.il")padsbBoxcellcell        dbId =  dbCreateInstByMasterName(                                    cvTopCell                                    lib                                    cell                                    "layout"                                    strcat("i" sprintf(nil "%02d" i++) cell)                                    origin; cdtGetListParam(cells list(cell "origin"))                                    "R0"                                    )cell = "apmom3v3_L1_1_W1_1_C7C5_dev"cell        dbId =  dbCreateInstByMasterName(                                    cvTopCell                                    lib                                    cell                                    "layout"                                    strcat("i" sprintf(nil "%02d" i++) cell)                                    origin; cdtGetListParam(cells list(cell "origin"))                                    "R0"                                    )cell = "apmom3v3_L1_1_W1_1_C7C5_dev"cell        dbId =  dbCreateInstByMasterName(                                    cvTopCell                                    lib                                    cell                                    "layout"                                    strcat("i" sprintf(nil "%02d" i++) cell)                                    origin; cdtGetListParam(cells list(cell "origin"))                                    "R0"                                    )       dbId =  dbCreateInstByMasterName(                                    cvTopCell                                    lib                                    cell                                    "layout"                                    strcat("i" sprintf(nil "%02d" i++) cell)                                    origin; cdtGetListParam(cells list(cell "origin"))                                    "R0"                                    )cvTopCell = geWindowCellView()cvTopCell = geGetWindowCellView()       dbId =  dbCreateInstByMasterName(                                    cvTopCell                                    lib                                    cell                                    "layout"                                    strcat("i" sprintf(nil "%02d" i++) cell)                                    origin; cdtGetListParam(cells list(cell "origin"))                                    "R0"                                    )       dbId =  dbCreateInstByMasterName(                                    cvTopCell                                    lib                                    cell                                    "layout"                                    strcat("i" sprintf(nil "%02d" i++) cell)                                    origin; cdtGetListParam(cells list(cell "origin"))                                    "R0"                                    )                                            if(dbIsId(dbId)                 then slSetListParam(cells list(cell "dbId" ) dbId )                else fprintf(stdout "dbID for %s fails\n" cell)                        break()        )dbId->bBox        padsets = setof(instPath dbInstQuery(cvTopCell dbId~>bBox 0 3) if(listp(instPath) car(last(instPath)) instPath)~>cellName=="padset_GSG_apmom")        dbId =  dbCreateInstByMasterName(                                    cvTopCell                                    lib                                    cell                                    "layout"                                    strcat("i" sprintf(nil "%02d" i++) cell)                                    origin; cdtGetListParam(cells list(cell "origin"))                                    "R0"                                    )        if(dbIsId(dbId)                 then slSetListParam(cells list(cell "dbId" ) dbId )                else fprintf(stdout "dbID for %s fails\n" cell)                        break()        )            fprintf(stdout "cell = %20s," cell)origin = 0:0        dbId =  dbCreateInstByMasterName(                                    cvTopCell                                    lib                                    cell                                    "layout"                                    strcat("i" sprintf(nil "%02d" i++) cell)                                    origin; cdtGetListParam(cells list(cell "origin"))                                    "R0"                                    )        if(dbIsId(dbId)                 then slSetListParam(cells list(cell "dbId" ) dbId )                else fprintf(stdout "dbID for %s fails\n" cell)                        break()        )            fprintf(stdout "cell = %20s," cell)        padsets = setof(instPath dbInstQuery(cvTopCell dbId~>bBox 0 3) if(listp(instPath) car(last(instPath)) instPath)~>cellName=="padset_GSG_apmom")        pads=nil        foreach(p padsets pads = cons(car(last(p)) pads))        fprintf(stdout " number of padsets found: %d," length(pads))dbId->bBoxforeach(p pads printf("%A\n" p->bBox))dbId->xyforeach(p pads printf("%A\n" p->xy))        bBox = list(                    list(                            apply( 'min mapcar(lambda( ( xy) xCoord(lowerLeft(rodGetBBox(?figId xy ?layer "C4")))) pads))                            apply( 'min mapcar(lambda( ( xy) yCoord(lowerLeft(rodGetBBox(?figId xy ?layer "C4")))) pads))                        )                    list(                            apply( 'max mapcar(lambda( ( xy) xCoord(lowerLeft(rodGetBBox(?figId xy ?layer "C4")))) pads))                            apply( 'max mapcar(lambda( ( xy) yCoord(lowerLeft(rodGetBBox(?figId xy ?layer "C4")))) pads))                        )                    )mapcar(lambda( ( xy) xCoord(lowerLeft(rodGetBBox(?figId xy ?layer "C4")))) pads)mapcar(lambda( ( xy) yCoord(lowerLeft(rodGetBBox(?figId xy ?layer "C4")))) pads)mapcar(lambda( ( xy) rodGetBBox(?figId xy ?layer "C4")) pads)mapcar(lambda( ( xy) xy->bBox pads))mapcar(lambda( ( xy) xy->bBox ) pads)mapcar(lambda( ( xy) rodGetBBox(?figId xy ?layer "C4")) pads)car(pads)->cellnamecar(pads)->cellName        bBox = list(                    list(                            apply( 'min mapcar(lambda( ( xy) xCoord(lowerLeft(rodGetBBox(?figId xy ?layer "C4")))) pads))                            apply( 'min mapcar(lambda( ( xy) yCoord(lowerLeft(rodGetBBox(?figId xy ?layer "C4")))) pads))                        )                    list(                            apply( 'max mapcar(lambda( ( xy) xCoord(lowerLeft(rodGetBBox(?figIp=car(pads)d xy ?layer "C4")))) pads))                            apply( 'max mapcar(lambda( ( xy) yCoord(lowerLeft(rodGetBBox(?figId xy ?layer "C4")))) pads))                        )                    )p=car(pads)p->bBoxp0=car(pads)p1=car(last(pads))p1->bBox

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • SteffenLGF
    SteffenLGF over 8 years ago

    Andrew,

    based on what I read in the documentation the required functionality should already be implemented by the 'rodGetBBox' function.

    When I try it this function appears to be unable to deal with mosaics, though, and only the first original shape of a mosaic is found.

    • Is your code above a work-around to deal with the fact that rodGetBBox does not handle mosaics?
    • am I using the function incorrectly?
    • or do I misunderstand the description of rodGetBBox?


    Thanks in advance
    Steffen

    to deal with the fact that load("~/skill/14lpp/apmpm/v1.il")load("~/skill/14lpp/apmom/v1.il")load("/home/sloeffle/sandbox/cdt/pcell/gf7b/skill/Moonraker0p9/slCdtExt.il")load("~/skill/14lpp/apmom/v1.il")startFindercv=geGetWindowCellView()instHier = dbInstQuery(cv cv->bBox)insthierinstHiercar(instHier)nth(0 instHier)nth(1 instHier)nth(2 instHier)nth(3 instHier)nth(4 instHier)nth(5 instHier)nth(6 instHier)length(instHier)instHier = dbInstQuery(cv cv->bBox 0 1)instHier = dbInstQuery(cv cv->bBox 0 4)instHierinstHier = dbInstQuery(cv cv->bBox 0 2)instHiercar(instHoer)->cellNamecar(instHier)->cellNamecar(nth(1 instHier))->cellNameinstHier = dbInstQuery(cv cv->bBox 0 3)instHier = dbInstQuery(cv cv->bBox 0 4)instHier = dbInstQuery(cv cv->bBox 0 4)instHier = dbInstQuery(cv cv->bBox )length(instHier)wanted=setof(instPath dbInstQuery(cv cv~>bBox ) if(listp(instPath) car(last(instPath)) instPath)~>cellName=="padset_GSG_apmom")wanted=setof(instPath dbInstQuery(cv cv~>bBox 0 3) if(listp(instPath) car(last(instPath)) instPath)~>cellName=="padset_GSG_apmom")wanted=setof(instPath dbInstQuery(cv cv~>bBox 0 2) if(listp(instPath) car(last(instPath)) instPath)~>cellName=="padset_GSG_apmom")wanted=setof(instPath dbInstQuery(cv cv~>bBox 0 3) if(listp(instPath) car(last(instPath)) instPath)~>cellName=="padset_GSG_apmom")cv->cellNamep1=car(wanted)foreach(p p1 fprintf(stdout "%s\n" p->cellName))foreach(p p1 fprintf(stdout "%A\n" p->bBox))load("~/skill/14lpp/apmom/v1.il")load("~/skill/14lpp/apmom/v1.il")load("~/skill/14lpp/apmom/v1.il")dbIddbId->cellViewcvTopCellload("~/skill/14lpp/apmom/v1.il")load("~/skill/14lpp/apmom/v1.il")padsforeach(p pads p = car(last(p)))ppadsa='(1 2 3)foreach(i a printf("%S\A\n" i))foreach(i a printf("%A\n" i))foreach(i a i++ printf("%A\n" i))foreach(i a i++ printf("%A\n" i))foreach(i a i++ printf("%A\n" i))aforeach(i a i=i++ printf("%A\n" i))load("~/skill/14lpp/apmom/v1.il")padsetspadsforeach(p padsets cons(car(last(p)) pads))padsforeach(p padsets printf("%A\n" (car(last(p)))))lastpadslcar(padsets)car(padsets)last(car(padsets))car(last(car(padsets)))padsetsp1=car(padsets)cons(car(last(p)) pads)cons(car(last(p1)) pads)padsa=list(1 2)cons(3 a)aload("~/skill/14lpp/apmom/v1.il")load("~/skill/14lpp/apmom/v1.il")padsbBoxcellcell        dbId =  dbCreateInstByMasterName(                                    cvTopCell                                    lib                                    cell                                    "layout"                                    strcat("i" sprintf(nil "%02d" i++) cell)                                    origin; cdtGetListParam(cells list(cell "origin"))                                    "R0"                                    )cell = "apmom3v3_L1_1_W1_1_C7C5_dev"cell        dbId =  dbCreateInstByMasterName(                                    cvTopCell                                    lib                                    cell                                    "layout"                                    strcat("i" sprintf(nil "%02d" i++) cell)                                    origin; cdtGetListParam(cells list(cell "origin"))                                    "R0"                                    )cell = "apmom3v3_L1_1_W1_1_C7C5_dev"cell        dbId =  dbCreateInstByMasterName(                                    cvTopCell                                    lib                                    cell                                    "layout"                                    strcat("i" sprintf(nil "%02d" i++) cell)                                    origin; cdtGetListParam(cells list(cell "origin"))                                    "R0"                                    )       dbId =  dbCreateInstByMasterName(                                    cvTopCell                                    lib                                    cell                                    "layout"                                    strcat("i" sprintf(nil "%02d" i++) cell)                                    origin; cdtGetListParam(cells list(cell "origin"))                                    "R0"                                    )cvTopCell = geWindowCellView()cvTopCell = geGetWindowCellView()       dbId =  dbCreateInstByMasterName(                                    cvTopCell                                    lib                                    cell                                    "layout"                                    strcat("i" sprintf(nil "%02d" i++) cell)                                    origin; cdtGetListParam(cells list(cell "origin"))                                    "R0"                                    )       dbId =  dbCreateInstByMasterName(                                    cvTopCell                                    lib                                    cell                                    "layout"                                    strcat("i" sprintf(nil "%02d" i++) cell)                                    origin; cdtGetListParam(cells list(cell "origin"))                                    "R0"                                    )                                            if(dbIsId(dbId)                 then slSetListParam(cells list(cell "dbId" ) dbId )                else fprintf(stdout "dbID for %s fails\n" cell)                        break()        )dbId->bBox        padsets = setof(instPath dbInstQuery(cvTopCell dbId~>bBox 0 3) if(listp(instPath) car(last(instPath)) instPath)~>cellName=="padset_GSG_apmom")        dbId =  dbCreateInstByMasterName(                                    cvTopCell                                    lib                                    cell                                    "layout"                                    strcat("i" sprintf(nil "%02d" i++) cell)                                    origin; cdtGetListParam(cells list(cell "origin"))                                    "R0"                                    )        if(dbIsId(dbId)                 then slSetListParam(cells list(cell "dbId" ) dbId )                else fprintf(stdout "dbID for %s fails\n" cell)                        break()        )            fprintf(stdout "cell = %20s," cell)origin = 0:0        dbId =  dbCreateInstByMasterName(                                    cvTopCell                                    lib                                    cell                                    "layout"                                    strcat("i" sprintf(nil "%02d" i++) cell)                                    origin; cdtGetListParam(cells list(cell "origin"))                                    "R0"                                    )        if(dbIsId(dbId)                 then slSetListParam(cells list(cell "dbId" ) dbId )                else fprintf(stdout "dbID for %s fails\n" cell)                        break()        )            fprintf(stdout "cell = %20s," cell)        padsets = setof(instPath dbInstQuery(cvTopCell dbId~>bBox 0 3) if(listp(instPath) car(last(instPath)) instPath)~>cellName=="padset_GSG_apmom")        pads=nil        foreach(p padsets pads = cons(car(last(p)) pads))        fprintf(stdout " number of padsets found: %d," length(pads))dbId->bBoxforeach(p pads printf("%A\n" p->bBox))dbId->xyforeach(p pads printf("%A\n" p->xy))        bBox = list(                    list(                            apply( 'min mapcar(lambda( ( xy) xCoord(lowerLeft(rodGetBBox(?figId xy ?layer "C4")))) pads))                            apply( 'min mapcar(lambda( ( xy) yCoord(lowerLeft(rodGetBBox(?figId xy ?layer "C4")))) pads))                        )                    list(                            apply( 'max mapcar(lambda( ( xy) xCoord(lowerLeft(rodGetBBox(?figId xy ?layer "C4")))) pads))                            apply( 'max mapcar(lambda( ( xy) yCoord(lowerLeft(rodGetBBox(?figId xy ?layer "C4")))) pads))                        )                    )mapcar(lambda( ( xy) xCoord(lowerLeft(rodGetBBox(?figId xy ?layer "C4")))) pads)mapcar(lambda( ( xy) yCoord(lowerLeft(rodGetBBox(?figId xy ?layer "C4")))) pads)mapcar(lambda( ( xy) rodGetBBox(?figId xy ?layer "C4")) pads)mapcar(lambda( ( xy) xy->bBox pads))mapcar(lambda( ( xy) xy->bBox ) pads)mapcar(lambda( ( xy) rodGetBBox(?figId xy ?layer "C4")) pads)car(pads)->cellnamecar(pads)->cellName        bBox = list(                    list(                            apply( 'min mapcar(lambda( ( xy) xCoord(lowerLeft(rodGetBBox(?figId xy ?layer "C4")))) pads))                            apply( 'min mapcar(lambda( ( xy) yCoord(lowerLeft(rodGetBBox(?figId xy ?layer "C4")))) pads))                        )                    list(                            apply( 'max mapcar(lambda( ( xy) xCoord(lowerLeft(rodGetBBox(?figIp=car(pads)d xy ?layer "C4")))) pads))                            apply( 'max mapcar(lambda( ( xy) yCoord(lowerLeft(rodGetBBox(?figId xy ?layer "C4")))) pads))                        )                    )p=car(pads)p->bBoxp0=car(pads)p1=car(last(pads))p1->bBox

    • 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