vrtlmod

vRTLmod modifies Verilator generated RTL simulation code for faul-injection purposes. It transforms source code with the help of LLVM/Clang-Tools and generates a fault injection API.

https://github.com/tum-ei-eda/vrtlmod

Science Score: 65.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
    Organization tum-ei-eda has institutional domain (www.eda.ei.tum.de)
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.3%) to scientific vocabulary

Keywords

clang fault-injection llvm register-transfer-level verilator
Last synced: 6 months ago · JSON representation ·

Repository

vRTLmod modifies Verilator generated RTL simulation code for faul-injection purposes. It transforms source code with the help of LLVM/Clang-Tools and generates a fault injection API.

Basic Info
  • Host: GitHub
  • Owner: tum-ei-eda
  • License: apache-2.0
  • Language: C++
  • Default Branch: master
  • Homepage:
  • Size: 601 KB
Statistics
  • Stars: 13
  • Watchers: 2
  • Forks: 5
  • Open Issues: 3
  • Releases: 0
Topics
clang fault-injection llvm register-transfer-level verilator
Created over 3 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.md

vRTLmod - Verilated RTL Injection modifier

Brief

The verilated RTL modifier (vRTLmod) is an LLVM based open-source tool to enable fault injection in verilator RTL (vRTL) simulations. Within an Clang-Frontend (LLVM) tool it automatically adds fault injection capability to Verilator output. Additionally, vRTLmod can make use of its own XML output *-vrtlmod.xml as a whitelist filter argument to allow manual steering of wanted/unwanted injectable variables.

Publication

If you use vRTLmod in your academic work you can cite it like this:

vRTLmod Publication

``` @inproceedings{Geier_vRTLmod_2023, author = {Geier, Johannes and Mueller-Gritschneder, Daniel}, booktitle = {Proceedings of the 20th ACM International Conference on Computing Frontiers}, doi = {10.1145/3587135.3591435}, pages = {387--388}, publisher = {Association for Computing Machinery}, series = {20th ACM International Conference on Computing Frontiers}, title = {{vRTLmod: An LLVM Based Open-Source Tool to Enable Fault Injection in Verilator RTL Simulations}}, url = {https://doi.org/10.1145/3587135.3591435}, year = {2023} } ```

Dependencies

Besides standard (gmake, cmake, gcc, ...)

  1. Verilator - tested with v4.202, v4.204, and v4.228 (see: https://www.veripool.org/wiki/verilator and install guide). Currently no support for Verilator version <4 and >4!
  2. LLVM - tested v13.0.1 built with -D LLVM_ENABLE_PROJECTS="clang;clang-tools-extra"
  3. Boost filesystem
  4. For Tests: Conan v<2.0, tested with 1.59.0 (pip install --force-reinstall "conan==1.59.0")

Build

  1. Required environment:

[BUILD]: export LLVM_DIR=<path/to/llvm/install/dir>/lib/cmake/llvm [BUILD]: export VERILATOR_ROOT=<path/to/verilator/build/or/install/directory>

  1. CMake command line arguments:

cmake -S . -B build -D LLVM_DIR=<path/to/llvm/install/dir> -D VERILATOR_ROOT=<path/to/verilator/build/or/install/directory> [-D BUILD_TESTING=Off] cmake --build build

Usage

  1. Required inputs:

    • Verilator output: <VRTL-files> <VRTL-Hpp-files>
  2. Execution:

vrtlmod [--systemc] [--wl-regxml=<*-vrtlmod.xml>] --out=<outputdir> <VRTL-Cpp-files> -- clang++ -I<VRTL-Hpp-dir> -I$LLVM_DIR/lib/clang/.../include -I$VERILATOR_ROOT/include [-I<path/to/systemc/include>]

or use installed vrtlmod-config.cmake in CMake environment.

The output can be found at <outputdir>/ in form of altered Cpp files (<vRTL-Cpp-files>) and the built injection API inside <outputdir>/ in the form of <top>_vrtlmodapi.{cpp,hpp} including the target dictionary and API wrapper.

Examples

The -D BUILD_TESTING=On option in cmake enables a SystemC and C++ verilate->vrtlmod flow for the test/fiapp/fiapp.sv SystemVerilog example. In addition, a SystemC (test/fiapp/sc_fiapp_test.cpp) and C++ (test/fiapp/fiapp_test.cpp) testbench showcases the usage of the generated fault injection API.

These tests are intended, both, as a form of unit-tests for vrtlmod as well as an example for its integration in other fault injection projects.

Owner

  • Name: EDA@TUM
  • Login: tum-ei-eda
  • Kind: organization
  • Email: eda@ei.tum.de
  • Location: Munich, Germany

Open Source Repository of the Chair of Electronic Design Automation, TU Munich

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Geier"
  given-names: "Johannes"
  orcid: "https://orcid.org/0000-0002-9439-3890"
title: "vrtlmod"
url: "https://github.com/tum-ei-eda/vrtlmod"
preferred-citation:
  type: conference-paper
  authors:
  - family-names: "Geier"
    given-names: "Johannes"
    orcid: "https://orcid.org/0000-0002-9439-3890"
  - family-names: "Mueller-Gritschneder"
    given-names: "Daniel"
    orcid: "https://orcid.org/0000-0003-0903-631X"
  year: "2023"
  title: "vRTLmod: An LLVM Based Open-Source Tool to Enable Fault Injection in Verilator RTL Simulations"
  start: "387"
  end: "388"
  doi: "10.1145/3587135.3591435"
  url: "https://doi.org/10.1145/3587135.3591435"
  publisher: "Association for Computing Machinery"
  address: "New York, NY, USA"
  conference: "20th ACM International Conference on Computing Frontiers"
  collection-doi: "10.1145/3587135"
  collection-title: "Proceedings of the 20th ACM International Conference on Computing Frontiers"
  collection-type: "proceedings"
  location: "Bologna, Italy"
  series: "CF '23"
  isbn: "9798400701405"

GitHub Events

Total
Last Year

Dependencies

.github/workflows/ci.yml actions
  • actions/cache v3 composite
  • actions/checkout v2 composite
  • actions/download-artifact v2 composite
  • actions/upload-artifact v2 composite