• 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. Accessing certain layer and get its ll and ur coordinat...

Stats

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

Accessing certain layer and get its ll and ur coordinates

Inas Mohammed
Inas Mohammed over 9 years ago

Hello,

I have a pattern of transistor has DRC errors for some spacings between successive rows. These errors will be solved if i add rectangles for these layer. so instead of adding the same layer several times in the middle, i thought to add it only once with dimension of this layer in the whole pattern, like the NW layer specially they all share the same NW.

So what i thought about is:

1) Grouping the instances.

2) Accessing the needed layer.

3) Get its ll and ur coordinates.

4)Create rect with this layer and list of gotten points.

5)ungroup them again.

So i need a skill script does this sort of function.

Thanks

Regards, 

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Your requirements are a bit imprecise, so I'll provide some code which illustrates the principle. If you have a list of instances and a named layer purpose pair, you can use this code:

    /******************************************************************
    *                                                                 *
    *             CCFfindLayerExtentFromInsts(insts lpp)              *
    *                                                                 *
    * Find the overall bounding box of a specified layer-purpose-pair *
    *                   across a list of instances.                   *
    *                                                                 *
    ******************************************************************/
    procedure(CCFfindLayerExtentFromInsts(insts lpp)
        let((minLLX minLLY maxURX maxURY)
            foreach(inst insts
                ;------------------------------------------------------------
                ; Find the matching layer purpose and get the shapes on that
                ; layer purpose
                ;------------------------------------------------------------
                shapes=car(exists(LP inst~>master~>lpps 
                    LP~>layerName==car(lpp) && LP~>purpose==cadr(lpp)))~>shapes
                ;------------------------------------------------------------
                ; For each shape, transform the bounding box up to the parent
                ; cellView's coordinate system, and pull apart the coordinates,
                ; comparing them against the min/max found so far
                ;------------------------------------------------------------
                foreach(shape shapes
                    destructuringBind(((llx lly) (urx ury)) 
                        dbTransformBBox(shape~>bBox inst~>transform)
                        minLLX=if(minLLX min(minLLX llx) llx)
                        minLLY=if(minLLY min(minLLY lly) lly)
                        maxURX=if(maxURX max(maxURX urx) urx)
                        maxURY=if(maxURY max(maxURY ury) ury)
                    )
                )
            )
            when(minLLX
                list(minLLX:minLLY maxURX:maxURY)
            )
        )
    )
    

    You'd just (say) select the instances (to experiment with) and then do:

    CCFfindLayerExtentFromInsts(geGetSelSet() list("PP" "drawing"))

    This will return the overall bBox of that layer purpose pair in the list of selected instances. You could use this return value to pass to dbCreateRect to create the rectangle in the same region.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Your requirements are a bit imprecise, so I'll provide some code which illustrates the principle. If you have a list of instances and a named layer purpose pair, you can use this code:

    /******************************************************************
    *                                                                 *
    *             CCFfindLayerExtentFromInsts(insts lpp)              *
    *                                                                 *
    * Find the overall bounding box of a specified layer-purpose-pair *
    *                   across a list of instances.                   *
    *                                                                 *
    ******************************************************************/
    procedure(CCFfindLayerExtentFromInsts(insts lpp)
        let((minLLX minLLY maxURX maxURY)
            foreach(inst insts
                ;------------------------------------------------------------
                ; Find the matching layer purpose and get the shapes on that
                ; layer purpose
                ;------------------------------------------------------------
                shapes=car(exists(LP inst~>master~>lpps 
                    LP~>layerName==car(lpp) && LP~>purpose==cadr(lpp)))~>shapes
                ;------------------------------------------------------------
                ; For each shape, transform the bounding box up to the parent
                ; cellView's coordinate system, and pull apart the coordinates,
                ; comparing them against the min/max found so far
                ;------------------------------------------------------------
                foreach(shape shapes
                    destructuringBind(((llx lly) (urx ury)) 
                        dbTransformBBox(shape~>bBox inst~>transform)
                        minLLX=if(minLLX min(minLLX llx) llx)
                        minLLY=if(minLLY min(minLLY lly) lly)
                        maxURX=if(maxURX max(maxURX urx) urx)
                        maxURY=if(maxURY max(maxURY ury) ury)
                    )
                )
            )
            when(minLLX
                list(minLLX:minLLY maxURX:maxURY)
            )
        )
    )
    

    You'd just (say) select the instances (to experiment with) and then do:

    CCFfindLayerExtentFromInsts(geGetSelSet() list("PP" "drawing"))

    This will return the overall bBox of that layer purpose pair in the list of selected instances. You could use this return value to pass to dbCreateRect to create the rectangle in the same region.

    Regards,

    Andrew.

    • 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