• 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
  • 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
Reply
  • 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
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