3 Replies Latest reply on Aug 19, 2008 10:02 AM by karen_chow

    Run Calibre Interactive in Batch mode

    James

      I've been asked if it is possible to run Calibre Interactive without actually opening the GUI several times. You can by adding the -batch option to the Calibre command line. calibre -gui -drc -runset runset.txt -batch The -gui option instructs Calibre to invoke Calibre Interactive, -drc sets Interactive to run DRC. You'll want to supply a runset file with the -runset option that contains the setup options for the job like the input database, topcell, etc. Following this all with -batch will prevent the GUI from opening, but still run everything based on the info in the runset file. -


      Here's a simple Tcl script that shows how you could do this in a practical application.
      {color:maroon}#!/user/bin/tclsh
      #
      # Call your stream out function from your design environment if the file
      # is not already on disk. Perform any file merging or data prep, then call
      # Calibre Incremental DRC in batch.{color}
      
      You can write your own script in your design environment's API that performs everything in this script.
      {color:maroon}# Set any unique variables that have not previously been set.{color}
      {color:blue}set MGC_DRCRULES "./rules"
      set MGC_TOPCELL "DIGBLK"
      set MGC_GDSFILE "./DIGBLK.gds"
      set MGC_RUNDIR "/wv/pv_mktg/jamesp/projects/flows/calibrei_run_batch"
      set MGC_SUMMARY "${MGC_TOPCELL}_summary.db"
      set MGC_RDB "${MGC_TOPCELL}_drc.db"{color}
      
      These variables are the ones that you would likely change each time you run a DRC job.
      {color:maroon}# Open the runset file
      # Remove the \'s to have this work. Just need to fix the formatting in my post.{color}
      {color:blue}set rsetFile \[open batch.runset w\]{color}
      
      Open a new file for Calibre Interactive runset file settings.
      {color:maroon}# Runset options that change from run to run{color}
      {color:blue}puts $rsetFile "*drcRulesFile: $MGC_DRCRULES"
      puts $rsetFile "*drcLayoutPaths: $MGC_GDSFILE"
      puts $rsetFile "*drcLayoutPrimary: $MGC_TOPCELL"
      puts $rsetFile "*drcRunDir: $MGC_RUNDIR"
      puts $rsetFile "*drcSummaryFile: $MGC_SUMMARY"
      puts $rsetFile "*drcResultsFile: $MGC_RDB"{color}
      
      Write the options that will change run to run into the file
      {color:maroon}# Runset options that are the same run to run{color}
      {color:blue}puts $rsetFile "*cmnRun64: 1"
      puts $rsetFile "*cmnRunMT: 1"
      puts $rsetFile "*cmnTranscriptFile: log"
      puts $rsetFile "*cmnTranscriptEchoToFile: 1"{color}
      
      Write in any additional non-default options
      {color:blue}close $rsetFile{color}
      
      {color:maroon}# Call calibre with -runset option (fill in runset file) and -batch option{color}
      {color:blue}eval exec "calibre -gui -drc -runset batch.runset -batch"{color}
      
      Close the runset file and execute Calibre Interactive DRC on the command line. The runset file is hard-coded, but could also be a variable.
      {color:blue}puts "Batch DRC job Complete, starting Calibre RVE"{color}
      {color:maroon}# Open Calibre RVE and load results database{color}
      {color:blue}eval exec "calibre -rve $MGC_RDB"{color}
      
      When DRC finishes, load the Results DataBase into RVE, connect to your editor's socket and begin debugging. Here's the resulting runset file :
      {color:green}*drcRulesFile: ./rules
      *drcLayoutPaths: ./DIGBLK.gds
      *drcLayoutPrimary: DIGBLK
      *drcRunDir: /jamesp/projects/calibrei_run_batch
      *drcSummaryFile: DIGBLK_summary.db
      *drcResultsFile: DIGBLK_drc.db
      *cmnRun64: 1
      *cmnRunMT: 1
      *cmnTranscriptFile: log
      *cmnTranscriptEchoToFile: 1{color}
      
      Here's the entire script in one shot :
      {color:green}#!/user/bin/tclsh
      #
      # Call your stream out function from your design environment if the file
      # is not already on disk. Perform any file merging or data prep, then call
      # Calibre Incremental DRC in batch.
      
      # Set any unique variables that have not previously been set.
      set MGC_DRCRULES "./rules"
      set MGC_TOPCELL "DIGBLK"
      set MGC_GDSFILE "./DIGBLK.gds"
      set MGC_RUNDIR "/wv/pv_mktg/jamesp/projects/flows/calibrei_run_batch"
      set MGC_SUMMARY "${MGC_TOPCELL}_summary.db"
      set MGC_RDB "${MGC_TOPCELL}_drc.db"
      
      # Open the runset file
      # Remove the \'s to have this work. Just need to fix the formatting in my post.
      set rsetFile \[open batch.runset w\]
      
      # Runset options that change from run to run
      puts $rsetFile "*drcRulesFile: $MGC_DRCRULES"
      puts $rsetFile "*drcLayoutPaths: $MGC_GDSFILE"
      puts $rsetFile "*drcLayoutPrimary: $MGC_TOPCELL"
      puts $rsetFile "*drcRunDir: $MGC_RUNDIR"
      puts $rsetFile "*drcSummaryFile: $MGC_SUMMARY"
      puts $rsetFile "*drcResultsFile: $MGC_RDB"
      # Runset options that are the same run to run
      puts $rsetFile "*cmnRun64: 1"
      puts $rsetFile "*cmnRunMT: 1"
      puts $rsetFile "*cmnTranscriptFile: log"
      puts $rsetFile "*cmnTranscriptEchoToFile: 1"
      
      close $rsetFile
      
      # Call calibre with -runset option (fill in runset file) and -batch option
      eval exec "calibre -gui -drc -runset batch.runset -batch"
      
      puts "Batch DRC job Complete, starting Calibre RVE"
      # Open Calibre RVE and load results database
      eval exec "calibre -rve $MGC_RDB"{color}
      

        • 1. Re: Run Calibre Interactive in Batch mode
          lorraine_zhang

           

          James, does Calibre Interactive Batch mode support Incremental DRC?

           

           

           

           

           

          • 2. Re: Run Calibre Interactive in Batch mode
            James

            Hi Lorraine, Sure. You can basically run any Calibre Interactive job in batch mode in the same way. This includes DRC, LVS, xRC, etc. You would just need to add the Incremental DRC options to the script such that they get written to your runset prior to executing Calibre. Here's an example of how this would look for the Calibre Interactive Design Delta Flow. The sections in green indicate the changes made for Incremental DRC. The DIGBLK_ref.gds file is the reference GDS file while the DIGBLK.gds file is the current one with any edits that have been made.

            #!/user/bin/tclsh
            #
            # Call your stream out function from your design environment if the file
            # is not already on disk. Perform any file merging or data prep, then call
            # Calibre Incremental DRC in batch.
            
            # Set any unique variables that have not previously been set.
            set MGC_DRCRULES "./rules"
            set MGC_TOPCELL "DIGBLK"
            set MGC_GDSFILE "./DIGBLK.gds"
            set MGC_RUNDIR "/wv/pv_mktg/jamesp/projects/flows/calibrei_run_batch"
            set MGC_SUMMARY "${MGC_TOPCELL}_summary.db"
            set MGC_RDB "${MGC_TOPCELL}_drc.db"
            
            {color:green}# Variables for Incremental DRC
            set MGC_REFERENCE_GDSFILE "./DIGBLK_ref.gds"
            {color}
            # Open the runset file
            # Remove the \'s to have this work. Just need to fix the formatting in my post.
            set rsetFile \[open batch.runset w\]
            
            # Runset options that change from run to run
            puts $rsetFile "*drcRulesFile: $MGC_DRCRULES"
            puts $rsetFile "*drcLayoutPaths: $MGC_GDSFILE"
            puts $rsetFile "*drcLayoutPrimary: $MGC_TOPCELL"
            puts $rsetFile "*drcRunDir: $MGC_RUNDIR"
            puts $rsetFile "*drcSummaryFile: $MGC_SUMMARY"
            puts $rsetFile "*drcResultsFile: $MGC_RDB"
            
            {color:green}# Runset options for Incremental DRC Design Delta Flow
            puts $rsetFile "*drcDRCRunIncrDRC: 1"
            puts $rsetFile "*drcDRCIncrRunType: ECO"
            puts $rsetFile "*drcDRCIncrBaseDesign: $MGC_REFERENCE_GDSFILE"
            puts $rsetFile "*drcDRCIncrBaseCell: $MGC_TOPCELL"
            {color}
            # Runset options that are the same run to run
            puts $rsetFile "*cmnRun64: 1"
            puts $rsetFile "*cmnRunMT: 1"
            puts $rsetFile "*cmnTranscriptFile: log"
            puts $rsetFile "*cmnTranscriptEchoToFile: 1"
            
            close $rsetFile
            
            # Call calibre with -runset option (fill in runset file) and -batch option
            eval exec "calibre -gui -drc -runset batch.runset -batch"
            
            puts "Batch DRC job Complete, starting Calibre RVE"
            # Open Calibre RVE and load results database
            eval exec "calibre -rve $MGC_RDB"
            

            • 3. Re: Run Calibre Interactive in Batch mode
              karen_chow

              Thanks James!