-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild_hosts.sh
More file actions
executable file
·82 lines (64 loc) · 1.97 KB
/
build_hosts.sh
File metadata and controls
executable file
·82 lines (64 loc) · 1.97 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
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
82
#!/bin/bash
# function to set a parameter in the configuration file
set_parameter() {
if [ $# -ne 2 ]; then
echo "Usage: $0 <parameter> <value>"
exit 1
fi
PARAM=$1
VALUE=$2
echo "Setting $PARAM to $VALUE"
sed -i "s/$PARAM := .*/$PARAM := $VALUE/" default.cfg
if ! grep -q "$PARAM := $VALUE" default.cfg; then
echo "Failed to set parameter ($PARAM := $VALUE)"
echo "default.cfg might be broken"
exit 1
fi
}
echo "> SETTING PAPER CONFIGURATION"
set_parameter DIMENSION 512
set_parameter N_COUPLES_MAX 512
set_parameter HIST_PE 1
set_parameter ENTROPY_PE 1
set_parameter INT_PE 0
set_parameter PIXELS_PER_READ 32
set_parameter N_COUPLES 256
echo "--------------------"
# list of INT_PE to test
int_pe_list=(1 2 4 8 16 32)
echo "> ITERATING OVER THE FOLLOWING INT_PE VALUES: ${int_pe_list[*]}"
for int_pe in "${int_pe_list[@]}"
do
echo "> BUILDING FOR INT_PE = $int_pe"
make -C sw clean
set_parameter INT_PE "$int_pe"
make config TASK=TX
make build_sw TASK=TX || exit 1
folder_name=$(printf "onlyTX_%02dIPE" "$int_pe")
xclbin_name=$(printf "onlyTX_%02dIPE.xclbin" "$int_pe")
make pack NAME="$folder_name" XCLBIN="bitstreams/$xclbin_name" || exit 1
echo "--------------------"
done
echo "> BUILDING REGISTRATION STEP"
set_parameter INT_PE 32
set_parameter HIST_PE 16
set_parameter ENTROPY_PE 4
make -C sw clean
make config TASK=STEP
make build_sw TASK=STEP || exit 1
folder_name=STEP_32IPE
xclbin_name=STEP_32IPE.xclbin
make pack NAME="$folder_name" XCLBIN="bitstreams/$xclbin_name" || exit 1
echo "--------------------"
echo "> BUILDING REGISTRATION Application"
folder_name="3DIRG_Application"
xclbin_name=STEP_32IPE.xclbin
make -C 3DIRG_application clean
make pack_app NAME="$folder_name" XCLBIN="bitstreams/$xclbin_name" || exit 1
echo "--------------------"
echo ""
echo "BUILD COMPLETE"
echo ""
echo "All builds have been placed under the folder build/"
ls -l build/
./finish_packing.sh