Giter VIP home page Giter VIP logo

iclib's Introduction

ICLIB: a library for Reactive Intermittent Computing

Library, build system and examples for three flavours of reactive intermittent computing:

  • QuickRecall
  • AllocatedState
  • ManagedState

QuickRecall is the simplest method, where all data resides in non-volatile memory (FRAM). When a power failure is detected, the device saves CPU registers and sleeps. Although simple, this method results in very high power consumption during on-periods, because accesses to FRAM are far more expensive than those to SRAM.

AllocatedState allocates data to SRAM to lower power consumption, and must therefore load the .data and .bss sections, as well as the stack, from FRAM to SRAM during boot, and likewise save them to FRAM when power fails. Although improving power consumption during the on-period, loading and saving the entire allocated state can get quite expensive.

ManagedState improves on AllocatedState by tracking active and modified pages of memory, so that only active pages need to be loaded during boot, and only modified pages need to be saved when power fails. This can substantially reduce energy consumption and thereby improve performance over the two other methods.

ManagedState was presented in an academic paper,

"Efficient State Retention through Paged Memory Management for Reactive Transient Computing",
Sivert T. Sliper, Domenico Balsamo, Nikos Nikoleris, William Wang, Alex S. Weddell and Geoff V. Merrett,
IEEE Design Automation Conference (DAC 56), Las Vegas, 2019

available at DOI 10.1145/3316781.3317812.

Targets

Currently, ICLIB supports the MSPFR5994 platform, and can readily be ported to other MSP430-based platforms. Support for Arm Cortex-M0 targets is under development.

Setup

Dependencies

The following dependencies are needed to build ICLIB:

Paths

Set environment variables MSP430_GCC_ROOT, that points to the toolchain directory, and MSP430_INC that points to the support file directory. This is done by e.g. adding the following two lines to your ~/.bashrc:

export MSP430_GCC_ROOT=<path/to/MSP430 GCC folder>
export MSP430_INC=<path/to/MSP430 support files>

Getting started

ICLIB is built using CMAKE. To build an application make a build directory, and call CMAKE with options to set the target platform.

cd iclib
mkdir build
cd build
cmake .. -DTARGET_ARCH=msp430

By default, CMAKE is set up to do a debug build, for benchmarking you should run the release build:

cmake .. -DTARGET_ARCH=msp430 -DCMAKE_BUILD_TYPE=Release

Then build an executable, for example aes using ManagedState:

make aes-MS-msp430

The syntax here is <app-icmethod-target>, where QR selects QuickRecall, AS selects AllocatedState, and MS selects ManagedState.

Finally, on supported platforms, you can upload the executable to the microcontroller using

make upload_aes-MS-msp430

Note that this uses mspdebug, and will only work on some setups (only tested on a laptop running Ubuntu 18.04).

iclib's People

Contributors

sivertism 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.