• 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. Getting MOSFET model type from instance

Stats

  • Locked Locked
  • Replies 14
  • Subscribers 144
  • Views 16774
  • 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

Getting MOSFET model type from instance

dragank
dragank over 3 years ago

Hi all.

I am using IC6.1.8-64b.500.10

Is there a way to get from instance?

For instance "/I0/I1/MP0" should be resolved to "pmos4".

Best regards,

Dragan

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago

    Dragan,

    For this and some of your other questions, it's unclear to me whether you are wanting to get this post-simulation (in which case it's pretty easy to do), or pre-simulation (in which case it's rather hard since it's dependent upon how the PDK is implemented). By "model type" do you mean the name of the model used in simulation? Or the underlying model type (e.g. bsim4, bsimimg etc)?

    Similarly your questions about getting every hierarchical name - it wasn't clear what you wanted

    (I've not been able to spend much time answering on the forums the last week - likely to continue this way for the next week I expect).

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dragank
    dragank over 3 years ago in reply to Andrew Beckett

    For this question it is for pre-simulation step.

    For model type I mean:

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dragank
    dragank over 3 years ago in reply to dragank

    Is the following enough information about PDK or should I provide something else?

    Best regards,

    Dragan

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Kevin Buck
    Kevin Buck over 3 years ago in reply to dragank

    PDKs are proprietary so more than sharing what PDK you are using is probably not a good idea. What you likely need to do is open your schematic for reading in your SKILL code and then iterate over the instances contained in the schematic. The instances should contain this information somewhere in the data structure.

    schView = dbOpenCellViewByType(libName cellName "schematic" "" "r")

    foreach(inst schView~>instances

    ;insert an if statement here to find what you are looking for

    )

    The pattern you need to search for will depend on how the PDK set up the data structure.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dragank
    dragank over 3 years ago in reply to Kevin Buck

    Thank you.

    The thing is I have to do this in cell hierarchy.

    This is asked in another thread.

    So I will have to find MOSFETS in cell hierarchy (I0/I1/...) until u get list of MOSFETS and then do something like inst~>modelName.

    Instance here is MOSFET cell if i understand correctly?

    Best regards,

    Dragan

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Kevin Buck
    Kevin Buck over 3 years ago in reply to dragank

    Instances will be everything in the cell view, not just MOSFETs. You will need to apply a conditional statement to figure out what type of cell it is. There may be a unique identifier that can tell you what you want directly from a single if statement in the for loop.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dragank
    dragank over 3 years ago in reply to Kevin Buck

    Ok.

    What about dbOpenCellViewByType(libName cellName "schematic" "" "r")

    if I have a test selected.

    Cadence already knows what are libName and cellName (right click on test and then select Design)

     ).

    How to find them from test in maestro?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dragank
    dragank over 3 years ago in reply to dragank

    I tried with "axlGetTestToolArgs" and "axlGetOrigTestToolArgs" but they return nil.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to dragank

    OK, I've seen some of your posts (I've not been able to respond to everything over the last couple of weeks for various reasons). If you're looking for something to hierarchically traverse the design and collect the model parameter values, then something like this would do:

    procedure(CCFgetHierModelNames(@key (cv geGetEditCellView()) 
    	(viewList "schematic spectre symbol")
    	(stopList "spectre symbol") devLib (modelParam "model")
            (hierPath "") hierList)
        let((master modelVal)
            when(stringp(stopList)
                stopList=parseString(stopList)
            )
            foreach(inst cv~>instances
                unless(inst~>pin
    		;--------------------------------------------------------
    		; switch into the instance
    		;--------------------------------------------------------
                    master=dbGetAnyInstSwitchMaster(inst viewList)
                    when(master 
    		    ;----------------------------------------------------
    		    ; If it's a stopping view, and the devLib matches,
    		    ; and there's a model parameter value, then collect
    		    ; the resulting hierarchical name and model 
    		    ;----------------------------------------------------
                        if(member(master~>viewName stopList) then
                            when(!devLib || master~>libName==devLib
                                modelVal=get(inst modelParam)
                                when(modelVal
                                    hierList=cons(
                                        list(
                                            strcat(hierPath "/" inst~>name)
                                            modelVal
                                        )
                                        hierList
                                    )
                                )
                            )
    		    ;----------------------------------------------------
    		    ; Otherwise recursively descend into the instance
    		    ;----------------------------------------------------
                        else
                            hierList=CCFgetHierModelNames(
                                ?cv master
                                ?viewList viewList
                                ?stopList stopList
                                ?devLib devLib
                                ?modelParam modelParam
                                ?hierPath strcat(hierPath "/" inst~>name)
                                ?hierList hierList
                            )
                        )
                    )
                )
            )
            hierList
        )
    )
    

    If you have the schematic open in the window, then you can just call:

    hierModels=CCFgetHierModelNames(?devLib "PRIMLIB")

    If you need to start from a given schematic view, you would use dbOpenCellViewByType(lib cell view) to open it, and then call the function:

    cv=dbOpenCellViewByType(lib cell view)
    hierModels=CCFgetHierModelNames(?devLib "PRIMLIB" ?cv cv)

    You've now started talking about getting the design for a test - yet your picture is showing ADE L - so I don't really know what you're trying to do.

    Andrew 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dragank
    dragank over 3 years ago in reply to Andrew Beckett

    Thank you for response.

    I am developing GUI which is started from maestro.

    I need to get library name and cell name (this should be top cell for iteration), so I do not have geGetEditCellView().

    I tried with "axlGetTestToolArgs" and "axlGetOrigTestToolArgs" but they both return nil.

    Best regards,

    Dragan

    • 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