GithubHelp home page GithubHelp logo

platin's Introduction

PLATIN toolset

This directory contains the PLATIN tools for manipulating, generating and transforming PML files.

Setup

Recommended

  • ./setup.sh
  • export PATH=<platin_dir>:$PATH

Alternative

  • ./install.sh -i <build_dir>
  • export PATH=<build_dir>/bin/:$PATH

Requirements

  • ruby 1.9 or newer (mandatory)
    • ruby 2.6.3 known to work
  • lpsolve
    • sudo aptitude install liblpsolve55-dev
  • Ubuntu/Debian specific
    • point LD_LIBRARY_PATH to the lpsolve library, e.g export LD_LIBRARY_PATH=/usr/lib/lp_solve:$LD_LIBRARY_PATH

Basic Usage

  • Compile test program

      echo 'volatile int out; __attribute__((noinline)) void f(int x) { int i; for(i = 0; i<1024;i++) out+=x; } ' > test.c
      echo 'int main() { f(3); f(5); return 0; }' >> test.c
      patmos-clang -Wall -mserialize=test.pml -mpreemit-bitcode=test.bc -o test test.c
    
  • Analyze using aiT

      platin wcet -i test.pml -b test --report
    
  • Analyze f() using platin-internal analyzer only

      platin wcet --analysis-entry f -i test.pml -b test --disable-ait --enable-wca --report
    
  • Enable analysis of the (dynamic) execution trace [for comparison]

      platin wcet --enable-trace-analysis  --trace-entry main --analysis-entry f -i test.pml -b test --enable-wca --report
    
  • Use flow facts from the (dynamic) execution trace [for early-stage development]

      platin wcet --use-trace-facts  --trace-entry main --analysis-entry f -i test.pml -b test --enable-wca --report
    

LLVM Options

CodeGen/Passes:

  • -mserialize=FILE
  • -mpreemit-bitcode=FILE
  • -mserialize-roots=LIST

Known Problems

  • tool chain problems
    • mrtc/whet -O0: Needs math libraries => problem with atan function

Demo of individual tools

MORE TO COME

Architectures

Notes for ARM (not up-to-date)

# Install ARM crosscompiler (Ubuntu)
#   sudo aptitude install gcc-arm-linux-gnueabi  libc6-dev-armel-cross
#
# Install ARM simulator (Ubuntu)
#   hg clone http://repo.gem5.org/gem5-stable
#   cd gem5-stable
#   emacs src/arch/arm/linux/process.cc # change linux version in line 69 to '2.6.35'
#   scons build/ARM/gem5.opt
#   GEM5_HOME=`pwd`

# Demo
# source = src/$1.c
mkdir -p bin out

# Compile using clang
patmos-clang -O1 -target arm-linux-gnueabi -marm -Xclang -backend-option -Xclang -mserialize=bin/$1.pml \
                 -c -o bin/$1.o  src/$1.c

# Link using arm-linux-gnueabi-gcc
arm-linux-gnueabi-gcc  -static bin/$1.o -o bin/$1.elf

# Simulate using GEM5
$GEM5_HOME/build/ARM/gem5.opt --debug-flags=Exec,-ExecMicro,ExecMacro --trace-file=$1.trace \
                              $GEM5_HOME/configs/example/se.py -c bin/$1.elf

# Analyze using platin (pseudo costs)
platin wcet --disable-ait --trace-file m5out/$1.trace --outdir out -b bin/$1.elf -i bin/$1.pml --report

platin's People

Contributors

noctux avatar visq avatar stettberger avatar stefanhepp avatar pzii avatar alexjordan avatar waegemann avatar dlp avatar praffeck avatar horscchtey avatar jeunes2 avatar emoun avatar us37itig avatar

Stargazers

Martin Schoeberl avatar

Watchers

 avatar Martin Schoeberl avatar  avatar  avatar Rasmus Bo Sørensen 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.