View
218
Download
0
Category
Tags:
Preview:
Citation preview
Page 1, CBSE graduate course
Lecture 3 Lecture 3
CBSE in Embedded System DevelopmentCBSE in Embedded System Development
AgendaAgenda
Embedded and Real-Time Systems
ProCom
Extra-Functional Properties
PRIDE
Lab2
Page 2, CBSE graduate course
What are Embedded Systems ?What are Embedded Systems ?
33
““special purpose computer built special purpose computer built into a larger device to perform a into a larger device to perform a
specific functionality by specific functionality by combination of hardware and combination of hardware and
software”software”
April 21, 2023Component-based real-time systems
Interaction with the environmentInteraction with the environment
A sensor transforms physical data (temperature, pressure) to digital format
Examples: thermometer, microphone, video camera
An actuator works the other way round - transforming digital data to physical format.
Example: motors, pumps, machines…
An embedded system interacts with the environment via An embedded system interacts with the environment via sensorssensors and and actuatorsactuators
RTRTsoftwaresoftwaresystemsystem
SensorSensor
ActuatorActuatorEnvironmentEnvironment
Does someone know an example of an Does someone know an example of an
embedded system that you can find in a embedded system that you can find in a
car?car?
Page 5, CBSE graduate course
An airbagAn airbag
Page 6, CBSE graduate course
Example:Example:
An air bag must not be inflated too late, nor too early!An air bag must not be inflated too late, nor too early!
CollisionCollision
Too lateToo late
timetime
Too earlyToo early
Correct results at the right timeCorrect results at the right time
What is a real-time system?What is a real-time system?
““A real-time system is a system that A real-time system is a system that reacts upon outside events reacts upon outside events and performs a function based on these and and performs a function based on these and and gives a response and gives a response within a certain timewithin a certain time. Correctness of the function does not only . Correctness of the function does not only depend on correctness of the result, but also the depend on correctness of the result, but also the timeliness timeliness of it”.of it”.
April 21, 2023
Event driven real-time systems
External events determines when a program is to be executed
Often through interrupts
Example: telephone switches, ”video-on-demand”, transaction systems…
Time driven real-time systems
The system handles external events at predefined points in time
Most often cyclic systems repeats a certain scenario
Example: ABS, control systems, manufacturing systems…
Event driven vs. time driven systemsEvent driven vs. time driven systems
Predictable vs. fastPredictable vs. fast
A robot arm with A robot arm with good timing catches good timing catches the passing boll.the passing boll.
April 21, 2023Ivica Crnkovic (c) : Component-based real-time systems
Too fast robot arm Too fast robot arm misses the passing misses the passing boll!boll!
Predictable vs. fastPredictable vs. fast
What do you need to think about when What do you need to think about when
developing ES?developing ES?
1212
Heterogeneous Development ConcernsHeterogeneous Development Concerns
Predictable
react in well-specified ways and be highly dependable
Real-time demands
react correctly to events in a given interval in time
Resource limitations
memory
bandwidth
power
…
1313
Current Trend Current Trend
Today, the software part increases Additional functionality HW functionality replaced by
SW functionality
““special purpose computer built into a larger device to special purpose computer built into a larger device to perform a specific functionality by combination of perform a specific functionality by combination of
hardware and software”hardware and software”
““special purpose computer built into a larger device to special purpose computer built into a larger device to perform a specific functionality by perform a specific functionality by combination of combination of
hardware and softwarehardware and software””
1414
Problems in current development methodsProblems in current development methods
Traditional development method does not scale anymore (1 functionality/subsystem on 1 ECU)
Software complexity
Distribution
Shared resources
Need solutions to:
Manage software complexity
Improve reusability
Address some fundamental development concerns:Timing demands
Resource limitations
Predictability
1515
CBSECBSE
––
The future of ES The future of ES
development?development?
1717
General RequirementsGeneral Requirements
Cover the whole development process
From early design up to deployment and synthesis
Centered around a unified notion of components
Collection of requirements, documentation, source code, analysis models, test results, etc.
Enable the integration of various analysis techniques
Manage and store the required/produced artefacts in a systematic way
1818
Coexistence of Different Abstraction LevelsCoexistence of Different Abstraction Levels
Example of development process
1919
RequirementsRequirementsSpecificationSpecification
Component Component repositoryrepository
Reuse of an Reuse of an already existing already existing solutionsolution
Fully implemented Component
(architecture model+source code
+analysis model)
Partially implemented component
Sketch of component
Component-Based Component-Based DesignDesign
DeploymentDeployment
Different Concerns at Different Granularity Different Concerns at Different Granularity LevelsLevels
2010-03-08Pau
2020
Resource limitationsResource limitations Real-time demandsReal-time demands PredictabilityPredictability DistributionDistribution
ES specific requirementsES specific requirements
Managing complexityManaging complexity Different abstraction levelsDifferent abstraction levels Different concerns at different levelsDifferent concerns at different levels Integration of various analysis techniquesIntegration of various analysis techniques
Component-based approach requirementsComponent-based approach requirements
Response-timeResponse-time CPUCPU Memory UsageMemory Usage ReliabilityReliability AccuracyAccuracy
Extra-Functional PropertiesExtra-Functional Properties
2010-03-08
2121
Pau
Specifies component Specifies component semanticssemantics
Composition rulesComposition rules
Component ModelComponent Model
2222
ProCom ProCom –– Key aspects (1) Key aspects (1)
Rich design-time concepts
A collection of development artefacts(source code, models of timing and resources, analysis results,
documentation, etc.)
Reuse all this information.
Components of different maturity should be allowed to co-exist.
2323
ProCom ProCom –– Key aspects(2) Key aspects(2)
Components abstracted from physical deployment
Different concerns depending on granularity:
Distribution, communication, analysis, etc.
2424
Architectural Architectural model (CBD)model (CBD)
Platform modelPlatform modelmappingmapping
ProCom ProCom a Two-Layered Component a Two-Layered Component
ModelModel
2010-03-08
2525
SystemSystem
C1C1C1C1 C2C2C2C2 C3C3C3C3
ProSys (upper layer)ProSys (upper layer)
"Function block" components"Function block" components Passive, non-distributedPassive, non-distributed Explicit transfer of data and controlExplicit transfer of data and control HierarchicalHierarchical
ProSave (lower layer)ProSave (lower layer)
A subsystem can internally be modelled by ProSave.A subsystem can internally be modelled by ProSave.
Connection between the layersConnection between the layers
ProSys – the upper layerProSys – the upper layer
Components (subsystems):
Active, possibly distributed.
Interact through message ports.
2626
Subsystem ASubsystem A
Subsystem BSubsystem B
Subsystem CSubsystem C
ProSys –communicationProSys –communication
Communication
Asynchronous messages
Explicit message channelsDesign entity for data shared between subsystems
Not a physical message channel like a bus !
steeringsteeringangleangle
speedspeed
ProSave – the lower levelProSave – the lower level
Passive components(similar to task or function block)
Interact through input- and output ports.
Data ports
Trigger port
Component semantics:
Initially passive, receivinginput data.
When triggered, read inputdata and turn active.
Write output once.
Return to the passive state.
Component Component AA
ProSave ProSave –– the lower level the lower level
More complex components can have: Multiple output groups:
Output can be produced at different points in time.
Each group written once per activation.
Multiple input groups (services):Services can share state.
Individual control flows
Component Component AAComponent Component AA
2010-03-08
2929
Pau
Component CComponent C
ProSave – the lower levelProSave – the lower level
Separated data- and control flow
Component AComponent A Component BComponent B
• Hierarchical nestingHierarchical nesting• Primitive components (implemented in C)Primitive components (implemented in C)• Composite componentsComposite components
ProSave – the lower levelProSave – the lower level
Connectors for more elaborate control:
3131
– Data forkData fork– Data orData or
– Control forkControl fork– Control joinControl join– Control selectionControl selection– Control orControl or
Modelling a ProSys subsystemModelling a ProSys subsystem
in ProSavein ProSave
Message ports trigger and data
Clocks and events
3232
C1C1 C2C2
C3C3
10 Hz10 Hz
Electronic Stability Control in ProSysElectronic Stability Control in ProSys
3333
Stability Control System in ProSave Primitive Stability Control System in ProSave Primitive
SubsytemsSubsytems
2010-03-08
3434
Pau
ProCom – SummaryProCom – Summary
A component model for “distributed control-intensive embedded systems”
Rich design-time component notion including models, properties, realisation, analysis results, etc.
Two layers for addressing the different paradigm existing at different abstraction level:
ProSys: Active subsystems, message passing.
ProSave: Passive components, trigger/data flow.
3535
3636
3737
ProComProCom
Component-Development Approach
Extra-functional Extra-functional properties ???properties ???Analysis ???Analysis ???
A Huge List of PropertiesA Huge List of Properties
3838
Execution timeExecution timePrioritiesPrioritiesDeadlineDeadline
Schedule policySchedule policyEnd-to-end deadlineEnd-to-end deadline
Response timeResponse timeComputation timeComputation time
WCET/BCETWCET/BCET
Static memory usageStatic memory usageDynamic memory usage Dynamic memory usage
CPU usageCPU usagePower consumptionPower consumptionMemory footprintMemory footprint
Disk accessDisk accessNetwork accessNetwork access
SafetySafetyReliabilityReliabilityAvailabilityAvailability
RecoverabilityRecoverabilityMaintainabilityMaintainabilityAccessibilityAccessibility
Nb of reuseNb of reuse
ThroughputThroughput
Confidentiality Confidentiality
Nb of testsNb of tests
CostCost
Value rangeValue range
Compliance to standardCompliance to standard
PrecisionPrecision
ExtensibilityExtensibility
ConfidentialityConfidentiality
IntegrityIntegrity
SecuritySecurity
EvolvabilityEvolvability
CredibilityCredibility
AccuracyAccuracy
LoCLoC
......
Characteristics of Extra-Functional Characteristics of Extra-Functional
PropertiesProperties
Different representations
numbers, intervals, formula, models, image, ...
Different techniques to obtain the values
model checking, measurement, calculation, expert estimate, ....
Relation to different entities
system, component, interfaces, links, ...
Validity conditions: context
hardware, specific library, scheduling policy, usage Profile, other properties, ...
3939
ExampleExample
4040
Static Static Memory UsageMemory UsageStatic Static Memory UsageMemory Usage
value: 10, kBvalue: 10, kB
version: 1version: 1
timestamp: 080120#17:44timestamp: 080120#17:44
source: estimationsource: estimation
value: 10, kBvalue: 10, kB
version: 1version: 1
timestamp: 080120#17:44timestamp: 080120#17:44
source: estimationsource: estimation
value: 15, kBvalue: 15, kB
version: 2version: 2
timestamp: 080220#10:00timestamp: 080220#10:00
source: measurementsource: measurement
platform: Xplatform: X
value: 15, kBvalue: 15, kB
version: 2version: 2
timestamp: 080220#10:00timestamp: 080220#10:00
source: measurementsource: measurement
platform: Xplatform: X
WCETWCETWCETWCET
value: 25, clock cyclevalue: 25, clock cycle
version: 1version: 1
timestamp: 090128#11:00timestamp: 090128#11:00
source: analysissource: analysis
platform: Xplatform: X
value: 25, clock cyclevalue: 25, clock cycle
version: 1version: 1
timestamp: 090128#11:00timestamp: 090128#11:00
source: analysissource: analysis
platform: Xplatform: X
value: 30, clock cyclevalue: 30, clock cycle
version: 2version: 2
timestamp: 090105#15:00timestamp: 090105#15:00
source: estimationsource: estimation
value: 30, clock cyclevalue: 30, clock cycle
version: 2version: 2
timestamp: 090105#15:00timestamp: 090105#15:00
source: estimationsource: estimation
4141
PRIDEPRIDE
The ProCom
Integrated Development Environment
Main IdeaMain Idea
Emphasis on component development & component reuse
Seamless integration of analysis techniques
4343
Components: a central conceptComponents: a central concept
Components are the main units of development
They follow the rich-desgin component concepts
“a component is the collection of all the artefacts produced or required during the development process”
Concretely, based on a predefined file structure
Source code folder,
Models folder,
Documentation folder,
Metadata file
4444
The various facets of a componentThe various facets of a component
Component type
Defines all the fixed parts of the component
Characterised by:a universally unique ID,
a name (possibly non-unique)
a architectural description (ports, services, etc.)
a functionality
Component instances:
Refer to the corresponding component type
Used during the design and realisation of composite components
Can have additional information, specific to that instanceEx: worst case execution time
4545
Overview of the Overview of the
ArchitectureArchitecture
4646
PRIDEPRIDE
Component Component ExplorerExplorer
ComponentComponentEditorsEditors
SynthesisSynthesis
Analysis ToolsAnalysis Tools
Attribute DefinitionsAttribute Definitions
Fault-Fault-PropagationPropagation
ParametrParametric WCETic WCET
EFP EFP AssuranceAssurance
REMES REMES SimulatorSimulator
REMES REMES EditorEditor
creates creates and and addsadds
Analysis Analysis ExpertExpert
usesuses
AnalystAnalyst
ComponentComponentRepositoryRepository
Core ConceptsCore Concepts
CBSECBSEProComProCom
Rich Rich ComponentsComponents
System System DeveloperDeveloper
import/import/exportexport
synthetisesynthetise
Binary Binary FilesFiles
Support Support for EFPsfor EFPs
Runtime Runtime EfficiencyEfficiency
......
......
4747
DemoDemo
Page 48, CBSE graduate course
4949
Introduction to Lab2Introduction to Lab2
Page 50, CBSE graduate course
Page 51, CBSE graduate course
ObjectivesObjectives Apply component based software engineering principles to
embedded system development
Model an embedded system using a component based model
Reuse components between systems
Calculate its non functional properties
Learn about composition and interaction semantics
Uses a dedicated tool suite.
Expected OutputExpected Output
Same system as for Lab1
Archive files only (no folder) named ”Lab2X_Y.zip” where X=your name (and Y=name of your teammate if you work in pair).1 report explaining your design choices and calculation results
The Project folder for your system
Individual work (or in pair)
But nothing else!
Both have to submit the archive file
Do not copy solutions from others !
Page 52, April 21, 2023Advanced CBSE
DeadlineDeadline
Tuesday 08 February 2011 23:59 (FIRM Deadline!)
If you submit your work late, you fail one submission opportunity => only one chance to pass the lab before Exam1!
Remember.
Lab2 must also be approved to before Exam 1
Page 53, CBSE graduate course
The assignmentThe assignment
In 3 parts
Modelling an industrial Baking Conveyor System using ProCom and PRIDE
Practice reuse of components in adapting the system
Calculate extra-functional properties on simple cases
Page 54, CBSE graduate course
The Industrial Baking Conveyor System The Industrial Baking Conveyor System
Page 55, CBSE graduate course
Main parts:Main parts:
Temperature Sensor
Humidity Sensor
Heating Unit
Orchestrator
Oven
Conveyor Belt
Usage ScenarioUsage Scenario
Page 56, CBSE graduate course
Orchestrator
OvenConveyor Belt
Oven monitors the temperature and humidity sensorOven monitors the temperature and humidity sensormeasurements and determines 1. if the heat should measurements and determines 1. if the heat should be increased and 2. if the cookies are cooked be increased and 2. if the cookies are cooked correctlycorrectly
Carries the cookies Carries the cookies from point A to point B from point A to point B in passing by the ovenin passing by the oven
Ensure that the conveyor belt Ensure that the conveyor belt and the oven are working and the oven are working togethertogether
Part 1 - What you need to do?Part 1 - What you need to do?
To model this system with ProCom and PRIDE
Tip 1 Start by understanding last year assignment (
http://www.idt.mdh.se/kurser/cd5490/2010/Assignment%202/index.htm )
Use pen and paper before PRIDE
Once you are sure of your solution. Model it in PRIDE
Tip 2:While designing components, think about reuse
What would make that component more reusable?
What would prevent to reuse that components in different systems
Page 57, CBSE graduate course
Part 2 - ReusePart 2 - Reuse You want to develop software for a second type of
industrial baking conveyor system
Page 58, CBSE graduate course
Conveyor Belt
Rotating Table
OvenOven
Waste
OkOk
Part 2 - What you need to do?Part 2 - What you need to do?
To model this second system with ProCom and PRIDE
Tip Think carefully on the first system with reuse in mind
What are the impacts of this change in the model you design for the first system?
What are the components that you can reuse?
What need to be added or modified? And Why?
Page 59, CBSE graduate course
Part 3 – Calculate Extra-Functional Part 3 – Calculate Extra-Functional
PropertiesProperties
First on a simple example, you will need to
Calculate static memory usage of whole system, based on static memory usage of all components used in system
Calculate WCET of the system, based on all possible execution paths
Then on the oven element of your system, you will need to
Calculate static memory usage of element, based on static memory usage of all components used in system
Calculate its WCET, based on all possible execution paths
Page 60, CBSE graduate course
Static Memory Usage and WCETStatic Memory Usage and WCET
Static memory usage (without considering the glue code)
10 (A) + 8 (B) + 6 ( C) + 10 (D) = 34
Execution paths
(I) A → B → D , (II) A → C → D
WCET
Path (I) = 5 + 15 + 15 = 35
Path (II) = 5 + 20 + 15 = 40 = WCET
Page 61, CBSE graduate course
Questions ?!?Questions ?!?
Page 62, CBSE graduate course
Questions ?!!?Questions ?!!?
Recommended