RTE Configuration Exploration Techniques ECU - autosar
RTE Configuration Exploration Techniques ECU - autosar
RTE Configuration Exploration Techniques ECU - autosar
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>RTE</strong>-<strong>Configuration</strong>: Seamless <strong>Exploration</strong> <strong>Techniques</strong> for AUTOSAR <strong>ECU</strong>s<br />
1<br />
Presentation title l Author l Department l 13 February 2008 l Strictly confidential<br />
© ETAS GmbH 2008. All rights reserved. The names and designations used in this document are trademarks or brands belonging to their respective owners.
2<br />
Outline<br />
• Introduction<br />
• <strong>Exploration</strong> <strong>Techniques</strong><br />
• Conclusion<br />
Presentation title l Author l Department l 13 February 2008 l Strictly confidential<br />
© ETAS GmbH 2008. All rights reserved. The names and designations used in this document are trademarks or brands belonging to their respective owners.
3<br />
Model-Based-Design & Code-Generation<br />
Specification of<br />
Software Functions<br />
Simulation<br />
Simulation System<br />
Validation of<br />
Software Functions<br />
Rapid Prototyping<br />
Specification of<br />
Software Functions<br />
Validation of<br />
Software Functions<br />
Experiment Hardware<br />
Design & Implementation<br />
of Software Functions<br />
• One control-algorithm model is used for<br />
• PC-simulation with a vehicle-model<br />
• Rapid-Prototyping in the real vehicle<br />
• Automatic code-generation for the<br />
production <strong>ECU</strong><br />
Production Code<br />
Generation<br />
Electronic<br />
Control<br />
Unit<br />
Verification and Validation of<br />
Software Functions<br />
• To realize model-based design, tools like<br />
ASCET are based on<br />
• a meta-model<br />
• an execution scheme<br />
• ASCET Production code generator<br />
• has been used to generate code for<br />
more than 50 millions production<br />
vehicles<br />
• Is certifiable according IEC 61508 (fit for<br />
purpose)<br />
Presentation title l Author l Department l 13 February 2008 l Strictly confidential<br />
© ETAS GmbH 2008. All rights reserved. The names and designations used in this document are trademarks or brands belonging to their respective owners.
4<br />
AUTOSAR Concepts & Code-Generation<br />
Specification of<br />
Software Functions<br />
Simulation<br />
Simulation System<br />
Validation of<br />
Software Functions<br />
Rapid Prototyping<br />
Specification of<br />
Software Functions<br />
Validation of<br />
Software Functions<br />
Experiment Hardware<br />
• <strong>RTE</strong> configuration & codegeneration<br />
is of paramount<br />
importance<br />
Production Production Code Code<br />
Generation<br />
Generation<br />
Design & Implementation<br />
of Software Functions<br />
Electronic<br />
Control<br />
Unit<br />
• code-generation is state-of-the-art<br />
• What about appropriate <strong>RTE</strong>generation?<br />
Verification and Validation of<br />
Software Functions<br />
New<br />
concepts<br />
Industry-wide<br />
consolidation<br />
of ‚existing‘<br />
basic software<br />
designs<br />
Presentation title l Author l Department l 13 February 2008 l Strictly confidential<br />
© ETAS GmbH 2008. All rights reserved. The names and designations used in this document are trademarks or brands belonging to their respective owners.<br />
Memory<br />
Services<br />
Exchange<br />
Formats<br />
Input<br />
Templates<br />
Methodology<br />
Mode<br />
Management<br />
Diagnostics<br />
Meta Model<br />
Virtual Function<br />
Bus (VFB)<br />
RunTime<br />
Environment<br />
OS Kernel<br />
<strong>ECU</strong><br />
µController<br />
Abstraction<br />
Abstraction<br />
Drivers<br />
Network<br />
Management<br />
Gateway<br />
<strong>Configuration</strong><br />
Concept<br />
Bus systems<br />
Complex<br />
Drivers<br />
• AUTOSAR proposes new concepts<br />
like<br />
• Meta-model<br />
• VFB & <strong>RTE</strong><br />
• <strong>Configuration</strong> concepts<br />
• …<br />
Error<br />
Handling<br />
Comm.<br />
Services
5<br />
AUTOSAR Concepts & Code-Generation<br />
Specification of<br />
Software Functions<br />
Simulation<br />
Simulation System<br />
Validation of<br />
Software Functions<br />
Rapid Prototyping<br />
Specification of<br />
Software Functions<br />
Validation of<br />
Software Functions<br />
Experiment Hardware<br />
Production Production Code Code<br />
Generation<br />
Generation<br />
Design & Implementation<br />
of Software Functions<br />
Electronic<br />
Control<br />
Unit<br />
Verification and Validation of<br />
Software Functions<br />
• On the one hand, evaluation projects * have shown that model-based<br />
designed control-algorithms can easily be mapped to a <strong>RTE</strong>-based<br />
software architecture<br />
• On the other hand, there are a lot of <strong>RTE</strong>-configuration possibilities.<br />
• Since <strong>RTE</strong>-configuration is interrelated with control-algorithm<br />
modeling, re-modeling of the control-algorithm can improve <strong>RTE</strong>performance<br />
of an <strong>ECU</strong>.<br />
* example shown on the 5 th PM-Conference<br />
Presentation title l Author l Department l 13 February 2008 l Strictly confidential<br />
© ETAS GmbH 2008. All rights reserved. The names and designations used in this document are trademarks or brands belonging to their respective owners.
6<br />
Outline<br />
• Introduction<br />
• <strong>Exploration</strong> <strong>Techniques</strong><br />
• Conclusion<br />
Presentation title l Author l Department l 13 February 2008 l Strictly confidential<br />
© ETAS GmbH 2008. All rights reserved. The names and designations used in this document are trademarks or brands belonging to their respective owners.
7<br />
<strong>RTE</strong>-<strong>Configuration</strong> <strong>Exploration</strong> Approaches<br />
a<br />
b<br />
<strong>Exploration</strong> Type A <strong>Exploration</strong> Type B<br />
SWC<br />
Runnable<br />
Entity<br />
Resource Consumption of<br />
a Runnable Entity<br />
x<br />
y<br />
• For exploration types A and B two different exploration approaches<br />
can be used<br />
1. Analytical: Toolsupport - ASCET, i-SOLAR, aiT, SymTA/S<br />
2. Measurement: Toolsupport - ASCET, i-SOLAR, RTA-Trace<br />
Presentation title l Author l Department l 13 February 2008 l Strictly confidential<br />
© ETAS GmbH 2008. All rights reserved. The names and designations used in this document are trademarks or brands belonging to their respective owners.<br />
AUTOSAR<br />
SW-C<br />
1<br />
<strong>ECU</strong> I<br />
<strong>RTE</strong><br />
Basic<br />
Software<br />
AUTOSAR<br />
SW-C<br />
3<br />
<strong>ECU</strong> II<br />
AUTOSAR<br />
SW-C<br />
2<br />
<strong>RTE</strong><br />
Basic<br />
Software<br />
...<br />
Gateway<br />
<strong>ECU</strong> m<br />
AUTOSAR<br />
SW-C<br />
n<br />
<strong>RTE</strong><br />
Basic<br />
Software<br />
Signal Delay of several<br />
scheduled SW-Components
8<br />
Simple Example of <strong>RTE</strong>-<strong>Configuration</strong> (ASCET V6.0)<br />
• Simple-Control-Algorithm<br />
a<br />
• Different <strong>RTE</strong>-<strong>Configuration</strong><br />
b<br />
c<br />
• AUTOSAR Software Component<br />
SimpleSWC<br />
Implicit Communication Explicit Communication<br />
Presentation title l Author l Department l 13 February 2008 l Strictly confidential<br />
© ETAS GmbH 2008. All rights reserved. The names and designations used in this document are trademarks or brands belonging to their respective owners.<br />
a<br />
b:=a*(a+1)<br />
c:=a+1<br />
b<br />
c
9<br />
Result of Code-Generation<br />
• Generated C-Code (ASCET V6.0)<br />
• 3x read from “a”<br />
Implicit Communication Explicit Communication<br />
• 1x write to “b” and “c” each<br />
• 1x read von “a” to local variable<br />
• 1x write to “b” and “c” each<br />
Presentation title l Author l Department l 13 February 2008 l Strictly confidential<br />
© ETAS GmbH 2008. All rights reserved. The names and designations used in this document are trademarks or brands belonging to their respective owners.<br />
a<br />
SimpleSWC<br />
b:=a*(a+1)<br />
c:=a+1<br />
b<br />
c
Analytical <strong>Exploration</strong> of <strong>RTE</strong>-<strong>Configuration</strong><br />
• Analysis of execution time & stack consumption (AbsInt aiT & StackAnalyzer)<br />
• Requires target code-generation of runnable-entities (ASCET)<br />
• <strong>RTE</strong>-configuration in contract-phase (RTA-<strong>RTE</strong>)<br />
10<br />
Implicit Communication Explicit Communication<br />
Call Graph and WCET (aiT) Call Graph and WCET (aiT)<br />
• Execution time: 1650 cycles (33 us) (WCET)<br />
• Stack: 0 byte User Stack<br />
• Execution time: 1598 cycles (31 us 950 ns)<br />
(WCET)<br />
• Stack: 8 byte User Stack by local variable (8<br />
byte)<br />
Presentation title l Author l Department l 13 February 2008 l Strictly confidential<br />
© ETAS GmbH 2008. All rights reserved. The names and designations used in this document are trademarks or brands belonging to their respective owners.<br />
a<br />
SimpleSWC<br />
b:=a*(a+1)<br />
c:=a+1<br />
b<br />
c
<strong>Exploration</strong> of <strong>RTE</strong>-<strong>Configuration</strong> by Measurement<br />
• Measurement of execution time & stack consumption (RTA-Trace)<br />
• Requires target code-generation and <strong>ECU</strong>-integration (ASCET, i-SOLAR)<br />
• <strong>RTE</strong>-configuration in <strong>RTE</strong>-phase<br />
11<br />
Implicit Communication Explicit Communication<br />
Measured Exectution Time<br />
(RTA-Trace)<br />
• Execution time: 26 us 340 ns<br />
• Resource consumption at the beginning of task<br />
execution<br />
• Interrupt locking before execution of runnables<br />
• No additional stack per runnable.<br />
Measured Execution Time<br />
(RTA-Trace)<br />
• Execution time: 25 us 980 ns<br />
• No additional resource consumption at the<br />
beginning of task execution<br />
• Additional stack-consumption (8 byte)<br />
• Interrupt locking during atomic data-access<br />
within the <strong>RTE</strong><br />
Presentation title l Author l Department l 13 February 2008 l Strictly confidential<br />
© ETAS GmbH 2008. All rights reserved. The names and designations used in this document are trademarks or brands belonging to their respective owners.<br />
a<br />
SimpleSWC<br />
b:=a*(a+1)<br />
c:=a+1<br />
b<br />
c
Analytical <strong>Exploration</strong> of <strong>RTE</strong>-<strong>Configuration</strong><br />
• Analytical schedule validation<br />
• Response-times of OS-tasks and network messages<br />
• Response-times of signal-path<br />
• Identification of bottlenecks<br />
12<br />
SWC1<br />
<strong>ECU</strong><br />
<strong>RTE</strong><br />
Basic<br />
Software<br />
SWC2<br />
Scheduling-Analysis (SymTA/S)<br />
Presentation title l Author l Department l 13 February 2008 l Strictly confidential<br />
© ETAS GmbH 2008. All rights reserved. The names and designations used in this document are trademarks or brands belonging to their respective owners.<br />
SWC1<br />
<strong>ECU</strong><br />
<strong>RTE</strong><br />
SWC2<br />
Basic Software
<strong>Exploration</strong> of <strong>RTE</strong>-<strong>Configuration</strong> by Measurement<br />
• Measured schedule validation<br />
• Execution time<br />
• Stack consumption<br />
• Correct Integration<br />
• Optimization<br />
13<br />
SWC1<br />
<strong>ECU</strong><br />
<strong>RTE</strong><br />
Basic<br />
Software<br />
SWC2<br />
Measurement of Execution-time (RTA-TRACE)<br />
Presentation title l Author l Department l 13 February 2008 l Strictly confidential<br />
© ETAS GmbH 2008. All rights reserved. The names and designations used in this document are trademarks or brands belonging to their respective owners.<br />
SWC1<br />
<strong>ECU</strong><br />
<strong>RTE</strong><br />
SWC2<br />
Basic Software
<strong>ECU</strong> Integration: Runnable to Task-Mapping (Execution Time)<br />
14<br />
Task Execution Time Consumption<br />
0<br />
1<br />
Switch from<br />
Explicit to Implicit<br />
Communication<br />
Number of Runnable Entities per Task<br />
• Typically, a runnable entity has <strong>RTE</strong> data-access via its port-prototypes.<br />
• <strong>RTE</strong> updates the original data value in its buffer.<br />
• <strong>RTE</strong> copies data to runnable buffer (explicit) or task-buffer (implicit)<br />
• <strong>RTE</strong> updates task buffer update once at start of the task (implicit),<br />
• Runnable buffer update occurs at every read access (explicit), sometimes even<br />
of the same data-element in different runnable entities of the same task.<br />
Presentation title l Author l Department l 13 February 2008 l Strictly confidential<br />
© ETAS GmbH 2008. All rights reserved. The names and designations used in this document are trademarks or brands belonging to their respective owners.<br />
Explicit Communication<br />
Implicit Communication
<strong>ECU</strong> Integration: Runnable to Task-Mapping (Memory Consumption)<br />
15<br />
0<br />
Memory Consumption<br />
1<br />
Implicit: sizeof(Task-Buffer) = ∑(DataElementPrototypes per Runnable)<br />
Explicit: sizeof(RunnableStak) = max(DataElemenProtoypes per Runnable)<br />
Switch from<br />
Explicit to Implicit<br />
Communication?<br />
Implicit Communication<br />
Explicit Communication<br />
Number of Runnable Entities per Task<br />
• Typically, a runnable entity has <strong>RTE</strong> data-access via its port-prototypes.<br />
• The task buffer (RAM) grows with the number of runnable entities (implicit).<br />
• It is unlikely that one runnable needs access to all data-elements of all<br />
runnable entities mapped to that task (Stack).<br />
Presentation title l Author l Department l 13 February 2008 l Strictly confidential<br />
© ETAS GmbH 2008. All rights reserved. The names and designations used in this document are trademarks or brands belonging to their respective owners.
<strong>RTE</strong>-<strong>Configuration</strong> <strong>Exploration</strong> <strong>Techniques</strong> at one Glance<br />
16<br />
Ad-hoc solution <strong>RTE</strong> solution I <strong>RTE</strong> solution II<br />
• Analytical resource analysis for atomic software components<br />
explore the internal structuring of runnable entities.<br />
• Analytical schedule analysis gives feedback on valid data-flows.<br />
• Analytical resource analysis of integrated <strong>ECU</strong>s gives feedback on<br />
the <strong>RTE</strong>-communication mechanism.<br />
• Measurement & Tracing of integrated <strong>ECU</strong>s provide mean resource<br />
consumption values, but <strong>RTE</strong>-configuration exploration is more<br />
difficult.<br />
Presentation title l Author l Department l 13 February 2008 l Strictly confidential<br />
© ETAS GmbH 2008. All rights reserved. The names and designations used in this document are trademarks or brands belonging to their respective owners.
Outline<br />
17<br />
• Introduction<br />
• <strong>Exploration</strong> <strong>Techniques</strong><br />
• Conclusion<br />
Presentation title l Author l Department l 13 February 2008 l Strictly confidential<br />
© ETAS GmbH 2008. All rights reserved. The names and designations used in this document are trademarks or brands belonging to their respective owners.
Conclusion<br />
• ASCET allows an easy migration of hierarchal structured control<br />
algorithms to AUTOSAR software components in an ad-hoc manner as<br />
well as in an optimized way.<br />
• To reveal optimization opportunities exploration of the <strong>RTE</strong>configuration<br />
is necessary.<br />
• <strong>RTE</strong>-<strong>Configuration</strong>s can be easily explored by coupling of ASCET with<br />
RTA-<strong>RTE</strong>, aiT, SymTA/S and RTA-TRACE.<br />
• Timing Annotations as currently developed in the Timing-Team of WP<br />
II-1.2 will facilitate tool-supported <strong>RTE</strong>-configuration exploration<br />
further.<br />
• As a result, AUTOSAR <strong>ECU</strong>s will run optimized <strong>RTE</strong>s with validated OSschedules<br />
18<br />
Presentation title l Author l Department l 13 February 2008 l Strictly confidential<br />
© ETAS GmbH 2008. All rights reserved. The names and designations used in this document are trademarks or brands belonging to their respective owners.