• 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. SKILL code to traverse the hierarchy of cellviews in sc...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 144
  • Views 17454
  • 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 code to traverse the hierarchy of cellviews in schematic

Atul Dwivedi
Atul Dwivedi over 12 years ago

Hi there,

I have been stuck for quite sometime with a requirement, to access the parameter values of each instance (MOS, RES, CAP, VDC...) in a design which has instances of many other cell view, hence creating a hierarchy (These sub-cell views translate to subcircuits in the netlist) .

What I want is, to be able to access recurisively each instance in the design and be able to change the 'w's and 'l' etc. from the top cell view.

As a starting point I have collected some information and coded the following:

currentSession=asiGetSession(hiGetCurrentWindow())

topCellView=asiGetTopCellView(currentSession)

Now where to head next? Can anyone suggest?

Thanks and Regards,

Atul 

  • Cancel
Parents
  • marcelpreda
    marcelpreda over 12 years ago

    Hi Atul,

    See bellow a starting example.

    The idea:

    - scan all instances in the cell

    - if your isnt has an schematic view descend in it

    - if no schematic view available I assume that it is a primitive (I print for it lib/cell)

    you should decided the "primitives" lib/cell which are interesting  for you.

     If your design is big the code bellow may slow,

    think of a nonrecursive implementation, or to not visist the already seen lib/cell/view .

    BR,

    Marcel

     

     ;; traverse schematic hier
    ;; and print all the instances that do not have any schematic view
    ;; most likely those are your primitives
    ;; cv - cv to scan

    ;; level - level down into hierarchy, used just to indent the printed lines.

    procedure( mpTraverseHierSch( cv @optional (level 0) )
        foreach(inst cv->instances
            if( cview =  dbGetAnyInstSwitchMaster(inst "schematic") then
                mpTraverseHierSch(cview level+1)
            else
                ;; some preety  printing
                for( i 1 level
                    printf("    ")
                )
                printf("%s %s/%s in %L\n"
                    inst->name inst->libName inst->cellName
                    list(cv->libName cv->cellName cv->viewName))
            )

        )
    )

    mpTraverseHierSch(topCellView)

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • marcelpreda
    marcelpreda over 12 years ago

    Hi Atul,

    See bellow a starting example.

    The idea:

    - scan all instances in the cell

    - if your isnt has an schematic view descend in it

    - if no schematic view available I assume that it is a primitive (I print for it lib/cell)

    you should decided the "primitives" lib/cell which are interesting  for you.

     If your design is big the code bellow may slow,

    think of a nonrecursive implementation, or to not visist the already seen lib/cell/view .

    BR,

    Marcel

     

     ;; traverse schematic hier
    ;; and print all the instances that do not have any schematic view
    ;; most likely those are your primitives
    ;; cv - cv to scan

    ;; level - level down into hierarchy, used just to indent the printed lines.

    procedure( mpTraverseHierSch( cv @optional (level 0) )
        foreach(inst cv->instances
            if( cview =  dbGetAnyInstSwitchMaster(inst "schematic") then
                mpTraverseHierSch(cview level+1)
            else
                ;; some preety  printing
                for( i 1 level
                    printf("    ")
                )
                printf("%s %s/%s in %L\n"
                    inst->name inst->libName inst->cellName
                    list(cv->libName cv->cellName cv->viewName))
            )

        )
    )

    mpTraverseHierSch(topCellView)

    • 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