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

Subversion Repositories oms8051mini

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

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

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

powered by: WebSVN 2.1.0

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