cva6/bin
Mike Thompson d76e8e9e39
Hotfix for security alert
Hotfix in response to GitHub security alert digest.
2023-04-11 07:54:02 -04:00
..
lib random PMA configuration 2021-10-04 09:58:58 -05:00
templates fix gen_corevdv index in cv_regress VSIF generation for vManager 2021-11-08 12:35:47 -06:00
vmgr extend compliance signature check updates to cv_regress for vsim and xrun 2020-11-29 16:37:29 -06:00
cfgyaml2make remove warnings from using yaml.load with different versions of PyYAML 2021-04-05 16:27:48 -05:00
ci_check Relative paths for Verilator 2021-12-28 10:09:02 -05:00
cv_regress extend toolchain option to metrics and shell script regression output products 2021-10-20 11:13:36 -05:00
diff_signatures.sh random PMA configuration 2021-10-04 09:58:58 -05:00
Makefile.uvmt port corev-dv and cv32 uvmt env and tests to core-specific cv32e40p 2021-02-09 12:42:46 -06:00
makeuvmt port corev-dv and cv32 uvmt env and tests to core-specific cv32e40p 2021-02-09 12:42:46 -06:00
metrics-regress Improvements to metrics-regress: better error handling, fixed lint warnings 2021-02-19 14:37:58 -05:00
objdump2itb add instruction trace table generation and trace to rvfi 2021-08-12 07:44:45 -05:00
README.md Fix up python requirements and related READMEs (2) 2022-11-23 15:50:46 -05:00
requirements.txt Hotfix for security alert 2023-04-11 07:54:02 -04:00
run_compliance.sh Add targets for compliance regression 2020-11-27 16:53:02 -06:00
run_embench.py tweaks to embench to enable running with any toolchain 2021-10-20 11:13:36 -05:00
yaml2make whitespace cleanup 2021-06-29 12:35:44 -05:00

Core-V-Verif Utilities

This directory contains various utilities for running tests and performing various verification-related activities in the core-v-verif repository.

Unless otherwise noted all utilities in this directory should be agnostic to $CWD. Therefore a user should be able to run the utilities via a PATH from any directory. The utilities will be able to determine their own directory based on the implementation langugage hooks available.

For example from a bash-type shell:

% export PATH=./core-v-verif/bin:$PATH

Requirements

Much of the scriptware in CORE-V-VERIF is written in python and makes use of external packages that are not necessarily distributed with python itself. An easy way to get the Python plug-ins installed on your machine is:

% git clone https://github.com/openhwgroup/core-v-verif.git <core-v-verif>
% cd <core-v-verif>/bin
% pip3 install -r requirements.txt

Utility Documentation

Documentation for each of the utilities are included below. Each utility should also support a help option on the command line for describing options and arguments available.

makeuvmt

This is a simple wrapper to redirect a make call to any core's UVMT Makefile. This redirection script simply requires that you either:

  • specify CV_CORE in your environment -or-
  • specify CV_CORE on the maekeuvmt command line as an override

The script will then invoke make in the following directory:

<core-v-verif>/$(CV_CORE)/sim/uvmt

This should enable simulations to be executed regardess of current shell directory. All common make flags and conventions should be passed to the underlying Makefile directory.

Examples:

# makeuvmt can be invoked from any directory
% makeuvmt test TEST=hello-world WAVES=1 SIMUALTOR=vsim
# Override the core to cv32e40x (regardless of CV_CORE environment setting)
% makeuvmt test TEST=hello-world WAVES=1 CV_CORE=cv32e40x

ci_check

Continuous integration checker script. This script runs a quick sanity regression on the requested simulator for the purposes of ensuring a pull-request can be safely made. Note that ci_check should now be able to be executed in any directory where previously it required the user to cd to ci/. Please refer to ci_check's help utility for more details on options

If required, the step and compare ISS can be disabled for this regression by setting --iss=0

Examples:

# Run CI sanity regression on Xcelium
% ci_check -s xrun
# Run CI sanity regression on Xcelium with the ISS disabled
% ci_check -s xrun --iss=0
# Get help of all available options
% ci_check --help

cv_regress

Regression script generator utility. cv_regress will read in one or more regressions defined in a specific YAML format into an output format suitable for the specified regression platform or utlity. The currently supported output platforms are:

  • Metrics JSON (--metrics)
  • Shell Script (--sh)
  • Vmanager VSIF (--vsif)

The format of the YAML testlist file is given below. All YAML regression testslists should go in the following directory:

core-v-verif/<project>/regress

where <project> is a core (cv32e40p or cva6)

Note that the utility has the ability to combine multiple testlists to build larger regressions. Therefore the --file option may be specified multiple times.

Please refer to the help utility of cv_regress for more details on the utility.

Examples:

# Read in cv32e40p_ci_check testlist with Questa and emit an executable shell script
% cv_regress --file=cv32e40p_ci_check.yaml --simulator=vsim --outfile=vsim_ci_check.sh

Regression YAML Format

The following describes the YAML format for regression testlists.

<Required: the name of the testlist>
name: <string>
<Required: human-readable description to specify the intent of the testlist>
description: <string>

# List of builds, this can include SystemVerilog compiles and riscv-dv compiles
# Multiple builds may be defined
builds:
  build_name0:
    <Required: make command for the build>
    cmd: make comp
    <Required: make directory for the build>
    dir: cv32/sim/uvmt_cv32

# List of tests
# Multiple tests can be defined
tests:
  test_name0:
    <Required: build dependecies, can be a list of single build_name>
    build: <string>
    <Required: human-readable test description>
    description: <string>
    <Required: make directory for the test>
    dir: <string>
    <Optional: A make command to run before running the test(s). This could be used for gen_* makes for corev-dv
    precmd: <string>
    <Required: make directory for the test>
    cmd: <string>
    <Optional: The number of test iterations to run. Note that all runs will receive a random seed>
    num: <number>