• 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. Dynamic arrays

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 14405
  • 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

Dynamic arrays

Adhil
Adhil over 13 years ago

Hi!!

I am trying to create a dynamic array. please test out the folowing code. it works fine, but the handle that varies the columns is not very sensitive. how can i solve this problem?


pcDefinePCell(
  list(ddGetObj("adhillib") "rect1" "layout")
  (
   (Width  0.1)
   (Length 0.2)
  )
  let(((cv pcCellView))
   rectRodObj = rodCreateRect(
                             ?name     "myRect"
                             ?cvId     cv
                             ?layer    list("M1" "drawing")
                             ?width    Width
                             ?length   Length
                             ?origin   list(0 0)
        )
                     
  )

   )

pcDefinePCell(
  list(ddGetObj("adhillib") "rectarray1" "layout")
  (
   (columns 1)
   (space 0.2)
  )
  let(((cv pcCellView) (width1 0.1) width2 (length1 0.2) cellview rectRodObj rectRodObj1)
                       
   mosaicbBox = dbCreateParamSimpleMosaicByMasterName(cv "adhillib" "rect1" "layout"
                                                              "rect_array" 0:0 "R0" 1 columns 0.2 space list(list("Width" "float" width1) list("Length" "float" length1))  )
                        cellview = dbOpenCellViewByType("adhillib" "rect1" "layout")
                 bBox     = dbComputeBBoxNoNLP(cellview)
                 width2   = xCoord(upperRight(bBox)) - xCoord(lowerLeft(bBox))
                 columnbBoxWidth  = xCoord(upperRight(mosaicbBox ~> bBox)) - xCoord(lowerLeft(mosaicbBox ~> bBox))
                        columnbBoxLength = yCoord(upperRight(mosaicbBox ~> bBox)) - yCoord(lowerLeft(mosaicbBox ~> bBox))


                        rectRodObj = rodCreateRect(
                             ?name     "myRect10"
                             ?cvId     cv
                             ?layer    list("ALPHA" "drawing")
                             ?width    space - width1
                             ?length   length1
                             ?origin   list(width2 0)
        )

                        rectRodObj1 = rodCreateRect(
                             ?name     "myRect11"
                             ?cvId     cv
                             ?layer    list("ALPHA" "drawing")
                             ?width    columnbBoxWidth
                             ?length   columnbBoxLength
                             ?origin   list(0 0)
        )

                        rodAssignHandleToParameter(
                             ?parameter          "space"
                             ?rodObj             rectRodObj
                             ?handleName         "centerRight"
                             ?stretchDir         "X"
                             ?displayName        "space"
                             ?displayExpression  "space"
                             ?updateIncrement    0.1
                             ); rodAssignHandleToParameter

                       rodAssignHandleToParameter(
                             ?parameter          "columns"
                             ?rodObj             rectRodObj1
                             ?handleName         "centerRight"
                             ?stretchDir         "X"
                             ?displayName        "columns"
                             ?displayExpression  "columns"
                             ?updateIncrement    space
                             ); rodAssignHandleToParameter
              

     )
      )

 Adhil

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

    The problem is that it's stretching it as a dimension, and so it only updates if you move the cursor by 1um (i.e. 1). So, change the default value of columns to be a floating point number (1.0) in the list of parameters in the pcDefinePCell call, and then change the rodAssignHandleToParameter to be:

     pcDefinePCell(
      list(ddGetObj("opamp090") "rectarray1" "layout")
      (
       (columns 1.0)   ; note change in default
      (space 0.2)
      )

    ...

                           rodAssignHandleToParameter(
                                 ?parameter          "columns"
                                 ?rodObj             rectRodObj1
                                 ?handleName         "centerRight"
                                 ?stretchDir         "X"
                                 ?displayName        "columns"
                                 ?displayExpression  "columns"
                                 ?updateIncrement    space
                                 ?userData           space
                                 ?userFunction
                                   lambda((struct)
                                        ; printf("STRUCT: %L\n" struct->??)
                                        round(struct->paramVal+struct->increment/struct->userData)
                                     )
                                 ); rodAssignHandleToParameter

    Something like that anyway!

    Andrew.

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

    The problem is that it's stretching it as a dimension, and so it only updates if you move the cursor by 1um (i.e. 1). So, change the default value of columns to be a floating point number (1.0) in the list of parameters in the pcDefinePCell call, and then change the rodAssignHandleToParameter to be:

     pcDefinePCell(
      list(ddGetObj("opamp090") "rectarray1" "layout")
      (
       (columns 1.0)   ; note change in default
      (space 0.2)
      )

    ...

                           rodAssignHandleToParameter(
                                 ?parameter          "columns"
                                 ?rodObj             rectRodObj1
                                 ?handleName         "centerRight"
                                 ?stretchDir         "X"
                                 ?displayName        "columns"
                                 ?displayExpression  "columns"
                                 ?updateIncrement    space
                                 ?userData           space
                                 ?userFunction
                                   lambda((struct)
                                        ; printf("STRUCT: %L\n" struct->??)
                                        round(struct->paramVal+struct->increment/struct->userData)
                                     )
                                 ); rodAssignHandleToParameter

    Something like that anyway!

    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