• 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 14521
  • 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
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    Hi Prabhakar,

    Unfortunately you'd need an "enclosure sub-rectangle" to do this, and that's not currently supported by rodCreateRect() (rodCreatePath() has enclosure sub-paths, but rodCreateRect() does not have the equivalent concept). There's an enhancement CCR, 279161, asking for this. You should contact Cadence Customer Support to request this enhancement - and a duplicate enhancement request can be filed with R&D, helping to increase the priority.

    You can't put parameters on level-0 ROD objects. Instead, the way to do this is to put your code inside a pcDefinePCell() and define a pcell, with parameters rows & columns, or width and length. You could add stretch handles (see the ROD manual) and then you could have a stretchable pcell where the M1 and M2 stretch together, and you could fill in the rows and columns (etc).

    Best Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • IC Layout
    IC Layout over 15 years ago

    Hi! Mr.Andrew, With your suggestions and with one of the below code (which is in sourcelink "CCSdependentPcell.il") I got similar kind of solution for which I am trying for.
    But my idea is to draw a box interactively and with this area the following code has to place the instance..
    Means the instance form should expect to draw a box to place instance with the drawned box area..
    I tried giving "area" as a string like this
    (area "string" "(0:0 0.25:0.25)")
    But if I evaluate area with evalstring its not taking it as a list...its giving an error..
    I hope you are getting my problem....
    Here is the code.... Please drive me to solve this problem...


    procedure( CCSbuildDependentPcell(cv w l area useArea "dnnng")

     rodCreateRect(
      ?cvId    cv
      ?name    "myRect"
      ?layer    list("M3" "drawing")
      ?width    if(useArea sqrt(area) w)
      ?length    if(useArea sqrt(area) l)
      ?origin    list(0 0)
     )
     rodCreateRect(
      ?cvId    cv
      ?name    "myRect2"
      ?layer    list("M2" "drawing")
      ?width    if(useArea sqrt(area) w)
      ?length    if(useArea sqrt(area) l)
      ?origin    list(0 0)
      ?subRectArray    list(
                      list(
                          ?layer    list("VIA2" "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
                      )
                  )
     )
     if(useArea then
      dbCreateLabel(cv list("text" "drawing") list(0 0)
        sprintf(nil "w&l=%2.4f" sqrt(area)) "lowerLeft" "R0" "stick" 0.05)
     else
      dbCreateLabel(cv list("text" "drawing") list(0 0)
        sprintf(nil "w=%2.3f" w) "lowerLeft" "R0" "stick" 0.05)
      dbCreateLabel(cv list("text" "drawing") list(0 0.2)
        sprintf(nil "l=%2.3f" l) "lowerLeft" "R0" "stick" 0.05)
     ); if
    ); procedure CCSbuildDependentPcell

    pcDefinePCell(
     list(ddGetObj("test") "dependentPcell" "layout")
     ;; list the formal parameters
     (
      (w "float" 0.25)
      (l "float" 0.25)
      (area "float" 0.625)
      (useArea "boolean" nil)
     )
     ;; call the PCell building routine
     CCSbuildDependentPcell(pcCellView w l area useArea)
    )

    let( (cv cdf)
     when(cv = dbOpenCellViewByType("test" "dependentPcell" "layout")
      when(cdf=cdfGetBaseCellCDF(cv~>cell)
        cdfDeleteCDF(cdf)
      )
      cdf = cdfCreateBaseCellCDF(cv~>cell)
      foreach(param reverse(cv~>parameters~>value)
        cdfCreateParam(cdf
          ?name        param~>name
      ?type        param~>valueType
      ?prompt        case(param~>name ("w" "Width") ("l" "Length")
                ("area" "Area") ("useArea" "Use Area?"))
      ?defValue    unless(param~>value=="FALSE" param~>value)
      ?callback    "CCSareaCB()"
      ?editable    case(param~>name
                (("l" "w") "if(cdfgData~>useArea~>value nil t)")
                ("area" "if(cdfgData~>useArea~>value t nil)")
                (t "t"))
        )
      ); foreach
      cdfSaveCDF(cdf)
      dbClose(cv)
     ); when cellview can be opened
    ); let

    procedure(CCSareaCB()
     when(boundp('cdfgData)
      let( ((cdf cdfgData))
        if(cdf~>useArea~>value then
      cdf~>w~>value = sqrt(cdf~>area~>value)
      cdf~>l~>value = sqrt(cdf~>area~>value)
        else
      cdf~>area~>value = cdf~>w~>value * cdf~>l~>value
        ); if
      ); let
     ); when
    ); procedure CCSareaCB
     
    Thanks in advance..
    Prabhakar. K -- Layout Engineer 

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • 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
  • IC Layout
    IC Layout over 15 years ago

    Thanks a lot Mr. Andrew ..... I will try my level best to solve my probelm with your suggestions .....

     Prabhakar. K -- Layout Engineer 

    • 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