forked from lowRISC/opentitan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrtl_diff_all
executable file
·81 lines (71 loc) · 2.23 KB
/
rtl_diff_all
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
#!/bin/bash
# to run rtl_diff (Conformal LEC) on all modules, type
# rtl_diff_all
#-------------------------------------------------------------------------
# list all blocks
#-------------------------------------------------------------------------
declare -a blocks=(
"gpio"
"rv_core_ibex"
"rv_dm"
"rv_plic"
"spi_device"
"rv_timer"
"uart"
"hmac"
"flash_ctrl"
"usbdev"
"usb_fs_nb_pe"
"tlul_adapter_sram"
"tlul_socket_1n"
"tlul_socket_m1"
"sram2tlul"
"top_earlgrey"
)
#-------------------------------------------------------------------------
# print header
#-------------------------------------------------------------------------
printf "LEC RESULTS (RTL vs. RTL) \n\n"
format="%18s %10s \n"
printf "${format}" "Block" "Result"
echo "------------------------------"
#-------------------------------------------------------------------------
# run rtl_diff and summarize results
#-------------------------------------------------------------------------
\rm -Rf lec_*.log
for block in "${blocks[@]}" ; do
# set full path to module $block
if [ $block == "top_earlgrey" ]; then
block_full="../${block}/rtl/${block}.sv"
elif [ $block == "usb_fs_nb_pe" ]; then
block_full="../ip/usbfs_nb_pe/rtl/${block}.sv"
elif [[ $block =~ "tlul" ]]; then
block_full="../ip/tlul/rtl/${block}.sv"
elif [[ $block == "rv_plic" ]]; then
block_full="../top_earlgrey/ip_autogen/${block}/rtl/${block}.sv"
else
block_full="../ip/${block}/rtl/${block}.sv"
fi
# run rtl_diff for module $block_full vs. itself
rtl_diff $block_full $block_full > /dev/null 2>&1
cp rtl_diff.log lec_${block}.log
# summarize results
result=`grep "Compare Results" rtl_diff.log`
if [ $? -ne 0 ]; then
printf "${format}" $block "CRASH"
else
result=`echo $result | awk '{ print $4 }'`
printf "${format}" $block $result
fi
done
#-------------------------------------------------------------------------
# print errors
#-------------------------------------------------------------------------
printf "\n\nLIST OF ERRORS:"
for block in "${blocks[@]}" ; do
egrep -A 2 "(Error:|ERROR )" lec_${block}.log > /dev/null 2>&1
if [ $? -eq 0 ]; then
printf "\n\n${block}\n"
egrep -A 2 "(Error:|ERROR )" lec_${block}.log
fi
done