gate
5.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
#!/bin/sh
. /home/whs/bb/setup
BB_PATH=/home/whs/bb/rf/sw/root/PR
RST="${BB_PATH}/tests/`basename $1`.result"
######### IOSIM SETUP ##################
SEED=$RANDOM
export IOSIM_SERVER=127.0.0.1
export IOSIM_PORT=8787
export IOSIM_ADDR=0
export IOSIM_MEM_SIZE=16384
export IOSIM_SEED=$SEED
echo "Gate level test start at `date`" >>$RST
echo "Random seed = $SEED" >>$RST
#cvs update -df
#cd vsim
#export SIMGATE=1
#make clean
#make sim.ipc
#make sim.cpu
cd ${BB_PATH}/hw2/chip/vsim
export SIMGATE=1
export SIMDEFS="+define+VIRAGE_FAST"
make clean
make sim.ipc
./sim.ipc +delay_mode_zero +cbus_mon +race +race=all +non_clk_mon $BBOPTS >${BB_PATH}/tests/sim.log 2>&1 &
cd ${BB_PATH}/tests
../iosim/src/iosim -f ../iosim/src/random/test/init.tst
grep_error()
{
grep -i "$2" tmp.$$ >/dev/null 2>&1 && {
echo "$1 Failed" >>$RST
} || {
echo "$1 Passed" >>$RST
}
cat tmp.$$
rm tmp.$$
}
cd ${BB_PATH}/iosim/src/random/test
for tst_file in `ls *.tst`
do
chmod a+w $tst_file
sed -e s/"^q"/"###q"/ $tst_file > tmp.$$
cp -rf tmp.$$ $tst_file
rm -rf tmp.$$
done
cd ${BB_PATH}/iosim/src/random/bcp
######### RI Single READ ############
../../iosim -f ../test/ri_sread.tst -d 0241 >tmp.$$ 2>&1
grep_error "RI single read" failed
######### RI Single WRITE ############
../../iosim -f ../test/ri_swrite.tst -d 0241 >tmp.$$ 2>&1
grep_error "RI single write" failed
######## AI DMA test ################
../../iosim -f ../test/ai_dma.tst -d 0241 >tmp.$$ 2>&1
grep_error "AI DMA test" failed
########## SP PIO TEST ############
../../iosim -f ../test/sp_pio.tst -d 0241 >tmp.$$ 2>&1
grep_error "SP PIO TEST" failed
########## SP DMA TEST0 ###########
../../iosim -f ../test/sp_dma.tst -d 0241 >tmp.$$ 2>&1
grep_error "SP DMA TEST" failed
########## USB0 pio ################
../../iosim -f ../test/ui_pio.tst -d 0241 >tmp.$$ 2>&1
grep_error "USB0 pio" failed
########## USB1 pio ################
../../iosim -f ../test/ui_pio1.tst -d 0241 >tmp.$$ 2>&1
grep_error "USB1 pio" failed
########## USB0 Transaction ###########
../../iosim -f ../test/usb0_trans.tst -d 0241 >tmp.$$ 2>&1
grep_error "USB0 Transaction" failed
########## USB1 Transaction ###########
../../iosim -f ../test/usb1_trans.tst -d 0241 >tmp.$$ 2>&1
grep_error "USB1 Transaction" failed
######### VI LAN1 #####################
../test/vi_lan1 >tmp.$$ 2>&1
grep_error "VI LAN1" "Error in"
######### VI LPN2 #####################
../test/vi_lpn2 >tmp.$$ 2>&1
grep_error "VI LPN2" "Error in"
######### VI H18 #####################
../test/vi_h18 >tmp.$$ 2>&1
grep_error "VI H18" "Error in"
######### VI h32 #####################
../test/vi_h32 >tmp.$$ 2>&1
grep_error "VI H32" "Error in"
########## DP ATT Test ################
../test/dp_att_014 >tmp.$$ 2>&1
grep_error "DP ATT Test" failed
########## DP COV Test ################
../test/dp_cov_023 >tmp.$$ 2>&1
grep_error "DP COV Test" failed
########## DP EW Test ################
../test/dp_ew_116 >tmp.$$ 2>&1
grep_error "DP EW Test" failed
########## DP MS Test ################
../test/dp_ms_002 >tmp.$$ 2>&1
grep_error "DP MS Test" failed
########## DP TEX Test ################
../test/dp_tex_038 >tmp.$$ 2>&1
grep_error "DP TEX Test" failed
######### SI TESTS ############
../../si_test/si_testr -d 341 -t 0 >tmp.$$ 2>&1
grep_error "SiTestRandom(1, ForceFail_None, 0, 0)" Failed
../../si_test/si_testr -d 341 -t 1 >tmp.$$ 2>&1
grep_error "(1, ForceFail_None, StartWithXs, 0)" Failed
../../si_test/si_testr -d 341 -t 2 >tmp.$$ 2>&1
grep_error "SiTestValidCtrlCmds(1, 0, 0, 0)" Failed
../../si_test/si_testr -d 341 -t 3 >tmp.$$ 2>&1
grep_error "SiTestInvalidCtrlrCmds(1, 0, 0, 0)" Failed
../../si_test/si_testr -d 341 -t 4 >tmp.$$ 2>&1
grep_error "SiTestCtrlrErrViaBD(1, CtrlQueryStatus, 0, 0)" Failed
../../si_test/si_testr -d 341 -t 5 >tmp.$$ 2>&1
grep_error "SiTestDmaBusyError(1, SI_DMA_WR_REG, PIF_RAM_START, 0)" Failed
../../si_test/si_testr -d 341 -t 6 >tmp.$$ 2>&1
grep_error "SI test6" failed
../../si_test/si_testr -d 341 -t 7 >tmp.$$ 2>&1
grep_error "SI test7" failed
../../si_test/si_testr -d 341 -t 8 10 >tmp.$$ 2>&1
grep_error "SI test8" failed
######## PI DMA test ##############
../../pi_test/pi_bufdma >tmp.$$ 2>&1
grep_error "PI DMA test" fail
########### PI GPIO ###########
../../pi_test/pi_gp_ide_io >tmp.$$ 2>&1
grep_error "PI GPIO" fail
######### MI INTERNAL SRAM Write/Read ############
../../mi_test/mi_random -d 0241 -t isram >tmp.$$ 2>&1
grep_error "MI Internal SRAM WRITE/Read" fail
######### MI Virage0 Write/Read ############
../../mi_test/mi_random -d 0241 -t v0sram >tmp.$$ 2>&1
grep_error "MI Virage0 Write/Read" fail
######### MI Virage1 Write/Read ############
../../mi_test/mi_random -d 0241 -t v1sram >tmp.$$ 2>&1
grep_error "MI Virage1 Write/Read" fail
######### MI Virage2 Write/Read ############
../../mi_test/mi_random -d 0241 -t v2sram >tmp.$$ 2>&1
grep_error "MI Virage2 Write/Read" fail
######### MI DRAM Write/Read ############
../../mi_test/mi_random -d 0241 -t dram >tmp.$$ 2>&1
grep_error "MI DRAM Write/Read" fail
#### PI FUNC ########
../../pi_test/pi_functest -g >tmp.$$ 2>&1
grep_error "PI FUNC Gate level" failed
### JTAG Test #####
../../jtag_test/jtag_test -g >tmp.$$ 2>&1
grep_error "JTAG Test" failed
#### MI Test #########
../../mi_test/mi_test -s 20 -g >tmp.$$ 2>&1
grep_error "MI Test(VIRAGE)" failed
../../iosim -f ../../../test/bcp_quit.tst
echo "Gate level test ends at `date`" >>$RST