-
Notifications
You must be signed in to change notification settings - Fork 0
/
syn_checker.sh
47 lines (36 loc) · 899 Bytes
/
syn_checker.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
######################################
# Check syn
######################################
check_syn() {
print_progress syn
pushd $work_dir > /dev/null
local syn_fail=1
local syn_timeout_error=0
cat << EOS > syn.tcl
open_project prj_hls_cosim
open_solution -flow_target $flow solution
export_design -flow syn -rtl verilog -format ip_catalog
exit
EOS
set +e
timeout $syn_timeout time vitis_hls -f syn.tcl |& tee syn.log > $logout
exit_code=${PIPESTATUS[0]}
set -e
if [ $exit_code -eq 124 ] ; then
syn_timeout_error=1
syn_result="Timeout ($syn_timeout)"
else
syn_fail=0
syn_result=Pass
fi
output_summary syn_fail=$syn_fail
output_summary syn_timeout=$syn_timeout_error
#copy_log syn.log
if [ $syn_fail -ne 0 ] ; then
print_fail "Syn: " $syn_result
exit
else
print_pass "Syn: " $syn_result
fi
popd > /dev/null
}