IT606 Embedded Systems Software - PowerPoint PPT Presentation

About This Presentation
Title:

IT606 Embedded Systems Software

Description:

end S. Ramesh / Kavi Arya / Krithi Ramamritham. Use of Broadcasting ... [ present O1 then emit O2 end. present O2 else emit O1 end. O2 is emitted if O1 is present ... – PowerPoint PPT presentation

Number of Views:38
Avg rating:3.0/5.0
Slides: 21
Provided by: dbph
Category:

less

Transcript and Presenter's Notes

Title: IT606 Embedded Systems Software


1
IT-606Embedded Systems(Software)
  • S. Ramesh
  • Kavi Arya
  • Krithi Ramamritham
  • KReSIT/ IIT Bombay

2
Esterel Advanced Features
  • S. Ramesh

3
Multiform notion of time
  • Belt Controller Specification
  • " Five seconds after the key is turned on, if the
  • belt has not been fastened, an alarm will beep
    for five seconds or until the key is turned off"

4
Declaration
  • module belt_control
  • input reset, key_on, key_off, belt_on, end_5,
  • end_10
  • output alarm(boolean), start_timer

5
Module body
  • loop
  • abort
  • emit alarm(false)
  • every key_on do
  • abort
  • emit start_timer await end_5
  • emit alarm(true) await end_10
  • when key_off or belt_on
  • emit alarm(false)
  • end
  • when reset
  • end

6
  • module timer
  • constant count_5 integer
  • input msec, start_timer
  • output end_5, end_10
  • every start_timer do
  • await count_5 msec
  • emit end_5
  • await count_5 msec
  • emit end_10
  • end .

7
Instantaneous dialogue
  • module inst_dialogue
  • input I
  • output S
  • signal Q, Y in
  • await tick
  • present I then emit Q end
  • present Y then emit S end
  • ?
  • every Q do emit Y end
  • end module

8
  • Input I triggers local Q
  • Q triggers Y
  • Y triggers S
  • all happen instantaneously
  • in the same reaction

9
Another example
  • P emit are_u_ready
  • present I_am_ready then
  • emit success
  • stat1
  • else
  • emit fail
  • stat2

10
  • Q loop
  • do
  • loop
  • emit I_am_ready
  • each are_u_ready
  • stat3
  • upto change
  • do
  • stat4
  • upto change
  • end

11
Use of Broadcasting
  • Simplifies communication among concurrent modules
  • Sender does not wait for the receiver
  • Receiver does not care who the sender is
  • Essentially like a shared variable but without
    associated problems
  • Works because of synchrony hypothesis!
  • Other problems creep in, of course!

12
Causality Problems
  • Non-reactive
  • signal S in
  • present S then
  • nothing
  • else
  • emit S
  • end
  • end
  • What is the behavior of this program?
  • S is present iff it is not present

13
Nondeterminism
  • signal S in
  • present S then
  • emit S
  • else
  • nothing
  • end
  • end
  • S is emitted and is present
  • or it is not emitted and it is not present
  • both status are possible!

14
Logical Correctness
  • A program is logically correct if it is
    deterministic and reactive.
  • Accepted programs should be logically correct
  • The above programs are not logically correct and
    rejected by the compiler
  • Some more additional restrictions
  • They have to be acyclic

15
Dependency Cycles
  • present O1 then emit O2 end
  • present O2 else emit O1 end
  • O2 is emitted if O1 is present
  • O1 is emitted if O2 is not present
  • cyclic dependency
  • rejected by the compiler!

16
More Acyclic programs
  • Is the following program logically correct?
  • input I
  • signal O1,O2 in
  • present I then
  • present O1 then emit O2 end
  • else
  • present O2 then emit O1 end
  • end
  • end

17
Cycles
  • What about this?
  • present O1 then emit O2
  • pause
  • present O2 then emit O1
  • They are accepted by the compiler!
  • Compile-time cycles does not matter
  • No run-time cycles allowed.
  • Programs should be Constructively causal

18
Constructive Causality
  • present O1 then emit O1 end
  • present O1 and not O2 then emit O2 end
  • logically correct program but rejected
  • It is not causal

19
O1 O1 O2 O1 and not O2
O1
O1 0 O1 1 ?
O2
20
Causality
  • present S then emit S else emit S
  • Is this equivalent to emit S?
  • The former is rejected!
  • The causality notion non trivial,
  • More restrictive than logical correctness
  • Status of local signals should have unique
  • values at every reaction step
  • Status determinable by a constructive
  • deduction process
Write a Comment
User Comments (0)
About PowerShow.com