-
Notifications
You must be signed in to change notification settings - Fork 7
/
run_tests.sh
executable file
·52 lines (44 loc) · 1.69 KB
/
run_tests.sh
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
#!/usr/bin/env bash
# Copyright (c) 2021 ETH Zurich, University of Bologna
#
# Copyright and related rights are licensed under the Solderpad Hardware
# License, Version 0.51 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law
# or agreed to in writing, software, hardware and materials distributed under
# this License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
#
# Testing script for redundancy cells
set -e
[ ! -z "$VSIM" ] || VSIM=vsim
VSIM_LOGFILE=vsim.log
bender script vsim -t test -t rtl --vlog-arg="-svinputport=compat" -t deprecated > compile.tcl
echo "return 0" >> compile.tcl
$VSIM -c -do 'quit -code [source compile.tcl]' > vcom.log
rm -f $VSIM_LOGFILE
call_vsim() {
if [ $1 == tb_ecc_sram ]; then
echo "source test/ecc_sram_fault_injection.tcl; run -all" | $VSIM "$@" >> $VSIM_LOGFILE 2>&1
else
echo "run -all" | $VSIM "$@" >> $VSIM_LOGFILE 2>&1
fi
echo " --> $@"
tail -7 $VSIM_LOGFILE
echo ""
tail -1 vsim.log | grep "Errors: 0," > /dev/null
}
call_vsim tb_tmr_voter
call_vsim tb_tmr_voter_fail
call_vsim tb_tmr_voter_detect
call_vsim tb_tmr_word_voter
call_vsim tb_bitwise_tmr_voter
call_vsim tb_bitwise_tmr_voter_fail
call_vsim tb_ecc_sram -voptargs="+acc=nr"
call_vsim -GDataWidth=8 tb_ecc_secded
call_vsim -GDataWidth=16 tb_ecc_secded
call_vsim -GDataWidth=32 tb_ecc_secded
call_vsim -GDataWidth=64 tb_ecc_secded
call_vsim tb_ecc_scrubber
call_vsim tb_voter_macros