James

Run Calibre Interactive in Batch mode

Discussion created by James on Jul 31, 2008
Latest reply on Aug 19, 2008 by karen_chow

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}

Outcomes