• 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. SKILL to Identify a LABEL over an Instance

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 143
  • Views 17890
  • 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

SKILL to Identify a LABEL over an Instance

skillUserD
skillUserD over 5 years ago

Hello,

I am in a need of a skill program to find all instances of a specific cell (Including Mosaics), throughout the hierarchy. The program should print the instance's name, xy coordinates at the top level, and extract a label name that is dropped on top of it. In case there is no label on top of the found instance, the program should print "No Label Found" in the report text file. This program aims to map PADs cells within top level.

I am using the below Cadence's solution to find instances and it works well. The missing feature is to identify LABELs that are on top of the found instances. 

I tried to use dbGetOverlap() function, within the below code, in few setups but it seems to fail to identify the existence of labels on top of the found instances.

For example: 


overlapLabel=dbGetTrueOverlaps(cv cadr(instBox) list("M1" "text"))

I am interested to add to the Cadence's solution below some code in order to identify labels on top of the found instances.

Any tip would be greatly appreciated.

Thanks,

Danny


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

procedure(HilightCellByArea(lib cell level)
let((cv instList rect instBox)
;; Deleting old highlights.To prevent uncomment the below line
when(boundp('hset) hset->enable=nil)
cv=geGetWindowCellView()
rect=enterBox(
         ?prompts list("Enter the first corner of your box."
                        "Enter the last corner of your box.")
                )
     instList=dbGetOverlaps(cv rect nil level nil)
;; It uses hilite layer packet. You can change it to y0-y9 layer or any other hilite lpp
     ;;hset = geCreateHilightSet(cv list("y0" "drawing") nil)
     ;;hset = geCreateHilightSet(cv list("hilite" "drawing1") nil)
     hset = geCreateHilightSet(cv list("hilite" "drawing") nil)
        hset->enable = t
  foreach(instId instList
     if(listp(instId)
        then
        instBox=CCSTransformBBox(instId)
        instId=car(instBox)
        when(instId~>libName==lib && instId~>cellName==cell
                geAddHilightRectangle(hset cadr(instBox))
                fprintf(myFileId, "Highlighted the %L instance %L of hierarchy at:%L \n"
                        cell buildString(append1(caddr(instBox)~>name instId~>name) "/") cadr(instBox)
                     foundFlag=t)
                )
        else
        when(instId~>libName==lib && instId~>cellName==cell
                geAddHilightFig(hset instId)
                fprintf(myFileId, "Highlighted the %L instance %L of top cell at:%L \n"
                         cell instId~>name instId~>bBox)
                         foundFlag=t
                        )
                );if listp
        ) ;foreach
t
) ;let
) ;procedure
procedure(CCSTransformBBox(inst)
let((flatList y location)
while(listp(inst)
        y = car(inst)
        flatList = append(flatList list(y))
        inst = cadr(inst) ; next inst
       );while
location=dbTransformBBox(inst~>bBox dbGetHierPathTransform(list(flatList inst)))
list(inst location flatList)
);let
);procedure
  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 5 years ago

    That's not so easy, because whilst dbGetOverlaps allows you to specify t as the layer/purpose arg, it's going to then find every shape of every type down to the specified level of hierarchy in that region - which could be a LOT of shapes. You can then filter them to find those with objType="label" but I don't think there's a direct way of finding just a subset of the object types directly.

    If the label is always at the same level of the instance, potentially you could do a hierarchy traversal and find the instances at level 0 only and the shapes at level 0 only which might make it easier to find as it would have fewer shapes to deal with (only shapes that overlap with the instance at that level). However, then you'll have to do the hierarchy traversal too and sort out all the transformations to the top level (not that hard, but more work). It's probably going to be a simpler and quicker change to limit yourself to a few lpps and loop over them to find any of them.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUserD
    skillUserD over 5 years ago in reply to Andrew Beckett

    Thanks for the support and tips Andrew. 

    Danny

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • skillUserD
    skillUserD over 5 years ago in reply to Andrew Beckett

    Thanks for the support and tips Andrew. 

    Danny

    • 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