• 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. SKILL to modify layout parameter

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 126
  • Views 18044
  • 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

SKILL to modify layout parameter

40Ford
40Ford over 12 years ago

I have written SKILL functions to change or add parameters to a cellView. What I need to do now is grab the value of a parameter from a schematic and copy that value to the corresponding layout.

The parameter is called "connectivity" and I only want to change the value in cell "option". Yes, "option" is the cellName.

I know how to grab and instance and grab the property in SKILL but what I can't understand is how to know I'm getting the corresponding layout view for that instance.

 Any suggestions?

  • Cancel
  • theopaone
    theopaone over 12 years ago

    A parameter and a property are two distinct objects, a parameter is assigned to pcells as the interface to the pcell program. A property is a way to assign data to a database object like a cellView master or an instance.

    I am assuming you are assigning a property to a cellView master. When you find the instance, you are assigning/adding/getting the value of the property on the instance's master cellView. That cellView master in the schematic is a symbol view. The symbol view should have corresponding views in the same library for layout and schematic. If the layout is in another library or goes by another name, you have to follow your design group methodology to get the correct library/cell name. Once you have determined the name of the layout cellView, you can open that master using dbOpenCellViewByType with "a" for append. Then you can add the property using dbReplaceProp on the cellView ID.

     masterId = dbOpenCellViewByType( instId~>libName "option" "layout" nil "a" )

    dbReplaceProp( masterId  "connectivity" 'string "new value" )

    dbSave( masterId )

     I hope I understood what you needed to do.

    Ted

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • 40Ford
    40Ford over 12 years ago

     Hi Theopan,

     I appreciate your response. It is a parameter in a layout cell that I'm am trying to set.  However the value of the parameter comes from the corresponding schematic view property.

    The difficulty for me is not setting parameters. What I've been unable to figure out is how to extract that value from the same instance in the schematic.

     I have a cell with numerous instantiations of the 'option' cell. The instantiations in the schematic are using pPar("var") as value for the "connectivity" property. In the layout the connectivity parameter is hardcoded to an integer value. What I want to do is grab the value from the schematic instantiation and set it to the value for the corresponding layout instantiation.

     I can get the values of each schematic instantiation in a list but I haven't yet been able to get the values set is the correct layout instantiations.

     Hope that makes sense. This is one of those things that is really actually very simple to show but difficult to explain.

    Cheers,

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • theopaone
    theopaone over 12 years ago

    OK, there is a difference in the use of certain terms here. When you speak of a view, it is assumed that you are refering to the master of the cellView. The property would be on the master and would be the same no matter how many times the cell was instantiated. In your case, you want to modify the parameter on a layout instance based on the corresponding schematic instance.

    If you are using the VXL layout methodology, each instance in the schematic has an instance name and the layout has a corresponding  instance name (based on the hierarchy which was flattened from the schematic). I don't know if there is an exposed API for finding the corresponding named instances but the names are hierarchical with a pipe (|) as a separator.

    If you are not using VXL, you have to use some extraction tool to find the correspondence between the schematic and master. You will have to get more help to figure that one out.

    Ted

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • 40Ford
    40Ford over 12 years ago

     It is tricky. For now I am assuming that the baseName (instance name in the views) are in line. I might be able to get something to work with that assumption. Definitely not a bullet proof method but that's my approach until someone with more skill than me comes across with a better suggestion.

     Thanks again,

    Cheers,

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • 40Ford
    40Ford over 12 years ago

     This may have worked. I haven't thoroughly verified it yet.

     procedure(reset_default_param()
        let((clv csv instList layInstList schInstList schInstName schParamValue numelem)
            clv = geGetEditCellView()
            csv = dbOpenCellViewByType(clv~>libName clv~>cellName "schematic" "schematic" "r")

            layInstList = clv~>instances
            schInstList = csv~>instances

            schInstName = setof(inst schInstList inst~>cellName == "option")~>baseName
            schParamValue = list()

            foreach(inst schInstList
                if(inst~>cellName == "option" then
                    schParamValue = append(schParamValue list( dbSearchPropByName(inst "connectivity")~>value))
                ) ; end if
            ) ; end foreach

            dbClose(csv)

            numelem = 1
            foreach(inst layInstList
                foreach(elem schInstName
                    if(inst~>baseName == strcat("|" elem) then
                        printf("\nmatch")
                        dbReplaceProp(inst "connectivity" 'string nthelem(numelem schParamValue))
                    ) ; end if
                ) ; foreach
                numelem = numelem + 1
            ) ; end foreach
        ) ; end let
    ) ; end procedure

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • theopaone
    theopaone over 12 years ago

     Something to try is to search through the instHeaders instead of the instances. The instHeader defines the virtual memory master for the instances. It is much quicker becasue there are fewer instHeaders than instances.

    schIh = setof(  ih csv~>instHeaders ih~>cellName == "option" )
    schInsts = foreach( mapcan schIh schIh~>instances )

    ; Check the last line because I don't have Virtuoso access from home

    ; It should return a flattened list of the instances of the cell option

    layIh = setof( ih clv~>instHeaders ih~>cellName == "option" )
    layInsts = foreach( mapcan layIh layIh~>instances )

    I think mapcan is the right mappng function to use but read about them as they are very useful.

    It will greatly speed up your program as you are only sorting a few instHeaders.

     You can also make a DPL or a table which will map the schematic values using the schematic instance name. I would use a table:

    schParamValue = makeTable('values "" )

    ;; Add the pipe to the beginning of the name
    schParamValue[strcat( "|" inst~>name) ] =  dbSearchPropByName( inst "connectivity")~>value

    In the layout processing part you can then get the layout instance name and get the value from the  table directly:

    dbReplaceProp( inst "connectivity" 'string schParamValue[layoutInst~>name]

    Look up the table data structure for more info.

    Ted

     

    • 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