• 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 stretch sub rectangles created with rodCreateRect...

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 143
  • Views 14535
  • 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 stretch sub rectangles created with rodCreateRect() ..?

IC Layout
IC Layout over 15 years ago

Hi, All, I have created an object which is composed of three layers (M2 being master, M1 and VIA1(as array) being sub rectangles in subrectArray section).
When I stretch this object except M1 layer both M2 and VIA1 are stretching correctly. It has been given that in the roduser.pdf inorder to stretch rodobjects correctly
we need to provide one argument i.e n_spaceY .. But I want the M1 layer to be stretched along with the M2 layer without any offset values..
I hope the problem is understandable and I have written it correctly..
Here is my code..............

procedure(box_box()
  bbox = enterBox()
          ll =  lowerLeft( bbox )
          ur = upperRight( bbox )
          llx = xCoord(ll)
          urx = xCoord(ur)
          X = urx-llx
          lly = yCoord( ll )
          ury = yCoord( ur )
          Y = ury - lly
          l1 = list(X Y bbox)
)
procedure(rect1()
box_1 = box_box()
rodCreateRect(
      ?layer    list("M2" "drawing")
      ?cvId     geGetEditCellView()
      ?bBox     nth(2 box_1)
      ?returnBoolean t
            ?subRectArray
              list(
                  list(
                      ?layer    list("M1" "drawing")
                      ?width    nth(0 box_1)
                      ?length   nth(1 box_1)
                      ?gap      "distribute"
                       )
                  list(
                      ?layer    list("VIA1" "drawing")
                      ?width    0.1
                      ?length   0.1
                      ?gap      "distribute"
                      ?spaceX   0.13
                      ?spaceY   0.13
                      ?lowerLeftOffsetX 0.07
                      ?lowerLeftOffsetY 0.07
                      ?upperRightOffsetX -0.07
                      ?upperRightOffsetY -0.07
                  )
              )
  );rect
)
rect1()

One more small question, is it possible to have properties "rows" & "columns" to the above object? If so, please someone guide me in achieving this ....
Thanks in advance..
Prabhakar. K -- Layout Engineer

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

    Hi Prabhakar,

    Just noticed I'd not replied to this. I don't have time to adapt your code (and I'm not sure even this is what you want), but I can answer your question about how to handle area specified as "(0:0 0.25:0.25)".

    item=linereadstring(area)
    when(listp(item)
      ; just take the first item in the list
      item=car(item)
      myArea=cond(
        (numberp(item) list(0:0 sqrt(item):sqrt(item)))
        (listp(item) eval(cons('list item)))
        (t warn("Unrecognized area format: %L\n" area)
      )
    )

    Note because the list has got ":" in, these are an operator which need to be evaluated. You can't just use evalstring, because it's not a properly formed SKILL function call - so the linereadstring parses the text, and then I cons on a "list" onto the beginning and eval that. The code above also handles the situation where the area is specified just as a single number. You could make it more or less flexible to suit your needs.

    Even with this, it won't prompt you to draw the box yourself. You could add stretch handles on (as I've mentioned) to allow it to be interactively resized after creation though.

    Regards,

    Andrew.

     

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

    Hi Prabhakar,

    Just noticed I'd not replied to this. I don't have time to adapt your code (and I'm not sure even this is what you want), but I can answer your question about how to handle area specified as "(0:0 0.25:0.25)".

    item=linereadstring(area)
    when(listp(item)
      ; just take the first item in the list
      item=car(item)
      myArea=cond(
        (numberp(item) list(0:0 sqrt(item):sqrt(item)))
        (listp(item) eval(cons('list item)))
        (t warn("Unrecognized area format: %L\n" area)
      )
    )

    Note because the list has got ":" in, these are an operator which need to be evaluated. You can't just use evalstring, because it's not a properly formed SKILL function call - so the linereadstring parses the text, and then I cons on a "list" onto the beginning and eval that. The code above also handles the situation where the area is specified just as a single number. You could make it more or less flexible to suit your needs.

    Even with this, it won't prompt you to draw the box yourself. You could add stretch handles on (as I've mentioned) to allow it to be interactively resized after creation though.

    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