SlideShare a Scribd company logo
Modeling and SW Synthesis for
Heterogeneous Embedded Systems
in UML/MARTE
Tutorial SD1: High-Level Specifications to Cope With Design Complexity

Hector Posadas, Pablo Peñil,
Alejandro Nicolás, Eugenio Villar
University of Cantabria
Spain
p
Motivation


Design
D i productivity gap
d ti it
 Raising

the abstraction level



Multi-Processing &
Heterogeneous platforms
H t
l tf



Increasing SW content
 SW centric
SW-centric

design methodologies

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

2
Usual SW development flow
A

M



Architectural Design



HW/SW platform



Architectural mapping



Ad/Hoc SW development

N1

 System

calls
 Communication functions
 I/O functions & drivers

B

N2

OS2
OS1

GPU



Verification & Debug



DSP

Costly fixing of wrong design decisions

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

3
Usual SW development flow


Lack of reusability
 Ad hoc
Ad-hoc
 Large

code

A

M

N1

B

N2

re-engineering effort

OS3

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

OS2
OS1

GPU DSP

January 20, 2014

4
Outline




Introduction
I t d ti
State of the Art
The PHARAON approach
 Design
g

Flow
 Modeling Methodology
 SW Synthesis


Conclusions

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

5
Introduction


Model-Driven Architecture (MDA)
 High-abstraction
High abstraction

level
 Mature SW engineering methodology


UML language
 Application

to embedded systems design

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

6
Introduction


Why UML?
 Natural

way to capture system architecture
 Standard way
M

B

N2

N1
N.P

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

A

N.O

January 20, 2014

7
Introduction


Why UML?
 Natural

way to capture system architecture
 Standard way



UML language
 Semantics



lacks

What is each component?
What kind or interaction each link actually means?

 Domain-specific
p


p
profiles

UML/MARTE

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

8
Introduction


MARTE
 Standard




UML profile for real time embedded systems
real-time

Platform-Independent Model (PIM)
Platform Description Model (PDM)
Platform-Specific Model (PSM)

 Rich

semantics content
 Single-source approach

Analysis

Simulation
Verification

Parallelization

Performance
Analysis

Optimization
Architectural
Mapping
Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

System
Synthesis
January 20, 2014

Design-Space
g
p
Exploration

9
State of the Art
State-of-the-Art


Discussion
 System


Methods based on specific MoCs and/or profiles



 SW





modeling in MARTE

Requiring additional semantics
q
g
Non-standard

Synthesis

Commercial code generation available
Limited support for heterogeneity
Limited flexibility for different architectural mappings
Limited support for the MARTE semantics

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

10
PHARAON Single Source Design Flow
Single-Source

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

11
PHARAON Single Source Design Flow
Single-Source
S
i
Scenarios

C/
C++
C

PIM
(App)

Architectural
Mappings

HW/SW
Platform

M2T Tools
SW Synthesis (
y
(SWSyn)
y )

+

Compilers
Linkers
SW stacks
HW
HW
Accelerators
HW
Accelerators
HW
Accelerators

Accelerators
CPUs/DSPs/ASIPs

GP-GPUs

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

12
PHARAON Modeling Methodology


Main features
M i f t
 MDD


concepts

Separation of Concerns

 CBE:

Component-Based Engineering approach
 SW centric
i
 Standard


MARTE profile
fil

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

13
PHARAON Modeling Methodology


Data T
D t Types for Communication Interfaces
f C
i ti I t f
 Primitive

Types




 Data

Bit Arrays

Arrays

Structures

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

14
PHARAON Modeling Methodology


Component model
 Hierarchical

functional encapsulation

 Ports


provided or required
C2
C2.1

C2.2

C2.3

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

15
PHARAON Modeling Methodology


Component Interfaces

C2
C2.1

C2.2

C2.3

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

16
PHARAON Modeling Methodology


Component model
 Interfaces



sequential, guarded or concurrent, Max. threads available
argument sizes (data splitting), Num. of incoming channels
C2
C2.1

C2.2

C2.3

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

