Compiling ESTEREL circuits into finite states machines - PowerPoint PPT Presentation

About This Presentation
Title:

Compiling ESTEREL circuits into finite states machines

Description:

Stage de DEA d'Informatique 1998/1999. Esterel constructive semantics ... Inputs are sorted upon the number of reachable registers ... – PowerPoint PPT presentation

Number of Views:21
Avg rating:3.0/5.0
Slides: 69
Provided by: yanni5
Category:

less

Transcript and Presenter's Notes

Title: Compiling ESTEREL circuits into finite states machines


1
Compiling ESTEREL circuitsinto finite states
machines
BRES Yannis Stage de DEA dInformatique 1998/1999
2
Esterel constructive semantics
Gives, for each statement p
, provided an initial environment E
A new environment E
A completion code k (terminated, paused or trap
exit level)
A derivative statement p, to be executed on next
step
E
k
,
p
p
E
3
Circuit compilation
Thus, each statement p of the language can be
compiled into a circuit
E are wires indicating present signals
E are wires indicating emitted signals
k indicates which completing code wire will be on
p is a another circuit activated by k wire
4
Generated circuits
Directed graphs
logical gates (and, or, not, )
registers (memory elements)
wires
5
Example of circuit
abort sustain O when I
6
Circuits vs. automata
Circuits are roughly linear while automata are
exponential
? No automata for big circuits
Up to medium-sized circuits
Automata are faster (run-time minimal)
Control flow computed at compile-time
? Only input/test dependent stuff remain at
run-time
Ex Motorola measures maximal application speed
7
Current compilation chain
8
Future compilation chain
Esterel source
.strl
.strl
.strl
strlic
strlic
strlic
intermediate code
.ic
.ic
.ic
iclc
linked code
.lc
lcsc
circuit code
.sc
automaton code
.oc
9
SSCOC automaton generation
Circuit is seen like a set of boolean equations
To be evaluated, equations must be sorted (?.ssc)
Sorting fails on several kind of cyclic circuits !
Code unmaintained...
10
SCOC automaton compilation
Algorithm follows electrical current
new informations (hot) propagated informations
(cold)
11
SCOC automaton compilation
Building initial state
Propagating registers
new informations (hot) propagated informations
(cold)
12
SCOC automaton compilation
Building initial state
Propagating registers
new informations (hot) propagated informations
(cold)
13
SCOC automaton compilation
Building initial state
Propagating registers
new informations (hot) propagated informations
(cold)
14
SCOC automaton compilation
Building initial state
Propagating registers
new informations (hot) propagated informations
(cold)
15
SCOC automaton compilation
Building initial state
Propagating registers
new informations (hot) propagated informations
(cold)
16
SCOC automaton compilation
Building initial state
Propagating registers
new informations (hot) propagated informations
(cold)
17
SCOC automaton compilation
Building initial state
Propagating registers
new informations (hot) propagated informations
(cold)
18
SCOC automaton compilation
Building initial state
Propagating registers
new informations (hot) propagated informations
(cold)
19
SCOC automaton compilation
Building initial state
Propagating registers
new informations (hot) propagated informations
(cold)
20
SCOC automaton compilation
Building initial state
Propagating registers
new informations (hot) propagated informations
(cold)
21
SCOC automaton compilation
Initial state built
new informations (hot) propagated informations
(cold)
22
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
23
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
24
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
Propagating registers
25
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
Propagating registers
26
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
Propagating registers
27
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
Propagating registers
28
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
Propagating registers
Forking on input signal I
29
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
Propagating registers
Forking on input signal I
Building branch where I is present
30
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
Propagating registers
Forking on input signal I
Building branch where I is present
31
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
Propagating registers
Forking on input signal I
Building branch where I is present
32
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
Propagating registers
Forking on input signal I
Building branch where I is present
33
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
Propagating registers
Forking on input signal I
Building branch where I is present
34
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
Propagating registers
Forking on input signal I
Building branch where I is present
35
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
Propagating registers
Forking on input signal I
Building branch where I is present
36
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
Propagating registers
Forking on input signal I
Building branch where I is present
37
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
Propagating registers
Forking on input signal I
Building branch where I is present
Final state reached
38
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
Propagating registers
Forking on input signal I
Building branch where I is present
Building branch where I is absent
39
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
Propagating registers
Forking on input signal I
Building branch where I is present
Building branch where I is absent
40
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
Propagating registers
Forking on input signal I
Building branch where I is present
Building branch where I is absent
41
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
Propagating registers
Forking on input signal I
Building branch where I is present
Building branch where I is absent
42
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
Propagating registers
Forking on input signal I
Building branch where I is present
Building branch where I is absent
43
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
Propagating registers
Forking on input signal I
Building branch where I is present
Building branch where I is absent
44
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
Propagating registers
Forking on input signal I
Building branch where I is present
Building branch where I is absent
45
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
Propagating registers
Forking on input signal I
Building branch where I is present
Building branch where I is absent
46
SCOC automaton compilation
Initial state built
Building state 1
new informations (hot) propagated informations
(cold)
Loading registers values
Propagating registers
Forking on input signal I
Building branch where I is present
Building branch where I is absent
State 1 reached again
47
Circuit saving and restoring
To avoid saving the whole circuit at each step of
automata building
Restoration data are stored in a stack of stacks
48
Circuit saving and restoring
To avoid saving the whole circuit at each step of
automata building
Restoration data are stored in a stack of stacks
49
Circuit saving and restoring
To avoid saving the whole circuit at each step of
automata building
Restoration data are stored in a stack of stacks
50
Circuit saving and restoring
To avoid saving the whole circuit at each step of
automata building
Restoration data are stored in a stack of stacks
51
Circuit saving and restoring
To avoid saving the whole circuit at each step of
automata building
Restoration data are stored in a stack of stacks
52
Circuit saving and restoring
To avoid saving the whole circuit at each step of
automata building
Restoration data are stored in a stack of stacks
53
Circuit saving and restoring
To avoid saving the whole circuit at each step of
automata building
Restoration data are stored in a stack of stacks
54
Circuit saving and restoring
To avoid saving the whole circuit at each step of
automata building
Restoration data are stored in a stack of stacks
55
Signal relations processing
Stored in a directed graph
Example
3 ? 2
2 ? 1
1 4 5
56
Signal relations processing
Stored in a directed graph
Example
3 ? 2
2 ? 1
1 4 5
57
Signal relations processing
Stored in a directed graph
Example
3 ? 2
2 ? 1
1 4 5
58
Signal relations processing
Stored in a directed graph
Example
3 ? 2
2 ? 1
1 4 5
59
Signal relations processing
Stored in a directed graph
Example
3 ? 2
2 ? 1
1 4 5
60
Signal relations processing
Stored in a directed graph
Example
3 ? 2
2 ? 1
1 4 5
61
Signal relations processing
Stored in a directed graph
Example
3 ? 2
2 ? 1
1 4 5
62
Signal relations processing
Stored in a directed graph
Example
3 ? 2
2 ? 1
1 4 5
63
Smart circuit evaluation
Circuit evaluation algorithm stops as soon as all
required nets are stabilized
Registers (determine next state)
K0/K1 (determine whether automaton has terminated)
Output signals
Action nets (side-effects operating on values)
64
Input partitionning
Depending on current state, parts of the circuit
are disabled
After registers propagation
Inputs reachable from required nets will be
processed first
Other inputs will probably not be processed at all
65
Input sorting
Example bus arbiter
Set of cells requesting the access to a data bus
Cells have rotating priorities
66
Input sorting
Inputs are sorted upon the number of reachable
registers
This turns transitions from full trees (2n-sized)
to combs (n-sized)
67
DAG sharing
Goals
Saving memory
Emphazing semantic aspects
present A emit A' end present
present B emit B' end present
68
Performance comparison
Write a Comment
User Comments (0)
About PowerShow.com