Monte Carlo Simulation
Run Spectre

Once again, this program takes in parameters: all .scs files in /results/ folder
 The user should be weary that the modified input.scs files are still in the direct subdirectory results/ and output files are labeled input(n).out

Click here to download the MCRunSpectre.pl file only.
Click here to go to the downloads page.


#!/usr/bin/perl -w 
#Written by Hector Hung, Shouri Chatterjee and Professor Peter Kinget
# Copyright (C) 2004 by the authors and Columbia Integrated Systems
# Laboratory.

# There is no warranty or support and we cannot be held liable in any way.
# Everyone is permitted to copy verbatim copies of the code including
# this message.


# MCRunSpectre      - Monte Carlo Simulation Runner
#                     runs spectre on all netlists in the results directory

# usage:       'MCRunSpectre.pl'



#constants:
my $RESULTPATH = "results/";     
<-Looks into this result path for .scs files

#get list of all netlists in results directory
$files = `ls $RESULTPATH*.scs | xargs`;     
<-- Uses 'xargs' from the local shell  to match and pipe all .scs files


#for each netlist, run spectre and output a file in ascii format
foreach $file (split(' ',$files)) {
    print "$file\n";
    $file =~ m/(.*)\.scs/;
   
    print `spectre -format nutascii -raw $1.out $file`;        
<--Run spectre and output them into a .out file


}

If you have any questions, please email me at hch2007@columbia.edu