-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathqflow-option.sh
executable file
·87 lines (81 loc) · 2.14 KB
/
qflow-option.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
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/sh
# ========================================================================
# QFlow options
# ========================================================================
# Define setup environment
# ------------------------
export PDK_ROOT="$HOME/pdk"
export SRC_DIR="$HOME/src"
my_path=$(realpath "$0")
my_dir=$(dirname "$my_path")
export SCRIPT_DIR="$my_dir"
# Install/update qrouter
# --------------------
if [ ! -d "$SRC_DIR/qrouter" ]; then
echo ">>>> Installing qrouter"
git clone https://github.com/RTimothyEdwards/qrouter.git "$SRC_DIR/qrouter"
cd "$SRC_DIR/qrouter" || exit
else
echo ">>>> Updating qrouter"
cd "$SRC_DIR/qrouter" || exit
git pull
fi
git checkout qrouter-1.4
./configure
git checkout
make && sudo make install
make clean
# Install/update graywolf
# --------------------
if [ ! -d "$SRC_DIR/graywolf" ]; then
echo ">>>> Installing graywolf"
sudo apt -qq install -y libgsl-dev cmake
git clone https://github.com/RTimothyEdwards/graywolf.git "$SRC_DIR/graywolf"
cd "$SRC_DIR/graywolf" || exit
./configure
else
echo ">>>> Updating graywolf"
cd "$SRC_DIR/graywolf" || exit
git pull
fi
mkdir build
cd build
cmake ..
make
sudo make install
# Install/update yosys
# --------------------
if [ ! -d "$SRC_DIR/yosys" ]; then
echo ">>>> Installing yosys"
sudo apt -qq install -y clang bison flex \
libreadline-dev gawk tcl-dev libffi-dev git \
graphviz xdot pkg-config python3 libboost-system-dev \
libboost-python-dev libboost-filesystem-dev zlib1g-dev
git clone https://github.com/YosysHQ/yosys.git "$SRC_DIR/yosys"
cd "$SRC_DIR/yosys" || exit
git submodule update --init
else
echo ">>>> Updating yosys"
cd "$SRC_DIR/yosys" || exit
git pull
git submodule update
fi
make config-clang
make -j"$(nproc)" && sudo make install
make clean
# Install/update qflow
# --------------------
if [ ! -d "$SRC_DIR/qflow" ]; then
echo ">>>> Installing qflow"
sudio apt -qq install -y python-tk
git clone https://github.com/RTimothyEdwards/qflow.git "$SRC_DIR/qflow"
cd "$SRC_DIR/qflow" || exit
else
echo ">>>> Updating yosys"
cd "$SRC_DIR/qflow" || exit
git pull
fi
git checkout qflow-1.3
./configure
make && sudo make install
make clean