The Wayback Machine - https://web.archive.org/web/20200529122455/https://github.com/google/riscv-dv
Skip to content
SV/UVM based instruction generator for RISC-V processor verification
SystemVerilog Python Shell Forth Filebench WML Tcl
Branch: master
Clone or download

Latest commit

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs convert handshake doc to rst format (#580) May 29, 2020
pygen/experimental PR to minor fix for running riscv_asm_program_gen.py (#571) May 13, 2020
sample Add sample rv32imc test (#367) Dec 20, 2019
scripts Add --seed_start argument and tidy up seed handling (#570) May 18, 2020
src Add missing default case to pmp_config (#583) May 29, 2020
target Add target rv64imcb (#543) Apr 19, 2020
test Restructure coverage (#569) May 18, 2020
user_extension Add user extension support (#163) Sep 16, 2019
verilog_style Restructure coverage (#569) May 18, 2020
yaml
.gitignore Python package (#419) Jan 4, 2020
.travis.yml Add setup Travis CI for tracking build docs, and install (#430) Jan 7, 2020
CONTRIBUTING.md Initial release of RISC-V instruction generator Jan 23, 2019
LICENSE.txt Initial release of RISC-V instruction generator Jan 23, 2019
MANIFEST.in riviera 2020.04 beta initial support Apr 7, 2020
README.md riviera 2020.04 beta initial support Apr 7, 2020
cov.py Implement storing the commands that would be executed as a script (#450) Jan 22, 2020
files.f Allow running riscv-dv from other directories (#128) Sep 6, 2019
qrun_option.f Qrun is missing -access=wrc option (#457) Jan 24, 2020
questa_sim.tcl Fixed default values, and trailing blank lines (#233) Oct 17, 2019
requirements.txt Update HTML document (#446) Jan 21, 2020
riviera_sim.tcl fix access rights Apr 16, 2020
run.py Add --seed_start argument and tidy up seed handling (#570) May 18, 2020
setup.cfg Update information about instruction for running scripts (#420) Jan 4, 2020
setup.py Python package (#419) Jan 4, 2020
vcs.compile.option.f Initial release of RISC-V instruction generator Jan 23, 2019

README.md

Overview

RISCV-DV is a SV/UVM based open-source instruction generator for RISC-V processor verification. It currently supports the following features:

  • Supported instruction set: RV32IMAFDC, RV64IMAFDC
  • Supported privileged mode: machine mode, supervisor mode, user mode
  • Page table randomization and exception
  • Privileged CSR setup randomization
  • Privileged CSR test suite
  • Trap/interrupt handling
  • Test suite to stress test MMU
  • Sub-program generation and random program calls
  • Illegal instruction and HINT instruction generation
  • Random forward/backward branch instructions
  • Supports mixing directed instructions with random instruction stream
  • Debug mode support, with fully randomized debug ROM
  • Instruction generation coverage model
  • Handshake communication with testbench
  • Support handcoded assembly test
  • Co-simulation with multiple ISS : spike, riscv-ovpsim, whisper, sail-riscv

Getting Started

Prerequisites

To be able to run the instruction generator, you need to have an RTL simulator which supports SystemVerilog and UVM 1.2. This generator has been verified with Synopsys VCS, Cadence Incisive/Xcelium, Mentor Questa, and Aldec Riviera-PRO simulators. Please make sure the EDA tool environment is properly setup before running the generator.

Install RISCV-DV

Getting the source

git clone https://github.com/google/riscv-dv.git

There are two ways that you can run scripts from riscv-dv.

For developers which may work on multiple clones in parallel, using directly run by python3 script is highly recommended. Example:

pip3 install -r requirements.txt    # install dependencies (only once)
python3 run.py --help

For normal users, using the python package is recommended. First, cd to the directory where riscv-dv is cloned and run:

export PATH=$HOME/.local/bin/:$PATH  # add ~/.local/bin to the $PATH (only once)
pip3 install --user -e .

This installs riscv-dv in a mode where any changes within the repo are immediately available simply by running run/cov. There is no need to repeatedly run pip install . after each change. Example for running:

run --help
cov --help

Use below command to install Verible, which is the tool to check Verilog style

verilog_style/build-verible.sh

This is the command to run Verilog style check. It's recommended to run and clean up all the style violations before submit a PR

verilog_style/run.sh

Document

To understand how to setup and customize the generator, please check the full document under docs directory. You can use the makefile to generate the document. HTML preview. You can find the prebuilt document under docs/build/singlehtml/index.html

External contributions and collaborations

This repository is still under active development. We hope the RISC-V processor verification platform development to be a collaborative effort of the RISC-V community. Free feel to submit issues, feature requests, pull requests through Github. You can also send your private collaboration request to riscv_dv_dev@google.com. Please refer to CONTRIBUTING.md for license related questions.

Supporting model

Please file an issue under this repository for any bug report / integration issue / feature request. We are looking forward to knowing your experience of using this flow and how we can make it better together.

Disclaimer

This is not an officially supported Google product.

You can’t perform that action at this time.