cva6 icon indicating copy to clipboard operation
cva6 copied to clipboard

[BUG] Regression Tests Failures: Incorrect PC jumps & Missing zbkb Extension

Open lx3211 opened this issue 8 months ago • 1 comments

Is there an existing CVA6 bug for this?

  • [x] I have searched the existing bug issues

Bug Description

I encountered issues while running the regression test simulations for CVA6. Some tests failed due to incorrect PC jumps, and another test reported a missing zbkb extension. Below are the steps I followed and the details of the errors.

Steps to Reproduce

The following commands were executed to set up and run the regression tests:

# Clone the CVA6 repository
git clone https://github.com/openhwgroup/cva6.git
cd cva6
git submodule update --init --recursive

# Install dependencies
sudo apt-get install autoconf automake autotools-dev curl git libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool bc zlib1g-dev

# Set up the RISC-V toolchain
export RISCV=/opt/riscv_cva6
mkdir -p $RISCV
INSTALL_DIR=$RISCV
cd ./util/toolchain-builder
sudo bash get-toolchain.sh
sudo bash build-toolchain.sh $INSTALL_DIR

# Install additional dependencies
sudo apt update
sudo apt install cmake  # Version: 3.28.3
sudo apt-get install help2man device-tree-compiler
sudo apt install python3.10-venv

# Set up Python environment
cd ../..
python3 -m venv cva6_env
source cva6_env/bin/activate
pip3 install --upgrade pip
pip3 install -r verif/sim/dv/requirements.txt

# Run regression tests
export DV_SIMULATORS=veri-testharness,spike
bash verif/regress/smoke-tests-cv32a65x.sh
bash verif/regress/smoke-tests-cv64a6_imafdc_sv39.sh
export DV_SIMULATORS=veri-testharness,spike
bash verif/regress/dv-riscv-compliance.sh

Observed Issues

  1. Incorrect PC Jumps in Regression Tests Some test cases fail due to mismatches in program counter (PC) values between spike and veri-testharness in dv-riscv-compliance.sh Example log output: Image

    • The PC values do not match, leading to test failures.
  2. Missing zbkb Extension in dv-riscv-arch-test.sh

    Image

    • This suggests that the zbkb extension is missing from the configuration.

Expected Behavior

  • The PC values should match between spike and veri-testharness, ensuring test consistency.
  • The dv-riscv-arch-test.sh test should recognize and support the zbkb extension.

System Information

  • CVA6 Commit: feb5f72b5cafb840388ea85b155dfb4013c1926f
  • OS: Ubuntu 22.04
  • Toolchain: gcc-13.1.0-baremetal
  • Simulation Tools: veri-testharness, spike
  • CMake Version: 3.28.3
  • Python Version: 3.10.12

Additional Information

  • Attached are logs and screenshots of the failed tests.
  • Any insights into potential causes and fixes would be greatly appreciated.

Thank you for your help! 🙏

lx3211 avatar Mar 18 '25 11:03 lx3211