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

Subversion Repositories oms8051mini

[/] [oms8051mini/] [trunk/] [verif/] [run/] [run_irun] - Blame information for rev 16

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 w
4
#
5
 
6
 
7 4 dinesha
set COV   = "0"
8
set failedm = 0;
9 2 dinesha
set failedi = 0;
10
set failedx = 0;
11 4 dinesha
set all_testsm = 0;
12 2 dinesha
set all_testsi = 0;
13
set all_testsx = 0;
14
 
15 4 dinesha
set misc_tests=(uart_test_1 spi_test_1)
16
set risc_int_tests=(fib divmul sort gcd cast xram)
17 2 dinesha
 
18
 
19
echo " Compiling with cadence tools - irun "
20
 
21
if (${COV} == 0) then
22
     set VERILOG     = "irun -64bit -sv -elaborate +access+rcw +nospecify +define+SFLASH_SDPUP -V93 -define S75"
23
     set ELAB        = "irun -64bit -R +access+rcw"
24
     echo " Compiling with IES without coverage"
25
 else
26
     set VERILOG     = "irun  -64bit -sv -elaborate +access+rcw +define+SFLASH_SDPUP +nospecify -V93 -define S75 -covfile cov_options.ccf -covoverwrite"
27
     set ELAB        = "irun -64bit -R +access+rcw -covfile cov_options.ccf -covoverwrite"
28
     echo " Compiling with IES with coverage"
29
 
30
 endif
31
 
32
 
33
$VERILOG -f filelist_top.f -l ../log/complie.log
34
 
35
 
36
if ($status != 0) then
37
  echo "#### Compile : FAILED"
38
  echo ""
39
  cat ../log/complie.log
40
  exit
41
else
42
  echo "#### Compile : PASSED"
43
endif
44
 
45
 
46
echo ""
47
echo "###########################################"
48
echo " Runing test programs "
49
echo "###########################################"
50
 
51
set i = 0;
52
        echo "###########################################"
53 4 dinesha
foreach misc_test ($misc_tests)
54 2 dinesha
        @ i += 1;
55
        #echo ""
56 4 dinesha
        #echo "### Running test ${i}: ${misc_test}"
57 2 dinesha
 
58 8 dinesha
        if (${misc_test} == "uart_test_1") then
59
           \cp ../testcase/dat/uart_lb.dat ./dat/oc8051_xrom.in
60
        endif
61
 
62
        $ELAB +DUMP +${misc_test} +INTERNAL_ROM -l ../log/run.log
63 2 dinesha
        if ($status != 0) then
64
          cat ../log/run.log
65
          exit
66
        else if (`tail -100 ../log/run.log | grep PASSED` == "") then
67 4 dinesha
          echo "### test ${i}: ${misc_test} --> FAILED"
68
          @ failedm += 1;
69
          @ all_testsm += 1;
70 2 dinesha
        else
71 4 dinesha
          echo "### test ${i}: ${misc_test} --> PASSED"
72
          @ all_testsm += 1;
73 2 dinesha
        endif
74
 
75 4 dinesha
        mv ../log/run.log ../log/${misc_test}.log
76 2 dinesha
 
77
 
78
end
79
    echo "###########################################"
80
 
81 4 dinesha
echo ""
82
echo ""
83
echo "###########################################"
84
echo "### tesing 8051 programs from internal rom"
85
echo "###########################################"
86 2 dinesha
 
87
set i = 0;
88 4 dinesha
        echo "###########################################"
89
foreach risc_int_test ($risc_int_tests)
90
        @ i += 1;
91
        #echo ""
92
 
93
        \cp ../testcase/dat/${risc_int_test}.dat ./dat/oc8051_xrom.in
94
        $ELAB +DUMP +INTERNAL_ROM -l ../log/run.log
95
        if ($status != 0) then
96
          cat ../log/run.log
97
          exit
98
        else if (`tail ../log/run.log | grep PASSED` == "") then
99
          echo "### test ${i}: ${risc_int_test} --> FAILED"
100
          @ failedi += 1;
101
          @ all_testsi += 1;
102
        else
103
          echo "### test ${i}: ${risc_int_test} --> PASSED"
104
          @ all_testsi += 1;
105
        endif
106
        mv ../log/run.log ../log/int_${risc_int_test}.log
107
 
108
end
109
        echo "###########################################"
110
 
111
set i = 0;
112 2 dinesha
echo ""
113
echo "###########################################"
114
echo "###  Test Logs                            "
115 4 dinesha
foreach misc_test ($misc_tests)
116 2 dinesha
          @ i += 1;
117 4 dinesha
   if (`tail ../log/${misc_test}.log | grep PASSED` == "") then
118
     echo "   test ${i}: ../log/${misc_test}.log --> FAILED"
119
  else
120
      echo "   test ${i}: ../log/${misc_test}.log --> PASSED"
121
  endif
122 2 dinesha
 
123
end
124 4 dinesha
 
125
foreach risc_int_test ($risc_int_tests)
126
   @ i += 1;
127
   if (`tail ../log/int_${risc_int_test}.log | grep PASSED` == "") then
128
     echo "   test ${i}: ../log/int_${risc_int_test}.log --> FAILED"
129
   else
130
      echo "   test ${i}: ../log/int_${risc_int_test}.log --> PASSED"
131
  endif
132
end
133 2 dinesha
    echo "###########################################"
134
 
135
echo ""
136
echo "###########################################"
137
echo "###  Test Summary                          "
138
echo "### "
139 4 dinesha
echo "### Failed $failedm of $all_testsm misc tests"
140
echo "### Failed $failedi of $all_testsi internal rom tests"
141 2 dinesha
echo "###########################################"
142
 

powered by: WebSVN 2.1.0

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