Home > Community > Forums > Custom IC SKILL > How to add prefix to all instances

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 How to add prefix to all instances 

Last post Tue, Dec 29 2009 6:34 AM by Quek. 3 replies.
Started by maven7783 28 Dec 2009 09:05 PM. Topic has 3 replies and 2287 views
Page 1 of 1 (4 items)
Sort Posts:
  • Mon, Dec 28 2009 9:05 PM

    • maven7783
    • Top 500 Contributor
    • Joined on Tue, Dec 2 2008
    • Hyderabad, Andhra Pradesh
    • Posts 17
    • Points 290
    How to add prefix to all instances Reply
    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. 
    Filed under:
    • Post Points: 20
  • Mon, Dec 28 2009 10:40 PM

    • Quek
    • Top 10 Contributor
    • Joined on Wed, Oct 14 2009
    • Singapore, 00-SG
    • Posts 1,071
    • Points 16,285
    Re: How to add prefix to all instances Reply

     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

    • Post Points: 20
  • Tue, Dec 29 2009 4:44 AM

    • maven7783
    • Top 500 Contributor
    • Joined on Tue, Dec 2 2008
    • Hyderabad, Andhra Pradesh
    • Posts 17
    • Points 290
    Re: How to add prefix to all instances Reply

    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.

    • Post Points: 20
  • Tue, Dec 29 2009 6:34 AM

    • Quek
    • Top 10 Contributor
    • Joined on Wed, Oct 14 2009
    • Singapore, 00-SG
    • Posts 1,071
    • Points 16,285
    Re: How to add prefix to all instances Reply

    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

    • Post Points: 5
Page 1 of 1 (4 items)
Sort Posts:
Started by maven7783 at 28 Dec 2009 09:05 PM. Topic has 3 replies.