17
PHARAON Modeling Methodology


Component model
 Channels




manage communications

BlockingFunctionCall, BlockingFunctionReturn, both or none
Timeout
Priority
C2
C2.1



C2.2

Buffer Size


ResMult

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

C2.3

January 20, 2014

18
PHARAON Modeling Methodology


The Platform Description Model
 HW/SW


Software Components




Components using MARTE stereotypes

OS, HdS, Drivers, …

Hardware Components


Processors, Memories, Buses, Custom HW, I/O

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

19
PHARAON Modeling Methodology


Platform-Specific Model
 Memory

spaces mapped to platform resources
 Mapping of functional components


to memory spaces and/or platform resources

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

20
PHARAON Modeling Methodology


Architectural Design



Code reuse and/or
development
p
 platform

independent



HW/SW platform



Architectural mapping



SW Synthesis
 Fast

design optimization

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

21
SW Synthesis



System heterogeneity
Full support for
 any

architectural mapping decided for each component
 any specific processing resource selected
 any processing resource type
 any memory space
 any OS used by the processing resource
 any communication i f
i ti infrastructure
t t

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

22
SW Synthesis


Functional synthesis
 One

executable per memory-space
memory space
 Platform-Independent (C/C++) code



Highest 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


<<SwSchedulableResource>>

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

23
SW Synthesis


Functional synthesis
 Platform-Specific
Platform Specific




code

PlatformIndependent
C code

OpenCL/GL
code for
GPU

Optimized C code for DSPs
OpenCL/GL for GPUs
OpenMP for SMPs…

Configuration

Original
908.28 sec

572.92 sec

ARM-NEON

325.81 sec

255.28 sec

ARM+DSP
blocking call

206.01
206 01 sec

193.45
193 45 sec

ARM+DSP
non-blocking call

895.98 sec

431.68 sec

ARM-NEON+DSP
ARM NEON+DSP
non-blocking call

247.93 sec

215.96 sec

C3

Optimized Code

ARM

DSP
optimized
C code

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

Memory Space
OS

SMP
node

GPU
DSP

Communication Infrastructure

January 20, 2014

24
SW Synthesis


Communication synthesis
 Essential

activity in heterogeneous SW synthesis
 Client-Server paradigm
 Dependent on the architectural mapping

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

25
SW Synthesis


Communication synthesis
 Architectural




Same memory space
Same OS
Different processing nodes

 Benefits






mapping

/ Drawbacks

Communication Speed
Memory protection
Memory/cache use
Scheduling
g
Parallelism…

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

26
SW Synthesis


Communication synthesis
3

Layers automatically inserted in service calls


Layer 1: communication semantics




Layer 2 management f allocation-dependent communications
L
2:
t for ll
ti d
d t
i ti




Allocation independent
Thread generation, data splitting, synchronization

Layer 3: Low-level communications
y


Inter-thread, Inter-process, distributed communication

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

27
SW Synthesis


Communication synthesis
 Layer1: Independent
 Channel properties


of architectural mapping

RPC
BlockingFunctionCall (T)
BlockingFunctionReturn (T)

T

M

Ta
T

Ta
M
Tb

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

Tb

January 20, 2014

28
SW Synthesis


Communication synthesis
 Layer1: Independent
 Channel properties


of architectural mapping

Pipeline
BlockingFunctionCall (F)
BlockingFunctionReturn (T)

T

M

Ta
T

Ta
M
Tb

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

Tb

January 20, 2014

29
SW Synthesis


Communication synthesis
 Layer1: Independent
 Channel properties


of architectural mapping

Pipeline & Parallel
BlockingFunctionCall (F)
BlockingFunctionReturn (F)

T

M

Ta
T

Ta
Tb

M

Tb

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

30
SW Synthesis


Communication synthesis
 Layer1: Independent
 Interface properties


T

of architectural mapping

Data splitting

M

Ta

Ta
Tb

M1
M2

Tb

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

31
SW Synthesis


Communication synthesis
 Layer1: Independent
 Interface properties


T

of architectural mapping

Data splitting

M

Ta

