GithubHelp home page GithubHelp logo

jcmarsh / drseus-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chrec/drseus

0.0 1.0 0.0 2.9 MB

DrSEUs: Dynamic robust Single Event Upset simulator

Python 78.54% Shell 3.35% CSS 0.52% HTML 17.59%

drseus-1's Introduction

Copyright (c) 2018 NSF Center for Space, High-performance, and Resilient Computing (SHREC) University of Pittsburgh. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

DrSEUs

The Dynamic Robust Single Event Upset Simulator, Created by Dr. Ed Carlisle IV

Fault injection framework and application for performing CPU fault injection on:

  • P2020RDB (Using BDI3000 JTAG debugger)
  • ZedBoard (Using BDI3000 or Integrated JTAG debugger)
  • PYNQ (Using Integrated JTAG debugger)
  • Simics simulation of P2020RDB
  • Simics simulation of CoreTile Express A9x4 (Only two cores simulated)

Support for automatially power cycling devices is included using this device: https://dlidirect.com/products/web-power-switch-7

DrSEUs Terminology:

  • Campaign: contains gold execution run of target application without fault injections that is used for comparison with one or more iterations
  • Iteration: monitored execution run of target application with one or more injections
  • Injection: single bit flip of randomly selected register or TLB entry

Run drseus.py --help for usage information

Use arguments in files by prefixing with "@", for example: "drseus.py @conf/sample/p2020"

Example:

  • drseus.py new ppc_fi_2d_conv_fft_omp -s -a "lena.bmp out.bmp" -f lena.bmp -o out.bmp
    • Creates a Simics fault-injection campaign
    • Sends binary file "ppc_fi_2d_conv_fft_omp" and input file "lena.bmp" to the device under test
    • Runs "ppc_fi_2d_conv_fft_omp lena.bmp out.bmp" on the device under test
    • Checks for output file "out.bmp"
  • drseus.py inject -n 100 -p 8
    • Performs 100 injection iterations using 8 processes
  • drseus.py log

Before using DrSEUs for the first time, you must first run "scripts/install_dependencies.sh" then run "scripts/setup_environment.sh"

Adding support for new architectures:

  • Create a new debugger that extends jtag class (use src/jtag/bdi.py or src/jtag/openocd.py as a guide)
  • Define injection targets as json file (use src/targets/a9.json or src/targets/p2020.json as a guide)
    • Any modifications to the jtag.json or simics.json in src/targets/a9/ or src/targets/p2020/ requires running scripts/merge.py to regenerate src/targets/a9.json and src/targets/p2020.json as only these files are used by DrSEUs
    • If architecture does not require Simics or jtag specific behavior (e.g. only adding jtag support), only the top level "targets" dictionary is required to be defined
  • Modify _init_() in src/fault_injectory.py to use your new debugger class
  • In order to automatically detect USB devices, find_devices() in src/jtag/_init_.py will need to be modified to detect the corresponding VENDOR_ID and MODEL_ID
  • In order for DrSEUs to automatically spawn child processes for injecting on multiple hardware devices in parallel (without invoking drseus.py for each device), support must be added to injection_campaign() in src/utilities.py
  • Additional modifications for adding a new device to Simics:
    • Modify _init_() in src/simics/_init_.py to use the new board's name for the new architecture
    • Modify launch_simics() in src/simics/_init_.py to properly initialize the new device in Simics

Installation for Debian-based systems

* Run the install dependencies script
    ./scripts/install_dependencies.sh
    be sure to select no when prompted to install simics unless you have a license
* Run the setup environment script
    ./scripts/setup_environment
* Setup tftp server
    ./scripts/setup_tftp.sh
* Make sure you have a cross-compiler for your desired architecture
    e.g. arm-linux-gnueabihf-gcc/g++

drseus-1's People

Contributors

edc4 avatar ssroffe avatar

Watchers

James Cloos 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.