cva6/verif
2023-10-09 22:35:23 +02:00
..
bsp move files to a verif directory 2023-09-07 09:50:50 +02:00
core-v-verif@580ea6f94f Bump verif/core-v-verif from 2cf4b79 to 580ea6f (#1495) 2023-10-03 06:25:27 +02:00
docs CV32A6 CSR Access dvplan (#1470) 2023-09-27 10:34:04 +02:00
env hvp vplan creation and sanity covergroup implementation (#1518) 2023-10-09 22:29:58 +02:00
regress Change STEP1 target with the embedded target (#1519) 2023-10-09 22:12:24 +02:00
sim hvp vplan creation and sanity covergroup implementation (#1518) 2023-10-09 22:29:58 +02:00
tb Merge CVA6Cfg and ArianeCfg (#1321) 2023-09-28 11:41:38 +02:00
tests ci: reorganize jobs (#1517) 2023-10-09 22:35:23 +02:00
.gitignore update verif/.gitignore 2023-09-07 10:12:03 +02:00
README.md hvp vplan creation and sanity covergroup implementation (#1518) 2023-10-09 22:29:58 +02:00

CVA6: Verification Environment for the CVA6 CORE-V processor core

Directories:

  • bsp: board support package for test-programs compiled/assembled/linked for the CVA6. This BSP is used by both core testbench and uvmt_cva6 UVM verification environment.
  • regress: scripts to install tools, test suites, CVA6 code and to execute tests
  • sim: simulation environment (e.g. riscv-dv)
  • tb: testbench module instancing the core
  • tests: source of test cases and test lists

There are README files in each directory with additional information.

Prerequisites

To execute tests on CVA6 core, you need a RISC-V toolchain.

Be aware that only gcc 11.1.0 or newer are supported in core-v-verif repository. To build and install riscv gcc compiler in local, you can use the following commands :

  • git clone https://github.com/riscv-collab/riscv-gnu-toolchain
  • cd riscv-gnu-toolchain
  • git clone https://github.com/gcc-mirror/gcc -b releases/gcc-13 gcc-13
  • ./configure prefix:/path/to/installation/directory --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
  • make j32

These commands will install the riscv gcc 13.1.0 compiler which is the latest version. Once running the previous commands, your environment must be updated with :

  • export RISCV=/path/to/installation/directory
  • export RISCV_PREFIX=/path/to/installation/directory/bin/riscv64-unknown-
  • export RISCV_GCC=/path/to/installation/directory/bin/riscv64-unknown-gcc
  • export CV_SW_PREFIX=riscv64-unknown-elf-

This 4 variables will ensure you use correctly the new gcc compiler you have just installed. You will now be able to run the test scripts.

Test execution

Run one of the shell scripts:

  • source cva6/regress/dv-riscv-compliance.sh: riscv-compliance test suite,
  • source cva6/regress/dv-riscv-tests.sh: riscv-tests test suite.

These tests are using riscv-dv as environment.

Verification plan

Verification plan is available only for vcs tool and located in sim/cva6.hvp, it's used within a modifier to filter out only needed features. Example sim/modifier_embedded.hvp for embedded config.

To generate the coverage database user should run at least a test or regression with coverage enabled by setting:

  • export cov=1

To view or edit verification plan use command:

  • cd sim
  • verdi -cov -covdir vcs_results/default/vcs.d/simv.vdb -plan cva6.hvp -mod modifier_embedded.hvp

To generate verification plan report in html format use command:

  • cd sim
  • urg -hvp_proj cva6_embedded -group instcov_for_score -hvp_attributes description -dir vcs_results/default/vcs.d/simv.vdb -plan cva6.hvp -mod modifier_embedded.hvp

Environment variables

Other environment variables can be set to overload default values provided in the different scripts.

The default values are:

  • RISCV_GCC: $RISCV/bin/riscv-none-elf-gcc

  • RISCV_OBJCOPY: $RISCV/bin/riscv-none-elf-objcopy

  • VERILATOR_ROOT: ../tools/verilator-4.110 to install in core-v-verif/tools

  • SPIKE_INSTALL_DIR: ../tools/spike to install in core-v-verif/tools

  • CVA6_REPO: https://github.com/openhwgroup/cva6.git

  • CVA6_BRANCH: master

  • CVA6_HASH: see value in regress/install-cva6.sh

  • CVA6_PATCH: no default value

  • COMPLIANCE_REPO: https://github.com/riscv/riscv-compliance.git

  • COMPLIANCE_BRANCH: master

  • COMPLIANCE_HASH: 220e78542da4510e40eac31e31fdd4e77cdae437

  • COMPLIANCE_PATCH: no default value

  • TESTS_REPO: https://github.com/riscv/riscv-tests.git

  • TESTS_BRANCH: master

  • TESTS_HASH: f92842f91644092960ac7946a61ec2895e543cec

  • DV_REPO: https://github.com/google/riscv-dv.git

  • DV_BRANCH: master

  • DV_HASH: 0ce85d3187689855cd2b3b9e3fae21ca32de2248

  • DV_PATCH: no default value

  • DV_TARGET: cv64a6_imafdc_sv39

  • DV_SIMULATORS: veri-core,spike

  • DV_TESTLISTS: ../tests/testlist_riscv-tests-$DV_TARGET-p.yaml ../tests/testlist_riscv-tests-$DV_TARGET-v.yaml

  • DV_OPTS: no default value

32-bit configuration

To test the CVA6 in 32-bit configuration, use DV_TARGET with a 32-bit variant (e.g. cv32a6_imac_sv0).

The following environment variables have to be modified before executing test script.

  • DV_TARGET: cv32a6_imac_sv0