cbse course
Post on 14-Jan-2016
53 Views
Preview:
DESCRIPTION
TRANSCRIPT
<<AutoComp>>
Power Supervison
Desired Output level
Source
Diesel Valve
Sink
Diesel Valve
<<AutoComp>>
Valve RegulatorSink
T = 40 ms
Air Valve
Air Valve
CBSE CourseThe SaveComp Component Technology
Vehicular Systems• Software Charateristics
– Safety – Reliability – Resource efficiency – Predictability
• Engineering Activities– Targeting non general System
Architecture– Early Analysis– Modelling– Verification
21/04/23 Mikael Åkerholm, CBSE Course 2005 2
Example: The architecture of a car control system
Page 3, April 21, 2023
Vehicle mechanics
ECU
Sensor ActuatorSensor
ECU
SensorActuatorSensor
ECU
SensorActuatorSensor
gateway
(CAN) BUS
brake injection
Infotaiment
ECU – Electronic Control Unit
The architectural design challenge
Page 4, April 21, 2023
Vehicle stability Suspension Drive by wire …… Complex functions
Local Control Functions
Sensor ActuatorSensor
Basic functionsLocal Control Functions
Sensor ActuatorSensor
How to implement complex functions based on local control functions?
Problem: resource sharing
Page 5, April 21, 2023
Sensor 1
Sensor 2
Sensor 3
Sensor ..
Networkresources
++++++++++
++++++++++
++++++++++Sensor ..
Executionresources
Node 1
Node 2
Node 3
Node …
Node …
Actuator 1
Actuator 2
Actuator 3
Actuator …
Actuator …
Can functions of different criticality be allowed to share resources?
Challenge – open and dependable platform
Page 6, April 21, 2023
sensors
Vehicle
actuators
Engine Control Local brake Control Transmission ………local
Vehicle stability
Cruise control
Antispin Global (complex) functions
Hardware
Input/output drivers
Middleware
ECU ECU ECU
Applications
SOFTWARE COMPONENTS
Collision detection
Challenge – open and dependable platform
Page 7, April 21, 2023
Hardware
Input/output drivers
Middleware
ECU ECU ECU
Applications C1 C2
RequirementsSeparation of hw from SW developmentSeparation 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
April 21, 2023Ivica Crnkovic (c) : Component-based
real-time systems
Task: BrakeLeftRight Period: 50 ms Release time: 10 ms Deadline: 30 ms Precedes: outputBrakeValues WCET: 2 ms
oil pressure
speed
….
brake left wheel
brake right wheel
Task state information
Real time attributes
21/04/23 Mikael Åkerholm, CBSE Course 2005 9
Task: BrakeLeftRight Period: 50 ms Release time: 10 ms Deadline: 30 ms Precedes: outputBrakeValues WCET: 2 ms
oil pressure
speed
….
brake left wheel
brake right wheel
Task state information
What isTaskPeriodDeadlineWCETPrecedance
Challenges when constructing RT systems
Most of the real-time systems are based on following:1. Several parallel activities are given some unique priorities2. A resource manager makes sure the task with the highest
priority will execute
April 21, 2023Ivica Crnkovic (c) : Component-based real-time systems
1 3
Activities
Resource manager
timeCPU
1
2
3
ready
ready
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.April 21, 2023
Ivica Crnkovic (c) : Component-based real-time systems
Periodic tasks
An infinite sequence of identical activities – invocations (jobs)
April 21, 2023Ivica Crnkovic (c) : Component-based
real-time systems
timeTask A A1
(Inv. 1)
A2
(Inv. 2)
A3
(Inv. 3)
period period
Analogy from real life:Example:
• Audio and video sampling
• Regulating
• Monitoring of temperature and pressure
Execution time
What is a release time and deadline?
April 21, 2023Ivica Crnkovic (c) : Component-based
real-time systems
Task release time is the earliest point in time we can activate (release) the task
Airbag-example:
Crash
Too late
time
Too early
Release time Deadline
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
21/04/23 Mikael Åkerholm, CBSE Course 2005 14
Composition of Components
April 21, 2023Ivica Crnkovic (c) : Component-based
real-time systems
Task:BrakeLeftRight
oilpressure
speed
brake left
brake right
Task state information
Task:OutputBrakeValues
Task state information
Component: BrakeSystem
pressure
speed
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?
April 21, 2023Ivica 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
April 21, 2023Ivica Crnkovic (c) : Component-based
real-time systems
Task:BrakeLeftRight
oilpressure
speed
brake left
brake right
Task state information
Task:OutputBrakeValues
Task state information
Component: BrakeSystem
pressure
speed
EXAMPLESAVECOMP COMPONENT MODEL
SaveCCM
21/04/23 Mikael Åkerholm, CBSE Course 2005 18
SaveComp Overview
21/04/23 Mikael Åkerholm, CBSE Course 2005 19
Task Allocation
Win 32
APPLICATION
SaveCCM
XML - representation
Design-Time
Compile-Time
Run-Time
<<SaveComp>>
PC
<<SaveComp>>
Compose
<<Assembly>>
P
Set ActualControl
AttributeAssignment
Code Generation & Analysis
C-compiler
RTXC
APPLICATION
Simulation Target
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
21/04/23 Mikael Åkerholm, CBSE Course 2005 20
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
21/04/23 Mikael Åkerholm, CBSE Course 2005 21
<<SaveComp>>
name
Input port, data
Input port, triggering
Input port, data and triggering
Output port, data
Output port, triggering
Output port, triggering and data
Architectural Elements
• Switches, special type of component• Conditionally changes the component
interconnection structure– Static or dynamic configuration of conditions
21/04/23 Mikael Åkerholm, CBSE Course 2005 22
<<Switch>>
name
P I D
INP
INI
IND
OUTP
OUTI
OUTD
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;}
Architectural Elements
• Assemblies, special type of component• Consists of components and switches• Naming of sub-systems, hiding internal structure
21/04/23 Mikael Åkerholm, CBSE Course 2005 23
<<Switch>>
S1
<<SaveComp>>
PC
<<SaveComp>>
IC
<<SaveComp>>
DC
<<Switch>>
S2
<<SaveComp>>
Compose
Set Actual
P I D
Control
<<Assembly>>
PID
Compile-Time Overview
21/04/23 Mikael Åkerholm, CBSE Course 2005 24
Design- Time
Component model
Real-Time Analysis
Real-time model
Synthesis
Compile- Time
Model transformation
Run- Time
Target application
RTOS
t
Task Allocation
Attribute Assignment
Analysis
Glue CodeGeneration
TargetCompiler
Component model
RTOS RTOS
Fully Automated Fully Automated Compile-Time StepCompile-Time Step
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
21/04/23 Mikael Åkerholm, CBSE Course 2005 25
SaveCCM Application Programmer ’s Interface
SaveCCM Application
MS Windows
SaveIO
PC
SaveMemory SaveCAN
CCSimTech
Sim
ulation Fram
ework
Sim
ulation Fram
ework
Target F
ramew
ork
SaveCCM Application Programmer ’s Interface
SaveCCM Application
SaveCAN
SaveCCM Hardware Abstraction Layer
SaveIO
SaveRTOS
HW Platform
SaveMemory
Device Drivers
Target F
ramew
orkT
arget Fram
ework
SaveCCM Application Programmer ’s Interface
SaveCCM Application
SaveCAN
SaveCCM Hardware Abstraction Layer
SaveIO
SaveRTOS
HW Platform
SaveMemory
Device Drivers
Target F
ramew
ork
21/04/23 Mikael Åkerholm, CBSE Course 2005 26
Road Signs Enabled
Current Speed
Road Sign SpeedACC Max Speed
Distance
ACC Enabled
Brake Pedal Used
<<Assembly>>50 Hz
10 Hz
Brake Signal
Throttle
Brake Assist
<<SaveComp>>
Logger HMI Outputs
<<SaveComp>>
Object Recognition
<<SaveComp>>
Mode Switch
<<Switch>>
ACCController
<<Assembly>>
Brake Assist
ACC
Max Speed
ACC ApplicationSpeed Limit
<<SaveComp>>
top related