Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dieses Projekt wird von der EU kofinanziert. Die Mittel stammen aus dem Europäischen Fonds für Regionale Entwicklung (EFRE) Investition in Ihre Zukunft.

Similar presentations


Presentation on theme: "Dieses Projekt wird von der EU kofinanziert. Die Mittel stammen aus dem Europäischen Fonds für Regionale Entwicklung (EFRE) Investition in Ihre Zukunft."— Presentation transcript:

1 Dieses Projekt wird von der EU kofinanziert. Die Mittel stammen aus dem Europäischen Fonds für Regionale Entwicklung (EFRE) Investition in Ihre Zukunft www.temea.org TTCN-3 embedded The TTCN-3 Real Time Concepts proposed by TEMEA

2 www.temea.org Standardized Test Technology for the Automotive Industry TEMEA WP4: Test Methodology and Quality WP3: AUTOSAR Test Framework WP2: TTCN-3 embedded Concepts WP1: Automotive Requirements WP5: Case Study

3 www.temea.org Standardized Test Technology for the Automotive Industry TTCN-3 embedded Tasks TTCN-3 embedded for real time systems  TTCN-3 embedded for continuous behavior  TTCN-3 embedded hybrid behavior  Graphical presentation format for TTCN-3 embedded  Preparation for standardization 3

4 www.temea.org Real Time TTCN-3 Simple Real Time Scenario [t WAIT ] test component value check time check system under test (SUT) [t MAX ] time control stimulus - OUT_MSG_1 reaction - IN_MSG_1 stimulus - OUT_MSG_2 reaction - IN_MSG_2 timer t1,t2; p_out.send(OUT_MSG_1); t1.start(t_max); alt{ []p_in.receive(IN_MSG_1){setverdict(pass)}; []t1.timeout{setverdict(fail)} } t2.start(twait); t2.timeout; p_out.send(OUT_MSG_2); p_in.receive(IN_MSG_2); setverdict(pass);

5 www.temea.org But where is the Problem?  Time measurement in classic TTCN-3 is not directly related to communication events! 5 s_time snapshot(k) snapshot(k+1) t MAX r_time snapshot(k) snapshot(k+1) t WAIT s_time t WAIT s_time t WAIT s_time

6 www.temea.org Problem Summary  Snapshot semantics is not real time capable -affected by durations for decoding/matching etc. -snapshot intervals depend on implementation related issues and are hard to predict.  The notion of timer is not adequate/exact -not directly related to the communication but to the control flow inside the test system -originally introduced to catch mid-term or long-term timeouts but not intended to handle real time properties -not always intuitive 6

7 www.temea.org TTCN-3 embedded Time: Concepts & Representation  Test case related relative time -dedicated to denote time points -time progress starts with the beginning of test case execution -synchronized for dedicated components -represented by TTCN-3 type float -constants that ease the definition of time literals (e.g. second, millisecond, microsecond ) const float myTimeConst:= 123.0*millisecond;

8 www.temea.org TTCN-3 embedded Measurement of Time  … to retrieve the enqueue time of a message,  and time measurement at any place in the test 8 var float myTime:= now; // yields the actual time p.receive(t)-> timestamp myTime; // yields the reception time of a message

9 www.temea.org TTCN-3 embedded Verification of Time  Verification of enqueue time for incoming messages, procedure calls etc. 9 p.receive(t)-> timestamp timevar { if (timvar>max){setverdict(fail)} else {setverdict(pass)} };

10 www.temea.org TTCN-3 embedded Temporal Control  … at any place during test case execution,  and similar for message timing 10 wait(timepoint); p.send(t); wait(timepoint);

