OpenCores
URL https://opencores.org/ocsvn/ahb_system_generator/ahb_system_generator/trunk

Subversion Repositories ahb_system_generator

[/] [ahb_system_generator/] [trunk/] [scripts/] [vdiff.pl] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 federico.a
#!/usr/bin/perl
2
 
3
open(FIL1,"<$ARGV[0]")|| die "## cannot open reference $ARGV[0]\nUSAGE: vdiff.pl ref_file out_file\n";
4
open(FIL2,"<$ARGV[1]")|| die "## cannot open log file $ARGV[1]\nUSAGE: vdiff.pl ref_file out_file\n";
5
$ok=1;
6
$lines=0;
7
 
8
 
9
    while(<FIL1>){
10
        $lines++;
11
        if(/(\w+)\s+\w+\s+\w+\s+(\w+)\s+\w+\s+(\w+)/){
12
            $timel=$1;
13
            $addrl=$2;
14
            $valuel=$3;
15
#           print "$1=$timel $2=$addrl $3=$valuel\n";
16
            $line=<FIL2>;
17
 
18
 
19
            if($line=~/(\w+)\s+\w+\s+\w+\s+(\w+)\s+\w+\s+(\w+)/){
20
            $timer=$1;
21
            $addrr=$2;
22
            $valuer=$3;
23
#           print "$1=$timer $2=$addrr $3=$valuer\n";
24
            if(!("$addrl" eq "$addrr")){
25
                    print "#### (line:$lines) < $_ (line:$lines)> $line";
26
                    $ok=0;
27
                        }
28
                if((!($valuel=~/U+/)) && (!($valuel eq $valuer))){
29
                    print "#### ------------ $timer $addrr $valuel $valuer   \n";
30
                    print "#### (line:$lines)< $_ (line:$lines)> $line";
31
                    $ok=0;
32
                        }
33
 
34
#               if((!($valr=~/U+/)) && (!($valr eq $valrr))){
35
#                   print "++++++++++ $addr $vall $valr $1 $2 $3\n";
36
#                   print " (line:$lines)< $_ (line:$lines)> $line";
37
#                   $ok=0;
38
#               }
39
 
40
                }
41
                else {
42
                        print "#### log missing from (line:$lines) !!!\n";
43
                        $ok=0;
44
                        exit($ok);
45
                }
46
        }
47
  }
48
exit($ok);
49
 
50
#exit(-99);

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.