• 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. Boolean Commands with 3 or More Layers

Stats

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

Boolean Commands with 3 or More Layers

noSKILL
noSKILL over 13 years ago

IC5.1.414

Trying to run the dbLayerAnd() command, but I need to do it with 3 layers.  I'll also need to be doing some other boolean commands on 3+ layers too (AndNot on 2 layers, And on a 3rd, etc)

The problem is I don't want to create a new dummy lpp for each pair of commands, since I will be doing this many many times.

I searched, and in later versions there is a command dbPointArrayAnd() which is exactly what I am looking for, but it does not exist in IC5141.

Any suggestions on how to do this?  I'm not strong in coding so I'm not sure how I can get the dbLayerAnd() command to write its data to a list or non-layout layer.

Thanks

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    You'll need to use a temporary layer, sorry. That's not too onerous though - you can use the temporary layer and keep deleting it as you go along.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • noSKILL
    noSKILL over 13 years ago

    Thanks for the quick reply.

    Perhaps my procedure for creating the temporary layer is horrifically complicated?

    Right now I am going into my tech file manager and creating a new layer and assigning it all the regular assortment of goodies.  Then referencing it in the code.

    Is there a better way to do this?

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

    Usually people just use one of the existing standard internal layers (e.g. y0, y1, y2 etc) to do this kind of thing. No need to invent yet another layer for your internal working, so that avoids you having to define anything new. Then you can easily write a function that extends the current functions to a variable number of arguments and breaks it down into steps which do:

    listOfShapes=dbLayerAnd("y0" lay1Shapes lay2Shapes)
    newListOfShapes=dbLayerAnd("y0" listOfShapes lay3Shapes)
    foreach(shape listOfShapes dbDeleteObject(shape))
    listOfShapes=newListOfShapes
    newListOfShapes=dbLayerAnd("outLayer" listOfShapes lay4Shapes)
    foreach(shape listOfShapes dbDeleteObject(shape))
    newListOfShapes ; return value

    And you could make that inner stuff a loop - so you could handle arbitrarily many layers.  Here's one I just threw together with very little thought:

     /* abLayerOps.il

    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Feb 27, 2012
    Modified   
    By         

    abLayerOps('dbLayerAnd cvId "Metal4" m1Shapes m2Shapes)
    abLayerOps('dbLayerAnd cvId "Metal4" m1Shapes m2Shapes m3Shapes)
    abLayerOps('dbLayerAnd cvId "Metal4" m1Shapes m2Shapes m3Shapes m5Shapes)

    ***************************************************

    */

    abLayerOps.tmpLayer="y0"
    procedure(abLayerOps(layerFunc cvId outLayer @rest inShapeLists)
        let((outShapeList lastShapes toLayer)
        unless(cdr(inShapeLists)
            error("abLayerOps: requires at least two lists of shapes)")
        )
        lastShapes=car(inShapeLists)
        foreach(maplist remShapeList cdr(inShapeLists)
            toLayer=if(cdr(remShapeList) abLayerOps.tmpLayer outLayer)
            outShapeList=funcall(layerFunc cvId toLayer lastShapes car(remShapeList))
            unless(eq(lastShapes car(inShapeLists))
            foreach(shape lastShapes dbDeleteObject(shape))
            )
            lastShapes=outShapeList
        )
        lastShapes
        )
    )

    Regards,

    Andrew.

    • 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