• 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. Problem Updating vtType Parameter When Swapping NMOS and...

Stats

  • Replies 4
  • Subscribers 148
  • Views 668
  • Members are here 0

Problem Updating vtType Parameter When Swapping NMOS and PMOS in SKILL Code

KH202511117250
KH202511117250 29 days ago

Hello Cadence Community,

I’m working on a SKILL procedure to swap device cellNames between nmos and pmos while preserving and updating the vtType parameter.

I'm using IC23.1 version

Goal:

  • If the device is nmos, store its parameter "vtType" in variable p, change cellName to pmos, and set vtType to pmodel.
  • If the device is pmos, store its parameter "vtType" in variable n, change cellName to nmos, and set vtType to nmodel.

 

Code:

procedure(paratest()
  let((cv a b c d e p n pmodel nmodel newMaster newcdf)
    cv = geGetEditCellView()
    foreach(inst cv~>instances
      a = inst~>cellName
      b = inst~>libName
      c = inst~>viewName
      when(a == "nmos"
        foreach(param cdfGetInstCDF(inst)~>parameters
          when(param~>name == "vtType"
            p = param~>value
            printf("Current value of %s vtType value is %s\n" a p)
            pmodel = if(p == "nvt"
                       then
                         "pvt"
                       else
                         if(p == "nhvt"
                           then
                             "phvt"
                           else
                             if(p == "nulvt"
                               then
                                 "pulvt"
                               else
                                 p
                              )
                          )
                      )
           )
         )
        newMaster = dbOpenCellViewByType(b "pmos" c)
        when(newMaster
          inst~>master = newMaster
          d = inst~>cellName
          when(d == "pmos"
            newcdf = cdfGetInstCDF(inst)
            foreach(param newcdf~>parameters
              when(param~>name == "vtType"
                param~>value = pmodel
                printf("set vtType for %s to: %s\n" d pmodel)
               )
             )
           )
         )
       )
      when(a == "pmos"
        foreach(param cdfGetInstCDF(inst)~>parameters
          when(param~>name == "vtType"
            n = param~>value
            printf("Current value of %s vtType value is %s\n" a n)
            nmodel = if(n == "pvt"
                       then
                         "nvt"
                       else
                         if(n == "phvt"
                           then
                             "uhvt"
                           else
                             if(n == "pulvt"
                               then
                                 "nulvt"
                               else
                                 n
                              )
                          )
                      )
           )
         )
        newMaster = dbOpenCellViewByType(b "nmos" c)
        newcdf = cdfGetInstCDF(inst)
        when(newMaster
          inst~>master = newMaster
          e = inst~>cellName
          when(e == "nmos"
            foreach(param newcdf~>parameters
              when(param~>name == "vtType"
                param~>value = nmodel
                printf("set vtType for %s to: %s\n" e nmodel)
               )
             )
           )
         )
       )
     )
   )
 )

Observed Behavior:

  • Output in ciw:
    paratest()
    Current value of nmos vtType value is nvt
    set vtType for pmos to: pvt
    Current value of pmos vtType value is pvt
    set vtType for nmos to: nvt
    Current value of pmos vtType value is pvt
    set vtType for nmos to:nvt
    Current value of nmos vtType value is nvt
    set vtType for pmos to: pvt
     
    Layout output:
    Only cellNames were changing..but vtType parameter is setting "Invalid Model"
    FYI, "Invalid Model" is also included in the list of vtType parameters.

Question:

  • Why is the vtType assignment failing and defaulting to "Invalid Model"?
  • Is there a better approach to update instance parameters after changing the master?

Any guidance or best practices would be greatly appreciated!

  • Cancel
  • Sign in to reply
  • Andrew Beckett
    Andrew Beckett 29 days ago

    I reformatted your code in your post to give me a chance of understanding it. Without indentation, it was illegible.

    My guess is that there's a CDF initProc for these components which is doing some validation of the model and resetting it to "Invalid Model". What PDK are you using?

    Rather than using edit properties to show the property values, can you select the instance and do:

    car(geGetSelSet)~>vtType 

    and report what you get (disable the property assistant in the schematic editor too if that's enabled). If that's showing the expected value, that pretty much confirms that it must be a CDF initProc.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • AR202509246930
    AR202509246930 28 days ago in reply to Andrew Beckett

    it seems that a string value was assigned to the vtType parameter, which actually supports multiple options—likely through a drop-down menu. Since the code only provides a single string value, it isn’t being recognized and defaults to the predefined value.
    Let assume if it's a drop-down menu

    Assuming it’s a drop-down menu, how can we identify the function name and modify the code accordingly?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 28 days ago in reply to AR202509246930
    AR202509246930 said:
    it seems that a string value was assigned to the vtType parameter, which actually supports multiple options—likely through a drop-down menu. Since the code only provides a single string value, it isn’t being recognized and defaults to the predefined value.
    Let assume if it's a drop-down menu

    Assuming it’s a drop-down menu, how can we identify the function name and modify the code accordingly?

    I don't understand what you're asking. The CDF is presumably defined as a cyclic parameter type and that will have a ~>choices slot to indicate the available choices. That's what makes it a "drop-down menu" in the edit properties form. There's no "function name" here, and the chosen value would be stored on the instance as a string property.

    It is (as I said) most likely to be caused by a formInitProc in the CDF (you can check that function with cdfGetInstCDF(inst)~>formInitProc if it's specified). You didn't answer my question about which PDK you're using.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • AR202509246930
    AR202509246930 23 days ago in reply to Andrew Beckett

    Hi Andrew,
    Tried this leUpdateInstanceCDFParameterValues(cv inst list(list("vtType" pmodel)))... it's working.

    Thanks Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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