Ta
Tb

M1 M2

Tb

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

32
SW Synthesis


Implementation alternatives
 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


optimal channel implementation for specific platform and code

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

33
SW Synthesis


MultiCore Association APIs
 Standard

APIs for communication and synchronization
 Closely distributed embedded systems




MCAPI - communication
MRAPI - synchronization
MTAPI - task generation

 Independence

from OS
 OS-agnostic channel implementation



Components treated as MCAPI nodes
Ports treated as MCAPI endpoints

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

34
SW Synthesis


Platform Inputs & Outputs
 Drivers

associated to environmental components

Camera
Test-Bench
code
Camera 1
driver

PLC
Test-Bench
code
PLC
driver

Environment Model
System Model
P1

P2

Camera 2
driver
Memory Space
OS1
SMP
Node

PLC

Communication Infrastructure

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

35
Conclusions


UML/MARTE
 Powerful

modeling methodology
 Single-Source approach
 Platform-Independent Modeling
Platform Independent
 Maximizing reusability

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

36
Conclusions


SW Synthesis
 Functional

modeling
 Functional synthesis
 Communication synthesis
 Platform Inputs & Outputs
 Actually

enables platform-independent code
 Reduces in depth knowledge of platforms
in-depth
 Support shorter design optimization cycles



wider design exploration
shorter code generation on heterogeneous platforms

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

37
Additional 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 p y
y
g physical implementation alternatives
p
from 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.
"EU FP7-288307 PHARAON project: Parallel and heterogeneous architecture for real-time
O
f
applications“
Euromicro Conference on Digital System Design, DSD 2013, IEEE, doi:
10.1109/DSD.2013.47.
10 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
Embedded S t
E b dd d Systems, ACES MB 2012 d i 10 1145/2432631 2432640
ACES-MB 2012, doi: 10.1145/2432631.2432640.

Tutorial SD1: High-Level Specifications to Cope With Design Complexity
ASP-DAC 2014, Singapore

January 20, 2014

38

More Related Content

