Static Timing Analysis in Thrint for Software Thread Integration PowerPoint PPT Presentation

presentation player overlay
1 / 27
About This Presentation
Transcript and Presenter's Notes

Title: Static Timing Analysis in Thrint for Software Thread Integration


1
Static Timing Analysis in Thrint for Software
Thread Integration
  • By Allen Cheng
  • Advisor Dr. Alexander Dean
  • Dept. of Electrical Computer Engineering
  • North Carolina State University

2
Research Objective
  • Add Static Timing Analysis (STA) of guest threads
    to the research compiler Thrint, our tool for
    Software Thread Integration (STI)

3
Research Specifications
  • My research is to write a software module in C,
    which will perform static timing analysis of a
    guest thread and create a histogram describing
    the idle time present in the thread.
  • Gnu C is the source code compiler.
  • Sun Workshop is the developing environment.
  • GnuPlot is used to generate the idle time
    histogram plot.

4
Overview
  • HSM - Hardware to Software Migration
  • STI - Software Thread Integration
  • CDG - Control Dependence Graph
  • Thrint - A research compiler for STI
  • STA - Static Timing Analysis

5
Hardware to Software Migration (HSM)
  • It is a common approach in Embedded System
    industry which uses software functions on a
    conventional CPU to replace hardware components

6
Why is HSM useful?
  • (1) Less hardware makes it easier to meet
    embedded system requirements
  • Cheaper
  • Smaller
  • Lighter
  • Easier parts sourcing
  • (2) More high-level software simplifies
    development
  • Easier development
  • Less brittle code, easier to maintain
  • Better function availability
  • Easier upgrade

7
How is HSM done?
  • (1) Interrupt-Driven
  • Context-switch time cuts efficiency and max
    frequency
  • Interrupts create timing jitter

8
How is HSM done? cont.
  • (2) Busy-Waiting
  • No other work performed - monopolize CPU
  • Must schedule by hand - tedious and error-prone

9
How is HSM done? cont.
  • (3) Software Thread Integration (STI)
  • Useful work done in idle time
  • Compiler can integrate threads automatically
  • The BEST one!

10
Software Thread Integration(STI)
11
What is STI?
  • It is an a revolutionary technology invented by
    Dr. Alexander Dean when he was a Ph.D. student in
    Carnegie Mellon University
  • STI shares CPU efficiently by running multiple
    threads in parallel on generic CPU without
    hardware support

12
Why is STI helpful?
  • Automation! Software Thread Integration uses a
  • compiler to interleave multiple program threads
    for
  • concurrent operation on generic microcontrollers
  • This makes Application Engineers job easier
  • (1) Tool analyzes and transforms code as needed
    to
  • meet real-time requirements
  • (2) AEs become much more efficient and can
  • create more sophisticated subsystems
  • This creates quality code - Efficient code which
    meets real-time requirements

13
Types of STI
  • (1) Thread-Level Basic STI
  • Set of transforms which interleave code freely
    and efficiently
  • Can trade off code size for execution efficiency
  • (2) System-Level STI for HSM
  • Choosing guests - finding idle time
  • Choosing hosts - finding temporal determinism
  • Matching threads to integrate predicting system
    efficiency and performance
  • Triggering guests depend on latency and
    resources

14
How is STI done?
  • STI uses a hierarchical code representation
  • Control Dependence Graph (CDG) which..
  • Simplifies code motion, which...
  • Provides cheap concurrency, which...
  • Helps software replace hardware
  • Our research compiler Thrint analyzes
  • and transforms assembly code using CDGs

15
Thread Representation - CDG
  • CDGs hierarchical structure simplifies
    integration
  • Vertical is conditional nesting
  • Horizontal is execution order
  • There is summary information at each level

16
Guest Events
  • Single Events Code and Predicate nodes
  • Looping Event Loop node

17
Types of Guest Events
  • Explicit Guests (bright yellow) - Guests
    annotated by Thrint according to integration
    directive files
  • Implicit Guests (pale yellow) - Rest of the
    guests not annotated by Thrint

18
What is Thrint ?
  • Thrint is our research compiler, which performs
    software transformations driven by Static Timing
    Analysis (STA) to implement Hardware to Software
    Migration (HSM) using Software Thread Integration
    (STI).

19
Thrint for STI
  • Thrint tool operates on CDGs of host, guest
    threads
  • It annotates host with execution time predictions
  • It then moves guest code into host, enforcing
    control, data, time dependencies
  • It finds gap, or else descends into subgraph

20
Thrint and its tool chain
21
Thrints program flow
22
Static Timing Analysis (STA)
  • This analysis allows the compiler Thrint to
    automatically determine the distribution of idle
    time within guest threads
  • Thrint then uses this idle time information to
    identify good threads to integrate

23
How is STA done?
  • Identify Explicit Guests
  • Calculate wasted idle time between two Explicit
    Guests
  • Subtract any execution time of Implicit Guests in
    between
  • Store the final idle time into a list
  • Plot the idle time in histogram using GnuPlot

24
1. Identify Guest Threads
25
2. Calculate the Idle Time
26
3. Store the Idle Time in list
27
4. Visualize the stored Idle Time with histogram
plot
Write a Comment
User Comments (0)
About PowerShow.com