• 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. How to add prefix to all instances

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 144
  • Views 19748
  • 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

How to add prefix to all instances

maven7783
maven7783 over 15 years ago
Hi All,I need a SKILL code for adding prefix or suffix to a top-cell and to all its instances.For eg: I have a Top cell ( INV)  and it has subcells called as a instances. INV hierarchy :  INV-> INV_PMOS-> INV_NMOS So, I want to add some prefix/suffix for all the cells in the hierarchy. Ex: myprefix_INV->myprefix_INV_PMOS-> myprefix_INV_NMOS Thanks,Maven. 
  • Cancel
  • Quek
    Quek over 15 years ago

     Hi maven

    The following COS solutions work on cells listed in the library manager. It is not exactly what you have requested but I think it can also solve your problem. You can first do a hierarchical copy of your top cell to a new library before applying the skillscript.

    11026492 : How can I rename all cells in a library with a specific prefix?
    11166194 : Add prefix/suffix to only some cells

    Hope that this helps you. : )

    Best regards
    Quek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • maven7783
    maven7783 over 15 years ago

    Thanks Quek,

    Your link gave me an idea to approach the problem.

    But the solution in the COS used ddGetObj() function which cannot traverse to the instances of a cell.

    So i used dbOpenCellVeiwByType() to get instances but its not effective could not complete the program.

    Could you suggest me a function which can traverse through libname~>cellname~>instances for a given libname and cellname.

     (dont tell me geEditCellView())

    If i can get that then my script is done.

    Thanks,

    Maven.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Quek
    Quek over 15 years ago

    Hi Maven

    You can use the following skillscript. It will find all subcells in a top cell and write the cellnames to a file. You can then use solution 11166194 to do the renaming. : )  Save the script as "findcells.il" in your working directory and execute it as follows:

    load "findcells.il"
    CCSwriteCells("myLib" "myTopCell" "myView")

    where "myView" can be either schematic or layout. The cell names will be written to a file named "list_cell".

    procedure( CCSfindAllCells(myLib myTopCell myView)
       prog( (allSubCells topCv allInsts cellList)
          allSubCells=list()
          topCv=dbOpenCellViewByType(myLib myTopCell myView)
          allInsts=topCv~>instances
          foreach( inst allInsts
             unless( member(inst~>cellName allSubCells)
                allSubCells=append1(allSubCells inst~>cellName)
                cellList=CCSfindAllCells(inst~>libName
                    inst~>cellName inst~>viewName)
                if( listp(cellList) then
                   allSubCells=append(allSubCells cellList)             
                ) ;if
             ) ;unless
          ) ;foreach
          return(allSubCells)
       ) ;prog
    ) ;procedure

    procedure( CCSwriteCells(myLib myTopCell myView)
       let( (outPort cellList)
          outPort=outfile("list_cell")
          cellList=CCSfindAllCells(myLib myTopCell myView)
          foreach(cell cellList
             fprintf(outPort "%s\n" cell)
          ) ;foreach
          close(outPort)
          outPort=nil
          printf("List of subcells have been written to file list_cell\n")
       ) ;let
    ) ;procedure

    Hope that this helps you. : )


    Best regards
    Quek

    findcells.il
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Kbrota
    Kbrota over 6 years ago in reply to Quek

    Hi Quek, the link you shared here is not working here anymore. Is it possible for you to paste the code here? I know it is 9 years old post, but, your solution seems more relevant to the problem I have right now.  

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to Kbrota

    I fixed the links for Quek - so they are now working.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Kbrota
    Kbrota over 6 years ago in reply to Andrew Beckett

    Thanks a lot, Andrew! I really appreciate your promptest response!

    • 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