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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [mp3/] [sim/] [run/] [run_regression] - Blame information for rev 1774

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

Line No. Rev Author Line
1 507 lampret
#!/bin/csh -f
2
 
3
set iter = 1;
4
set failed = 0;
5
set all_tests = 0;
6
# List all test cases
7 565 lampret
set simpletests=(buserr-nocache immu-nocache dmmu-nocache basic-nocache mul-nocache-O2 syscall-nocache cbasic-nocache-O2 ints1-nocache ints2-nocache \
8
                buserr-icdc immu-icdc dmmu-icdc basic-icdc mul-icdc-O2 syscall-icdc cbasic-icdc-O2 ints1-icdc ints2-icdc)
9
set complextests=(buserr-ic immu-ic dmmu-ic basic-ic mul-ic-O2 syscall-ic cbasic-ic-O2 ints1-ic ints2-ic \
10
                buserr-dc immu-dc dmmu-dc basic-dc mul-dc-O2 syscall-dc cbasic-dc-O2 ints1-dc ints2-dc \
11 507 lampret
                mul-nocache-O0 cbasic-nocache-O0 \
12
                mul-icdc-O0 cbasic-icdc-O0 \
13
                mul-ic-O0 cbasic-ic-O0 \
14
                mul-dc-O0 cbasic-dc-O0)
15 565 lampret
set simpletimes=(10 10 10 40 40 40 40 40 60 \
16
                 10 10 10 40 40 40 40 40 40)
17
set complextimes=(10 10 10 40 40 40 40 40 40 \
18
                 10 10 10 40 40 40 40 40 100 \
19 507 lampret
                 40 40 \
20
                 40 40 \
21
                 40 40 \
22
                 40 40)
23
set iterations=( \
24
                "OR1200_REGISTERED_OUTPUTS+FLASH_GENERIC" \
25
                "OR1200_REGISTERED_OUTPUTS+FLASH_GENERIC+FLASH_GENERIC_REGISTERED+OR1200_REGISTERED_INPUTS" \
26
                "OR1200_REGISTERED_OUTPUTS+OR1200_REGISTERED_INPUTS" \
27
                "OR1200_REGISTERED_OUTPUTS+OR1200_REGISTERED_INPUTS+OR1200_CLMODE_1TO2" \
28
                "OR1200_REGISTERED_OUTPUTS+OR1200_CLMODE_1TO2" \
29
                "OR1200_REGISTERED_OUTPUTS+FLASH_GENERIC+FLASH_GENERIC_REGISTERED+OR1200_CLMODE_1TO2" \
30
                "OR1200_REGISTERED_OUTPUTS" \
31
                "" \
32
                "OR1200_REGISTERED_OUTPUTS+OR1200_REGISTERED_INPUTS+FLASH_GENERIC_REGISTERED" \
33
                "")
34
 
35
# Process arguments
36
if ($1 == "simple") then
37
        set tests=(${simpletests})
38
        set maxtimes=(${simpletimes})
39
else
40
        set tests=(${simpletests} ${complextests})
41
        set maxtimes=(${simpletimes} ${complextimes})
42
endif
43
if ($1 == "single") then
44
        set tests=(${simpletests} ${complextests})
45
        set maxtimes=(${simpletimes} ${complextimes})
46
        set tests=${tests[$2]}
47
        set maxtimes=${maxtimes[$2]}
