Component Technologies for Embedded Systems - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

Component Technologies for Embedded Systems

Description:

Component Technologies for Embedded Systems Johan Eker Ptolemy II A Software Laboratory The Caltrop Actor Language Component Technology Examples: Java beans, VB ... – PowerPoint PPT presentation

Number of Views:90
Avg rating:3.0/5.0
Slides: 21
Provided by: NewU229
Category:

less

Transcript and Presenter's Notes

Title: Component Technologies for Embedded Systems


1
Component Technologies for Embedded Systems
  • Johan Eker

2
Ptolemy IIA Software Laboratory
  • Ptolemy II
  • Actor based models
  • Implemented in Java
  • Graphical modeling and simulation environment
  • Multiple models of computation
  • Hierarchical heterogeneous models
  • Code generation

3
The Caltrop Actor Language
  • a language for writing dataflow actors.
  • It is designed as a domain-specific language.
  • It compiles against the Ptolemy API (Pt/Java).

4
Component Technology
  • Examples Java beans, VB-components, etc
  • Rationale
  • Encapsulation
  • Reuse
  • Divide complexity
  • Successful in many areas
  • Problems with concurrent components
  • Threads are not components
  • Priorities are global parameters
  • Difficult to design embedded systems component
    with state-of-the art technology

5
Multipurpose tools
  • Express almost anything, guarantee almost nothing
  • You only need to know one programming language
  • Quick starts, but sometimes slower endings
  • Programmerslanguage, a lifelong marriage
  • Examples
  • Java
  • C/C with RTOS, ADA, Modula-2
  • RMA EDF scheduling

6
Sharpen your tools
  • Use problem specific tools
  • Constrain the solutions
  • Choice of tools, a major design decision
  • Combine several tools

7
Hierarchical, Heterogeneous Modeling and Design
in Ptolemy II
Models of computation
8
Actor Interaction Semantics
9
Ptolemy II Basics
  • A model is a a set of interconnected actors and
    one director
  • Actor
  • Input output ports, states, parameters
  • Atomic or composite
  • Communicates using tokens
  • When it is fired it produces and consumes tokens

Ports
consumer
producer
actor
actor
10
Ptolemy II Basics
  • Director
  • Manages the data flow and the scheduling of the
    actors
  • The director fires the actors
  • Receiver
  • Defines the semantics of the port buffers
  • Models of Computation
  • Define the interaction semantics
  • Implemented in Ptolemy II by a domain
  • Director Receiver

11
Key Orthogonalizing the Concerns
  • Write your actors so that communication and
    scheduling can be factored out
  • Requires stylized Java and many informal
    contracts
  • Solution generate Java actors from a more
    abstract description such as Caltrop

Communication
Scheduling
Algorithm
12
Caltrop Actor Language
  • Imperative, but with a functional flavor
  • Ports, states, parameters actions
  • Operates on token streams
  • A1,2,3,..., B 1,2,3,... ÞC 2,4,6,...
  • Embedded in a host language

actor Add () double A, double B ? double C
action a, b ? c c a b end end

13
States
actor B () Double Input gt Double Output
Integer n 0 Double sum 0
action a gt sum / n n n 1
sum sum a end end
14
Multiple actions, action conditions
actor C () Double Input gt Double Output
action a gt a where a gt 0 end action a
gt -a where a lt 0 end end
actor D () Double Input gt Double Output
action a gt abs(a) end end
15
Port patterns
actor PairwiseSwap T () T Input gt T
Output action a, b gt b, a end end
  • examples
  • a, b, c
  • a, b, c s
  • s

16
Channel selectors
actor Switch T () multi T Data, Integer
Select gt T Output action a at i, i
gt a end end
17
Action tags, action selectors
actor FairMerge T () T Input1, T Input2
gt T Output A action a, gt a
end B action , a gt a end
selector (A B) end end
  • other selectors are conceivable, e.g.
  • (A B) (B A)
  • ( (A B) (B A) )

18
Caltrop implementationthe big picture.
parsing
source text
Caltrop
transformation,annotation
Caltrop AST
Caltrop(0)
code generation
target platform
Caltrop(1)
Caltrop(n)
split-phase CalCore
Ì
CalCore
Ptolemy II
Moses
Koala OS
Matlab/Pålsjö
DSP/FPGA
19
The Rest of Caltrop
  • Expressions are side effect free
  • Lambda, block and actor closures
  • Statements
  • foreach, while, if-then-else
  • Few built-in types list, map, set
  • Immutable variable no aliasing
  • Allows analysis
  • Deadlock, schedulability, memory consumption

20
Summary
  • Dont get it right, keep it right
  • Embedded system components
  • Realized in the Ptolemy II framework
  • Compiler is being developed at UCB
  • More information
  • Edward Lee Whats Ahead for Embedded
    Computing?, IEEE Computer, Sept. 2000
  • http//ptolemy.eecs.berkeley.edu
  • http//www.gigascale.org/caltrop
Write a Comment
User Comments (0)
About PowerShow.com