-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinstall.sh
executable file
·75 lines (65 loc) · 2.48 KB
/
install.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
63
64
65
66
67
68
69
70
71
72
73
74
75
if [ -z "$LLVM_SRC_PATH" ]; then
echo "Need to set LLVM_SRC_PATH"
exit 1
fi
if [ -z "$LLVM_BUILD_PATH" ]; then
echo "Need to set LLVM_BUILD_PATH"
exit 1
fi
if [ -z "$AWS_FPGA_PATH" ]; then
echo "Need to set AWS_FPGA_PATH"
exit 1
fi
orig_path=`pwd`
sudo yum -y install elfutils-libelf-devel
sudo mkdir -p /opt/Xilinx/license
sudo cp lic/XilinxAWS.lic /opt/Xilinx/license/XilinxAWS.lic
sudo cp patch/boost/queue.hpp /usr/include/boost/lockfree
sudo cp patch/aws/cosim/sh_bfm.sv $AWS_FPGA_PATH/hdk/common/verif/models/sh_bfm
sudo cp patch/aws/synthesis/strategy_TIMING.tcl $AWS_FPGA_PATH/hdk/common/shell_v04261818/build/scripts/strategy_TIMING.tcl
sudo cp patch/aws/runtime/fpga_pci.h $AWS_FPGA_PATH/sdk/userspace/include/fpga_pci.h
sudo cp patch/aws/runtime/fpga_pci.c $AWS_FPGA_PATH/sdk/userspace/fpga_libs/fpga_pci/fpga_pci.c
sudo rm -rf /usr/include/staccel
sudo mkdir /usr/include/staccel
sudo cp STAccel/inc/staccel* /usr/include/staccel
sudo cp -r STAccel/inc/hls_csim /usr/include
sudo rm -rf /usr/staccel/
sudo mkdir /usr/staccel/
sudo cp -r STAccel/template /usr/staccel
g++ STAccel/src/iopinChecker.cpp -std=c++11 -O3 \
-o staccel_pinckr
sudo mv staccel_pinckr /usr/bin
sudo cp STAccel/shell/* /usr/bin
sudo rm -rf /usr/include/insider
sudo mkdir /usr/include/insider
sudo cp Insider/inc/* /usr/include/insider
sudo rm -rf /usr/insider
sudo mkdir /usr/insider
sudo cp -r Insider/cosim/ /usr/insider/
sudo cp -r Insider/synthesis/ /usr/insider/
g++ Insider/src/insider_reset_syn.cpp -std=c++11 -O3 \
-o insider_reset_syn
sudo mv insider_reset_syn /usr/bin
sudo cp Insider/shell/* /usr/bin
cd Insider/lib; ./compile.sh;
sudo mv libinsider_runtime.so /usr/lib64;
cd ../..;
echo -e "\nadd_clang_subdirectory(s2s-kernel)" \
>> $LLVM_SRC_PATH/tools/clang/tools/CMakeLists.txt
echo "add_clang_subdirectory(s2s-interconnect)" \
>> $LLVM_SRC_PATH/tools/clang/tools/CMakeLists.txt
echo "add_clang_subdirectory(csim-interconnect)" \
>> $LLVM_SRC_PATH/tools/clang/tools/CMakeLists.txt
echo "add_clang_subdirectory(insider-app)" \
>> $LLVM_SRC_PATH/tools/clang/tools/CMakeLists.txt
echo "add_clang_subdirectory(insider-interconnect)" \
>> $LLVM_SRC_PATH/tools/clang/tools/CMakeLists.txt
echo "add_clang_subdirectory(insider-cosim-intc)" \
>> $LLVM_SRC_PATH/tools/clang/tools/CMakeLists.txt
cp -r Insider/llvm/* $LLVM_SRC_PATH/tools/clang/tools
cp -r STAccel/llvm/* $LLVM_SRC_PATH/tools/clang/tools
cd $LLVM_BUILD_PATH
cmake3 $LLVM_SRC_PATH
make -j2
sudo make install
cd $orig_path