48
endif
49
if ($1 == "clean") then
50
        rm -rf ../log/*
51
        rm -rf ../out/wave/*
52
        exit 0;
53
else if ($1 == "sim") then
54
        goto sim;
55
endif
56
 
57
# List all selected tests
58
set i = 0;
59
foreach test ($tests)
60
        @ i += 1;
61
        echo -n " Test ${i}: ${test}, $maxtimes[$i] ms\t"
62
        if ((${i} % 2) == 0) then
63
                echo ""
64
        endif
65
end
66
 
67
echo ""
68
 
69
set i = 1;
70
while ($iterations[$i] != "")
71
        echo " Iteration ${i}: ${iterations[$i]}\t"
72
        @ i += 1;
73
end
74
 
75
# Prepare all .args files
76
iteration:
77
echo ""
78
echo "<<<"
79
echo "<<< Iteration ${iter}: ${iterations[$iter]}"
80
echo "<<<"
81
if (${iterations[$iter]} != "") then
82
        ncprep +define+${iterations[$iter]} -f ../bin/nc.scr > ncprep.out
83
else
84
        ncprep -f ../bin/nc.scr > ncprep.out
85
endif
86
if (`tail -1 ncprep.out | grep Failed` != "") then
87
  echo ""
88
  cat ncprep.out
89
  exit
90
endif
91
 
92
# Run NC-Verilog compiler
93
echo ""
94
echo "\t@@@"
95
echo "\t@@@ Compiling sources"
96
echo "\t@@@"
97
ncvlog -NOCOPYRIGHT -f ncvlog.args > ncvlog.out
98
if ($status != 0) then
99
  echo "\t@@@ FAILED"
100
  echo ""
101
  cat ncvlog.out
102
  exit
103
else
104
  echo "\t@@@ Passed"
105
endif
106
 
107
# Run the NC-Verilog elaborator (build the design hierarchy)
108
echo ""
109
echo "\t@@@"
110
echo "\t@@@ Building design hierarchy (elaboration)"
111
echo "\t@@@"
112
ncelab -NOTIMINGCHECKS -NOCOPYRIGHT -f ncelab.args > ncelab.out
113
if ($status != 0) then
114
  echo "\t@@@ FAILED"
115
  echo ""
116
  cat ncelab.out
117
  exit
118
else
119
  echo "\t@@@ Passed"
120
endif
121
 
122
# Run the NC-Verilog simulator (simulate the design)
123
sim:
124
set i = 0;
125
foreach test ($tests)
126
        @ i += 1;
127
        echo ""
128
        echo "\t###"
129
        echo "\t### Running test ${i}: ${test}, $maxtimes[$i] ms"
130
        echo "\t###"
131
 
132
        echo "database -open waves -into ../out/wave/i${iter}-${test} -default" > sim.tcl
133
        echo "probe -create -shm xess_top -all -variables -depth all" >> sim.tcl
134
        echo "stop -create -time $maxtimes[$i]ms -relative" >> sim.tcl
135
        echo "run" >> sim.tcl
136
        echo "quit" >> sim.tcl
137
 
138
        cp ../src/${test}.mem ../src/flash.in
139
        ncsim -NOCOPYRIGHT -f ncsim.args > ncsim.out
140
        if ($status != 0) then
141
          cat ncsim.out
142
          exit
143
        else
144 565 lampret
          set magic=`tail -1 nop.log | cut -d'(' -f2 | cut -d')' -f1`
145
          set magictime=`tail -1 nop.log | cut -d'n' -f1`
146 507 lampret
          if ($magic == "deaddead") then
147
                echo "\t### Passed (@time $magictime)"
148
                @ all_tests += 1;
149
          else
150
                echo "\t### FAILED (@time $magictime, magic# 0x$magic)"
151
                @ failed += 1;
152
                @ all_tests += 1;
153
          endif
154
          mv flash.log ../log/i${iter}-${test}-flash.log
155
          mv executed.log ../log/i${iter}-${test}-executed.log
156
          mv sram.log ../log/i${iter}-${test}-sram.log
157
          mv sprs.log ../log/i${iter}-${test}-sprs.log
158 565 lampret
          mv nop.log ../log/i${iter}-${test}-nop.log
159 507 lampret
        endif
160
end
161
 
162
@ iter += 1;
163
if ($iterations[$iter] != "") then
164
        goto iteration
165
else
166
        echo ""
167
        echo "<<<"
168
        echo "<<< End of Regression Iterations"
169
        echo "<<<"
170
        echo "<<< Failed $failed out of $all_tests"
171
        echo "<<<"
172
endif

powered by: WebSVN 2.1.0

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