Skip to content

Commit

Permalink
updated install tool chain file to use verilator v5.016
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas-J-Kidd committed Jan 5, 2024
1 parent c743f27 commit 3168859
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
13 changes: 7 additions & 6 deletions bin/wally-tool-chain-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@ set -e # break on error
NUM_THREADS=8 # for >= 32GiB
#NUM_THREADS=16 # for >= 64GiB

sudo mkdir -p $RISCV
#sudo mkdir -p $RISCV
# *** need to update permissions to local user

# Update and Upgrade tools (see https://itsfoss.com/apt-update-vs-upgrade/)
sudo apt update -y
sudo apt upgrade -y
sudo apt install -y git gawk make texinfo bison flex build-essential python3 libz-dev libexpat-dev autoconf device-tree-compiler ninja-build libpixman-1-dev ncurses-base ncurses-bin libncurses5-dev dialog curl wget ftp libgmp-dev libglib2.0-dev python3-pip pkg-config opam z3 zlib1g-dev automake autotools-dev libmpc-dev libmpfr-dev gperf libtool patchutils bc
# Other python libraries used through the book.
sudo pip3 install sphinx sphinx_rtd_theme matplotlib scipy scikit-learn adjustText lief
# sudo pip3 install sphinx sphinx_rtd_theme matplotlib scipy scikit-learn adjustText lief

# needed for Ubuntu 22.04, gcc cross compiler expects python not python2 or python3.
if ! command -v python &> /dev/null
then
echo "WARNING: python3 was installed as python3 rather than python. Creating symlink."
sudo ln -sf /usr/bin/python3 /usr/bin/python
sudo ln -sf /bin/python3 /usr/bin/python
fi

# gcc cross-compiler (https://github.com/riscv-collab/riscv-gnu-toolchain)
Expand All @@ -71,8 +71,8 @@ cd riscv-gnu-toolchain
# Temporarily use the following commands until gcc-13 is part of riscv-gnu-toolchain (issue #1249)
#git clone https://github.com/gcc-mirror/gcc -b releases/gcc-13 gcc-13
#./configure --prefix=/opt/riscv --with-multilib-generator="rv32e-ilp32e--;rv32i-ilp32--;rv32im-ilp32--;rv32iac-ilp32--;rv32imac-ilp32--;rv32imafc-ilp32f--;rv32imafdc-ilp32d--;rv64i-lp64--;rv64ic-lp64--;rv64iac-lp64--;rv64imac-lp64--;rv64imafdc-lp64d--;rv64im-lp64--;" --with-gcc-src=`pwd`/gcc-13
./configure --prefix=${RISCV} --with-multilib-generator="rv32e-ilp32e--;rv32i-ilp32--;rv32im-ilp32--;rv32iac-ilp32--;rv32imac-ilp32--;rv32imafc-ilp32f--;rv32imafdc-ilp32d--;rv64i-lp64--;rv64ic-lp64--;rv64iac-lp64--;rv64imac-lp64--;rv64imafdc-lp64d--;rv64im-lp64--;"
make -j ${NUM_THREADS}
#./configure --prefix=${RISCV} --with-multilib-generator="rv32e-ilp32e--;rv32i-ilp32--;rv32im-ilp32--;rv32iac-ilp32--;rv32imac-ilp32--;rv32imafc-ilp32f--;rv32imafdc-ilp32d--;rv64i-lp64--;rv64ic-lp64--;rv64iac-lp64--;rv64imac-lp64--;rv64imafdc-lp64d--;rv64im-lp64--;"
#make -j ${NUM_THREADS}

# elf2hex (https://github.com/sifive/elf2hex)
#The elf2hex utility to converts executable files into hexadecimal files for Verilog simulation.
Expand Down Expand Up @@ -124,7 +124,8 @@ git clone https://github.com/verilator/verilator # Only first time
unset VERILATOR_ROOT # For bash
cd verilator
git pull # Make sure git repository is up-to-date
git checkout master # Use development branch (e.g. recent bug fixes)
git checkout v5.016 # Use development branch (e.g. recent bug fixes)
#git checkout master # Use development branch (e.g. recent bug fixes)
autoconf # Create ./configure script
./configure # Configure and create Makefile
make -j ${NUM_THREADS} # Build Verilator itself (if error, try just 'make')
Expand Down
5 changes: 3 additions & 2 deletions tests/riscof/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ wally_workdir = $(work)/wally-riscv-arch-test
current_dir = $(shell pwd)
#XLEN ?= 64

all: root arch32 wally32 arch32e arch64 wally64
wally-riscv-arch-test: root wally32 wally64
#all: root arch32 wally32 arch32e arch64 wally64
#wally-riscv-arch-test: root wally32 wally64
all: root wally32 wally64

root:
mkdir -p $(work_dir)
Expand Down

0 comments on commit 3168859

Please sign in to comment.