• 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 Design
  3. modify PCell parameter due to skill code

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 125
  • Views 8461
  • 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

modify PCell parameter due to skill code

AutoJeff
AutoJeff over 2 years ago

Hi all,

I want to modify some parameters of PCell due to skill code. the code is in the following:

procedure(modifyCDFParam()

   let((cv cvSch cdfData)

   cv=geGetEditCellView()

  cvSch=dbOpenCellViewByType(cv~>libName cv~>cellName "schematic" "schematic")

  foreach(inst cvSch~>instances

   cdf=cdfGetInstCDF(inst)

   vfoSetParam(cdfData "sdMtlWidth" "280n")

  vfoSetParam(cdfData "leftTap" nil)

             )

       )
                )

when I load the code and run the the function modifyCDFParam(), the code don't work and show the error: *Error* putprop: first arg must be either symbol, list, defstruct or user type - nil.

does anyone help to debug what is the problem of the code?

thanks

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago

    Two issues:

    1. You're getting the CDF for the instance in the variable cdf and the vfoSetParam is using a different variable cdfData
    2. You probably should check that cdf is non-nil (or even the right kind of component) before trying to set parameters. After all, using ~>instances will get all the pins and global taps etc as well as any devices in your schematic.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AutoJeff
    AutoJeff over 2 years ago in reply to Andrew Beckett

    Hi Andrew,

    I'm not clear for this. could you please help modify the code for me?

    thank you very much

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AutoJeff
    AutoJeff over 2 years ago in reply to AutoJeff

    Hi Andrew,

    I miss something. the cdf should be cdfData. 

    thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to AutoJeff

    cdfData=cdfGetInstCDF(inst)
    when(cdfData
       vfoSetParam(cdfData "sdMtlWidth" "280n")
       vfoSetParam(cdfData "leftTap" nil)
    )

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AutoJeff
    AutoJeff over 2 years ago in reply to Andrew Beckett

    Hi Andrew,

    thank you very much. it does work now.

    Jeff

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AutoJeff
    AutoJeff over 2 years ago in reply to Andrew Beckett

    Hi Andrew,

    I write a code in the following to modify the cells in a library. the code works in process a, but it doesn't work in process b. I found an interesting thing: I run the code first, it will moidfy one instance parameter; it will modify the next instance parameter when I run the code twice. 

    my code:

    procedure(modifyCDFParam()

       let((cv cvSch cdfData)

       cv=geGetEditCellView()

      cvSch=dbOpenCellViewByType(cv~>libName cv~>cellName "schematic" "schematic")

      foreach(inst cvSch~>instances

        if (inst~>libName==techGetTechFile(cvSch)~>libName

        then

        cdf=cdfGetInstCDF(inst)

        when(cdf~>sdMtlWidth  vfoSetParam(cdf "" "280n"))

        when(cdf~>leftTap  vfoSetParam(cdf "leftTap" nil))

           )

                    )

           )
                    )

    when I run the code, the ciw report the error:

    *** Error in routine putprop:

    Message:*Error* putprop: first arg must be either symbol, list, defstruct or user type

    Entering new debug toplevel due to error:

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AutoJeff
    AutoJeff over 2 years ago in reply to AutoJeff

    sorry, the "" should be "sdMtlWidth"

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AutoJeff
    AutoJeff over 2 years ago in reply to AutoJeff

    the whole code:

    procedure(modifyCDFParam()

       let((cv cvSch cdfData)

       cv=geGetEditCellView()

      cvSch=dbOpenCellViewByType(cv~>libName cv~>cellName "schematic" "schematic")

      foreach(inst cvSch~>instances

        if (inst~>libName==techGetTechFile(cvSch)~>libName

        then

       printf("Proceeding the instance: %s\n" inst~>name) 

       cdf=cdfGetInstCDF(inst)

        when(cdf~>sdMtlWidth  vfoSetParam(cdf "sdMtlWidth " "280n"))   

        when(cdf~>leftTap  vfoSetParam(cdf "leftTap" nil))

           )

                    )

           )
                    )

    • 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