forked from p2l1pfp/GlobalCorrelator
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetupProject.sh
executable file
·64 lines (55 loc) · 1.76 KB
/
setupProject.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
#!/bin/bash
if [[ "$1" == "" ]]; then
echo "Usage: $0 project";
exit 1;
fi;
PROJECT=$1;
shift
if [ -f buildToolSetup.sh ] ; then
source buildToolSetup.sh
fi
if [ -z ${XILINX_VIVADO:+x} ] ; then
echo "Xilinx Vivado environment has not been sourced. Exiting."
exit 1
else
echo "Found Xilinx Vivado at" ${XILINX_VIVADO}
fi
if [ -d ipbb-master ]; then
echo "Will not re-download ipbb"
else
git clone https://github.com/ipbus/ipbb.git ipbb-master
fi
source ipbb-master/env.sh
if [ -d algo-work ]; then
echo "Using existing algo-work directory"
else
ipbb init algo-work
pushd algo-work
ipbb add git https://:@gitlab.cern.ch:8443/p2-xware/firmware/emp-fwk.git -b v0.3.6
ipbb add git https://gitlab.cern.ch/ttc/legacy_ttc.git -b v2.1
ipbb add git https://github.com/ipbus/ipbus-firmware -b v1.8
ipbb add git https://:@gitlab.cern.ch:8443/rufl/RuflCore.git
pushd src
ln -sd ../../l1pf_hls/multififo_regionizer .
ln -sd ../../demonstrator_firmware .
ln -sd ../../ip_cores_firmware .
ln -sd ../../post_sort .
popd
popd
fi
if test -f algo-work/src/demonstrator_firmware/firmware/cfg/${PROJECT}_top.dep; then
echo "Will create a project for $PROJECT";
else
echo "Couldn't find demonstrator_firmware/firmware/cfg/${PROJECT}_top.dep --> exiting";
exit 1;
fi;
pushd algo-work
test -d proj/$PROJECT && rm -rf proj/$PROJECT
ipbb proj create vivado $PROJECT demonstrator_firmware: -t ${PROJECT}_top.dep
pushd proj/$PROJECT
ipbb vivado project -c -1
#if test -f demonstrator_firmware/firmware/cfg/${PROJECT}_importIP.tcl then
#vivado -mode batch -source ../../../$PROJECT/$HLSIP/importIP.tcl
#end if
popd
popd