Skip to content
HI-RESTPublic

About

HFIM: fault injection for embedded processors on QEMU, gem5, OVP and real boards

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

HFIM, a HI-REST project

PyPI version Python versions MIT licence Manual Backends: QEMU, gem5, OVP, boards

HFIM (Fault-Injection Manager) is an automated framework for early reliability assessment of embedded microprocessors, both single-core and multicore. It runs a program, flips bits in registers, memory, caches or deeper hardware structures at chosen instants, and classifies what each fault did to the result. Campaigns run on QEMU, gem5 and OVP, or on a real board, and are reproducible from a seed.

A campaign file goes to the HFIM controller, which records a golden run, draws a seeded fault list and injects each fault into QEMU, gem5, OVP or a hardware board. Each run is classified as masked, sdc, detected, crash or timeout.

Quick start

You need Linux or macOS, Python 3.9 or newer, git and a running Docker. The PyPI package is hfim-cli; the command it installs is hfim.

With pipx (sudo apt install pipx or brew install pipx, then pipx ensurepath):

pipx install hfim-cli

Without pipx, in a virtual environment of its own (on Debian and Ubuntu this needs sudo apt install python3-venv). Current Debian, Ubuntu and Homebrew Pythons refuse a plain pip install outside one:

python3 -m venv ~/.hfim
~/.hfim/bin/pip install hfim-cli
echo 'export PATH="$HOME/.hfim/bin:$PATH"' >> ~/.bashrc    # ~/.zshrc on macOS; then open a new terminal

Then:

hfim init                                # pick a board template; installs its simulator and SDK
cd nezha-c906-qemu
hfim run campaigns/fibonacci/register.yaml
hfim report                              # HTML report of the latest campaign

hfim init lists the templates and asks for a folder; hfim init nezha-c906-qemu my-campaigns does the same without asking.

hfim doctor reports what the machine can run and the command for anything missing. The full walkthrough is in the manual.

What it can do

QEMU gem5 OVP Board
Registers, integer and float ✓ ✓ ✓ ✓
Memory: variable, section, address range, stack ✓ ✓ ✓ ✓
Caches: L1D, L1I, L2 data and tags, ECC check bits ✓
DRAM error models, DRAM ECC, NVM tag store ✓
Pipeline: ROB, LSQ, rename map, physical registers, branch predictor, TLB ✓
Coherence state, Ruby MSHR, TBE, directory and message buffers ✓
Time per injection 1 to 3 s 10 to 60 s about 3 s about 13 s

Fault models: single-bit flip, multi-bit, stuck-at-0 and stuck-at-1, permanent faults on gem5, and exact replay of a fault list from CSV. Every injection ends as masked, sdc, detected, crash or timeout. See fault targets, fault models and fault classification.

Examples

The RV64 QEMU starter includes a Fibonacci benchmark and a motor controller. The controller exchanges samples with a separate plant process that you can replace with your own model.

Documentation

  • Manual: install, configure and run campaigns, read the results
  • Backends and boards: what each simulator and board supports
  • Reference: every configuration key and output file
  • Server: an optional queue and worker fleet for campaigns too long for one machine

Contributing

See the contributor guide for setup and tests, or the extension guide to add a board, probe, model or connector. Report security issues as described in SECURITY.md.

Contributors

Licence and citation

HFIM's original software is available under the MIT License. Bundled components have their own third-party notices.

If you use HFIM in a publication, please cite HI-REST and include the release or commit you used.

HI-REST

About

HFIM: fault injection for embedded processors on QEMU, gem5, OVP and real boards

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages