auto place METAL_Dummy

Discussion in 'Cadence' started by YuAmA, Jul 24, 2009.

  1. YuAmA

    YuAmA Guest

    I used the following to place Metal_Dummy in my layout chip.
    x=1200
    y=1200
    i=1
    while((10*i+5<=x)
    dbCreatePolygon( "METAL1" "drawing" list((i-1)*10+5:4.5 (i-1)*10+4.5:5
    (i-1)*10+0.5:5 (i-1)*10:4.5 (i-1)*10:0.5 (i-1)*10+0.5:0 (i-1)*10+4.5:0
    (i-1)*10+5:0.5))
    i++
    )
    i=1
    while((10*i+5<=y)
    dbCreatePolygon( "METAL1" "drawing" list
    (..............................................))
    i++
    )
    use this procedure i can create 1xi or ix1array METAL1 only,who can
    tell me how to create ixi array METAL1 Dummy in my layout chip.
    please show me detailed procedure,ths!
     
    YuAmA, Jul 24, 2009
    #1
  2. YuAmA wrote, on 07/24/09 16:42:
    Your question wasn't that clear, but you just need to nest the two while loops,
    and use a different loop variable for each. Please try to use indentation in the
    code, it makes it much easier to read:

    x=1200
    y=1200
    i=1
    while(10*i+5<=x
    j=1
    while(10*j+5<=y
    ; no guarantees the calculations are correct here - I didn't
    ; check very carefully
    dbCreatePolygon( "METAL1" "drawing"
    list((i-1)*10+5:(j-1)*10+4.5 (i-1)*10+4.5:(j-1)*10+5
    (i-1)*10+0.5:(j-1)*10+5 (i-1)*10:(j-1)*10+4.5
    (i-1)*10:(j-1)*10+0.5 (i-1)*10+0.5:(j-1)*10
    (i-1)*10+4.5:(j-1)*10 (i-1)*10+5:(j-1)*10+0.5
    )
    )
    j++
    ) ; while j
    i++
    ) ; while i

    Note the code above would be much simpler if you started i and j from 0, as it
    would avoid you having to subtract 1 all the time. Also, it would be worth
    calculating the *10 product each time. Or just increment i and j by 10 rather
    than 1 each time...

    Nested loops are very basic programming - I'm amazed you didn't think of doing
    that...

    Andrew.
     
    Andrew Beckett, Jul 27, 2009
    #2
  3. YuAmA

    YuAmA Guest

     
    YuAmA, Jul 28, 2009
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.