-
Notifications
You must be signed in to change notification settings - Fork 203
/
install-cva6.sh
executable file
·61 lines (52 loc) · 1.7 KB
/
install-cva6.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
# Copyright 2021 Thales DIS design services SAS
#
# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0
# You may obtain a copy of the License at https://solderpad.org/licenses/
#
# Original Author: Jean-Roch COULON (jean-roch.coulon@thalesgroup.fr)
# Customise this to a fast local disk
export ROOT_PROJECT=$(cd "$(dirname "${BASH_SOURCE[0]}")/../../" && pwd)
export TOP=$ROOT_PROJECT/tools
# where to install the tools
if ! [ -n "$RISCV" ]; then
echo "Error: RISCV variable undefined"
return
fi
# install Verilator
if ! [ -n "$VERILATOR_ROOT" ]; then
export VERILATOR_ROOT=$TOP/verilator-4.110/
fi
cva6/regress/install-verilator.sh
export PATH=$RISCV/bin:$VERILATOR_ROOT/bin:$PATH
export LIBRARY_PATH=$RISCV/lib
export LD_LIBRARY_PATH=$RISCV/lib
export C_INCLUDE_PATH=$RISCV/include:$VERILATOR_ROOT/include
export CPLUS_INCLUDE_PATH=$RISCV/include:$VERILATOR_ROOT/include
# number of parallel jobs to use for make commands and simulation
export NUM_JOBS=24
# install the required tools for cva6
if ! [ -n "$CVA6_REPO" ]; then
CVA6_REPO="https://github.com/openhwgroup/cva6.git"
CVA6_BRANCH="master"
CVA6_HASH="75807530f26ba9a0ca501e9d3a6575ec375ed7ab"
CVA6_PATCH=
fi
echo $CVA6_REPO
echo $CVA6_BRANCH
echo $CVA6_HASH
echo $CVA6_PATCH
if ! [ -d core-v-cores/cva6 ]; then
git clone --recursive $CVA6_REPO -b $CVA6_BRANCH core-v-cores/cva6
cd core-v-cores/cva6; git checkout $CVA6_HASH;
if [ -f ../$CVA6_PATCH ]; then
git apply ../$CVA6_PATCH
fi
cd -
fi
# install Spike
if ! [ -n "$SPIKE_ROOT" ]; then
export SPIKE_ROOT=$TOP/spike/
fi
cva6/regress/install-spike.sh