You are on page 1of 2

#############################AUTHOR: GAURAV GANERIWAL #######Email ID: gauravx@synopsys.

com ######DATE: 1 August 2010 #####PURPOSE: GET CTS SUMMARY FROM SINGLE/MULTIPLE FILES, THE FILES CAN BE LOG F ILES OR CTS QOR REPORT (generated using report_clock_tree -summary) FILE OR A MI X OF BOTH. IF YOU ARE SPECIFYING A LOG FILE THE CTS REPORT THAT OCCURS AT THE EN D EOF WILL BE CONSIDERED. ##### XLS Sheet compatibility: You can easily take the CTS_summary Comparison re sult, and open it with microsoft xls sheet with a space delimiter. After openein g it into the xls sheet you will see the CTS-summary results properly tabulated. #USAGE :: perl multi_cts_summary.pl <file1> <file2> <file3> .......... #OUTPUT FILE :: summary_cts_all.rpt will be the output written out # ###Checking if any input file is specified if (@ARGV < 1) { print "usage: perl multi_cts_summary.pl <file1> <file2> <file3> ..........\n you should specify atleast one file to get the summary report\n"; exit; } ####Opening the summary report to which the QOR summary for all files will be wr itten open SUMM , ">summary_cts_all.rpt" ; $i = 0; while ($ARGV[$i]) { $i = $i + 1; } $j = 0; $ss = 1; while ($j < $i) { open FH1 , "$ARGV[$j]" ; ####Parsing the CTS-summary report while (<FH1>) { $cnt = 0; if (/Clock\s+Tree\s+Summary/) { while (<FH1>) { if (/^1$/ || /END_CMD/) { last; } if (!/^1$/) { if (/(\S+)$/) { $clock[$cnt][$j] = $1; $line = <FH1> ; chomp ($line); if ($line=~/(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+ )\s+(\S+)\s+$/) { $sinks[$cnt][$j] = $1; $ctbuffers[$cnt][$j] = $2; $clkcells[$cnt][$j] = $3; $skew[$cnt][$j] = $4; $longestpath[$cnt][$j] = $5; $totaldrc[$cnt][$j] = $6; $bufferarea[$cnt][$j] = $7; $cnt = $cnt + 1 ; } } if (/(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s

+(\S+)\s+$/) { $clock[$cnt][$j] = $1; $sinks[$cnt][$j] = $2; $ctbuffers[$cnt][$j] = $3; $clkcells[$cnt][$j] = $4; $skew[$cnt][$j] = $5; $longestpath[$cnt][$j] = $6; $totaldrc[$cnt][$j] = $7; $bufferarea[$cnt][$j] = $8; $cnt = $cnt + 1; } } } $cnt1 = $cnt; } } close FH1; $j = $j + 1; } $cn = 0 ; $n = 0; $file_no = 1; #### Printing in the Output summary file print SUMM " # # # $ARGV[0] # # # # "; while ($file_no < $i){ print SUMM "# # # $ARGV[$file_no] # # # "; $file_no = $file_no + 1; } print SUMM "\n"; while ($cn <= $cnt1) { $k = 0; while ($k < $i) { print SUMM " $clock[$cn][$k] $sinks[$cn][$k] $ctbuffers[$cn][$k] $clkce lls[$cn][$k] $skew[$cn][$k] $longestpath[$cn][$k] $totaldrc[$cn][$k] $bufferarea [$cn][$k]"; $k = $k + 1; } print SUMM "\n"; $cn = $cn + 1; } close SUMM; ### Printing on the shell a summary file has been generated print "check summary_cts_all.rpt file for the summary, you can import this into xls sheet using \"space\" as delimitter\n";

You might also like