⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 grep.pl

📁 用于IC设计中
💻 PL
字号:
#!/usr/bin/perl system "rm -r  result_file";open(filename,"@ARGV[0]") || die "can't open the file";system "mkdir result_file";    open(file3,">>./result_file/final_result") || die " the file is missing ";while($name=<filename>) {    open(file1,"./chip_top_cts_05_23/$name");    open(file2,">>./result_file/$name")|| die "can't open the file";    while (<file1>)  {    if  (!/^</)  {     @temp=split(" ",$_);#     push(@$name_array,"$temp[0]");#     print file2 "$temp[0]\n";#     @tmep1=split('\/',$temp[0]);#       print " $temp[0]\n";      if  ( $temp[0]=~/[CK]$/ ) {         chop($temp[0]);        chop($temp[0]);        chop($temp[0]);       }      elsif ($temp[0]=~/[RN]$/ ) {        chop($temp[0]);        chop($temp[0]);         chop($temp[0]);       }      elsif ($temp[0]=~/[A]$/ ) {      chop($temp[0]);      chop($temp[0]);      }        elsif ($temp[0]=~/[Y]$/ ) {        chop($temp[0]);        chop($temp[0]);       }       elsif ($temp[0]=~/[SE]$/ ) {        chop($temp[0]);         chop($temp[0]);         chop($temp[0]);       }        elsif ($temp[0]=~/[B]$/ ) {        chop($temp[0]);        chop($temp[0]);       }         elsif ($temp[0]=~/[D]$/ ) {        chop($temp[0]);        chop($temp[0]);       }       elsif ($temp[0]=~/[S0]$/ ) {        chop($temp[0]);        chop($temp[0]);        chop($temp[0]);       }     elsif ($temp[0]=~/[SI]$/ ) {        chop($temp[0]);        chop($temp[0]);        chop($temp[0]);        }       elsif ($temp[0]=~/[Q]$/ ) {        chop($temp[0]);        chop($temp[0]);        }       elsif ($temp[0]=~/[A1]$/ ) {        chop($temp[0]);        chop($temp[0]);        chop($temp[0]);        }       elsif ($temp[0]=~/[A2]$/ ) {        chop($temp[0]);        chop($temp[0]);        chop($temp[0]);        }        elsif ($temp[0]=~/[G]$/ ) {        chop($temp[0]);        chop($temp[0]);        }       else {#      print " please check the $temp[0]\n";        }#      if ($temp[0] = ~/cell/) {#      print " the  cell error is in $name ";#        }#      if ($temp[0] = ~/max/ ) {#       print " the  max error is in $name";#       }#      print "$temp[0]\n";       if (($temp[0] !~/cell/) && ($temp[0] !~/max/)) {#       print "good\n";#        print  "$temp[0]\n";        $cell_name_1 = $temp[0];       if ($cell_name_1 ne $cell_name_2 ) {       print file2 "$temp[0]\n";       print file3 "$temp[0]\n";        $cell_name_2 = $temp[0];       }      }     }     }#      $max = $$name_array[0];#      $min = $$name_array[0];#    for($i=0;i<=$#$name_array-1;$i++) {#    if(($name_array[$i] <= $max) && ($name_array[$i] => $min)) {#     }#    elsif ($name_array[$i] > $max) {#       $max =  $name_array[$i];#      }#    elsif ($name_array[$i] < $min) {#       $min = $name_array[$i];#      }#      }#   $result=$max-$min;#   print file2 " ==========================";#   print file2 " The max skew is $result ";#    print file2 " ==========================";     close(file2);    close(file1);    }   close(filename);   close(file3);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -