Skip to main content

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

Metadata

Release files for hfim-cli 1.16.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hfim-cli 1.16.2
File Size Uploaded Provenance Actions
hfim_cli-1.16.2.tar.gz 1.2 MB Without provenance Details for hfim_cli-1.16.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hfim-cli 1.16.2
File Interpreter ABI Platform Actions
hfim_cli-1.16.2-py3-none-any.whl Python 3 none any Details for hfim_cli-1.16.2-py3-none-any.whl

Total release size: 2.1 MB

Release files / hfim_cli-1.16.2.tar.gz

Download URL hfim_cli-1.16.2.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
62559816733ca9d914a95b21a61654f396a9e2eb149badcc6224bb182b34d690
BLAKE2b-256 checksum
How to use checksums
405ded06d1f77f025dbac058ec7c74b9b000672a231fc55cae880e3508801209
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / hfim_cli-1.16.2-py3-none-any.whl

Download URL hfim_cli-1.16.2-py3-none-any.whl
Size 947.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e5fd43e3ba5cc1176ed3d4ab296444621cb9e3ed4904a98ce5bc842c164f31a
BLAKE2b-256 checksum
How to use checksums
6df3f09a2bc4be333f7b6c92e856aab5250cff50f3a9ff2b8f1f41f1011f8f9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Security for hfim-cli 1.16.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page