From 7cfeb15c42b841284965d0622c8a172aa9c01c3c Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Sun, 29 Sep 2024 23:23:31 -0700 Subject: [PATCH 01/16] remove old files and scripts from sim directory --- sim/coverage | 2 -- sim/make-tests.sh | 16 ---------------- sim/run-imperasdv-tests.bash | 22 ---------------------- sim/test | 1 - 4 files changed, 41 deletions(-) delete mode 100755 sim/coverage delete mode 100755 sim/make-tests.sh delete mode 100755 sim/run-imperasdv-tests.bash delete mode 100644 sim/test diff --git a/sim/coverage b/sim/coverage deleted file mode 100755 index 038253911..000000000 --- a/sim/coverage +++ /dev/null @@ -1,2 +0,0 @@ -# recompile coverage tests and run coverage including them -pushd $WALLY/tests/coverage; make; popd; ./regression-wally -coverage diff --git a/sim/make-tests.sh b/sim/make-tests.sh deleted file mode 100755 index de7765086..000000000 --- a/sim/make-tests.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -rm -r work* -make allclean -make -# cd ../../tests/imperas-riscv-tests/ -# make allclean -# make -# cd ../wally-riscv-arch-test -# make allclean -# make -# make XLEN=32 -# exe2memfile.pl work/*/*/*.elf -# cd ../linux-testgen/linux-testvectors -# ./tvLinker.sh -# cd ../../../regression diff --git a/sim/run-imperasdv-tests.bash b/sim/run-imperasdv-tests.bash deleted file mode 100755 index a9facd0e4..000000000 --- a/sim/run-imperasdv-tests.bash +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -if [ -d results ]; then - rm -rf results -fi -mkdir -p results - -ALL=$(find ${WALLY}/external/ImperasDV-HMC/tests/riscof/work/riscv-arch-test/rv64i_m -name "ref" -type d) - -export IMPERAS_TOOLS=$(pwd)/imperas.ic -export OTHERFLAGS="+TRACE2LOG_ENABLE=1 VERBOSE=1" - -for t in $ALL; do - export TESTDIR=$(dirname ${t}) - OUTLOG=$(echo ${TESTDIR} | sed "s|${WALLY}/external/ImperasDV-HMC/tests/riscof/work|results|").log - OUTDIR=$(dirname ${OUTLOG}) - echo "Running test ${TESTDIR} -> ${OUTDIR} :: ${OUTLOG}" - - mkdir -p ${OUTDIR} - vsim -c -do "do wally-imperas.do rv64gc" - mv transcript ${OUTLOG} -done diff --git a/sim/test b/sim/test deleted file mode 100644 index 9daeafb98..000000000 --- a/sim/test +++ /dev/null @@ -1 +0,0 @@ -test From d007f3f66f53f24d44943266f77452f4343dc587 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Sun, 29 Sep 2024 23:30:15 -0700 Subject: [PATCH 02/16] remove deprecated verilator scripts --- sim/verilator/sim-wally-batch | 1 - 1 file changed, 1 deletion(-) delete mode 100755 sim/verilator/sim-wally-batch diff --git a/sim/verilator/sim-wally-batch b/sim/verilator/sim-wally-batch deleted file mode 100755 index 63b4a4cba..000000000 --- a/sim/verilator/sim-wally-batch +++ /dev/null @@ -1 +0,0 @@ -wsim -s verilator rv64gc arch64i From e1b85289f3f7996882875e1d4d0fcb6736934b54 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Sun, 29 Sep 2024 23:30:30 -0700 Subject: [PATCH 03/16] remove deprecated questa scripts --- sim/questa/coverage | 2 -- sim/questa/sim-testfloat | 14 -------------- sim/questa/sim-testfloat-batch | 17 ----------------- sim/questa/sim-testfloat-verilator | 23 ----------------------- sim/questa/sim-wally | 2 -- sim/questa/sim-wally-batch | 1 - 6 files changed, 59 deletions(-) delete mode 100755 sim/questa/coverage delete mode 100755 sim/questa/sim-testfloat delete mode 100755 sim/questa/sim-testfloat-batch delete mode 100755 sim/questa/sim-testfloat-verilator delete mode 100755 sim/questa/sim-wally delete mode 100755 sim/questa/sim-wally-batch diff --git a/sim/questa/coverage b/sim/questa/coverage deleted file mode 100755 index 038253911..000000000 --- a/sim/questa/coverage +++ /dev/null @@ -1,2 +0,0 @@ -# recompile coverage tests and run coverage including them -pushd $WALLY/tests/coverage; make; popd; ./regression-wally -coverage diff --git a/sim/questa/sim-testfloat b/sim/questa/sim-testfloat deleted file mode 100755 index ee13f17c9..000000000 --- a/sim/questa/sim-testfloat +++ /dev/null @@ -1,14 +0,0 @@ - -# cvtint - test integer conversion unit (fcvtint) -# cvtfp - test floating-point conversion unit (fcvtfp) -# cmp - test comparison unit's LT, LE, EQ opperations (fcmp) -# add - test addition -# fma - test fma -# sub - test subtraction -# div - test division -# sqrt - test square root -# all - test everything - - -wsim fdqh_ieee_rv64gc $1 --tb testbench_fp --gui - diff --git a/sim/questa/sim-testfloat-batch b/sim/questa/sim-testfloat-batch deleted file mode 100755 index 52ad83c0f..000000000 --- a/sim/questa/sim-testfloat-batch +++ /dev/null @@ -1,17 +0,0 @@ -# Run TestFloat simulation - -# cvtint - test integer conversion unit (fcvtint) -# cvtfp - test floating-point conversion unit (fcvtfp) -# cmp - test comparison unit's LT, LE, EQ opperations (fcmp) -# add - test addition -# fma - test fma -# mul - test mult with fma -# sub - test subtraction -# div - test division -# sqrt - test square root -# all - test everything - -#vsim -c -do "do testfloat.do fdqh_ieee_rv64gc $1" -wsim fdqh_ieee_rv64gc $1 --tb testbench_fp -#wsim fdqh_ieee_rv64gc $1 --tb testbench_fp --gui - diff --git a/sim/questa/sim-testfloat-verilator b/sim/questa/sim-testfloat-verilator deleted file mode 100755 index 1bd0386b9..000000000 --- a/sim/questa/sim-testfloat-verilator +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -# sim-testfloat-verilator -# David_Harris@hmc.edu 3 April 2024 -# Run Testfloat simulations with Verilator -# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 - -# cvtint - test integer conversion unit (fcvtint) -# cvtfp - test floating-point conversion unit (fcvtfp) -# cmp - test comparison unit's LT, LE, EQ opperations (fcmp) -# add - test addition -# fma - test fma -# mul - test mult with fma -# sub - test subtraction -# div - test division -# sqrt - test square root -# all - test everything - -wsim fdqh_ieee_rv64gc add --tb testbench_fp --sim verilator - -# Change TEST_SIZE to only test certain FP width -# values are QP, DP, SP, HP or all for all tests -#vsim -voptargs=+acc work.testbenchfp -GTEST=$2 -GTEST_SIZE="all" diff --git a/sim/questa/sim-wally b/sim/questa/sim-wally deleted file mode 100755 index 3359be0eb..000000000 --- a/sim/questa/sim-wally +++ /dev/null @@ -1,2 +0,0 @@ -wsim rv64gc arch64i --gui - diff --git a/sim/questa/sim-wally-batch b/sim/questa/sim-wally-batch deleted file mode 100755 index 7b3c69339..000000000 --- a/sim/questa/sim-wally-batch +++ /dev/null @@ -1 +0,0 @@ -wsim rv64gc arch64i From 47d78495543d6e0b1d8ac0dab70df1f3a3f05266 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Mon, 30 Sep 2024 00:14:40 -0700 Subject: [PATCH 04/16] Remove more old files --- bugs.txt | 2 -- fpga/debug_notes.org | 16 ---------------- 2 files changed, 18 deletions(-) delete mode 100644 bugs.txt delete mode 100644 fpga/debug_notes.org diff --git a/bugs.txt b/bugs.txt deleted file mode 100644 index 4c5a15a3c..000000000 --- a/bugs.txt +++ /dev/null @@ -1,2 +0,0 @@ -1. [ ] AMO should always generate store faults never load faults. We are generating both. - diff --git a/fpga/debug_notes.org b/fpga/debug_notes.org deleted file mode 100644 index 84952d8c5..000000000 --- a/fpga/debug_notes.org +++ /dev/null @@ -1,16 +0,0 @@ -* December 12, 2021 -Indefinite lockup in the dcache with STATE_PTW_FAULT_CPU_BUSY -InstrM = f884_3803 -PCM = ffff_ffff_8030_8004 - -Indefinite lockup in the dcache with STATE_PTW_FAULT_CPU_BUSY -InstrM = 0207_ba03 -PCM = ffff_ffff_8034_89fe - -Indefinite lockup in the dcache with STATE_PTW_FAULT_CPU_BUSY -InstrM = 0016_c383 -PCM = ffff_ffff_8030_7504 - -Indefinite lockup in the dcache with STATE_PTW_FAULT_CPU_BUSY -InstrM = 0006_a703 -PCM = ffff_ffff_8028_fa02 From 6971c3723d4a0535f32c8c41bfc10b9762746d7d Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Thu, 29 Aug 2024 08:40:17 -0700 Subject: [PATCH 05/16] Use sail binary release --- bin/wally-tool-chain-install.sh | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/bin/wally-tool-chain-install.sh b/bin/wally-tool-chain-install.sh index 474cbe9b5..a9b269c7d 100755 --- a/bin/wally-tool-chain-install.sh +++ b/bin/wally-tool-chain-install.sh @@ -347,14 +347,21 @@ fi # but a binary release of it should be available soon, removing the need to use opam. section_header "Installing/Updating Sail Compiler" STATUS="Sail Compiler" -export OPAMROOTISOK=1 # Silence warnings about running opam as root -export OPAMROOT="$RISCV"/opam -cd "$RISCV" -opam init -y --disable-sandboxing --no-setup --compiler=5.1.0 -eval "$(opam config env)" -opam update -y -opam upgrade -y -opam install sail -y +if [ ! -e "$RISCV"/bin/sail ]; then + cd "$RISCV" + rm -rf sail + wget https://github.com/rems-project/sail/releases/latest/download/sail.tar.gz + tar -xf sail.tar.gz + rm sail.tar.gz + cd sail + cp bin/* "$RISCV"/bin + cp share/* "$RISCV"/share + if [ "$clean" ]; then + cd "$RISCV" + rm -rf sail + fi + echo -e "${SUCCESS_COLOR}gmp successfully installed!${ENDC}" +fi echo -e "${SUCCESS_COLOR}Sail Compiler successfully installed/updated!${ENDC}" # RISC-V Sail Model (https://github.com/riscv/sail-riscv) From 8f49c527d91b7dff445f2a096d0d0846b217c175 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Thu, 29 Aug 2024 08:41:33 -0700 Subject: [PATCH 06/16] No more opam --- bin/wally-package-install.sh | 2 +- bin/wally-tool-chain-install.sh | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/bin/wally-package-install.sh b/bin/wally-package-install.sh index 8fea2d27b..b823066e3 100755 --- a/bin/wally-package-install.sh +++ b/bin/wally-package-install.sh @@ -80,7 +80,7 @@ elif [ "$FAMILY" == ubuntu ]; then QEMU_PACKAGES+=(libfdt-dev libpixman-1-dev) SPIKE_PACKAGES+=(device-tree-compiler libboost-regex-dev libboost-system-dev) VERILATOR_PACKAGES+=(help2man perl g++ clang ccache libunwind-dev libgoogle-perftools-dev numactl perl-doc libfl2 libfl-dev zlib1g) - SAIL_PACKAGES+=(opam z3) + SAIL_PACKAGES+=(z3) BUILDROOT_PACKAGES+=(ncurses-base ncurses-bin libncurses-dev gfortran cpio) # gfortran is only needed for compiling spec benchmarks on buildroot linux VIVADO_PACKAGES+=(libncurses*) # Vivado hangs on the third stage of installation without this fi diff --git a/bin/wally-tool-chain-install.sh b/bin/wally-tool-chain-install.sh index a9b269c7d..cac89dda7 100755 --- a/bin/wally-tool-chain-install.sh +++ b/bin/wally-tool-chain-install.sh @@ -322,22 +322,6 @@ else fi -# Install opam from binary disribution on rhel as it is not available from dnf -# Opam is needed to install the sail compiler -if [ "$FAMILY" == rhel ]; then - section_header "Installing/Updating Opam" - STATUS="Opam" - export OPAMROOTISOK=1 # Silence warnings about running opam as root - cd "$RISCV" - mkdir -p opam - cd opam - wget https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh - printf '%s\n' "$RISCV"/bin Y | sh install.sh # the print command provides $RISCV/bin as the installation path when prompted - cd "$RISCV" - rm -rf opam - echo -e "${SUCCESS_COLOR}Opam successfully installed/updated!${ENDC}" -fi - # Sail Compiler (https://github.com/rems-project/sail) # Sail is a formal specification language designed for describing the semantics of an ISA. # It is used to generate the RISC-V Sail Model, which is the golden reference model for RISC-V. From 2c63b8daf3f48923968fe3f8ddc80ce3fd169716 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Thu, 29 Aug 2024 08:42:41 -0700 Subject: [PATCH 07/16] Remove sail dependencies from package install --- bin/wally-package-install.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/bin/wally-package-install.sh b/bin/wally-package-install.sh index b823066e3..725d3b201 100755 --- a/bin/wally-package-install.sh +++ b/bin/wally-package-install.sh @@ -55,10 +55,9 @@ if [ "$FAMILY" == rhel ]; then SPIKE_PACKAGES+=(dtc boost-regex boost-system) VERILATOR_PACKAGES+=(help2man perl clang ccache gperftools numactl mold) BUILDROOT_PACKAGES+=(ncurses-base ncurses ncurses-libs ncurses-devel gcc-gfortran cpio) # gcc-gfortran is only needed for compiling spec benchmarks on buildroot linux - # Extra packages not availale in rhel8, nice for Verilator and needed for sail respectively + # Extra packages not availale in rhel8, nice for Verilator if (( RHEL_VERSION >= 9 )); then VERILATOR_PACKAGES+=(perl-doc) - SAIL_PACKAGES=(z3) fi # A newer version of gcc is required for qemu OTHER_PACKAGES=(gcc-toolset-13) @@ -80,7 +79,6 @@ elif [ "$FAMILY" == ubuntu ]; then QEMU_PACKAGES+=(libfdt-dev libpixman-1-dev) SPIKE_PACKAGES+=(device-tree-compiler libboost-regex-dev libboost-system-dev) VERILATOR_PACKAGES+=(help2man perl g++ clang ccache libunwind-dev libgoogle-perftools-dev numactl perl-doc libfl2 libfl-dev zlib1g) - SAIL_PACKAGES+=(z3) BUILDROOT_PACKAGES+=(ncurses-base ncurses-bin libncurses-dev gfortran cpio) # gfortran is only needed for compiling spec benchmarks on buildroot linux VIVADO_PACKAGES+=(libncurses*) # Vivado hangs on the third stage of installation without this fi @@ -90,11 +88,11 @@ fi if [ "${1}" == "--check" ]; then section_header "Checking Dependencies from Package Manager" if [ "$FAMILY" == rhel ]; then - for pack in "${GENERAL_PACKAGES[@]}" "${GNU_PACKAGES[@]}" "${QEMU_PACKAGES[@]}" "${SPIKE_PACKAGES[@]}" "${VERILATOR_PACKAGES[@]}" "${SAIL_PACKAGES[@]}" "${BUILDROOT_PACKAGES[@]}" "${OTHER_PACKAGES[@]}"; do + for pack in "${GENERAL_PACKAGES[@]}" "${GNU_PACKAGES[@]}" "${QEMU_PACKAGES[@]}" "${SPIKE_PACKAGES[@]}" "${VERILATOR_PACKAGES[@]}" "${BUILDROOT_PACKAGES[@]}" "${OTHER_PACKAGES[@]}"; do rpm -q "$pack" > /dev/null || (echo -e "${FAIL_COLOR}Missing packages detected (${WARNING_COLOR}$pack${FAIL_COLOR}). Run as root to auto-install or run wally-package-install.sh first.${ENDC}" && exit 1) done elif [ "$FAMILY" == ubuntu ]; then - for pack in "${GENERAL_PACKAGES[@]}" "${GNU_PACKAGES[@]}" "${QEMU_PACKAGES[@]}" "${SPIKE_PACKAGES[@]}" "${VERILATOR_PACKAGES[@]}" "${SAIL_PACKAGES[@]}" "${BUILDROOT_PACKAGES[@]}" "${OTHER_PACKAGES[@]}"; do + for pack in "${GENERAL_PACKAGES[@]}" "${GNU_PACKAGES[@]}" "${QEMU_PACKAGES[@]}" "${SPIKE_PACKAGES[@]}" "${VERILATOR_PACKAGES[@]}" "${BUILDROOT_PACKAGES[@]}" "${OTHER_PACKAGES[@]}"; do dpkg -l "$pack" | grep "ii" > /dev/null || (echo -e "${FAIL_COLOR}Missing packages detected (${WARNING_COLOR}$pack${FAIL_COLOR}). Run as root to auto-install or run wally-package-install.sh first." && exit 1) done fi @@ -124,6 +122,6 @@ else # Update and Upgrade tools eval "$UPDATE_COMMAND" # Install packages listed above using appropriate package manager - sudo $PACKAGE_MANAGER install -y "${GENERAL_PACKAGES[@]}" "${GNU_PACKAGES[@]}" "${QEMU_PACKAGES[@]}" "${SPIKE_PACKAGES[@]}" "${VERILATOR_PACKAGES[@]}" "${SAIL_PACKAGES[@]}" "${BUILDROOT_PACKAGES[@]}" "${OTHER_PACKAGES[@]}" "${VIVADO_PACKAGES[@]}" + sudo $PACKAGE_MANAGER install -y "${GENERAL_PACKAGES[@]}" "${GNU_PACKAGES[@]}" "${QEMU_PACKAGES[@]}" "${SPIKE_PACKAGES[@]}" "${VERILATOR_PACKAGES[@]}" "${BUILDROOT_PACKAGES[@]}" "${OTHER_PACKAGES[@]}" "${VIVADO_PACKAGES[@]}" echo -e "${SUCCESS_COLOR}Packages successfully installed.${ENDC}" fi From f63b6a84959641b418ad0176010d718d69c4bcf9 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Thu, 29 Aug 2024 08:43:31 -0700 Subject: [PATCH 08/16] Don't install z3 for sail --- bin/wally-tool-chain-install.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/bin/wally-tool-chain-install.sh b/bin/wally-tool-chain-install.sh index cac89dda7..f187015cf 100755 --- a/bin/wally-tool-chain-install.sh +++ b/bin/wally-tool-chain-install.sh @@ -148,11 +148,6 @@ source "$RISCV"/riscv-python/bin/activate # activate python virtual environment STATUS="python packages" pip install --upgrade pip && pip install -r "$dir"/requirements.txt -# z3 is needed for sail and not availabe from dnf for rhel 8 -if (( RHEL_VERSION == 8 )); then - pip install -U z3-solver -fi - source "$RISCV"/riscv-python/bin/activate # reload python virtual environment echo -e "${SUCCESS_COLOR}Python environment successfully configured!${ENDC}" From e13880accf18a83b39e67f4e76cf1e749ef57d36 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Thu, 29 Aug 2024 10:29:04 -0700 Subject: [PATCH 09/16] Use cp -r for sail --- bin/wally-tool-chain-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/wally-tool-chain-install.sh b/bin/wally-tool-chain-install.sh index f187015cf..9c373d456 100755 --- a/bin/wally-tool-chain-install.sh +++ b/bin/wally-tool-chain-install.sh @@ -333,8 +333,8 @@ if [ ! -e "$RISCV"/bin/sail ]; then tar -xf sail.tar.gz rm sail.tar.gz cd sail - cp bin/* "$RISCV"/bin - cp share/* "$RISCV"/share + cp -r bin/* "$RISCV"/bin + cp -r share/* "$RISCV"/share if [ "$clean" ]; then cd "$RISCV" rm -rf sail From 59dc20fa17e3ea1b4a86c7b8932fa800637bd900 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Thu, 29 Aug 2024 11:00:29 -0700 Subject: [PATCH 10/16] Simplify install using curl for extra dependencies --- bin/wally-tool-chain-install.sh | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/bin/wally-tool-chain-install.sh b/bin/wally-tool-chain-install.sh index 9c373d456..c8b18e1ac 100755 --- a/bin/wally-tool-chain-install.sh +++ b/bin/wally-tool-chain-install.sh @@ -161,15 +161,13 @@ if (( RHEL_VERSION == 8 )) || (( UBUNTU_VERSION == 20 )); then section_header "Installing glib" pip install -U meson # Meson is needed to build glib cd "$RISCV" - wget https://download.gnome.org/sources/glib/2.70/glib-2.70.5.tar.xz - tar -xJf glib-2.70.5.tar.xz - rm glib-2.70.5.tar.xz - cd glib-2.70.5 + curl --location https://download.gnome.org/sources/glib/2.70/glib-2.70.5.tar.xz | tar xJf --directory="glib" + cd glib meson setup _build --prefix="$RISCV" meson compile -C _build meson install -C _build cd "$RISCV" - rm -rf glib-2.70.5 + rm -rf glib echo -e "${SUCCESS_COLOR}glib successfully installed!${ENDC}" fi fi @@ -180,15 +178,13 @@ if (( RHEL_VERSION == 8 )); then if [ ! -e "$RISCV"/include/gmp.h ]; then section_header "Installing gmp" cd "$RISCV" - wget https://ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz - tar -xJf gmp-6.3.0.tar.xz - rm gmp-6.3.0.tar.xz - cd gmp-6.3.0 + curl --location https://ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz | tar xJf --directory="gmp" + cd gmp ./configure --prefix="$RISCV" make -j "${NUM_THREADS}" make install cd "$RISCV" - rm -rf gmp-6.3.0 + rm -rf gmp echo -e "${SUCCESS_COLOR}gmp successfully installed!${ENDC}" fi fi @@ -328,17 +324,7 @@ section_header "Installing/Updating Sail Compiler" STATUS="Sail Compiler" if [ ! -e "$RISCV"/bin/sail ]; then cd "$RISCV" - rm -rf sail - wget https://github.com/rems-project/sail/releases/latest/download/sail.tar.gz - tar -xf sail.tar.gz - rm sail.tar.gz - cd sail - cp -r bin/* "$RISCV"/bin - cp -r share/* "$RISCV"/share - if [ "$clean" ]; then - cd "$RISCV" - rm -rf sail - fi + curl --location https://github.com/rems-project/sail/releases/latest/download/sail.tar.gz | tar xvz --directory="$RISCV" echo -e "${SUCCESS_COLOR}gmp successfully installed!${ENDC}" fi echo -e "${SUCCESS_COLOR}Sail Compiler successfully installed/updated!${ENDC}" From 5471d8efa5119a08b1329d022d9039d0d1f73edc Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Thu, 29 Aug 2024 11:01:57 -0700 Subject: [PATCH 11/16] Fix sail binary install --- bin/wally-tool-chain-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/wally-tool-chain-install.sh b/bin/wally-tool-chain-install.sh index c8b18e1ac..7765f8dd2 100755 --- a/bin/wally-tool-chain-install.sh +++ b/bin/wally-tool-chain-install.sh @@ -324,7 +324,7 @@ section_header "Installing/Updating Sail Compiler" STATUS="Sail Compiler" if [ ! -e "$RISCV"/bin/sail ]; then cd "$RISCV" - curl --location https://github.com/rems-project/sail/releases/latest/download/sail.tar.gz | tar xvz --directory="$RISCV" + curl --location https://github.com/rems-project/sail/releases/latest/download/sail.tar.gz | tar xvz --directory="$RISCV" --strip-components=1 echo -e "${SUCCESS_COLOR}gmp successfully installed!${ENDC}" fi echo -e "${SUCCESS_COLOR}Sail Compiler successfully installed/updated!${ENDC}" From 82a19a4858bd75aafa2b9afaaf9ac111a928666a Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Thu, 29 Aug 2024 11:09:37 -0700 Subject: [PATCH 12/16] Remove remaining mentions of opam --- bin/wally-tool-chain-install.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bin/wally-tool-chain-install.sh b/bin/wally-tool-chain-install.sh index 7765f8dd2..57442a14d 100755 --- a/bin/wally-tool-chain-install.sh +++ b/bin/wally-tool-chain-install.sh @@ -317,9 +317,7 @@ fi # Sail is a formal specification language designed for describing the semantics of an ISA. # It is used to generate the RISC-V Sail Model, which is the golden reference model for RISC-V. # The Sail Compiler is written in OCaml, which is an object-oriented extension of ML, which in turn -# is a functional programming language suited to formal verification. The Sail compiler is installed -# with the opam OCaml package manager. It has so many dependencies that it can be difficult to install, -# but a binary release of it should be available soon, removing the need to use opam. +# is a functional programming language suited to formal verification. section_header "Installing/Updating Sail Compiler" STATUS="Sail Compiler" if [ ! -e "$RISCV"/bin/sail ]; then @@ -336,7 +334,6 @@ STATUS="RISC-V Sail Model" if git_check "sail-riscv" "https://github.com/riscv/sail-riscv.git" "$RISCV/bin/riscv_sim_RV32"; then cd sail-riscv git reset --hard && git clean -f && git checkout master && git pull - export OPAMCLI=2.0 # Sail is not compatible with opam 2.1 as of 4/16/24 ARCH=RV64 make -j "${NUM_THREADS}" c_emulator/riscv_sim_RV64 2>&1 | logger sailModel; [ "${PIPESTATUS[0]}" == 0 ] ARCH=RV32 make -j "${NUM_THREADS}" c_emulator/riscv_sim_RV32 2>&1 | logger sailModel; [ "${PIPESTATUS[0]}" == 0 ] cp -f c_emulator/riscv_sim_RV64 "$RISCV"/bin/riscv_sim_RV64 @@ -344,7 +341,6 @@ if git_check "sail-riscv" "https://github.com/riscv/sail-riscv.git" "$RISCV/bin/ if [ "$clean" ]; then cd "$RISCV" rm -rf sail-riscv - rm -rf opam fi echo -e "${SUCCESS_COLOR}RISC-V Sail Model successfully installed/updated!${ENDC}" else From 4c8114c1754900000ae296a2dd6abf290e43fde9 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Thu, 29 Aug 2024 12:15:03 -0700 Subject: [PATCH 13/16] Installation fixes --- bin/wally-tool-chain-install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/wally-tool-chain-install.sh b/bin/wally-tool-chain-install.sh index 57442a14d..87defb3a4 100755 --- a/bin/wally-tool-chain-install.sh +++ b/bin/wally-tool-chain-install.sh @@ -161,13 +161,13 @@ if (( RHEL_VERSION == 8 )) || (( UBUNTU_VERSION == 20 )); then section_header "Installing glib" pip install -U meson # Meson is needed to build glib cd "$RISCV" - curl --location https://download.gnome.org/sources/glib/2.70/glib-2.70.5.tar.xz | tar xJf --directory="glib" - cd glib + curl --location https://download.gnome.org/sources/glib/2.70/glib-2.70.5.tar.xz | tar xJf + cd glib-2.70.5 meson setup _build --prefix="$RISCV" meson compile -C _build meson install -C _build cd "$RISCV" - rm -rf glib + rm -rf glib-2.70.5 echo -e "${SUCCESS_COLOR}glib successfully installed!${ENDC}" fi fi @@ -178,13 +178,13 @@ if (( RHEL_VERSION == 8 )); then if [ ! -e "$RISCV"/include/gmp.h ]; then section_header "Installing gmp" cd "$RISCV" - curl --location https://ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz | tar xJf --directory="gmp" - cd gmp + curl --location https://ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz | tar xJf + cd gmp-6.3.0 ./configure --prefix="$RISCV" make -j "${NUM_THREADS}" make install cd "$RISCV" - rm -rf gmp + rm -rf gmp-6.3.0 echo -e "${SUCCESS_COLOR}gmp successfully installed!${ENDC}" fi fi From 24a95d9ecbeeedabb0ea743eb44a4b8222bc79b4 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Thu, 29 Aug 2024 12:16:40 -0700 Subject: [PATCH 14/16] Update Sail status messages --- bin/wally-tool-chain-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/wally-tool-chain-install.sh b/bin/wally-tool-chain-install.sh index 87defb3a4..80d9ad04e 100755 --- a/bin/wally-tool-chain-install.sh +++ b/bin/wally-tool-chain-install.sh @@ -323,9 +323,10 @@ STATUS="Sail Compiler" if [ ! -e "$RISCV"/bin/sail ]; then cd "$RISCV" curl --location https://github.com/rems-project/sail/releases/latest/download/sail.tar.gz | tar xvz --directory="$RISCV" --strip-components=1 - echo -e "${SUCCESS_COLOR}gmp successfully installed!${ENDC}" + echo -e "${SUCCESS_COLOR}Sail Compiler successfully installed/updated!${ENDC}" +else + echo -e "${SUCCESS_COLOR}Sail Compiler already installed.${ENDC}" fi -echo -e "${SUCCESS_COLOR}Sail Compiler successfully installed/updated!${ENDC}" # RISC-V Sail Model (https://github.com/riscv/sail-riscv) # The RISC-V Sail Model is the golden reference model for RISC-V. It is written in Sail (described above) From 77d3ffaca4494f724fe6aa855731197c35d38615 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Thu, 29 Aug 2024 12:52:08 -0700 Subject: [PATCH 15/16] Installation tar fixes --- bin/wally-tool-chain-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/wally-tool-chain-install.sh b/bin/wally-tool-chain-install.sh index 80d9ad04e..a01298869 100755 --- a/bin/wally-tool-chain-install.sh +++ b/bin/wally-tool-chain-install.sh @@ -7,6 +7,7 @@ ## Modified: 22 January 2023 ## Modified: 23 March 2023 ## Modified: 30 June 2024, Jordan Carlin jcarlin@hmc.edu +## Modified: 1 September 2024 ## ## Purpose: Open source tool chain installation script ## @@ -161,7 +162,7 @@ if (( RHEL_VERSION == 8 )) || (( UBUNTU_VERSION == 20 )); then section_header "Installing glib" pip install -U meson # Meson is needed to build glib cd "$RISCV" - curl --location https://download.gnome.org/sources/glib/2.70/glib-2.70.5.tar.xz | tar xJf + curl --location https://download.gnome.org/sources/glib/2.70/glib-2.70.5.tar.xz | tar xJ cd glib-2.70.5 meson setup _build --prefix="$RISCV" meson compile -C _build @@ -178,7 +179,7 @@ if (( RHEL_VERSION == 8 )); then if [ ! -e "$RISCV"/include/gmp.h ]; then section_header "Installing gmp" cd "$RISCV" - curl --location https://ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz | tar xJf + curl --location https://ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz | tar xJ cd gmp-6.3.0 ./configure --prefix="$RISCV" make -j "${NUM_THREADS}" From 04178572539a6ffc0f25d370ee96c457bd696d17 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Mon, 30 Sep 2024 16:37:22 -0700 Subject: [PATCH 16/16] Remove old setup.imperas.sh script --- setup.imperas.sh | 57 ------------------------------------------------ 1 file changed, 57 deletions(-) delete mode 100644 setup.imperas.sh diff --git a/setup.imperas.sh b/setup.imperas.sh deleted file mode 100644 index 71d5dcfd5..000000000 --- a/setup.imperas.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash - -IMP_HASH=56b1479 - -REPO=davidharrishmc -REPO=eroom1966 -git clone https://github.com/${REPO}/riscv-wally -b imperas - -cd riscv-wally -WALLY=$(dirname ${BASH_SOURCE[0]:-$0}) -export WALLY=$(cd "$WALLY" && pwd) - -# clone the Imperas repo -if [ ! -d external ]; then - mkdir -p external -fi -pushd external - if [ ! -f ImperasDV-HMC ]; then - git clone git@github.com:Imperas/ImperasDV-HMC.git - fi - pushd ImperasDV-HMC - git checkout $IMP_HASH - popd -popd - -# Setup Imperas -source ${WALLY}/external/ImperasDV-HMC/Imperas/bin/setup.sh -setupImperas ${WALLY}/external/ImperasDV-HMC/Imperas -export IMPERAS_PERSONALITY=CPUMAN_DV_ASYNC - -# setup QUESTA (Imperas only command, YMMV) -svsetup -questa - -pushd sim - # With IDV - IMPERAS_TOOLS=$(pwd)/imperas.ic \ - OTHERFLAGS="+TRACE2LOG_ENABLE=1 VERBOSE=1" \ - TESTDIR=${WALLY}/external/ImperasDV-HMC/tests/riscof/work/riscv-arch-test/rv64i_m/F/src/fadd_b1-01.S \ - vsim -c -do "do wally-imperas.do rv64gc" -popd - -# notes -# run the pushd external code - -#source external/ImperasDV-HMC/Imperas/bin/setup.sh -# setupImperas /home/ross/repos/active-wally/riscv-wally/external/ImperasDV-HMC/Imperas -# env | grep IMPERAS -# export IMPERAS_PERSONALITY=CPUMAN_DV_ASYNC - -IMPERAS_TOOLS=$(pwd)/imperas.ic \ -OTHERFLAGS="+TRACE2LOG_ENABLE=1 VERBOSE=1" \ -TESTDIR=../../tests/riscof_lee/work/riscv-arch-test/rv64i_m/F/src/fadd_b1-01.S \ -vsim -c -do "do wally-imperas.do rv64gc" - - -# getting library issue. -# try switching to modelsim 2022.01