-
Notifications
You must be signed in to change notification settings - Fork 37
/
run_compile.sh
executable file
·80 lines (68 loc) · 2.11 KB
/
run_compile.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
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
# Clean files
rm -rf formal/ddr3*prf*
rm -rf formal/ddr3_singleconfig
# run verilator lint
echo -e "\e[32mRun Verilator Lint:\e[0m"
verilator --lint-only rtl/ddr3_controller.v rtl/ecc/ecc_dec.sv rtl/ecc/ecc_enc.sv -Irtl/ -Wall
echo "DONE!"
# run yosys compile
echo ""
echo ""
echo -e "\e[32mRun Yosys Compile:\e[0m"
yosys -q -p "
read_verilog -sv ./rtl/ddr3_controller.v rtl/ecc/ecc_dec.sv rtl/ecc/ecc_enc.sv;
synth -top ddr3_controller"
# run iverilog compile
echo ""
echo ""
echo -e "\e[32mRun IVerilog Compile:\e[0m"
iverilog rtl/ddr3_controller.v -o out
vvp out
rm out
echo
# run symbiyosys
echo ""
echo -e "\e[32mRun Symbiyosys Formal Verification: ECC\e[0m"
echo "---------------------------------------"
sby -f formal/ecc.sby
echo ""
echo -e "\e[32mRun Symbiyosys Formal Verification: Single Configuration\e[0m"
echo "---------------------------------------"
sby -f formal/ddr3_singleconfig.sby
echo ""
echo -e "\e[32mRun Symbiyosys Formal Verification: Multiple Configurations (DEFAULT)\e[0m"
echo "---------------------------------------"
sby -f formal/ddr3_multiconfig_default.sby
echo ""
echo -e "\e[32mRun Symbiyosys Formal Verification: Multiple Configurations (ECC)\e[0m"
echo "---------------------------------------"
sby -f formal/ddr3_multiconfig_ecc.sby
# ANSI color codes
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
echo ""
echo ""
echo "Summary:"
# Iterate over folders starting with 'ddr3*'
for folder in formal/ddr3*/ ; do
# Check if the 'PASS' file exists in the folder
if [[ -e "${folder}PASS" ]]; then
# Print the folder name and 'PASS' in green
echo -e "${folder}: ${GREEN}PASS${NC}"
else
# Print the folder name and 'FAIL' in red
echo -e "${folder}: ${RED}FAIL${NC}"
fi
done
# Iterate over folders inside 'ecc/'
for folder in formal/ecc/ ; do
# Check if the 'PASS' file exists in the folder
if [[ -e "${folder}PASS" ]]; then
# Print the folder name and 'PASS' in green
echo -e "${folder}: ${GREEN}PASS${NC}"
else
# Print the folder name and 'FAIL' in red
echo -e "${folder}: ${RED}FAIL${NC}"
fi
done