• 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 19749
  • 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
Parents
  • 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
Reply
  • 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
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