260 likes | 432 Views
<<AutoComp>>. <<AutoComp>>. Sink. Sink. T = 40 ms. Valve Regulator. Power Supervison. Source. Diesel Valve. Desired Output level. Diesel Valve. Air Valve. Air Valve. CBSE Course. The SaveComp Component Technology. Vehicular Systems. Software Charateristics Safety Reliability
E N D
<<AutoComp>> <<AutoComp>> Sink Sink T = 40 ms Valve Regulator Power Supervison Source Diesel Valve Desired Output level Diesel Valve Air Valve Air Valve CBSE Course The SaveComp Component Technology
Vehicular Systems • Software Charateristics • Safety • Reliability • Resource efficiency • Predictability • Engineering Activities • Targeting non general System Architecture • Early Analysis • Modelling • Verification Mikael Åkerholm, CBSE Course 2005
Actuator Actuator Actuator Sensor Sensor Sensor Sensor Sensor Sensor ECU ECU ECU Example: The architecture of a car control system Infotaiment gateway (CAN) BUS brake injection Vehicle mechanics ECU – Electronic Control Unit
Actuator Actuator Sensor Sensor Sensor Sensor Local Control Functions Local Control Functions The architectural design challenge Vehicle stability Suspension Drive by wire …… Complex functions Basic functions How to implement complex functions based on local control functions?
Actuator … Actuator … Actuator 2 Actuator 3 Actuator 1 Sensor .. Sensor .. Sensor 3 Sensor 2 Sensor 1 Node … Node … Node 1 Node 2 Node 3 Problem: resource sharing Network resources Execution resources ++++++++++ ++++++++++ ++++++++++ Can functions of different criticality be allowed to share resources?
ECU ECU ECU SOFTWARE COMPONENTS Challenge – open and dependable platform Collision detection Antispin Global (complex) functions Cruise control Vehicle stability local Engine Control Local brake Control Transmission ……… sensors actuators Vehicle Applications Middleware Input/output drivers Hardware
C1 C2 Challenge – open and dependable platform Applications Middleware Input/output drivers Hardware ECU ECU ECU Requirements Separation of hw from SW development Separation of SW component development
Example: A task as a componentComponent-model used in REBUS (Volvo construction equipment) • The timing requirements are specified by release-time, deadline, WCET and period Ivica Crnkovic (c) : Component-based real-time systems
Real time attributes • What is • Task • Period • Deadline • WCET • Precedance Mikael Åkerholm, CBSE Course 2005
ready ready Challenges when constructing RT systems Most of the real-time systems are based on following: • Several parallel activities are given some unique priorities • A resource manager makes sure the task with the highest priority will execute Activities 1 Resource manager 3 2 1 3 CPU time Ivica Crnkovic (c) : Component-based real-time systems
Definition – task Task • A sequential program performing an activity and that possibly communicates with other tasks in the system. A task often has a priority relative to other tasks in the system. • Sometimes thread is used instead of task. Process • A virtual processor that can handle several tasks with a common memory space. Ivica Crnkovic (c) : Component-based real-time systems
period period (Inv. 1) (Inv. 2) (Inv. 3) A1 A2 A3 Task A time Periodic tasks An infinite sequence of identical activities – invocations (jobs) Execution time Analogy from real life: • Example: • Audio and video sampling • Regulating • Monitoring of temperature and pressure Ivica Crnkovic (c) : Component-based real-time systems
Airbag-example: Crash Too late time Too early Release time Deadline What is a release time and deadline? Task release time is the earliest point in time we can activate (release) the task Ivica Crnkovic (c) : Component-based real-time systems
Relations between components and tasks • Components – design Units • Tasks – execution Units • Mapping: • Simplest: a Component is a task • Complex • A set of components makes a task • A component can be split into several tasks Mikael Åkerholm, CBSE Course 2005
Composition of Components Ivica Crnkovic (c) : Component-based real-time systems
What is with time attributes? • How do we specify properties of an assembly? • Execution time (WCET,…) • How do we map assembly properties to the components being composed? • Period? • Priority? Ivica Crnkovic (c) : Component-based real-time systems
Properties of Composed components • Can we use WCET? • No • WCET cannot be computed since its parts may be executing with different periods. • End-to-end deadlines • Are set such that the system requirements are fulfilled • Should be specified for the input to and output from the component • Latency – time for an assembly to respond to input signal • Average, Worst case (end-to-end deadline), best case Ivica Crnkovic (c) : Component-based real-time systems
SaveCCM EXAMPLESAVECOMP COMPONENT MODEL Mikael Åkerholm, CBSE Course 2005
SaveComp Overview Mikael Åkerholm, CBSE Course 2005
SaveCCM Component Model • Tradeoff: • Freedom vs. Restrictions • SaveCCM restrictive, but expressive power focused on domain specific needs, e.g., • Mode Changes • Static Configuration • Control Feedback Mikael Åkerholm, CBSE Course 2005
Architectural Elements • Components • In and Output ports, (1) data only, (2) triggering, (3) triggering and data (for all elements, not only components) • Basic units of encapsulated behavior • Execution model: read input, execute, write output Input port, data <<SaveComp>> Output port, data Input port, triggering name Output port, triggering Input port, data and triggering Output port, triggering and data Mikael Åkerholm, CBSE Course 2005
Architectural Elements • Switches, special type of component • Conditionally changes the componentinterconnection structure • Static or dynamic configuration of conditions P I D Switch name { Inports: INP:Pport, INI:Iport, IND:Dport, P:Setport, I:Setport, D:Setport; Outports: OUTP:Pport, OUTI:Iport, OUTD:Dport; Switching: P: INP->OUTP; I: INI->OUTI; D: IND->OUTD; } OUTP <<Switch>> INP OUTI name INI OUTD IND Mikael Åkerholm, CBSE Course 2005
P I D <<Assembly>> PID <<SaveComp>> <<Switch>> <<Switch>> PC <<SaveComp>> Compose S1 S2 <<SaveComp>> IC <<SaveComp>> DC Set Actual Control Architectural Elements • Assemblies, special type of component • Consists of components and switches • Naming of sub-systems, hiding internal structure Mikael Åkerholm, CBSE Course 2005
Design - Component model Time Component model Target application Run - Time RTOS Compile-Time Overview Fully Automated Compile-Time Step Task Allocation Attribute Assignment Model transformation Analysis Compile - Real - time model Time t Glue Code Generation Real - Time Synthesis Analysis Target Compiler RTOS RTOS Mikael Åkerholm, CBSE Course 2005
Run-Time System • Applications have no dependencies to operating systems, all operating system dependencies are automatically generated glue code, gives portable and reusable components • Prototype: • Win32 for Simulation with the CCSimTech simulation technique • RTXC RTOS for target Mikael Åkerholm, CBSE Course 2005
50 Hz Speed Limit <<Assembly>> <<SaveComp>> Road Signs Enabled ACC Application ACC Max Speed Road Sign Speed ACC Controller <<Assembly>> Throttle Object Recognition <<SaveComp>> Distance Current Speed 10 Hz Logger HMI Outputs Mode Switch Max Speed <<Switch>> <<SaveComp>> ACC Enabled Brake Assist Brake Pedal Used ACC Brake Assist <<SaveComp>> Brake Signal Mikael Åkerholm, CBSE Course 2005