8 Replies Latest reply on Feb 9, 2009 9:48 AM by aghany85

    Tips & Tricks


      Have you ever had a huge GDS file from which you just wanted to know what the TOP cellname was, what layers were in it, or what cells? Recently, I came across a newer DESIGNrev API command that called "layout peek" that can quickly get you this information and more...all without even opening a GUI. Since I work with many GDS files on a daily basis, I went ahead and created some unix aliases to make things a bit easier.

      alias topcell 'calibredrv -a puts [layout peek \!* -topcells]'
      alias layers 'calibredrv -a puts [layout peek \!* -layers]'
      alias cells 'calibredrv -a puts [layout peek \!* -cells]'
      To execute, simply supply the GDS file name :
      %topcell xyz.gds
      %layers xyz.gds
      %cells xyz.gds



      Do you find this useful? Have any cool tips or tricks to share?



        • 1. Re: Tips & Tricks

          Hi James. Thanks for the tip about  layout peek in Calibre DESIGNrev. What other commands are there for layout peek?

          • 2. Re: Tips & Tricks

            Hi Karen,

            There are several for finding units, precision, parent or children of a given cell, but the one I found the most useful recently was reference count. It will return the number of references in a design. I built this basic functionality into a script to extract statistical cell info out of many databases.







            • 3. Re: Tips & Tricks

              When reviewing Calibre log files to debug an issue can be more difficult when the rules used for that job were not printed into the log. This can happen when a "header" rule file that contains user specified options like LAYOUT PATH and LAYOUT PRIMARY is used and the "main" golden rule file is included with an INCLUDE statement. Calibre will print the contents of the header rule file, and the INCLUDE statement into the transcript, but not the contents of the included file.


              The CALIBRE_ECHO_RULE_FILE environment variable can be set prior to launching the job to have the contents of the included rule files printed into the log. This is very useful when trying to see what switches may be set in the rules file itself, and reproducing any issues. IFDEF switches that were unused will be commented with "//" characters while those used whill remain uncommented. This means that you can simply strip the rules section out of the transcript and run exactly the same rules and options as the testcase.


              To echo all included rule files to the Calibre log file, set this variable to “1″ and then execute Calibre as normal.


              setenv CALIBRE_ECHO_RULE_FILE YES

              • 4. Tips & Tricks

                Here's another Calibre DRC variable that can come in handy. When writing a rule deck and putting in IFDEF switches or to setup a subset of rules for a specific run, it is helpful to know what rules in a rule deck require connectivity. The variable CALIBRE_SHOW_CONNECT_RULES can be used to do just that.


                Useage :

                1) setenv CALIBRE_SHOW_CONNECT_RULES YES

                2) calibre -drc rules

                3) unsetenv CALIBRE_SHOW_CONNECT_RULES


                Calibre will compile the rules and then output to STDOUT, something like :

                --- RULE FILE = rules 



                This won't actually run the Calibre DRC job, so you'll need to unset the variable before trying to actually run from the same shell.

                • 5. Re: Tips & Tricks

                  Hi! Sounds Good!

                  • 6. Re: Tips & Tricks


                    Hi James,



                    The -refcount functionality is nice, but only returns the hierarchical references,



                    so the value might not be the actual number a cell is used in the design.






                    best regards, Jacob






                    • 7. Re: Tips & Tricks

                      Hi Jacob,


                      In the early version, the count returned by layout peek refcount was misleading if not incorrect. I believe the 2008.4 release will contain the count that you expect; taking into consideration placement in parents of parents, etc.



                      • 8. Re: Tips & Tricks

                        Hi James!



                        This working for people who use csh-like shell. In case you use bash or ksh, you can do them in a proc placed in your ~/.bashrc like:


                        topcell() {
                        calibredrv -a puts /[layout peek $1 -topcells/] 2> /dev/null;


                        I've directed stdErr output to /dev/null as I'm installing Calibre on a non supported OS (Fedore)..


                        Thanks again,