• 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. Replace library name and cell name of standard cells in...

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 143
  • Views 17552
  • 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

Replace library name and cell name of standard cells in schematic

naresh9005
naresh9005 over 4 years ago

Hi 

we are trying to write one skill script to replace the library name and cell name of an instant in the schematic i.e. we have standard cell with instant name  as "I1" it is from the library "STANDARDCELL_1" and cell name is "INV_F1", this instant library name should replace with "STANDARDCELL_2" and cell name should append with  "AB", that is cell name should replace with  "INV_FIAB". i have many instances like this with different cell names,  please help with this problem. 

Regards 

Naresh 

  • Cancel
  • naresh9005
    naresh9005 over 4 years ago

    could some one help me on this , can i use "schHiReplace" function ?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to naresh9005

    I'd probably do it by writing a simple bit of SKILL - your requirement was a little vague (which was why I didn't reply sooner). What are you expecting to provide to the program? A list of instance names? Or do you want to replace all instances from a particular library with cells from a different library with the suffix added to each?

    In general, changing the master (symbol) for a specific instance would be done by setting ~>master to the database object of the new cellView (you can't directly set libName/cellName/viewName); if you want to change all instances of a particular lib/cell/view in a schematic you'd probably use dbSetInstHeaderMasterName.

    I think it might end up being a bit tortuous to do this with schHiReplace.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • naresh9005
    naresh9005 over 4 years ago in reply to Andrew Beckett

    Thank you for your reply, 

    Actually i have two standard cell library's in our design one is "STANDARDCELL_1" and second one is "STANDARDCELL_2". Both of the library's contains standard cells like Inverters, ANDgate,ORgate .....etc,but there is a naming difference for cells, if the inverter name is "INV1_F1" in  "STANDARDCELL_1" library,  the same inverter name  will be "INV_FIAB" in "STANDARDCELL_2" library. similarly  if the Andgate name is "AND_F1" in  "STANDARDCELL_1" library,  the same ANDgate  name  will be "AND_FIAB" in "STANDARDCELL_2" library.

    Now in my design few instances(symbol) are referring from "STANDARDCELL_1" library, so these instances library name should changes to  "STANDARDCELL_2" and the cell name should be append with "AB", if the cell name is "INV_F1", then it should change to "INV_F1AB".

    Finally our skill script should be able to find the instances from "STANDARDCELL_1"  and replace each instant library with "STANDARDCELL_2"

    and cell name of the instant should append with "AB". 

    EXAMPLE :

    INPUT:                                                                             OUTPUT:

    INSTANT NAME: I1                                                        INSTANT NAME: I1

    LIBRARY NAME: STANDARDCELL_1                           LIBRARY NAME: STANDARDCELL_2

    CELL NAME: INV_FI                                                       CELL NAME: INV_FIAB

    Regards 

    Naresh 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to naresh9005

    Naresh,

    This code should help you:

    procedure(CCFreplaceStdCells(@key 
            (cvId geGetEditCellView()) 
            (fromLib "STANDARDCELL_1") 
            (toLib "STANDARDCELL_2") 
            (suffix "AB")
          )
      let((newCellName)
        foreach(instHeader cvId~>instHeaders
          when(instHeader~>libName==fromLib && instHeader~>instances
            newCellName=strcat(instHeader~>cellName suffix)
            dbSetInstHeaderMasterName(
              instHeader
              toLib
              newCellName
              instHeader~>viewName
            )
          )
        )
        t
      )
    )

    Then all you need to do is (with the schematic open and in the current window):

    CCFreplaceStdCells()

    You might also want to change the library names it is looking for, so you could do:

    CCFreplaceStdCells(?fromLib "origLibName" ?toLib "newLibName")

    There's also the ability to pass ?cvId so it doesn't have to be a schematic open in a window (it could have been opened with dbOpenCellViewByType), or to use a different suffix via ?suffix.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • naresh9005
    naresh9005 over 4 years ago in reply to Andrew Beckett

    Thank you Andrew, above code is working perfectly fine thank you. 

    i have similar case, where i need to replace the "STANDARDCELL_3" library has to replace with "STANDARDCELL_4"

     library cells . below are cell names compression between two library cells 

    STANDARDCELL_3                                                      STANDARDCELL_4

    cell names:                                                                   cell names: 

    inv_f1_1p8v                                                                 inv_f1_ab1p8v                                                         

    inv_f2_1p8v                                                                 inv_f2_ab1p8v

    mux_f2_1p8v_e                                                           mux_f2_ab1p8v_e

    and_f1_1p8v_h                                                            and_f1_ab1p8v_h

    ................                                                                     .................

     all the standard cell names contain "1p8v" string in the cell names in "STANDAREDCELL_3" , this string has to replace with "ab1p8v" string for the cell names in "STANDAREDCELL_4".

    EXAMPLE :

    INPUT:                                                                             OUTPUT:

    INSTANT NAME: I1                                                        INSTANT NAME: I1

    LIBRARY NAME: STANDARDCELL_3                          LIBRARY NAME: STANDARDCELL_4

    CELL NAME: inv_f1_1p8v                                              CELL NAME: inv_f1_ab1p8v 

    i was trying break the cell names, but my script is not working  , could you please help me with this problem .

    Regards 

    Naresh 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to naresh9005

    Naresh,

    Completely untested, but something like this should work:

    procedure(CCFreplaceStdCellsPat(@key 
            (cvId geGetEditCellView()) 
            (fromLib "STANDARDCELL_3") 
            (toLib "STANDARDCELL_4") 
            (pattern "1pv8")
    	(with "ab1pv8")
          )
      let((newCellName pat)
        pat=pcreCompile(pattern)
        foreach(instHeader cvId~>instHeaders
          when(instHeader~>libName==fromLib && instHeader~>instances
            newCellName=pcreReplace(pat instHeader~>cellName with 1)
            dbSetInstHeaderMasterName(
              instHeader
              toLib
              newCellName
              instHeader~>viewName
            )
          )
        )
        t
      )
    )

    Andrew

    • 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