6 Replies Latest reply on Nov 8, 2013 4:07 PM by david.klein

    Creating and quering a CCI database...

    david.klein

      I have a weird issue. In the past, I was able to create a CCI database by editing my LVS deck to change the line MASK SVDB DIRECTORY "svdb" QUERY to MASK SVDB DIRECTORY "svdb" CCI QUERY. As long as the LVS run completed (lvs clean), I then had the CCI data to work with using a command like this:

           calibre -cb -nowait -query ./svdb' topCell < cci-script.txt > query.log

      where topCell was the top cell in the layout and cci-script.txt was the list of stuff I wanted to be generated with the query.

       

      So, I'm not sure when this stopped working, but with the 2013.1_14.11 of Calibre, I get the following dumped into the query.log file:

      //  Calibre v2013.1_14.11    Thu Feb 7 13:14:55 PST 2013
      //  Calibre Utility Library   v0-11_9-2012-5    Tue Nov 20 15:37:50 PST 2012
      //  Litho Libraries v2013.1_14.11  Thu Feb  7 13:04:18 PST 2013
      //
      //             Copyright Mentor Graphics Corporation 1996-2013
      //                             All Rights Reserved.
      //         THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION
      //            WHICH IS THE PROPERTY OF MENTOR GRAPHICS CORPORATION
      //              OR ITS LICENSORS AND IS SUBJECT TO LICENSE TERMS.
      //
      //  Mentor Graphics software executing under x86-64 Linux
      //
      //  Running on Linux stomper 2.6.18-308.el5 #1 SMP Fri Jan 27 17:17:51 EST 2012 x86_64 glibc 2.5/NPTL 2.5
      //  64 bit virtual addressing enabled
      //  Running x86_64-linux/pkgs/icv/pvt/calibre -cb -nowait -query ./svdb topCell
      //  Process ID: 30181
      //
      //  Starting time: Thu Nov  7 18:05:54 2013
      //

      //  Applying licensing policy...
      //  caldrclvseve license acquired.

      //  Licensed Products
      //  -----------------
      //  Other products:
      //  - Query Server

      --- CALIBRE::HDB QUERY SERVER --- Thu Nov  7 18:05:54 2013
      Can't open PHDB database in "./svdb case0_base"
      Can't open XDB database in "./svdb case0_base"

       

      Anyone have any ideas on what I might be doing wrong? It seems odd that calibre cannot read databases it just created as I get this error message whether I give it a scrpt to read or not. Also, the LVS run is clean and the log file shows calibre lvs writing to the phdb and xdb files. They certainly exist in the .svdb directory.

       

      Thanks,

      Dave

        • 1. Re: Creating and quering a CCI database...
          david.klein

          So, after posting the question above, I had a small brain wave and decided to try starting the query without giving it a primary cell name:

           

          calibre -cb -nowait -query ./svdb

           

          and the query server started right up!?! Where before it complained about not being able to open the two databases, I see what I expect:

           

          --- CALIBRE::HDB QUERY SERVER --- Fri Nov  8 14:42:56 2013
          |-------------------------------- READING PHDB --------------------------------|
          ################################################################################
          --------------------------------------------------------------------------------
          -    HDB FOR LAYOUT PRIMARY: "topCell" WAS RESTORED FROM SVDB: ./svdb
          -    CROSS REFERENCE WAS RESTORED FROM SVDB: ./svdb
          -    CPU TIME = 1  REAL TIME = 2  LVHEAP = 92/92/93 MALLOC = 63/63/63
          --------------------------------------------------------------------------------


          --------------------------------------------------------------------------------
          --------------------------------------------------------------------------------
          -----          CALIBRE::HDB QUERY SERVER - EXECUTIVE MODULE                -----
          --------------------------------------------------------------------------------
          --------------------------------------------------------------------------------

          INITIATING HDB QUERY SERVER:
          --------------
             OK: Ready to serve.

           

          Sweet! So, now my question is: Why is it doing this? Is there something not happening in the LVS deck that I should be doing? Since this had me stumped all yesterday, your thoughts would be most welcome.

           

          Thanks,
          David

          • 2. Re: Creating and quering a CCI database...
            chris_balcom

            One thing to try is to make sure you're in the directory above the svdb directory and also avoid listing a cell name. It's just a technique I use to simplify things while I'm poking around trying to find what's going wrong. So in this case you might try:

             

            calibre -cb -nowait -query svdb

             

            And see if you get this instead of the error you were getting previously:

             

            INITIATING HDB QUERY SERVER:

            --------------

               OK: Ready to serve.

             

            (then you can type: quit)

             

            If I purposely go down into the svdb directory before invoking calibre -query, then I get these errors similar to what you saw:

             

            --- CALIBRE::HDB QUERY SERVER --- Fri Nov  8 12:54:45 2013

            Can't open PHDB database in "svdb"

            Can't open XDB database in "svdb"

            1 of 1 people found this helpful
            • 3. Re: Creating and quering a CCI database...
              david.klein

              Hey Chris,

               

              Thanks for taking a crack at this one. I've been poking about a bunch more and discovered something very interesting. When I start the query from a command line when I am in the lvs run directory, all is well. However, if I attempt to have a script run the query, even though I have it cd to the lvs run directory (confirmed by having it echo pwd), somehow calibre is getting confused and can't open the databases. This is not happy news as I am writing the script to help automate stuff and asking the user to type in commands is hardly automation.

               

              Here is an example of the csh script:

              #! /bin/csh -f

              echo `pwd`
              calibre -cb -nowait -query ./svdb < cci-script.txt

              This fails with the "Can't open" errors we know and !love. Type that last line of the script in the command line while in the same directory that contains the above script and the svdb subdir and it run beautifully.

               

              My head hurts.

               

              What does calibre have against running a query from a script?

               

              Thanks,

              David

              • 4. Re: Creating and quering a CCI database...
                chris_balcom

                In hopes of easing your pain I copied your script and tried it myself. It ran fine. For the cci-script.txt I just used a one liner containing the command: RESPONSE FILE temp.txt

                 

                Sometimes in my own travels I've seen simple shell scripts just simply not behave the way they usually do, or the way I want them to, in spite of the fact that simply typing the commands manually works fine immediately afterward. I've assumed it's some weird shell progamming glitch.

                 

                My colleague Matt has been following this thread and may have some ideas for an alternative approach that may skirt the issue... Matt... you still out there?

                • 5. Re: Creating and quering a CCI database...
                  matthew_killinger

                  David

                  Will the -query_input argument work for you?

                   

                  % calibre -cb -nowait -query_input cci-script.txt -query ./svdb

                   

                  Calibre Query Server Manual

                  The following optional arguments should appear before -query.

                  • -query_input query_file

                  An optional argument that specifies the pathname to a text file containing a Query Server command script.

                   

                  Matt


                  • 6. Re: Creating and quering a CCI database...
                    david.klein

                    Matt,

                     

                    Thanks for reading the manual with care. (I'm not even sure where the manuals are in our systems.) That did the trick for my simple minded script. Sadly, the full version is still not happy, but if the simple one works, I can figure out what I need to do to get the big one to work.

                     

                    Cheers,

                    David