Git Product home page Git Product logo

riscv-compliance's Introduction

RISC-V Compliance Task Group

This is a repository for the work of the RISC-V Foundation Compliance Task Group. The repository owners are:

  • Jeremy Bennett (Embecosm)
  • Lee Moore (Imperas)

Details of the RISC-V Foundation, the work of its task groups, and how to become a member can be found at riscv.org.

Contribution process

You are encouraged to contribute to this repository by submitting pull requests and by commenting on pull requests submitted by other people.

  • Where a pull request is non-controversial one of the repository owners will immediately merge it. The repository uses rebase merges to maintain a linear history.

  • Other pull requests will be publicised to the task group for comment and decision at a subsequent meeting of the group. Everyone is encouraged to comment on a pull request. Such pull requests will be merged by when a consensus/decision has been reached by the task group.

Licensing

In general:

  • code is licensed under the BSD 3-clause license (SPDX license identifier BSD-3-Clause); while
  • documentation is licensed under the Creative Commons Attribution 4.0 International license (SPDX license identifier CC-BY-4.0).

The files COPYING.BSD and COPYING.CC in the top level directory contain the complete text of these licenses.

Engineering practice

  • Documentation uses the structured text format AsciiDoc. See doc/README.adoc for more details.

  • Some directories use ChangeLog files to track changes in the code and documentation. Please honor these, keeping them up to date and including the ChangeLog entry in the git commit message.

  • Please include a comment with the SPDX license identifier in all source files, for example:

// SPDX-License-Identifier: BSD-3-Clause

Running the compliance tests

The only setup required is to define where the toolchain is found, and where the target / device is found.

For the toolchain, the binaries must be in the search path and the compiler prefix is defined on the make line. The default value for this is

RISCV_PREFIX ?= riscv64-unknown-elf-

The path to the RUN_TARGET is defined within the riscv-target Makefile.include.

To run the rv32i test suite on riscvOVPsim

make RISCV_TARGET=riscvOVPsim RISCV_DEVICE=rv32i

Accessing riscvOVPsim

As we create the RISCV.org compliance test suite, the Imperas developed riscvOVPsim compliance simulator is included as part of this GitHub repository. For more information please contact [email protected] or [email protected].

For more information on riscvOVPsim look here: riscv-ovpsim/README.md and here: riscv-ovpsim/doc/riscvOVPsim_User_Guide.pdf.

Using the simulators from the Sail RISC-V formal model

The Sail RISC-V formal model generates two simulators, in C and OCaml. They can be used as test targets for this compliance suite.

For this purpose, the Sail model needs to be checked out and built on the machine running the compliance suite. Follow the build instructions described the README for building the RV32 and RV64 models. Once built, please add $SAIL_RISCV/c_emulator and $SAIL_RISCV/ocaml_emulator to your path, where $SAIL_RISCV is the top-level directory containing the model.

To test the compliance of the C simulator for the current RV32 and RV64 tests, use

make RISCV_TARGET=sail-riscv-c all_variant

while the corresponding command for the OCaml simulator is

make RISCV_TARGET=sail-riscv-ocaml all_variant

Using the GRIFT simulator

The GRIFT formal model and simulation tool can be used as a test target for this compliance suite.

GRIFT needs to be cloned and built on the machine running the compliance suite. Follow the build instructions described in the README for building the GRIFT simulator. Once build, add the generated grift-sim executable to your path.

To test the compliance of the GRIFT simulator for the current RV32 and RV64 tests, use

make RISCV_TARGET=grift all_variant

Note that the I-MISALIGN_LDST test fails for GRIFT because GRIFT currently supports misaligned loads and stores in hardware, while the test is specifically written for systems that trap on misaligned loads and stores.

riscv-compliance's People

Contributors

jeremybennett avatar allenjbaum avatar eroom1966 avatar neelgala avatar debs-sifive avatar simon5656 avatar olofk avatar bluewww avatar jstraus59 avatar pmundkur avatar pdonahue-ventana avatar dsw avatar albaeda avatar felixonmars avatar imphil avatar hajekra avatar scottj97 avatar xiretza avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.