-
Notifications
You must be signed in to change notification settings - Fork 14
/
sourceme
34 lines (25 loc) · 1013 Bytes
/
sourceme
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
echo "***** RISC-V Atom Environment Setup *****"
# Uncomment if using environment modules
# module load verilator/5.006
# module load riscv64-multilib-gcc
# module load openfpgaloader
echo "> Setting environment variables..."
# RVATOM variable: points to root of riscv-atom directory (get dir containing this sourceme file)
export RVATOM=$(dirname -- "$(readlink -f "${BASH_SOURCE}")")
# VERILATOR_PATH: points to verilator installation
if command -v "verilator" &>/dev/null; then
# get verilator path
VLP=$(dirname $(dirname `which verilator`))
echo "Found Verilator at: $VLP"
export VERILATOR_PATH=$VLP
else
echo "ERROR: Verilator not found; please install verilator"
fi
# export RVATOM_LIB variable
export RVATOM_LIB="$RVATOM/sw/lib"
# add atomsim to PATH ($RVATOM/sim/build/bin)
export PATH="$RVATOM/sim/build/bin:$PATH"
# add elfdump to path ($RVATOM/tools/elfdump/bin)
export PATH="$RVATOM/tools/elfdump/bin:$PATH"
# add $RVATOM/scripts to path
export PATH="$RVATOM/scripts:$PATH"