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

Subversion Repositories oms8051mini

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

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

powered by: WebSVN 2.1.0

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