IBM/chiffre

Name: chiffre

Owner: International Business Machines

Description: A fault-injection framework using Chisel and FIRRTL

Created: 2018-01-30 16:45:57.0

Updated: 2018-05-09 22:22:53.0

Pushed: 2018-05-09 22:22:51.0

Homepage:

Size: 11568

Language: Scala

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Chained Hierarchical Injection for Fault Resiliency Evaluation (Chiffre)

This provides a framework for automatically instrumenting a hardware design with run-time configurable fault injectors. This relies on three major components:

Examples

There are currently two major usage classes: standalone injection and Rocket Chip-assisted injection.

In Standalone Injection you define and implement a fault injection controller, MyController, that manages a specific scan chain. You then annotate specific circuit components with the isFaulty method indicating which scan chain they belong to and what type of fault injector to use. An overall example of this is shown below.

rt chisel3._
rt chiffre._

 controller for injectors on the "main" scan chain */
s MyController extends Module with ChiffreController {
l io = IO(new Bundle{})
zy val scanId = "main"
 MyController body with scan chain logic not shown


 module with faulty components */
s MyModule extends Module with ChiffreInjectee {
l io = IO(new Bundle{})
l x = Reg(UInt(1.W))
l y = Reg(UInt(4.W))
l z = Reg(UInt(8.W))
Faulty(x, "main", classOf[inject.LfsrInjector32])
Faulty(y, "main", classOf[inject.StuckAt])
Faulty(z, "main", classOf[inject.CycleInjector32])

In Rocket-Chip Assisted Injection, the fault controller is a provided Rocket Custom Coprocessor (RoCC) called LeChiffre. This can then be used to orchestrate fault injection experiments in external components or inside Rocket itself. We provide an example patch that makes certain control and status registers (CSRs) in rocket fault injectable and a bare metal test program that makes sure this fault injection is working. You can build an emulator with the correct configuration using the following (note: this will clone the chiffre repository inside of your Rocket Chip clone directory):

clone https://github.com/freechipsproject/rocket-chip $ROCKETCHIP_DIR
ROCKETCHIP_DIR
clone https://github.com/ibm/chiffre chiffre
apply chiffre/patches/rocket-chip-fault-cycle.patch
mulator
 CONFIG=LeChiffreConfig ROCKETCHIP_ADDONS=chiffre

You can then run the test provided by chiffre/tests (instructions provided in that directory).


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.