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

Subversion Repositories pci

[/] [pci/] [tags/] [rel_12/] [sim/] [rtl_sim/] [log/] [parse_monitor_logs.scr] - Blame information for rev 129

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 104 mihad
#!/bin/bash
2
 
3
for pci_mon_log in `ls *pci_mon.log` ; do
4
 
5
    echo "Parsing:" $pci_mon_log
6
 
7
    # split log file into sections
8
    csplit -s -f "pci_mon_part" \
9
    ./$pci_mon_log /"Monitor will complain in following section for a few times - testbench is intentionally causing parity errors"/ {*}
10
 
11
    for pci_mon_log_part in `ls pci_mon_part*` ; do
12
 
13
        if [ $pci_mon_log_part == "pci_mon_part00" ] ; then
14
            lines_in_part0=`wc -l < ./pci_mon_part00`
15
            if [ $lines_in_part0 -ne 1 ] ; then
16
                echo "WARNING! Error detected before the first section of pci monitor expected messages!"
17
            fi
18
 
19
            rm $pci_mon_log_part
20
            continue
21
 
22
        fi
23
 
24
        # parts of log file should now consist of sections between start and end marker of monitor complaining
25
        # check if the last line contains an end complaining section marker
26
 
27
        last_line_is_end_marker=$(tail -n 1 $pci_mon_log_part  | grep -c "End of Monitor complaining section")
28
 
29
        if [ $last_line_is_end_marker -ne 1 ] ; then
30
            echo "WARNING! Unexpected warning or error detected in the "$pci_mon_log" file!"
31
        fi
32
        rm $pci_mon_log_part
33
    done
34
done
35
 
36
for pciu_mon_log in `ls *pciu_mon.log` ; do
37
 
38
    echo "Parsing:" $pciu_mon_log
39
 
40
    # split log file into sections
41
    csplit -s -f "pciu_mon_part" \
42
    ./$pciu_mon_log /"Monitor should complain in following section for two times about STB de-asserted without slave response"/ {*}
43
 
44
    for pciu_mon_log_part in `ls pciu_mon_part*` ; do
45
 
46
        if [ $pciu_mon_log_part == "pciu_mon_part00" ] ; then
47
            lines_in_part0=`wc -l < ./pciu_mon_part00`
48
            if [ $lines_in_part0 -ne 1 ] ; then
49
                echo "WARNING! Error detected before the first section of pciu monitor expected messages!"
50
            fi
51
 
52
            rm $pciu_mon_log_part
53
            continue
54
 
55
        fi
56
 
57
        # parts of log file should now consist of sections between start and end marker of monitor complaining
58
        # check if the last line contains an end complaining section marker
59
 
60
        last_line_is_end_marker=$(tail -n 1 $pciu_mon_log_part  | grep -c "Monitor should NOT complain any more")
61
 
62
        if [ $last_line_is_end_marker -ne 1 ] ; then
63
            echo "WARNING! Unexpected warning or error detected in the "$pciu_mon_log" file!"
64
        fi
65
        rm $pciu_mon_log_part
66
    done
67
done
68
 
69
for wbu_mon_log in `ls *wbu_mon.log` ; do
70
    echo "Parsing: "$wbu_mon_log
71
    num_of_lines_in_wbu_log=$(wc -l < $wbu_mon_log)
72
    if [ $num_of_lines_in_wbu_log -ne 1 ] ; then
73
        echo "WARNING! Unexpected warning or error detected in the "$wbu_mon_log" file!"
74
    fi
75
done

powered by: WebSVN 2.1.0

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