You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if [[ $strategy!=@(BASIC|DEFAULT|EXPLORE|TIMING|CONGESTION) ]];then
88
-
echo"ERROR: $strategy isn't a valid strategy. Valid strategies are BASIC, DEFAULT, EXPLORE, TIMING and CONGESTION."
116
+
err_msg "$strategy isn't a valid strategy. Valid strategies are BASIC, DEFAULT, EXPLORE, TIMING and CONGESTION."
89
117
exit 1
90
118
fi
91
119
92
120
# Check that clock_recipe_a is valid
93
121
shopt -s extglob
94
122
if [[ $clock_recipe_a!=@(A0|A1|A2) ]];then
95
-
echo"ERROR: $clock_recipe_a isn't a valid Clock Group A recipe. Valid Clock Group A recipes are A0, A1, and A2."
123
+
err_msg "$clock_recipe_a isn't a valid Clock Group A recipe. Valid Clock Group A recipes are A0, A1, and A2."
96
124
exit 1
97
125
fi
98
126
99
127
# Check that clock_recipe_b is valid
100
128
shopt -s extglob
101
129
if [[ $clock_recipe_b!=@(B0|B1) ]];then
102
-
echo"ERROR: $clock_recipe_b isn't a valid Clock Group B recipe. Valid Clock Group B recipes are B0 and B1."
130
+
err_msg "$clock_recipe_b isn't a valid Clock Group B recipe. Valid Clock Group B recipes are B0 and B1."
103
131
exit 1
104
132
fi
105
133
106
134
# Check that clock_recipe_c is valid
107
135
shopt -s extglob
108
136
if [[ $clock_recipe_c!=@(C0|C1) ]];then
109
-
echo"ERROR: $clock_recipe_c isn't a valid Clock Group C recipe. Valid Clock Group C recipes are C0 and C1."
137
+
err_msg "$clock_recipe_c isn't a valid Clock Group C recipe. Valid Clock Group C recipes are C0 and C1."
110
138
exit 1
111
139
fi
112
140
113
-
echo"AWS FPGA: Starting the design checkpoint build process"
114
-
echo"AWS FPGA: Checking for proper environment variables and build directories"
141
+
if [ $expected_memory_usage-gt`get_instance_memory` ];then
142
+
143
+
output_message="YOUR INSTANCE has less memory than is necessary for certain builds. This means that your builds will take longer than expected. \nTo change to an instance type with more memory, please check our instance resize guide: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-resize.html"
144
+
145
+
if [[ $ignore_memory_requirement== 0 ]];then
146
+
err_msg "$output_message"
147
+
err_msg "To ignore this memory requirement, source hdk_setup.sh again with -ignore_memory_requirement as an argument."
148
+
exit 1
149
+
else
150
+
warn_msg "$output_message"
151
+
fi
152
+
fi
153
+
154
+
info_msg "Starting the design checkpoint build process"
155
+
info_msg "Checking for proper environment variables and build directories"
115
156
116
157
if! [ $HDK_SHELL_DIR ]
117
158
then
118
-
echo"ERROR: HDK_SHELL_DIR environment variable is not set, try running hdk_setup.sh script from the root directory of AWS FPGA repository."
159
+
err_msg "HDK_SHELL_DIR environment variable is not set, try running hdk_setup.sh script from the root directory of AWS FPGA repository."
119
160
exit 1
120
161
fi
121
162
122
163
if! [ $CL_DIR ]
123
164
then
124
-
echo"ERROR: CL_DIR environment variable is not set. Set CL_DIR to a valid directory."
165
+
err_msg "CL_DIR environment variable is not set. Set CL_DIR to a valid directory."
125
166
exit 1
126
167
fi
127
168
128
169
if! [ $HDK_DIR ]
129
170
then
130
-
echo"ERROR: HDK_DIR environment variable is not set, try running hdk_setup.sh script from the root directory of AWS FPGA repository."
171
+
err_msg "HDK_DIR environment variable is not set, try running hdk_setup.sh script from the root directory of AWS FPGA repository."
local mem=$(awk -F"[: ]+"'/MemTotal/ {print $2;exit}' /proc/meminfo)
73
-
echo"$mem"
74
-
}
75
-
76
69
# Process command line args
77
70
args=( "$@" )
78
71
for(( i =0; i <${#args[@]}; i++));do
@@ -85,10 +78,6 @@ for (( i = 0; i < ${#args[@]}; i++ )); do
85
78
help
86
79
return 0
87
80
;;
88
-
-ignore_memory_requirement)
89
-
info_msg "Ignoring the instance memory requirement."
90
-
ignore_memory_requirement=1
91
-
;;
92
81
*)
93
82
err_msg "Invalid option: $arg\n"
94
83
usage
@@ -107,19 +96,6 @@ else
107
96
debug_msg "AWS_FPGA_REPO_DIR=$AWS_FPGA_REPO_DIR"
108
97
fi
109
98
110
-
if [ $expected_memory_usage-gt`get_instance_memory` ];then
111
-
112
-
output_message="YOUR INSTANCE has less memory than is necessary for certain builds. This means that your builds will take longer than expected. \nTo change to an instance type with more memory, please check our instance resize guide: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-resize.html"
113
-
114
-
if [[ $ignore_memory_requirement== 0 ]];then
115
-
err_msg "$output_message"
116
-
err_msg "To ignore this memory requirement, source hdk_setup.sh again with -ignore_memory_requirement as an argument."
117
-
return 2
118
-
else
119
-
warn_msg "$output_message"
120
-
fi
121
-
fi
122
-
123
99
debug_msg "Checking for Vivado install:"
124
100
125
101
# On the FPGA Developer AMI use module load to use the correct version of Vivado
0 commit comments