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

Subversion Repositories oms8051mini

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

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 4 dinesha
        $ELAB +DUMP +${misc_test} -l ../log/run.log
59 2 dinesha
        if ($status != 0) then
60
          cat ../log/run.log
61
          exit
62
        else if (`tail -100 ../log/run.log | grep PASSED` == "") then
63 4 dinesha
          echo "### test ${i}: ${misc_test} --> FAILED"
64
          @ failedm += 1;
65
          @ all_testsm += 1;
66 2 dinesha
        else
67 4 dinesha
          echo "### test ${i}: ${misc_test} --> PASSED"
68
          @ all_testsm += 1;
69 2 dinesha
        endif
70
 
71 4 dinesha
        mv ../log/run.log ../log/${misc_test}.log
72 2 dinesha
 
73
 
74
end
75
    echo "###########################################"
76
 
77 4 dinesha
echo ""
78
echo ""
79
echo "###########################################"
80
echo "### tesing 8051 programs from internal rom"
81
echo "###########################################"
82 2 dinesha
 
83
set i = 0;
84 4 dinesha
        echo "###########################################"
85
foreach risc_int_test ($risc_int_tests)
86
        @ i += 1;
87
        #echo ""
88
 
89
        \cp ../testcase/dat/${risc_int_test}.dat ./dat/oc8051_xrom.in
90
        $ELAB +DUMP +INTERNAL_ROM -l ../log/run.log
91
        if ($status != 0) then
92
          cat ../log/run.log
93
          exit
94
        else if (`tail ../log/run.log | grep PASSED` == "") then
95
          echo "### test ${i}: ${risc_int_test} --> FAILED"
96
          @ failedi += 1;
97
          @ all_testsi += 1;
98
        else
99
          echo "### test ${i}: ${risc_int_test} --> PASSED"
100
          @ all_testsi += 1;
101
        endif
102
        mv ../log/run.log ../log/int_${risc_int_test}.log
103
 
104
end
105
        echo "###########################################"
106
 
107
set i = 0;
108 2 dinesha
echo ""
109
echo "###########################################"
110
echo "###  Test Logs                            "
111 4 dinesha
foreach misc_test ($misc_tests)
112 2 dinesha
          @ i += 1;
113 4 dinesha
   if (`tail ../log/${misc_test}.log | grep PASSED` == "") then
114
     echo "   test ${i}: ../log/${misc_test}.log --> FAILED"
115
  else
116
      echo "   test ${i}: ../log/${misc_test}.log --> PASSED"
117
  endif
118 2 dinesha
 
119
end
120 4 dinesha
 
121
foreach risc_int_test ($risc_int_tests)
122
   @ i += 1;
123
   if (`tail ../log/int_${risc_int_test}.log | grep PASSED` == "") then
124
     echo "   test ${i}: ../log/int_${risc_int_test}.log --> FAILED"
125
   else
126
      echo "   test ${i}: ../log/int_${risc_int_test}.log --> PASSED"
127
  endif
128
end
129 2 dinesha
    echo "###########################################"
130
 
131
echo ""
132
echo "###########################################"
133
echo "###  Test Summary                          "
134
echo "### "
135 4 dinesha
echo "### Failed $failedm of $all_testsm misc tests"
136
echo "### Failed $failedi of $all_testsi internal rom tests"
137 2 dinesha
echo "###########################################"
138
 

powered by: WebSVN 2.1.0

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