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

Subversion Repositories oms8051mini

[/] [oms8051mini/] [trunk/] [verif/] [run/] [run_modelsim] - Blame information for rev 7

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

Line No. Rev Author Line
1 2 dinesha
#!/bin/csh -f
2
#
3
# test all programs with ethernet controler
4
#
5
 
6
set failedm = 0;
7
set failedi = 0;
8
set failedx = 0;
9
set all_testsm = 0;
10
set all_testsi = 0;
11
set all_testsx = 0;
12
 
13
set misc_tests=(uart_test_1 spi_test_1)
14
#set misc_tests=( )
15
 
16
set risc_ext_tests=(fib divmul sort gcd cast xram)
17
 
18
set risc_int_tests=(fib divmul sort gcd cast xram)
19
 
20
echo " Compiling with MODELSIM "
21
 
22
./compile.modelsim | tee ../log/complie.log
23
 
24
 
25
if ($status != 0) then
26
  echo "#### Compile : FAILED"
27
  echo ""
28
  cat ../log/complie.log
29
  exit
30
else
31
  echo "#### Compile : PASSED"
32
endif
33
 
34
 
35
echo ""
36
echo "###########################################"
37
echo " Runing GMAC/SPI/UART test programs "
38
echo "###########################################"
39
 
40
set i = 0;
41
        echo "###########################################"
42
foreach misc_test ($misc_tests)
43
        @ i += 1;
44
        #echo ""
45
        echo "### Running test ${i}: ${misc_test}"
46
 
47 7 dinesha
        if (${misc_test} == "uart_test_1") then
48
           \cp ../testcase/dat/uart_lb.dat ./dat/oc8051_xrom.in
49
        endif
50
 
51
        vsim -do run.do -c tb_top +${misc_test} +INTERNAL_ROM | tee  ../log/run.log
52 2 dinesha
        if ($status != 0) then
53
          cat ../log/run.log
54
          exit
55
        else if (`tail ../log/run.log | grep PASSED` == "") then
56
          echo "### test ${i}: ${misc_test} --> FAILED"
57
          @ failedm += 1;
58
          @ all_testsm += 1;
59
        else
60
          echo "### test ${i}: ${misc_test} --> PASSED"
61
          @ all_testsm += 1;
62
        endif
63
 
64
        mv ../log/run.log ../log/${misc_test}.log
65
 
66
 
67
end
68
    echo "###########################################"
69
 
70
 
71
set i = 0;
72
echo ""
73
echo "###########################################"
74
echo "###  Test Logs                            "
75
foreach misc_test ($misc_tests)
76
          @ i += 1;
77
          echo "   test ${i}: ../log/${misc_test}.log"
78
 
79
end
80
    echo "###########################################"
81
 
82
echo ""
83
echo ""
84
echo "###########################################"
85
echo "### tesing 8051 programs from external rom"
86
echo "###########################################"
87
 
88
set i = 0;
89
        echo "###########################################"
90
foreach risc_ext_test ($risc_ext_tests)
91
        @ i += 1;
92
        #echo ""
93
 
94
        \cp ../testcase/dat/${risc_ext_test}.dat ./dat/oc8051_xrom.in
95
        vsim -do run.do -c tb_top +EXTERNAL_ROM | tee  ../log/run.log
96
        if ($status != 0) then
97
          cat ../log/run.log
98
          exit
99 7 dinesha
        else if (`tail ../log/run.log | grep PASSED` == "") then
100 2 dinesha
          echo "### test ${i}: ${risc_ext_test} --> FAILED"
101
          @ failedx += 1;
102
          @ all_testsx += 1;
103
        else
104
          echo "### test ${i}: ${risc_ext_test} --> PASSED"
105
          @ all_testsx += 1;
106
        endif
107
        mv ../log/run.log ../log/ext_${risc_ext_test}.log
108
 
109
end
110
        echo "###########################################"
111
 
112
 
113
echo ""
114
echo ""
115
echo "###########################################"
116
echo "### tesing 8051 programs from internal rom"
117
echo "###########################################"
118
 
119
set i = 0;
120
        echo "###########################################"
121
foreach risc_int_test ($risc_int_tests)
122
        @ i += 1;
123
        #echo ""
124
 
125
        \cp ../testcase/dat/${risc_int_test}.dat ./dat/oc8051_xrom.in
126
        vsim -do run.do -c tb_top +INTERNAL_ROM | tee  ../log/run.log
127
        if ($status != 0) then
128
          cat ../log/run.log
129
          exit
130 7 dinesha
        else if (`tail ../log/run.log | grep PASSED` == "") then
131 2 dinesha
          echo "### test ${i}: ${risc_int_test} --> FAILED"
132
          @ failedi += 1;
133
          @ all_testsi += 1;
134
        else
135
          echo "### test ${i}: ${risc_int_test} --> PASSED"
136
          @ all_testsi += 1;
137
        endif
138
        mv ../log/run.log ../log/int_${risc_int_test}.log
139
 
140
end
141
        echo "###########################################"
142
 
143
echo ""
144
echo "###########################################"
145
echo "###  Test Summary                          "
146
echo "### "
147
echo "### Failed $failedm of $all_testsm misc tests"
148
echo "### Failed $failedx of $all_testsx external rom tests"
149
echo "### Failed $failedi of $all_testsi internal rom tests"
150
echo "###########################################"
151
 

powered by: WebSVN 2.1.0

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