Skip to main content

Apheleia Verification Library RISCV Coverage Framework. Collect architectural coverage from elf and trace files with no HDL intermediate

Project description

AVL RISCV Coverage - Apheleia Verification Library RISCV Coverage Framework

License: MIT Python

AVL RISCV Coverage has been developed by experienced, industry professional verification engineers to provide a framework
and library of base classes for developing functional coverage for RISCV processors in Python using
the compiled test code and trace files. Coverage can be generated from higher level models with no HDL intermediate.

  • Although a default instr_dict.json is provided, it can be overridden on the commandline.

  • An elf file and spike trace are required.

  • Additional coverage packages can be added from the commandline.

  • Output is generated in AVL coverage.json and optionally rendered into html.

usage: avl-riscv-coverage [-h] [--ref REF] [--extensions [EXTENSIONS ...]] [--packages [PACKAGES ...]] [--elf ELF] [--trace TRACE] [--output OUTPUT] [--html] [--verbose]

options:
  -h, --help            show this help message and exit
  --ref REF             Pointer to instr_dict.json (generated from https://github.com/riscv/riscv-opcodes) (default: ./avl-riscv-coverage/avl_riscv_coverage/instr_dict.json)
  --extensions [EXTENSIONS ...
                        List of extensions
  --packages [PACKAGES ...]
                        List of python packages containing covergroups
  --elf ELF             Elf file for testcase
  --trace TRACE         List of trace files
  --output OUTPUT       Output directory for report
  --html                Generate HTML report
  --verbose             Verbose messages

📦 Installation

Using pip

# Standard build
pip install avl-riscv-coverage

# Development build
pip install avl-riscv-coverage[dev]

Install from Source

git clone https://github.com/projectapheleia/avl-riscv-coverage.git
cd avl-riscv-coverage

# Standard build
pip install .

# Development build
pip install .[dev]

Alternatively if you want to create a virtual environment rather than install globally a script is provided. This will install, with edit privileges to local virtual environment.

This script assumes you have Verilator, GTKWave and Graphviz installed, so all examples and documentation will build out of the box.

git clone https://github.com/projectapheleia/avl-riscv-coverage.git
cd avl-riscv-coverage
source avl-riscv-coverage.sh

📖 Documentation

In order to build the documentation you must have installed the development build.

Build from Source

cd docs
make html
<browser> build/html/index.html

🏃 Examples

In order to run all the examples you must have installed the development build.

To run all examples:

cd examples

# To run
make -j 8 sim

# To clean
make -j 8 clean

To run an individual example:

cd examples/THE EXAMPLE YOU WANT

# To run
make sim

# To clean
make clean

🧹 Code Style & Linting

This project uses Ruff for linting and formatting.

Check code for issues:

ruff check .

Automatically fix common issues:

ruff check . --fix

📧 Contact

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

avl_riscv_coverage-0.0.1.tar.gz (28.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

avl_riscv_coverage-0.0.1-py3-none-any.whl (32.4 kB view details)

Uploaded Python 3

File details

Details for the file avl_riscv_coverage-0.0.1.tar.gz.

File metadata

  • Download URL: avl_riscv_coverage-0.0.1.tar.gz
  • Upload date:
  • Size: 28.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for avl_riscv_coverage-0.0.1.tar.gz
Algorithm Hash digest
SHA256 efbc29841365e4b817a4af8b22de0c231a93f1ece15c76b9e61b7cebc8450af5
MD5 d0e99131ec1920a914ee398bef46c0e2
BLAKE2b-256 3429c25675663c82fd448d3c263ebd4f2cdd1202db51efa71270dac04a03a4e6

See more details on using hashes here.

File details

Details for the file avl_riscv_coverage-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for avl_riscv_coverage-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bb19ff0c78424e1abaee73846c1f93bb95b6cc21e849b6a9b23c79bb58b5d343
MD5 14e305623ef8342f2843859136384bd0
BLAKE2b-256 d7da675b5567f209837d5ee4f3d55a94c38e4ecaddde523eff2c16bed99148c7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page