• 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. Script for finding same Metal type Shape Overlapping a ...

Stats

  • Locked Locked
  • Replies 23
  • Subscribers 152
  • Views 28758
  • 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

Script for finding same Metal type Shape Overlapping a Trace

RFStuff
RFStuff over 12 years ago

Dear All,

I want to find whether same metal type shape  is overlapping another shape of the same metal.

If it is overlapping, then the overlap area should blink.

Basically this I need for finding SHORT with undesired trace.

For example: I have a trace ( may be a Rectangle/Path). I select this. Then an enabled SKILL script should find a same metal type shape overlapping with the trace and highligting the overlapped area with the trace.

Can anybody show me some light  for this.

Kind Regards,

  • Cancel
  • RFStuff
    RFStuff over 12 years ago

     Hi TheoPain,

    I tried with dbGetTrueOverlaps().

    But No chnage in the output. As you have mentioned, it should have returned 3 objects instead of 6 objects as there are only total 3 overlapping objects (PATHS) of the same metal layer of  the trace.

    shapeList = dbGetTrueOverlaps(cv obj1~>bBox obj1~>layer 0:5)
    \t (db:217705012
    \t     (db:217517248 db:262161624)
    \t     (db:217517248 db:262161472)
    \t     (db:217517248 db:262161312)
    \t     (db:217517248 db:261977724)
    \t     (db:217517248 db:261977644)
    \t     (db:217517248 db:261977564)
    \t )

    Kind Regards,

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    A picture might help, but I suspect that the problem is that the dbGetTrueOverlaps is finding all the objects which interact with the bounding box of obj1. See the attached picture. In this case, the selected object is obj1, and I get:

    (db:0x17511f12
        (db:0x17511f92 db:0x17512292)
        (db:0x17511f92 db:0x17512293)
    )

    The top right path iteracts with the bounding box of the first shape - that's correct. If the path had moved a little to the right so that it didn't interact with the bBox of the fat path, then dbGetTrueOverlaps wouldn't return it - however, dbGetOverlaps (in IC5141) would still return it if the bBox of the lower shape interacts with the bBox of the selected shape. That's what the difference between the two functions (in IC61 dbGetOverlaps always returns the "true" overlaps).

    That's why you need to do the dbLayerAnd as well. Here's what I did to do that:

    overlaps=dbGetTrueOverlaps(cv obj1~>bBox obj1~>layer 0:5)
    shapeList=nil
    foreach(overlap overlaps
      unless(overlap==obj1
        shapeList=cons(dbCopyFig(abGetOverlapShape(overlap) cv abGetOverlapTransform(overlap)) shapeList)
      )
    )
    interactingRegions=dbLayerAnd(cv "y0" list(obj1) shapeList)
    foreach(shape shapeList
      dbDeleteObject(shape)
    )
    ; if a shape on y0 isn't enough, you can convert to markers
    foreach(shape interactingRegions
      if(shape~>objType=="polygon" then
        geCreateMarkerByBBox(cv "warning" "SHORT" "shorting shape" "some reason" shape~>points)
      else
        geCreateMarkerByBBox(cv "warning" "SHORT" "shorting shape" "some reason" shape~>bBox)
      )
      dbDeleteObject(shape)
    )

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RFStuff
    RFStuff over 12 years ago

    Dear Andrew,

    Thanks a lot. 

    I think you might have forgotten to attach the picture.

    Kind Regards,

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

     I must be getting old and forgetting things. Here  it is - sorry!

    Andrew.

    • overlaps.png
    • View
    • Hide
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RFStuff
    RFStuff over 12 years ago

     Dear Andrew,

    Thanks a lot. I don't think so. I think I got the snapshot before I have posted the...

    You are like rocket fast.

    Kind Regards,

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RFStuff
    RFStuff over 12 years ago

    Dear Andrew,

    I tried with your code.  In first stance it worked fine. But I don't kbow when I started icfb agian and ran the code it shows the following warnings and errors. 

     load("~/SKILL/SHORT_TEST_FINAL.ils")
    \o variable abGetOverlapShape redefined
    \w *WARNING* (dbGetq): calling NLambda from Scheme code - dbGetq(car(overlap) transform)
    \w *WARNING* (dbGetq): calling NLambda from Scheme code - dbGetq(car(overlap) origin)
    \w *WARNING* (dbGetq): calling NLambda from Scheme code - dbGetq(car(overlap) orient)
    \o variable abGetOverlapTransform redefined
    \e *Error* eval: unbound variable - overlap
    \e *Error* load: error while loading file - "~/SKILL/SHORT_TEST_FINAL.ils"
    \p >


    My code is as below

    /*****************************************************************
    *                                                                *
    *                (abGetOverlapTransform overlap)                 *
    *                                                                *
    * Get the transform needed to transform the shape in the overlap *
    *           into the current cell's coordinate system            *
    *                                                                *
    *****************************************************************/


    procedure(abGetOverlapShape(overlap1)
      if(listp(overlap1) then
          abGetOverlapShape(cadr(overlap1))
      else
          overlap1
      )
    )



    (procedure (abGetOverlapTransform overlap)
      (let (transform)
           (if (listp overlap)
               (setq transform (dbConcatTransform
                                (abGetOverlapTransform (cadr overlap))
                                (or
                                  (dbGetq (car overlap) transform)
                                  (list (dbGetq (car overlap) origin)
                                        (dbGetq (car overlap) orient)
                                        1.0)
                                  )
                                ))
               (setq transform (list 0:0 "R0" 1.0)))
           transform
           ))


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

    cv=geGetEditCellView()
    obj1=car(geGetSelSet())
    overlaps=dbGetTrueOverlaps(cv obj1~>bBox obj1~>layer 0:5)
    shapeList=nil
    foreach(overlap overlaps
      unless(overlap==obj1
        shapeList=cons(dbCopyFig(abGetOverlapShape(overlap) cv abGetOverlapTransform(overlap)) shapeList)
      )
    )
    interactingRegions=dbLayerAnd(cv "y0" list(obj1) shapeList)
    foreach(shape shapeList
      dbDeleteObject(shape)
    )
    ; if a shape on y0 isn't enough, you can convert to markers
    foreach(shape interactingRegions
      if(shape~>objType=="polygon" then
        geCreateMarkerByBBox(cv "warning" "SHORT" "shorting shape" "some reason" shape~>points)
      else
        geCreateMarkerByBBox(cv "warning" "SHORT" "shorting shape" "some reason" shape~>bBox)
      )
      dbDeleteObject(shape)
    )
    ;;load("~/SKILL/SHORT_TEST_FINAL.ils")

    Running in SKILL Init gives following LOgs:-

    \o INFO (REP008): Program SKILL Lint started on Feb 28 22:10:19 2013.
    \o INFO (PREFIXES): Using prefixes: "none"
    \o INFO (STRICT): Using strict checking of global variables.
    \o INFO (VAR5): Unrecognized global variables:
    \o WARN GLOB (VAR8): cv
    \o INFO (VAR0): used:  in function/file ~/SKILL/SHORT_TEST_FINAL.ils, lines (58 56 49 46 42)
    \o INFO (VAR0): set:   in function/file ~/SKILL/SHORT_TEST_FINAL.ils, line 40
    \o WARN GLOB (VAR8): interactingRegions
    \o INFO (VAR0): used:  in function/file ~/SKILL/SHORT_TEST_FINAL.ils, line 54
    \o INFO (VAR0): set:   in function/file ~/SKILL/SHORT_TEST_FINAL.ils, line 49
    \o WARN GLOB (VAR8): obj1
    \o INFO (VAR0): used:  in function/file ~/SKILL/SHORT_TEST_FINAL.ils, lines (49 45 42)
    \o INFO (VAR0): set:   in function/file ~/SKILL/SHORT_TEST_FINAL.ils, line 41
    \o WARN GLOB (VAR8): overlaps
    \o INFO (VAR0): used:  in function/file ~/SKILL/SHORT_TEST_FINAL.ils, line 44
    \o INFO (VAR0): set:   in function/file ~/SKILL/SHORT_TEST_FINAL.ils, line 42
    \o WARN GLOB (VAR8): shapeList
    \o INFO (VAR0): used:  in function/file ~/SKILL/SHORT_TEST_FINAL.ils, lines (50 49 46)
    \o INFO (VAR0): set:   in function/file ~/SKILL/SHORT_TEST_FINAL.ils, lines (46 43)
    \o INFO (IQ): IQ score is 90 (best is 100).
    \o INFO (IQ1): IQ score is based on 0 error messages, 5 general warning messages, and 10 top level forms.
    \o INFO (REP110): Total enhancement     : 0.
    \o INFO (REP110): Total external global : 0.
    \o INFO (REP110): Total package global  : 0.
    \o INFO (REP110): Total warning global  : 5.
    \o INFO (REP110): Total error global    : 0.
    \o INFO (REP110): Total unused vars     : 0.
    \o INFO (REP110): Total next release    : 0.
    \o INFO (REP110): Total alert           : 0.
    \o INFO (REP110): Total hint            : 0.
    \o INFO (REP110): Total suggestion      : 0.
    \o INFO (REP110): Total internal alert  : 0.
    \o INFO (REP110): Total information     : 35.
    \o INFO (REP110): Total warning         : 0.
    \o INFO (REP110): Total error           : 0.
    \o INFO (REP110): Total internal error  : 0.
    \o INFO (REP110): Total fatal error     : 0.
    \o INFO (REP009): Program SKILL Lint finished on Feb 28 22:10:20 2013 with status PASS.
    \r t
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    This is because you've put it in a file with a ".ils" suffix, and it's interpreting the code with SKILL++ semantics (i.e. lexical scoping).

    My code was not expected to be SKILL++, and so it uses the dbGetq function which is not supported in SKILL++ mode. For historical reasons, dbGetq is a binary function which is not a syntax form. The dbGetq function selectively evaluates its arguments, and as such it is trying to evaluate the argument overlap as a SKILL dynamic variable (rather than a SKILL++ lexically scoped variable). So you have two choices:

    1. Put the code in a file with a ".il" suffix (actually anything other than ".ils" will do), or
    2. Change the dbGetq() calls to getq. 

    I know the first will work, and I just tested the second too - that worked OK too.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RFStuff
    RFStuff over 12 years ago

    Dear Andrew,

    Thanks a lot. Yes I changed the fileextension to .il and it works fine.

    On thing about the Marker:-

    As per guide the "Marker text" like below:-

    geCreateMarkerByBBox( cell2 "warning" "PDV" "poly-poly spacing violation" "mytext"
    list(12:10 20:18) )
    I think "mytext" should be visible at the MArker.

    But I am NOT seeing it in the above code execution. The Marker is geting created but the the text is NOT visible. Is it because of IC5141 version or something else.

    Kind Regards,

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    No, "mytext" does not get displayed. It sets a property called markerDisplay on the marker shape, but it does not display this on the screen. Not really sure if it's used at all anywhere...

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RFStuff
    RFStuff over 12 years ago

    Dear Andrew,

    Thanks alot for your reply.

    May be I could not interprete what is written in the guide under geCreateMarkerByBox() commnd heading.

    Kind Regards,

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
<>

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