forked from black-parrot/black-parrot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup_env.sh
executable file
·45 lines (36 loc) · 1.25 KB
/
setup_env.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
#!/bin/sh
CWD=$PWD
# Set common environment variables
export BSG_IP_CORES_DIR=$CWD/bsg_ip_cores
export BSG_CADENV_DIR=$CWD/bsg_cadenv
export BP_COMMON_DIR=$CWD/bp_common
export BP_FE_DIR=$CWD/bp_fe
export BP_BE_DIR=$CWD/bp_be
export BP_ME_DIR=$CWD/bp_me
export BP_TOP_DIR=$CWD/bp_top
export BP_EXTERNAL_DIR=$CWD/external
# Override these tool paths if needed
export VCS=${VCS:-vcs}
export VERILATOR=${VERILATOR:-verilator}
# Needed for verilator g++ compilation
export VERILATOR_ROOT=$BP_EXTERNAL_DIR/verilator
export SYSTEMC_INCLUDE=$BP_EXTERNAL_DIR/include
export SYSTEMC_LIBDIR=$BP_EXTERNAL_DIR/lib-linux64
# Add external tools to path
export PATH=$CWD/external/bin:$PATH
export LD_LIBRARY_PATH=$SYSTEMC_LIBDIR:$LD_LIBRARY_PATH
if [ "$1" = "init" ]; then
git submodule update --init --recursive
# Make external tools (uncomment whichever individual tool you would like to build)
#make -C $CWD/external all
make -C $CWD/external verilator -j 25
make -C $CWD/external gnu -j 25
make -C $CWD/external fesvr -j 25
make -C $CWD/external spike -j 25
make -C $CWD/external axe -j 25
# Make test roms
make -C $BP_FE_DIR/test/rom all
make -C $BP_BE_DIR/test/rom all
make -C $BP_ME_DIR/test/rom all
make -C $BP_TOP_DIR/test/rom all
fi