Email: bknpk@hotmail.com Phone: +972-54-7649119
V

 

ASIC/FPGA Design and Verification Out Source Services

regression script for AIS DUT using system C
Main features of the regression script are:

  1. Automatic seed generation based on perl command time with better granularity than one second.
  2. Keeps track on failing tests.
    When a test fails an entry is written to the log with the seed and error kind.
  3. Regression stops after a fixed number of tests has been done or the existence of the file stop.txt in the current running directory.
  4. Each regression run generates always the following data in the regression log:
    start simulation of 10000 runs at Sat Apr 11 10:34:02 EDT 2009
    stop simulation after 117 runs
  5. Coverage Handling: The script handles coverage collecting and accumulating.
    When a test finishes the system C test-bench writes data for coverage to a file named cov.txt.The following command collects the coverage information and accumulates it.
    The accumulation is written to a file named cov_acc.txt.
    When the regression ends it generates a nice HTML report, using the following command:
    perl Report/cov_report.pl cov.txt report
  6. To see an example of the coverage report press report
  7. #!/bin/perl
    open(FPWRLOG, ">>reg.log") || die("can not open reg.log\n");
    $pl_seed=time ^ $$ or time ^ ($$ + ($$ << 15));
    srand($pl_seed);
    if($ARGV[0] eq "") {$lim=10000;}
    else {$lim=$ARGV[0];}
    if($ARGV[1] ne "") {$lim=1; $sc_seed=$ARGV[1];}
    $date=`date`; chomp($date);
    print FPWRLOG ("start simulation of $lim runs at $date\n");
    for($i=0; $i<$lim; $i++) {
      if( (-e "stop.txt") ) {#if file exist stop regression
        print("stop due to user\n");
        system("rm -f stop.txt");
        print FPWRLOG ("stop simulation after $i runs\n");
        system("perl Report/cov_report.pl cov.txt report");
        exit(0);
      }
      if($ARGV[1] eq "") {
        $sc_seed=int(rand(1000000));
      }
      $cmd="./run.x " . $sc_seed;
      $res=`$cmd`;
      if($res =~ /(.*ERROR.*)/) {
        $t=$1; chomp($t);
        print FPWRLOG ("fail seed = $sc_seed\n");
        print FPWRLOG ("$t\n\n");
      }
      #coverae
      @cov_A=split(/\n/, $res);
      open(FPW, ">cov.txt") || die("can not open cov.txt\n");
      foreach $j ( @cov_A ) {
        chomp($j);
        if($j =~ /^cov/) {
          print FPW ("$j\n");
        }
      }
      close(FPW);
      system("perl Report/cov_report.pl cov.txt");
    }#for

Contact me now at:

  ...


I would be happy to offer my services. Call ASAP !


Home

AIS TB using system C

Coverage of the AIS DUT

Download Area






Search This Site


Feedback This Site




new pages on this site