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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [orp/] [orp_soc/] [sim/] [bin/] [run_sw] - Blame information for rev 1157

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

Line No. Rev Author Line
1 975 lampret
#!/bin/csh -f
2
 
3
set iter = 1;
4
set failed = 0;
5
set all_tests = 0;
6
 
7
# List all test cases
8 1157 lampret
set alldirs=( ../../sw/dhry ../../sw/mmu ../../sw/basic ../../sw/mul ../../sw/except \
9
                ../../sw/cbasic ../../sw/tick ../../sw/syscall )
10 975 lampret
set alltests=(dhry-nocache-O2 dhry-icdc-O2 \
11
                mmu-nocache mmu-icdc basic-icdc \
12
                basic-nocache \
13
                mul-nocache-O2 mul-icdc-O2 \
14
                except-nocache except-icdc \
15 1157 lampret
                cbasic-nocache-O2 cbasic-icdc-O0 tick-nocache tick-icdc syscall-nocache syscall-icdc)
16 975 lampret
 
17
# Process arguments
18
if ($1 == "single") then
19
        set tests=(${alltests})
20
        set tests=${tests[$2]}
21
else
22
        set tests=(${alltests})
23
endif
24
if ($1 == "clean") then
25
        rm -rf ../log/s-*
26
        foreach dir ($alldirs)
27
                @ i += 1;
28
                echo ""
29
                echo "\t###"
30
                echo "\t### Clean: $dir"
31
                echo "\t###"
32
                cd $dir
33
                make clean
34
        end
35
        echo ""
36
        echo "\t###"
37
        echo "\t### Clean: ../../sw/support"
38
        echo "\t###"
39
        cd ../../sw/support
40
        make clean
41
        echo ""
42
        echo "\t###"
43
        echo "\t### Clean: ../../sw/utils"
44
        echo "\t###"
45
        cd ../../sw/utils
46
        make clean
47
        exit 0;
48
else if ($1 == "build") then
49
        echo ""
50
        echo "\t###"
51
        echo "\t### Build: ../../sw/utils"
52
        echo "\t###"
53
        cd ../../sw/utils
54
        make
55
        echo ""
56
        echo "\t###"
57
        echo "\t### Build: ../../sw/support"
58
        echo "\t###"
59
        cd ../../sw/support
60
        make
61
        foreach dir ($alldirs)
62
                @ i += 1;
63
                echo ""
64
                echo "\t###"
65
                echo "\t### Build: $dir"
66
                echo "\t###"
67
                cd $dir
68
                make
69
        end
70
        exit 0;
71
endif
72
 
73
# Print HW clock
74
/sbin/hwclock
75
 
76
# List all selected tests
77
set i = 0;
78
foreach test ($tests)
79
        @ i += 1;
80
        echo -n " Test ${i}: ${test}\t"
81
        if ((${i} % 2) == 0) then
82
                echo ""
83
        endif
84
end
85
 
86
echo ""
87
 
88
# Run or1ksim
89
sim:
90
set i = 0;
91
foreach test ($tests)
92
        @ i += 1;
93
        echo ""
94
        echo "\t###"
95
        echo "\t### Running test ${i}: ${test}"
96
        echo "\t###"
97
 
98
        set test_binary=`find $alldirs -name $test.or32`
99 1087 lampret
        echo "run 10000000 hush\nq\n" | or32-uclinux-sim -i -f ../../sw/support/orp.cfg $test_binary >& or1ksim.log
100 975 lampret
        set magic=`grep report or1ksim.log | tail -1 | sed -e "s/(sim) //" | cut -d'(' -f2 | cut -d')' -f1 | cut -d' ' -f1`
101
        if ($magic == "0xdeaddead") then
102
                echo "\t### Passed"
103
                @ all_tests += 1;
104
        else
105
                echo "\t### FAILED (magic# $magic)"
106
                echo ../log/s-${test}-or1ksim.log:
107
                cat or1ksim.log
108
                @ failed += 1;
109
                @ all_tests += 1;
110
        endif
111
          mv executed.log ../log/s-${test}-executed.log
112
#         mv sram.log ../log/s-${test}-sram.log
113
#         mv sprs.log ../log/s-${test}-sprs.log
114
          mv or1ksim.log ../log/s-${test}-or1ksim.log
115
        endif
116
end
117
 
118
        echo ""
119
        echo "<<<"
120
        echo "<<< Failed $failed out of $all_tests"
121
        echo "<<<"

powered by: WebSVN 2.1.0

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