• 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. pCell skill for beginners

Stats

  • Locked Locked
  • Replies 21
  • Subscribers 148
  • Views 31796
  • 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

pCell skill for beginners

stuso
stuso over 16 years ago

Hi,

i'd like some advice for creating my first simple pCell from skill. I have no skill experience so i'm looking for a good place to start.

My ultimate aim (for now) is to create a rectangular via array with X and Y stretch handles. For example you have M1->M4(the top & bottom layers would be parameters) that you can stretch in X or Y and it fills with the max vias allowed by spacing rules. However to begin with i'd be happy to create a parameterised rectangle of M1 that i can stretch in one direction & take it from there.

Pointers to on-line tutorials and very simple examples would be great, right now i am blindly searching around source-link.

Thanks

Stu

  • Cancel
Parents
  • stuso
    stuso over 16 years ago

    Hi Lawrence, i've been using your example (thanks for that) and i've had managed to make some good progress (for a beginner). I now can generate a pCell with say M1,VIA1,M2,VIA2 & M3 which has X&Y stretch handles.  I've used M1 as my main ROD rectangle with the other 4 layers as subrectangles.

    It works nicely in the sense that I can place & stretch it around, it looks like all the layers are in place and the correct size. I have a couple of immediate issues & a more generic question.

    1) How do i set a miimum value for parameters, currently i can stretch the pCell to 0um then i can't recover it, i have to select it (by area for example) then delete it.

    2) It fails to run PVS DRC with message: 

      *WARNING* Pcell evaluation for stu_test_skill/GGL_pCell_M1viaM3/layout has the following error(s):
    *WARNING* ("eval" 0 t nil ("*Error* eval: undefined function" GGLcreateViaM1M3))
    *WARNING* Error kept in "errorDesc" property of the label "pcellEvalFailed" on layer/purpose "marker/error" in the submaster.

    FATAL (449): Pcell evaluation failed. This could happen as a result of either a syntax error or the use of an unsupported PIPO function in Pcell SKILL code. Only db*() and rod*() functions can be used in Pcell SKILL code. To continue, either use the 'Ignore Pcell evaluation failure' option in Stream  In/Out Options or fix the Pcell SKILL code.
    pvsvirt: PROBLEM happened while processing strmout.

    3) This is the more generic Question. Once i have a nice clean pcell code how should i store & implement the Skill for the design team. For example i could just load the code from the project .cdsinit, would that be wise? I noticed that when i start a new session i have to reload the skill function else i get the pCell evaluation failed message in the layout view.

    Thanks for you help

    Stu

    Here is my code, all feedback is very welcome:

     

    procedure(GGLcreateViaM1M3(cv w l "dnn")
      let( (rectRodObj)
      ;; create a rectangle on metal1 with x & y dimensions set by w & l
      rectRodObj = rodCreateRect(
          ?name    "gglVIA1m1m3"
          ?cvId    cv
          ?layer    list("M1" "drawing")
          ?width    w
          ?length    l
          ?origin    list(0 0)
          ?subRectArray     list(
            list(
                ?layer     list("M2" "drawing")
                ?width     w
                ?length     l
                )
            list(
                ?layer     list("M3" "drawing")
                ?width     w
                ?length     l
                )
            list(
                ?layer     list("VIA1" "drawing")
                ?width     0.07
                ?length     0.07
                ?lowerLeftOffsetX    0.05
                           ?lowerLeftOffsetY    0.05
                           ?upperRightOffsetX   -0.05
                          ?upperRightOffsetY   -0.05
                           ?spaceX              0.075
                           ?spaceY              0.075
                )
            list(
                ?layer     list("VIA2" "drawing")
                ?width     0.07
                ?length     0.07
                ?lowerLeftOffsetX    0.05
                           ?lowerLeftOffsetY    0.05
                           ?upperRightOffsetX   -0.05
                          ?upperRightOffsetY   -0.05
                           ?spaceX              0.075
                           ?spaceY              0.075
                )
            )    
      )

    ;; create a stretch handle for the width & length

      rodAssignHandleToParameter(
        ?parameter        "w"
        ?rodObj        rectRodObj
        ?handleName        "centerRight"
        ?stretchDir        "X"
        ?updateIncrement    0.005
      ); rodAssignHandleToParameter

     rodAssignHandleToParameter(
        ?parameter        "l"
        ?rodObj        rectRodObj
        ?handleName        "upperCenter"
        ?stretchDir        "Y"
        ?updateIncrement    0.005
      ); rodAssignHandleToParameter

      ); let
    ); procedure

    ;; Create the PCell, the "drawing routine" is encapsulated in the
    ;; GGLcreateViaM1M3 function which does all the work

    pcDefinePCell(
      list(ddGetObj("stu_test_skill") "GGL_pCell_M1viaM3" "layout")
      (
        (w 0.33)
        (l 0.33)
      )
      let( ((cv pcCellView))
        GGLcreateViaM1M3(cv w l)
      ); let
    )

    ;; Create the CDF for the 'l' and 'w' parameters
    let( (cellId cdfId)
      when(cellId = ddGetObj("stu_test_skill" "GGL_pCell_M1viaM3")
        ;; if the cell CDF already exists, delete it
        when( cdfId = cdfGetBaseCellCDF(cellId)
          cdfDeleteCDF(cdfId)
        )
        ;; create the base cell CDF
        cdfId = cdfCreateBaseCellCDF(cellId)
        ;; create the parameters
        cdfCreateParam( cdfId
          ?name    "l"
          ?prompt    "Length"
          ?defValue    0.33
          ?type    "float"
          ?display    "t"
        )
        cdfCreateParam( cdfId
          ?name    "w"
          ?prompt    "Width"
          ?defValue    0.33
          ?type    "float"
          ?display    "t"
        )
        cdfSaveCDF(cdfId)
      ); when
    ); let for CDF creation

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • stuso
    stuso over 16 years ago

    Hi Lawrence, i've been using your example (thanks for that) and i've had managed to make some good progress (for a beginner). I now can generate a pCell with say M1,VIA1,M2,VIA2 & M3 which has X&Y stretch handles.  I've used M1 as my main ROD rectangle with the other 4 layers as subrectangles.

    It works nicely in the sense that I can place & stretch it around, it looks like all the layers are in place and the correct size. I have a couple of immediate issues & a more generic question.

    1) How do i set a miimum value for parameters, currently i can stretch the pCell to 0um then i can't recover it, i have to select it (by area for example) then delete it.

    2) It fails to run PVS DRC with message: 

      *WARNING* Pcell evaluation for stu_test_skill/GGL_pCell_M1viaM3/layout has the following error(s):
    *WARNING* ("eval" 0 t nil ("*Error* eval: undefined function" GGLcreateViaM1M3))
    *WARNING* Error kept in "errorDesc" property of the label "pcellEvalFailed" on layer/purpose "marker/error" in the submaster.

    FATAL (449): Pcell evaluation failed. This could happen as a result of either a syntax error or the use of an unsupported PIPO function in Pcell SKILL code. Only db*() and rod*() functions can be used in Pcell SKILL code. To continue, either use the 'Ignore Pcell evaluation failure' option in Stream  In/Out Options or fix the Pcell SKILL code.
    pvsvirt: PROBLEM happened while processing strmout.

    3) This is the more generic Question. Once i have a nice clean pcell code how should i store & implement the Skill for the design team. For example i could just load the code from the project .cdsinit, would that be wise? I noticed that when i start a new session i have to reload the skill function else i get the pCell evaluation failed message in the layout view.

    Thanks for you help

    Stu

    Here is my code, all feedback is very welcome:

     

    procedure(GGLcreateViaM1M3(cv w l "dnn")
      let( (rectRodObj)
      ;; create a rectangle on metal1 with x & y dimensions set by w & l
      rectRodObj = rodCreateRect(
          ?name    "gglVIA1m1m3"
          ?cvId    cv
          ?layer    list("M1" "drawing")
          ?width    w
          ?length    l
          ?origin    list(0 0)
          ?subRectArray     list(
            list(
                ?layer     list("M2" "drawing")
                ?width     w
                ?length     l
                )
            list(
                ?layer     list("M3" "drawing")
                ?width     w
                ?length     l
                )
            list(
                ?layer     list("VIA1" "drawing")
                ?width     0.07
                ?length     0.07
                ?lowerLeftOffsetX    0.05
                           ?lowerLeftOffsetY    0.05
                           ?upperRightOffsetX   -0.05
                          ?upperRightOffsetY   -0.05
                           ?spaceX              0.075
                           ?spaceY              0.075
                )
            list(
                ?layer     list("VIA2" "drawing")
                ?width     0.07
                ?length     0.07
                ?lowerLeftOffsetX    0.05
                           ?lowerLeftOffsetY    0.05
                           ?upperRightOffsetX   -0.05
                          ?upperRightOffsetY   -0.05
                           ?spaceX              0.075
                           ?spaceY              0.075
                )
            )    
      )

    ;; create a stretch handle for the width & length

      rodAssignHandleToParameter(
        ?parameter        "w"
        ?rodObj        rectRodObj
        ?handleName        "centerRight"
        ?stretchDir        "X"
        ?updateIncrement    0.005
      ); rodAssignHandleToParameter

     rodAssignHandleToParameter(
        ?parameter        "l"
        ?rodObj        rectRodObj
        ?handleName        "upperCenter"
        ?stretchDir        "Y"
        ?updateIncrement    0.005
      ); rodAssignHandleToParameter

      ); let
    ); procedure

    ;; Create the PCell, the "drawing routine" is encapsulated in the
    ;; GGLcreateViaM1M3 function which does all the work

    pcDefinePCell(
      list(ddGetObj("stu_test_skill") "GGL_pCell_M1viaM3" "layout")
      (
        (w 0.33)
        (l 0.33)
      )
      let( ((cv pcCellView))
        GGLcreateViaM1M3(cv w l)
      ); let
    )

    ;; Create the CDF for the 'l' and 'w' parameters
    let( (cellId cdfId)
      when(cellId = ddGetObj("stu_test_skill" "GGL_pCell_M1viaM3")
        ;; if the cell CDF already exists, delete it
        when( cdfId = cdfGetBaseCellCDF(cellId)
          cdfDeleteCDF(cdfId)
        )
        ;; create the base cell CDF
        cdfId = cdfCreateBaseCellCDF(cellId)
        ;; create the parameters
        cdfCreateParam( cdfId
          ?name    "l"
          ?prompt    "Length"
          ?defValue    0.33
          ?type    "float"
          ?display    "t"
        )
        cdfCreateParam( cdfId
          ?name    "w"
          ?prompt    "Width"
          ?defValue    0.33
          ?type    "float"
          ?display    "t"
        )
        cdfSaveCDF(cdfId)
      ); when
    ); let for CDF creation

     

    • 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