SW Synthesis from UML/MARTE
-
Upload
eugenio-villar -
Category
Technology
-
view
344 -
download
6
description
Transcript of SW Synthesis from UML/MARTE
Modeling and SW Synthesis for Heterogeneous Embedded SystemsHeterogeneous Embedded Systems in UML/MARTETutorial SD1: High-Level Specifications to Cope With Design Complexity
Hector Posadas, Pablo Peñil, Alejandro Nicolás, Eugenio VillarAlejandro Nicolás, Eugenio Villar
University of CantabriaSpainp
MotivationMotivation
D i d ti it Design productivity gap Raising the abstraction level
Multi-Processing &H t l tfHeterogeneous platforms
Increasing SW content SW centric design methodologies SW-centric design methodologies
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 2
Usual SW development flowUsual SW development flow
M A
HW/SW platform Architectural Design
B
M A
HW/SW platform N2 BN1
Architectural mapping
OS1OS2
GPU DSP
Ad/Hoc SW development System calls OS1 GPU DSP System calls Communication functions I/O functions & drivers I/O functions & drivers
Verification & Debug Costly fixing of wrong design decisions
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 3
Usual SW development flowUsual SW development flow
M A
Lack of reusability Ad hoc code B
M A
Ad-hoc code
Large re-engineering effortN2 BN1
OS3OS1
OS2GPU DSP
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 4
OutlineOutline
I t d ti Introduction State of the Art The PHARAON approach
Design FlowgModeling Methodology SW Synthesis SW Synthesis
Conclusions
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 5
IntroductionIntroduction
Model-Driven Architecture (MDA) High-abstraction level High abstraction levelMature SW engineering methodology
UML language Application to embedded systems design Application to embedded systems design
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 6
IntroductionIntroduction
Why UML? Natural way to capture system architecture Natural way to capture system architecture Standard way
M A
N2 BN1
N.P N.O
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 7
IntroductionIntroduction
Why UML? Natural way to capture system architecture Natural way to capture system architecture Standard way
UML language UML language Semantics lacks
What is each component? What is each component? What kind or interaction each link actually means?
Domain-specific profilesp p UML/MARTE
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 8
IntroductionIntroduction
MARTE Standard UML profile for real-time embedded systems Standard UML profile for real time embedded systems
Platform-Independent Model (PIM) Platform Description Model (PDM) Platform-Specific Model (PSM)
Rich semantics content Single-source approach Analysis Simulation
VerificationParallelization
Performance Analysis
Design-Space Architectural
Optimization
g pExplorationSystem
Synthesis
Architectural Mapping
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 9
State-of-the-ArtState of the Art
Discussion System modeling in MARTE System modeling in MARTE
Methods based on specific MoCs and/or profiles Requiring additional semanticsq g Non-standard
SW Synthesis Commercial code generation available Limited support for heterogeneity Limited flexibility for different architectural mappings Limited support for the MARTE semantics Limited support for the MARTE semantics
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 10
PHARAON Single-Source Design FlowPHARAON Single Source Design Flow
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 11
PHARAON Single-Source Design FlowPHARAON Single Source Design Flow
S i
HW/SWPlatform
ArchitecturalMappings
C/C++
Scenarios
PIM (App)C
SW Synthesis (SWSyn)
M2T Tools
CompilersLinkers
y ( y )
+
SW stacks
HWAcceleratorsHW
AcceleratorsHWAcceleratorsHW
Accelerators
CPUs/DSPs/ASIPs GP-GPUs
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 12
PHARAON Modeling MethodologyPHARAON Modeling Methodology
M i f t Main featuresMDD concepts
Separation of Concerns
CBE: Component-Based Engineering approachSW i SW centric
StandardMARTE fil MARTE profile
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 13
PHARAON Modeling MethodologyPHARAON Modeling Methodology
D t T f C i ti I t f Data Types for Communication Interfaces Primitive Types
Bit Arrays
Data Structures
Arrays
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 14
PHARAON Modeling MethodologyPHARAON Modeling Methodology
Component model Hierarchical functional encapsulation Hierarchical functional encapsulation Ports
provided or requiredprovided or required
C2C2.1 C2.2
C2.3
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 15
PHARAON Modeling MethodologyPHARAON Modeling Methodology
Component Interfaces
C2C2.1 C2.2
C2.3
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 16
PHARAON Modeling MethodologyPHARAON Modeling Methodology
Component model Interfaces Interfaces
sequential, guarded or concurrent, Max. threads available argument sizes (data splitting), Num. of incoming channels
C2C2.1 C2.2
C2.3
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 17
PHARAON Modeling MethodologyPHARAON Modeling Methodology
Component model Channels manage communications Channels manage communications
BlockingFunctionCall, BlockingFunctionReturn, both or none Timeout Priority
C2C2.1 C2.2
Buffer Size Buffer Size ResMult C2.3
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 18
PHARAON Modeling MethodologyPHARAON Modeling Methodology
The Platform Description Model HW/SW Components using MARTE stereotypes HW/SW Components using MARTE stereotypes
Software Components OS, HdS, Drivers, …
Hardware Components Processors, Memories, Buses, Custom HW, I/O
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 19
PHARAON Modeling MethodologyPHARAON Modeling Methodology
Platform-Specific ModelMemory spaces mapped to platform resourcesMemory spaces mapped to platform resourcesMapping of functional components
to memory spaces and/or platform resourcesto memory spaces and/or platform resources
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 20
PHARAON Modeling MethodologyPHARAON Modeling Methodology
Architectural Design
Code reuse and/or development
HW/SW platform
p platform independent
HW/SW platform
Architectural mapping
SW Synthesis
Architectural mapping
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 21
Fast design optimization
SW SynthesisSW Synthesis
System heterogeneity Full support for Full support for
any architectural mapping decided for each component any specific processing resource selected any specific processing resource selected any processing resource type any memory space any memory space any OS used by the processing resource
i ti i f t t any communication infrastructure
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 22
SW SynthesisSW Synthesis
Functional synthesisOne executable per memory-spaceOne executable per memory space Platform-Independent (C/C++) code
Highest reusabilityHighest reusability Non-recommended explicit calls to platform services
communication, concurrency, etc. Platform services should derived from the UML/MARTE model POSIX and/or OpenMP as alternatives Static execution flows Static execution flows
<<SwSchedulableResource>>
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 23
SW SynthesisSW Synthesis
Functional synthesis Platform-Specific code
DSP optimized
C code
OpenCL/GL code for
GPU
Platform-Independent
C code Platform Specific code Optimized C code for DSPs OpenCL/GL for GPUs
C codeGPUC code
OpenMP for SMPs… C3
Configuration Original Optimized Code
Memory Space
OS GPU
ARM 908.28 sec 572.92 sec
ARM-NEON 325.81 sec 255.28 sec
ARM+DSP 206 01 sec 193 45 sec GPUSMPnode
DSP
blocking call 206.01 sec 193.45 sec
ARM+DSPnon-blocking call 895.98 sec 431.68 sec
ARM NEON+DSPCommunication Infrastructure
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 24
ARM-NEON+DSPnon-blocking call 247.93 sec 215.96 sec
SW SynthesisSW Synthesis
Communication synthesis Essential activity in heterogeneous SW synthesis Essential activity in heterogeneous SW synthesis Client-Server paradigm Dependent on the architectural mapping Dependent on the architectural mapping
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 25
SW SynthesisSW Synthesis
Communication synthesis Architectural mapping Architectural mapping
Same memory space Same OS Different processing nodes
Benefits / Drawbacks Communication Speed
Memory protection Memory protection Memory/cache use Schedulingg Parallelism…
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 26
SW SynthesisSW Synthesis
Communication synthesis 3 Layers automatically inserted in service calls 3 Layers automatically inserted in service calls
Layer 1: communication semantics Allocation independent
L 2 t f ll ti d d t i ti Layer 2: management for allocation-dependent communications Thread generation, data splitting, synchronization
Layer 3: Low-level communicationsy Inter-thread, Inter-process, distributed communication
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 27
SW SynthesisSW Synthesis
Communication synthesis Layer1: Independent of architectural mapping Layer1: Independent of architectural mapping
Channel properties RPC
T
BlockingFunctionCall (T)BlockingFunctionReturn (T)
T M Ta
MTa
TbTb
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 28
SW SynthesisSW Synthesis
Communication synthesis Layer1: Independent of architectural mapping Layer1: Independent of architectural mapping
Channel properties Pipeline
T
BlockingFunctionCall (F)BlockingFunctionReturn (T)
Ta
M
T MTa
TbTb
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 29
SW SynthesisSW Synthesis
Communication synthesis Layer1: Independent of architectural mapping Layer1: Independent of architectural mapping
Channel properties Pipeline & Parallel
T
BlockingFunctionCall (F)BlockingFunctionReturn (F)
Ta
MTb
T MTa
Tb
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 30
SW SynthesisSW Synthesis
Communication synthesis Layer1: Independent of architectural mapping Layer1: Independent of architectural mapping
Interface properties Data splitting
TTa
M1Tb
T MTa
M2
Tb
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 31
SW SynthesisSW Synthesis
Communication synthesis Layer1: Independent of architectural mapping Layer1: Independent of architectural mapping
Interface properties Data splitting
TTa
Tb
T MTa
M1 M2
Tb
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 32
SW SynthesisSW Synthesis
Implementation alternatives Channel semantics can be implemented in multiple ways Channel semantics can be implemented in multiple ways
Different OS services shared memory message queue socket file file...
Performance is highly dependent on platform and OS Synthesis enables fast exploration Synthesis enables fast exploration
optimal channel implementation for specific platform and code
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 33
SW SynthesisSW Synthesis
MultiCore Association APIs Standard APIs for communication and synchronization Standard APIs for communication and synchronization Closely distributed embedded systems
MCAPI - communicationMCAPI communication MRAPI - synchronization MTAPI - task generation
Independence from OSOS-agnostic channel implementation
Components treated as MCAPI nodes Ports treated as MCAPI endpoints
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 34
SW SynthesisSW Synthesis
Platform Inputs & Outputs Drivers associated to environmental components Drivers associated to environmental components
Environment ModelPLC
Test-Benchcode
CameraTest-Bench
code
P1
System Model
P2
codecodePLC
driverCamera 1
driver
Camera 2
OS1
Memory Space
driver
PLCSMPNode
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 35
Communication Infrastructure
ConclusionsConclusions
UML/MARTE Powerful modeling methodology Powerful modeling methodology Single-Source approach Platform-Independent Modeling Platform Independent ModelingMaximizing reusability
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 36
ConclusionsConclusions
SW Synthesis Functional modeling Functional modeling Functional synthesis Communication synthesis Communication synthesis Platform Inputs & Outputs
Actually enables platform-independent code Reduces in depth knowledge of platforms Reduces in-depth knowledge of platforms Support shorter design optimization cycles
wider design exploration wider design exploration shorter code generation on heterogeneous platforms
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 37
Additional InformationAdditional Information
http://www.teisa.unican.es/gim/en/proyecto?id=95 H. Posadas, P. Peñil, A. Nicolás, E. Villar
"Automatic synthesis of embedded SW for evaluating physical implementation alternatives y g p y pfrom UML/MARTE models supporting memory space separation“Microelectronics Journal, in press, doi: 10.1016/j.mejo.2013.11.003.
H. Posadas, E. Villar, et al.O f"EU FP7-288307 PHARAON project: Parallel and heterogeneous architecture for real-time
applications“Euromicro Conference on Digital System Design, DSD 2013, IEEE, doi: 10 1109/DSD 2013 4710.1109/DSD.2013.47.
H. Posadas, P. Peñil, A. Nicolás, E. Villar"System synthesis from UML/MARTE models: The PHARAON approach“,Electronic System Level Synthesis Conference, ESLsyn, 2013, IEEE.
P. Peñil, H. Posadas, A. Nicolás, E. Villar"Automatic synthesis from UML/MARTE models using channel semantics“International Workshop on Model-Based Arquitecting and Construction of E b dd d S t ACES MB 2012 d i 10 1145/2432631 2432640Embedded Systems, ACES-MB 2012, doi: 10.1145/2432631.2432640.
January 20, 2014Tutorial SD1: High-Level Specifications to Cope With Design ComplexityASP-DAC 2014, Singapore 38