• 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 prevent duplicate cell creation?

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 13977
  • 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 prevent duplicate cell creation?

kumarb
kumarb over 14 years ago
Hi Experts, I wrote the following SKILL to prevent duplicate cell creation while creating new cell in any of the project library.==============================procedure(DuplicateCellChk(@rest args) let((libList libName cellName tmpPath (cells_with_same_name nil))    if(car(reverse(args))=="ddViewType"   then  tmpPath=cadr(args)  libName=car(args)~>lib~>name  cellName=car(parseString(tmpPath "/"))  libList=ddGetLibList()    ;;ignoring lx*SCRATCH  temp cells   if(!rexMatchp("^lx[a-zA-Z0-9]*SCRATCH$" cellName)  then    foreach(lib libList     if(member(cellName lib~>cells~>name) then      cells_with_same_name=cons(lib~>name cells_with_same_name)      );if    );foreach   ); if SCRATCH cell check    if(length(cells_with_same_name)>1 then    if(ddGetObj(libName cellName)~>views then         hiDisplayAppDBox(                    ?name gensym('dialogBox1)                    ?dboxBanner "Warning!"                    ?dboxText  strcat("Duplicate cells exists with the name " cellName " in Libraries " sprintf(nil "%L" cells_with_same_name))                    ?buttonLayout 'Close                        );DBox                          else  ddDeleteObj(ddGetObj(libName cellName))     hiDisplayAppDBox(                    ?name gensym('dialogBox1)                    ?dboxBanner "Error!"                    ?dboxText  strcat("Can't create cell " cellName " as this already exists in libraries " sprintf(nil "%L" remd(libName cells_with_same_name)))                     ?buttonLayout 'Close                        ) ;DBox       error("\n")    );if   );if  );if t ) ;let);procddRegTrigger("PreCreateObj" 'DuplicateCellChk)========================================== This code works as far as cell creation is concerned. But, this is causing problem while instantiating pcells in the layout since function is being triggered on each object creation due to PreCreateObj. So, when I try instantiating pcell, submaster is created in VM and hence function triggers. So, this is not a practical solution. I only want to put check at the time to cell creation not all other object creation.  I need to put this check since out verification scripts expect unique cells in all the cds.lib. Do we have hook called PreCreateCell? Thanks in advance for the suggestions. Best Regards,Bhupendra     

 

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    Hi Bhupendra,

    Code formatting/line-wrapping makes it impossible to debug. I suggest you compare against the cellName being "^zpcell.*" or "^zvia.*" to filter out the pcell ghost scratch cellViews. You should also be able to limit the check when  just a ddCellType is being created, but can't really see your code to make clearer  suggestions.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    Hi Bhupendra,

    Code formatting/line-wrapping makes it impossible to debug. I suggest you compare against the cellName being "^zpcell.*" or "^zvia.*" to filter out the pcell ghost scratch cellViews. You should also be able to limit the check when  just a ddCellType is being created, but can't really see your code to make clearer  suggestions.

    Regards,

    Andrew.

    • 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