• 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. how to cut an array of rectangles in a big rectangle if...

Stats

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

how to cut an array of rectangles in a big rectangle if the the widths and lengths of small rectangle are defined as the variables?

YYLiao
YYLiao over 8 years ago

Hi All,

I am a newbie to SKILL programming and need help on the following question that seems simple yet getting me stuck for a while. Any help will be appreciated!!

What I am trying to do is simple: I would like to cut several repeated rectangle holes in a rectangle. I define the widths and lengths of small rectangle and the gap between big rectangle and small rectangle as the variables.

However,  the gap between big rectangle and small rectangle are not symmetrical to both rectangular side.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    Your question is far from clear, but maybe this little example I just threw together will give you some clues. If not, please ask a more precise question (some pictures might help explain the problem). This example creates a big rectangle and then chops a lot of holes in it on a regular grid, with the size and offset and spacing of the holes specified with variables.

    cv=geGetEditCellView()
    bigRect=dbCreateRect(cv "Metal2" list(0:0 10:20)) ; change the layer to suit your technology
    bBox=bigRect~>bBox
    leftGap=0.5
    rightGap=0.2
    bottomGap=0.3
    topGap=0.2
    holeWidth=0.2
    holeHeight=0.4
    spacingX=0.1
    spacingY=0.2
    currentX=xCoord(lowerLeft(bBox))+leftGap
    ;------------------------------------------------------------------------
    ; Loop over the big rectangle chopping out holes
    ;------------------------------------------------------------------------
    while(currentX+holeWidth+rightGap < xCoord(upperRight(bBox))
      currentY=yCoord(lowerLeft(bBox))+bottomGap
      while(currentY+holeHeight+topGap < yCoord(upperRight(bBox))
        ;--------------------------------------------------------------------
        ; I am assuming the chop only returns a single shape here
        ;--------------------------------------------------------------------
        bigRect=car(leChopShape(
          bigRect
          list(currentX:currentY currentX+holeWidth:currentY
            currentX+holeWidth:currentY+holeHeight currentX:currentY+holeHeight
          )
          t ; closed
          t ; remove chop shape
        ))
        currentY=currentY+holeHeight+spacingY
      )
      currentX=currentX+holeWidth+spacingX
    )

     

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • YYLiao
    YYLiao over 8 years ago
    Thanks a lot!
    • 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