PDF
Single-Source approach to the design of HW/SW Embedded Systems
PDF
Tutorial at the European Nanoelectronics Applications, Design & Technology Co...
PDF
Modeling an Embedded Device for PSpice Simulation
PDF
NOGESI case study
PDF
Lear unified env_paper-1
PPT
Prograamção Paralela Baseada em Componentes (Introduzido o Modelo #)
DOCX
Kavita resume
DOCX
Kavita resume startup
Single-Source approach to the design of HW/SW Embedded Systems
Tutorial at the European Nanoelectronics Applications, Design & Technology Co...
Modeling an Embedded Device for PSpice Simulation
NOGESI case study
Lear unified env_paper-1
Prograamção Paralela Baseada em Componentes (Introduzido o Modelo #)
Kavita resume
Kavita resume startup

What's hot (6)

PPTX
Presentation
PDF
Tools and Methods for Continuously Expanding Software Applications
DOC
Leela Madhavi KV_Latest
PDF
IRJET- A Review- FPGA based Architectures for Image Capturing Consequently Pr...
PDF
Verilog Ams Used In Top Down Methodology For Wireless Integrated Circuits
PDF
Csit77404
Presentation
Tools and Methods for Continuously Expanding Software Applications
Leela Madhavi KV_Latest
IRJET- A Review- FPGA based Architectures for Image Capturing Consequently Pr...
Verilog Ams Used In Top Down Methodology For Wireless Integrated Circuits
Csit77404
Ad

Similar to SW Synthesis from UML/MARTE (20)

PDF
The Art of Applied Engineering - An Overview
PDF
1unit--Embedded Systems
PPTX
Traditional vs. SoC FPGA Design Flow A Video Pipeline Case Study
PDF
1.1. SOC AND MULTICORE ARCHITECTURES FOR EMBEDDED SYSTEMS (2).pdf
PPTX
Unit 1c
PPTX
VLSI_CAD_Introductionxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.pptx
PDF
Pbd for es
PDF
AI Assisted Digital System Design Lecture 1
PPT
PDF
DSE and Profiling of Multi-Context Coarse-Grained Reconfigurable Systems
PPT
FPGA_prototyping proccesing with conclusion
PPTX
Software hardware co-design using xilinx zynq soc
PPTX
Intsoc2
PPTX
Esd module1
PDF
Digital Design With Systemc (with notes)
PPTX
EMBEDDED AND REAL TIME SYSTEMS-Unit-4_6703.pptx
PDF
Identifying and Resolving Consistency Issues between Model Representations
PPT
Fmcad08
PPTX
EC 308 Embedded Systems Module 1 Notes APJKTU
PPTX
Plenary Session: application drive design alberto sv
The Art of Applied Engineering - An Overview
1unit--Embedded Systems
Traditional vs. SoC FPGA Design Flow A Video Pipeline Case Study
1.1. SOC AND MULTICORE ARCHITECTURES FOR EMBEDDED SYSTEMS (2).pdf
Unit 1c
VLSI_CAD_Introductionxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.pptx
Pbd for es
AI Assisted Digital System Design Lecture 1
DSE and Profiling of Multi-Context Coarse-Grained Reconfigurable Systems
FPGA_prototyping proccesing with conclusion
Software hardware co-design using xilinx zynq soc
Intsoc2
Esd module1
Digital Design With Systemc (with notes)
EMBEDDED AND REAL TIME SYSTEMS-Unit-4_6703.pptx
Identifying and Resolving Consistency Issues between Model Representations
Fmcad08
EC 308 Embedded Systems Module 1 Notes APJKTU
Plenary Session: application drive design alberto sv
Ad

Recently uploaded (20)

PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Machine learning based COVID-19 study performance prediction
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Cloud computing and distributed systems.
PPT
Teaching material agriculture food technology
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Encapsulation theory and applications.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Empathic Computing: Creating Shared Understanding
Diabetes mellitus diagnosis method based random forest with bat algorithm
Machine learning based COVID-19 study performance prediction
NewMind AI Weekly Chronicles - August'25 Week I
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Cloud computing and distributed systems.
Teaching material agriculture food technology
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Understanding_Digital_Forensics_Presentation.pptx
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Mobile App Security Testing_ A Comprehensive Guide.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Encapsulation theory and applications.pdf
Unlocking AI with Model Context Protocol (MCP)
MYSQL Presentation for SQL database connectivity
20250228 LYD VKU AI Blended-Learning.pptx
cuic standard and advanced reporting.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
NewMind AI Monthly Chronicles - July 2025
Empathic Computing: Creating Shared Understanding

SW Synthesis from UML/MARTE

  • 1. Modeling and SW Synthesis for Heterogeneous Embedded Systems in UML/MARTE Tutorial SD1: High-Level Specifications to Cope With Design Complexity Hector Posadas, Pablo Peñil, Alejandro Nicolás, Eugenio Villar University of Cantabria Spain p
  • 2. Motivation  Design D i productivity gap d ti it  Raising the abstraction level  Multi-Processing & Heterogeneous platforms H t l tf  Increasing SW content  SW centric SW-centric design methodologies Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 2
  • 3. Usual SW development flow A M  Architectural Design  HW/SW platform  Architectural mapping  Ad/Hoc SW development N1  System calls  Communication functions  I/O functions & drivers B N2 OS2 OS1 GPU  Verification & Debug  DSP Costly fixing of wrong design decisions Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 3
  • 4. Usual SW development flow  Lack of reusability  Ad hoc Ad-hoc  Large code A M N1 B N2 re-engineering effort OS3 Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore OS2 OS1 GPU DSP January 20, 2014 4
  • 5. Outline    Introduction I t d ti State of the Art The PHARAON approach  Design g Flow  Modeling Methodology  SW Synthesis  Conclusions Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 5
  • 6. Introduction  Model-Driven Architecture (MDA)  High-abstraction High abstraction level  Mature SW engineering methodology  UML language  Application to embedded systems design Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 6
  • 7. Introduction  Why UML?  Natural way to capture system architecture  Standard way M B N2 N1 N.P Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore A N.O January 20, 2014 7
  • 8. Introduction  Why UML?  Natural way to capture system architecture  Standard way  UML language  Semantics   lacks What is each component? What kind or interaction each link actually means?  Domain-specific p  p profiles UML/MARTE Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 8
  • 9. Introduction  MARTE  Standard    UML profile for real time embedded systems real-time Platform-Independent Model (PIM) Platform Description Model (PDM) Platform-Specific Model (PSM)  Rich semantics content  Single-source approach Analysis Simulation Verification Parallelization Performance Analysis Optimization Architectural Mapping Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore System Synthesis January 20, 2014 Design-Space g p Exploration 9
  • 10. State of the Art State-of-the-Art  Discussion  System  Methods based on specific MoCs and/or profiles    SW     modeling in MARTE Requiring additional semantics q g Non-standard Synthesis Commercial code generation available Limited support for heterogeneity Limited flexibility for different architectural mappings Limited support for the MARTE semantics Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 10
  • 11. PHARAON Single Source Design Flow Single-Source Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 11
  • 12. PHARAON Single Source Design Flow Single-Source S i Scenarios C/ C++ C PIM (App) Architectural Mappings HW/SW Platform M2T Tools SW Synthesis ( y (SWSyn) y ) + Compilers Linkers SW stacks HW HW Accelerators HW Accelerators HW Accelerators Accelerators CPUs/DSPs/ASIPs GP-GPUs Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 12
  • 13. PHARAON Modeling Methodology  Main features M i f t  MDD  concepts Separation of Concerns  CBE: Component-Based Engineering approach  SW centric i  Standard  MARTE profile fil Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 13
  • 14. PHARAON Modeling Methodology  Data T D t Types for Communication Interfaces f C i ti I t f  Primitive Types    Data Bit Arrays Arrays Structures Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 14
  • 15. PHARAON Modeling Methodology  Component model  Hierarchical functional encapsulation  Ports  provided or required C2 C2.1 C2.2 C2.3 Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 15
  • 16. PHARAON Modeling Methodology  Component Interfaces C2 C2.1 C2.2 C2.3 Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 16
  • 17. PHARAON Modeling Methodology  Component model  Interfaces   sequential, guarded or concurrent, Max. threads available argument sizes (data splitting), Num. of incoming channels C2 C2.1 C2.2 C2.3 Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 17
  • 18. PHARAON Modeling Methodology  Component model  Channels    manage communications BlockingFunctionCall, BlockingFunctionReturn, both or none Timeout Priority C2 C2.1  C2.2 Buffer Size  ResMult Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore C2.3 January 20, 2014 18
  • 19. PHARAON Modeling Methodology  The Platform Description Model  HW/SW  Software Components   Components using MARTE stereotypes OS, HdS, Drivers, … Hardware Components  Processors, Memories, Buses, Custom HW, I/O Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 19
  • 20. PHARAON Modeling Methodology  Platform-Specific Model  Memory spaces mapped to platform resources  Mapping of functional components  to memory spaces and/or platform resources Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 20
  • 21. PHARAON Modeling Methodology  Architectural Design  Code reuse and/or development p  platform independent  HW/SW platform  Architectural mapping  SW Synthesis  Fast design optimization Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 21
  • 22. SW Synthesis   System heterogeneity Full support for  any architectural mapping decided for each component  any specific processing resource selected  any processing resource type  any memory space  any OS used by the processing resource  any communication i f i ti infrastructure t t Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 22
  • 23. SW Synthesis  Functional synthesis  One executable per memory-space memory space  Platform-Independent (C/C++) code   Highest 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  <<SwSchedulableResource>> Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 23
  • 24. SW Synthesis  Functional synthesis  Platform-Specific Platform Specific    code PlatformIndependent C code OpenCL/GL code for GPU Optimized C code for DSPs OpenCL/GL for GPUs OpenMP for SMPs… Configuration Original 908.28 sec 572.92 sec ARM-NEON 325.81 sec 255.28 sec ARM+DSP blocking call 206.01 206 01 sec 193.45 193 45 sec ARM+DSP non-blocking call 895.98 sec 431.68 sec ARM-NEON+DSP ARM NEON+DSP non-blocking call 247.93 sec 215.96 sec C3 Optimized Code ARM DSP optimized C code Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore Memory Space OS SMP node GPU DSP Communication Infrastructure January 20, 2014 24
  • 25. SW Synthesis  Communication synthesis  Essential activity in heterogeneous SW synthesis  Client-Server paradigm  Dependent on the architectural mapping Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 25
  • 26. SW Synthesis  Communication synthesis  Architectural    Same memory space Same OS Different processing nodes  Benefits      mapping / Drawbacks Communication Speed Memory protection Memory/cache use Scheduling g Parallelism… Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 26
  • 27. SW Synthesis  Communication synthesis 3 Layers automatically inserted in service calls  Layer 1: communication semantics   Layer 2 management f allocation-dependent communications L 2: t for ll ti d d t i ti   Allocation independent Thread generation, data splitting, synchronization Layer 3: Low-level communications y  Inter-thread, Inter-process, distributed communication Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 27
  • 28. SW Synthesis  Communication synthesis  Layer1: Independent  Channel properties  of architectural mapping RPC BlockingFunctionCall (T) BlockingFunctionReturn (T) T M Ta T Ta M Tb Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore Tb January 20, 2014 28
  • 29. SW Synthesis  Communication synthesis  Layer1: Independent  Channel properties  of architectural mapping Pipeline BlockingFunctionCall (F) BlockingFunctionReturn (T) T M Ta T Ta M Tb Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore Tb January 20, 2014 29
  • 30. SW Synthesis  Communication synthesis  Layer1: Independent  Channel properties  of architectural mapping Pipeline & Parallel BlockingFunctionCall (F) BlockingFunctionReturn (F) T M Ta T Ta Tb M Tb Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 30
  • 31. SW Synthesis  Communication synthesis  Layer1: Independent  Interface properties  T of architectural mapping Data splitting M Ta Ta Tb M1 M2 Tb Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 31
  • 32. SW Synthesis  Communication synthesis  Layer1: Independent  Interface properties  T of architectural mapping Data splitting M Ta Ta Tb M1 M2 Tb Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 32
  • 33. SW Synthesis  Implementation alternatives  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  optimal channel implementation for specific platform and code Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 33
  • 34. SW Synthesis  MultiCore Association APIs  Standard APIs for communication and synchronization  Closely distributed embedded systems    MCAPI - communication MRAPI - synchronization MTAPI - task generation  Independence from OS  OS-agnostic channel implementation   Components treated as MCAPI nodes Ports treated as MCAPI endpoints Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 34
  • 35. SW Synthesis  Platform Inputs & Outputs  Drivers associated to environmental components Camera Test-Bench code Camera 1 driver PLC Test-Bench code PLC driver Environment Model System Model P1 P2 Camera 2 driver Memory Space OS1 SMP Node PLC Communication Infrastructure Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 35
  • 36. Conclusions  UML/MARTE  Powerful modeling methodology  Single-Source approach  Platform-Independent Modeling Platform Independent  Maximizing reusability Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 36
  • 37. Conclusions  SW Synthesis  Functional modeling  Functional synthesis  Communication synthesis  Platform Inputs & Outputs  Actually enables platform-independent code  Reduces in depth knowledge of platforms in-depth  Support shorter design optimization cycles   wider design exploration shorter code generation on heterogeneous platforms Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 37
  • 38. Additional 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 p y y g physical implementation alternatives p from 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. "EU FP7-288307 PHARAON project: Parallel and heterogeneous architecture for real-time O f applications“ Euromicro Conference on Digital System Design, DSD 2013, IEEE, doi: 10.1109/DSD.2013.47. 10 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 Embedded S t E b dd d Systems, ACES MB 2012 d i 10 1145/2432631 2432640 ACES-MB 2012, doi: 10.1145/2432631.2432640. Tutorial SD1: High-Level Specifications to Cope With Design Complexity ASP-DAC 2014, Singapore January 20, 2014 38