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 1782

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

powered by: WebSVN 2.1.0

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