11 www.temea.org Real Time TTCN-3 Simple Real Time Scenario [t WAIT ] test component value check time check system under test (SUT) [t MAX ] time control stimulus - OUT_MSG_1 reaction - IN_MSG_1 stimulus - OUT_MSG_2 reaction - IN_MSG_2 timer t1,t2; p_out.send(OUT_MSG_1); t1.start(t_max); alt{ []p_in.receive(IN_MSG_1){setverdict(pass)}; []t1.timeout{setverdict(fail)} } t2.start(twait); t2.timeout; p_out.send(OUT_MSG_2); p_in.receive(IN_MSG_2); setverdict(pass); var float r_time,s_time; p_out.send(OUT_MSG_1); s_time:=now; p_in.receive(IN_MSG_1)-> timestamp r_time; if(r_time>s_time+tmax) setverdict(fail); wait(r_time+twait); p_out.send(OUT_MSG_2); p_in.receive(IN_MSG_2); setverdict(pass);

12 www.temea.org Use Case: Test of an Indicator Derived Interfaces 12 module IndicatorTest{ type enumerated IndicatorSwitchState { OFF, LEFT, RIGHT} type enumerated IndicatorSignal {OFF, ON} type port LeverPos message { out IndicatorSwitchState} type port IndicatorSignals message { in IndicatorSignal} type component IndicatorTestComponent { port IndicatorSignals RearOut, FrontOut; port LeverPos LeverIn}...

13 www.temea.org Use Case: Test of an Indicator Testing Temporal Properties 13  Maximum activation time 60 ms, phase length 600 ms  Synchronization between signals: distance < 5 ms

14 www.temea.org Use Case: Test of an Indicator Testing Activation of Indicator 14 testcase tc1( ) runs on IndicatorTestComponent{ var float l_actv, r_actv, f_actv; const float TMAX = 60*millisecond; activate(tc_timout); leverIn.send (LEFT); l_actv:= now; interleave{ [ ] FrontOut.receive(ON) -> timestamp f_actv; [ ] RearOut.receive(ON) -> timestamp r_actv; } if ((f_actv-l_actv > TMAX) or (f_actv-r_actv > TMAX)){setverdict(fail)} setverdict(pass); }

15 www.temea.org Use Case: Test of an Indicator Testing Signal Synchronization 15 testcase tc2( ) runs on IndicatorTestComponent{ var float r_actv, f_actv; const float TMAX = 5*millisecond; activate(tc_timout); leverIn.send (LEFT); interleave{ [ ] FrontOut.receive(ON) -> timestamp f_actv; [ ] RearOut.receive(ON) -> timestamp r_actv; } if (abs(r_actv-l_actv) > TMAX){setverdict(fail)} setverdict(pass); }

16 www.temea.org Open Issues  Synchronization of components  Semantics of wait statement: what happens when the time point to wait for has already passed? -enable decision by the user and allow him to apply setverdict(error) or setverdict(fail)  Use of now statement in guards alt{ [now<10.0] p.receive(m) } 16

17 www.temea.org Further Steps  TTCN-3 embedded continuous behavior – Syntax & Semantics (March 2008)  TTCN-3 embedded hybrid behavior – Syntax & Semantics (November 2009)  Graphical presentation format for TTCN-3 embedded (March 2010) 17

18 www.temea.org Contact and Info Jürgen Großmann Fraunhofer FOKUS Kaiserin-Augusta-Allee 31,10589 Berlin Tel: +49-30-3463-7390 juergen.grossmann@fokus.fraunhofer.de www.temea.org

19 TEMEA Goals  Testing discrete and continuous real time systems with TTCN-3 embedded.  Test support for the entire integration process.  Exchange of test definitions between -OEM and supplier -various test- and simulation platforms e.g. Model in the Loop (MIL) platforms, Software in the Loop (SIL) platforms, and Hardware in the Loop (HIL) platforms  Integration with model based development especially with AUTOSAR.  Analysis and improvements of test quality. 19 Test Specification Technology and Methodology for Embedded Real Time Systems in the Automobile


Download ppt "Dieses Projekt wird von der EU kofinanziert. Die Mittel stammen aus dem Europäischen Fonds für Regionale Entwicklung (EFRE) Investition in Ihre Zukunft."

Similar presentations


Ads by Google