-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsynthesize_project.sh
More file actions
51 lines (42 loc) · 1.22 KB
/
synthesize_project.sh
File metadata and controls
51 lines (42 loc) · 1.22 KB
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
#!/bin/bash
CONFIG_FILE="synthesis_settings.cfg"
# read from config file
get_config_value() {
echo $(crudini --get $CONFIG_FILE "$1" "$2")
}
clone_repo() {
echo "Cloning the repository..."
git clone $1 project_src
if [ $? -ne 0 ]; then
echo "Failed to clone repository."
exit 1
fi
}
# use the default demo project
use_default_project() {
echo "using the default matrix multiplication project..."
}
echo "do you want to use the default matrix multiplication demo project? [y/n]"
read use_default
if [ "$use_default" = "y" ]; then
use_default_project
cd project_src
else
echo "enter the GitHub repository URL to your project code:"
read repo_url
clone_repo $repo_url
repo_name=$(basename $repo_url .git)
cd $repo_name
fi
# settings from config file
VIVADO_HLS_PATH=$(get_config_value General VivadoHLSPath)
SYNTHESIS_SCRIPT=$(get_config_value Synthesis SynthesisScript)
SYNTHESIS_FLAGS=$(get_config_value Synthesis SynthesisFlags)
# begin synthesis process
if [ -f $SYNTHESIS_SCRIPT ]; then
echo "Starting synthesis process..."
$VIVADO_HLS_PATH -f $SYNTHESIS_SCRIPT -tclargs $SYNTHESIS_FLAGS
else
echo "Synthesis script not found: $SYNTHESIS_SCRIPT"
exit 1
fi