• 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. problem when executing for loop

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 144
  • Views 18186
  • 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

problem when executing for loop

Adhil
Adhil over 13 years ago

Hi All!

this is a code to explore the usefulness of dbGetTrueOverlaps.

procedure(ca_get_pos()
cv = geGetEditCellView()       
LP = car(exists(lpp cv~>lpps lpp~>layerName=="RX" && lpp~>purpose == "drawing"))
foreach(bBox LP~>shapes~>bBox
for(i 0 2   
shapes = dbGetTrueOverlaps(cv bBox list("CA" "drawing") i)
cabBox = cadadr(shapes)~>bBox
origin = caar(shapes)~> xy
originX = nth(0 origin)
originY = nth(1 origin)
rows = caar(shapes)~>rows
columns = caar(shapes)~>columns
pitch_x = caar(shapes)~>uX
pitch_y = caar(shapes)~>uY
)
for(i 0 rows
x1 = caar(cabBox)   
y1 = cadar(cabBox)+originY+(i*pitch_y)
x2 = caadr(cabBox)
y2 = cadadr(cabBox)+originY+(i*pitch_y)
dbCreateRect(cv list("CA" "drawing") '((x1 y1) (x2 y2)))
    )))

however when i execute

for(i 0 rows
x1 = caar(cabBox)   
y1 = cadar(cabBox)+originY+(i*pitch_y)
x2 = caadr(cabBox)
y2 = cadadr(cabBox)+originY+(i*pitch_y)
dbCreateRect(cv list("CA" "drawing") '((x1 y1) (x2 y2)))
    )

cabBox, shapes, pitch_y, pitch_x,origin, originX, originY etc. all became nil.

please help me to debug this

Adhil

  • Cancel
  • lawlag02
    lawlag02 over 13 years ago

    hi adhil.

     from your first "for" statement you have the ff

    shapes = dbGetTrueOverlaps(cv bBox list("CA" "drawing") i) 
    cabBox = cadadr(shapes)~>bBox

    I think the number of objects in "shapes" varies depending on the situation so how come you simply perform "cadadr(shapes)~>bBox"

    BR, lrlsk

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Adhil
    Adhil over 13 years ago
    thanks alot it works fine now
    • 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