README merge

This commit is contained in:
David Harris 2023-03-23 08:45:12 -07:00
commit 5ef19b9c3a
2 changed files with 18 additions and 7 deletions

View File

@ -61,6 +61,7 @@ Build the tests and run a regression simulation with Questa to prove everything
# Toolchain Installation (Sys Admin) # Toolchain Installation (Sys Admin)
<<<<<<< HEAD
This section describes the open source toolchain installation. These steps should only be done once by the system admin. This section describes the open source toolchain installation. These steps should only be done once by the system admin.
## TL;DR Open Source Tool-chain Installation ## TL;DR Open Source Tool-chain Installation
@ -282,6 +283,14 @@ The linux testbench can instruction by instruction compare Wally's committed ins
cd cvw/linux/testvector-generation cd cvw/linux/testvector-generation
./genTrace.sh ./genTrace.sh
=======
This section describes the open source toolchain installation. The
current version of the toolchain has been tested on Ubuntu and Red
Hat/Rocky 8. The latter is more difficult to install and Ubuntu may
be more recommended for new users. The <pre>wally-tool-chain-install.sh</pre> script inside
the bin directory can be utilized to install the toolchain on Ubuntu
using sudo.
>>>>>>> a7e00e438681f72433225abccf3aef5f3c8913e7
### Download Synthesis Libraries ### Download Synthesis Libraries

View File

@ -5,6 +5,7 @@
## Written: Ross Thompson ross1728@gmail.com ## Written: Ross Thompson ross1728@gmail.com
## Created: 18 January 2023 ## Created: 18 January 2023
## Modified: 22 January 2023 ## Modified: 22 January 2023
## Modified: 23 March 2023
## ##
## Purpose: Open source tool chain installation script ## Purpose: Open source tool chain installation script
## ##
@ -26,18 +27,20 @@
## and limitations under the License. ## and limitations under the License.
################################################################################################ ################################################################################################
# Use /opt/riscv for installation - may require running script with sudo
export RISCV="${1:-/opt/riscv}" export RISCV="${1:-/opt/riscv}"
export PATH=$PATH:$RISCV/bin export PATH=$PATH:$RISCV/bin
set -e # break on error set -e # break on error
# Modify accordingly for your machine
NUM_THREADS=1 # for low memory machines > 16GiB NUM_THREADS=1 # for low memory machines > 16GiB
#NUM_THREADS=8 # for >= 32GiB #NUM_THREADS=8 # for >= 32GiB
#NUM_THREADS=16 # for >= 64GiB #NUM_THREADS=16 # for >= 64GiB
sudo mkdir -p $RISCV sudo mkdir -p $RISCV
# UPDATE / UPGRADE # Update and Upgrade (see https://itsfoss.com/apt-update-vs-upgrade/)
apt update apt update
apt upgrade apt upgrade
@ -51,7 +54,7 @@ then
ln -sf /usr/bin/python3 /usr/bin/python ln -sf /usr/bin/python3 /usr/bin/python
fi fi
# gcc cross-compiler # gcc cross-compiler (https://github.com/riscv-collab/riscv-gnu-toolchain)
cd $RISCV cd $RISCV
git clone https://github.com/riscv/riscv-gnu-toolchain git clone https://github.com/riscv/riscv-gnu-toolchain
cd riscv-gnu-toolchain cd riscv-gnu-toolchain
@ -60,9 +63,8 @@ git checkout 2023.01.31
make -j ${NUM_THREADS} make -j ${NUM_THREADS}
make install make install
# elf2hex # elf2hex (https://github.com/sifive/elf2hex)
cd $RISCV cd $RISCV
#export PATH=$RISCV/riscv-gnu-toolchain/bin:$PATH
export PATH=$RISCV/bin:$PATH export PATH=$RISCV/bin:$PATH
git clone https://github.com/sifive/elf2hex.git git clone https://github.com/sifive/elf2hex.git
cd elf2hex cd elf2hex
@ -77,7 +79,7 @@ apt-get -y install python3-pip
apt-get -y install pkg-config apt-get -y install pkg-config
apt-get -y install libglib2.0-dev apt-get -y install libglib2.0-dev
# QEMU # QEMU (https://www.qemu.org/docs/master/system/target-riscv.html)
cd $RISCV cd $RISCV
git clone --recurse-submodules https://github.com/qemu/qemu git clone --recurse-submodules https://github.com/qemu/qemu
cd qemu cd qemu
@ -85,7 +87,7 @@ cd qemu
make -j ${NUM_THREADS} make -j ${NUM_THREADS}
make install make install
# Spike # Spike (https://github.com/riscv-software-src/riscv-isa-sim)
cd $RISCV cd $RISCV
git clone https://github.com/riscv-software-src/riscv-isa-sim git clone https://github.com/riscv-software-src/riscv-isa-sim
mkdir -p riscv-isa-sim/build mkdir -p riscv-isa-sim/build
@ -97,7 +99,7 @@ cd ../arch_test_target/spike/device
sed -i 's/--isa=rv32ic/--isa=rv32iac/' rv32i_m/privilege/Makefile.include sed -i 's/--isa=rv32ic/--isa=rv32iac/' rv32i_m/privilege/Makefile.include
sed -i 's/--isa=rv64ic/--isa=rv64iac/' rv64i_m/privilege/Makefile.include sed -i 's/--isa=rv64ic/--isa=rv64iac/' rv64i_m/privilege/Makefile.include
# SAIL # Sail (https://github.com/riscv/sail-riscv)
cd $RISCV cd $RISCV
apt-get install -y opam build-essential libgmp-dev z3 pkg-config zlib1g-dev apt-get install -y opam build-essential libgmp-dev z3 pkg-config zlib1g-dev
git clone https://github.com/Z3Prover/z3.git git clone https://github.com/Z3Prover/z3.git