39
Davide Quaglia Assistant Professor @ CS depart University of Verona, Italy [email protected] Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark

Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Davide Quaglia

Assistant Professor @ CS depart

University of Verona, Italy

[email protected]

Emad Ebeid

Post-doc @ ENG Department

Aarhus University

Denmark

Page 2: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

2

Page 3: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

• Networked Embedded Systems (NES) are an important class of devices

– Network functionalities are at the core of design

objectives

– Network requirements come together with

IntroductionIntroduction

– Network requirements come together with

traditional requirements

• Distributed Embedded Systems are group of NES which are connected together using network interfaces, standardized protocols and channels

– Example: Temperature control of a building

3

Page 4: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

IntroductionIntroduction

Temperature control of a buildingTemperature control of a building

• Scenario:

– Hundreds of concurrent tasks.

– Heterogeneous tasks.

– Devices with different capabilities.

A C S

Activation of a set of

independentcoolers

Temperature sensing

4

– Devices with different capabilities.

– Wireless and wired channels.

– Many communication protocols.

– Nodes position affects system performance.

• Questions:

– How many nodes?

– How to assign tasks to nodes?

– Which network protocols?

– Which intermediate systems?

A C S

A C S

Communicationinfrastructure

Page 5: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Application requirements: functional & non-functional

Model-driven design

Traditional design flow for embedded Traditional design flow for embedded systems:systems:

IntroductionIntroduction

5

Platform description:

IP blocks (CPU, memory, ASIC)

Design-space

Exploration

(DSE) HW/SW partitioning

Final result

Page 6: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

a = b AND c

HW/SW HW/SW partitioning:partitioning:

IntroductionIntroduction

6

b

ca

{

a = b && c;

}

Page 7: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

High level function model

a

b f

modelingF(a,b,c)= a AND (not b) AND c

IntroductionIntroductionHardware Hardware design:design:

b

c

Mapping

a

b

c

f

f

Auto

matic S

ynth

esis

7

Page 8: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Software development Software development

• Functionality is described with different languages and an automatic process is used to generate assembly code for different target CPU’s

Application spaceJava, C, Perl, Python(functions, classes ,

template)

IntroductionIntroduction

CPU’s

• Modeling of the functionality: High level languages

• Automatic synthesis: Compilers

Architectural space

Instruction sets (Intel, ARM)

8

Page 9: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

IntroductionIntroduction• Distributed embedded system as a single system to be

designed

Zone IZone IZone IZone I Zone VZone VZone VZone V Zone VIZone VIZone VIZone VI

9

Zone IIZone IIZone IIZone II Zone IIIZone IIIZone IIIZone III

Page 10: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Application requirementsSteps of state-of-the-art system design flow

Additional steps for network design

Formal network model

Computational and

communication requirements

IntroductionIntroductionNew design flow for NESNew design flow for NES

10

Platform description

Design-space exploration

of nodes

NW DSE& NetworkSynthesis

Network-awaredescription

of the application

Channel & protocol description

Page 11: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

IntroductionIntroduction• Start from an abstract Model-Driven System Specification

• Modeling and Analysis of Real-Time and Embedded

Systems (MARTE) profile for the unified modeling

language (UML)

• Refinement steps and simulations

11

• Refinement steps and simulations

• Standard representation of requirement and solutions

Page 12: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

BackgroundBackground• Design of the network infrastructure starting from a

library of nodes and channels (Network synthesis)

– Communication Aware Specification and Synthesis

Environment (CASSE), [FDL 2010]

12

– COmmunication Synthesis Infrastructure framework

(COSI), [IEEE TASE '12]

• Open issue : Both approaches do not rely on a standard

representation of requirements (from the initial user

specification) and solutions

Page 13: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Key ideaKey idea

13

Page 14: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Proposed Proposed methodologymethodology

Application requirements

SystemC /TLM

Description of actual nodes & channels

Environmentdescription

Tasks & Data flows

Distributedarchitecture

SystemC NetworkSimulation

Library (SCNSL)

Modeling

requirements

14

Task implementation

CASSE/ manipulation

Throughput & Latency

requirements

Communication & computationrequirements Environment constraints Description of actual nodes and channels

Nodes & channelsallocation

Network statistics:packet loss rate,

delay

System

View

SimulationNetwork

synthesis

Network

View

Simulation

Page 15: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Application requirements

SystemC /TLM

Description of actual nodes & channels

Environmentdescription

Tasks & Data flows

Distributedarchitecture

SystemC NetworkSimulation

Library (SCNSL)

Modeling

requirements

15

Task implementation

CASSE/ manipulation

Throughput & Latency

requirements

Communication & computationrequirements Environment constraints Description of actual nodes and channels

Nodes & channelsallocation

Network statistics:packet loss rate,

delay

Page 16: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Modeling requirementsModeling requirements

• The main aspects to be represented in UML/MARTE are:

– Tasks, data flows, nodes, channels and the external environment

16

Task Task

Node

Channel

Data flow

Zone

Node

Zone

Page 17: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Modeling requirementsModeling requirements

• Generic Quantitative Analysis Modeling (GQAM) sub-profile of MARTE profile are used to specify the semantics of some classes and their attributes

• This is the first time that GQAM is used to model the network

17

Page 18: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Modeling requirementsModeling requirements

• Generic Quantitative Analysis Modeling (GQAM) sub-profile of MARTE profile are used to specify the semantics of some classes and their attributes

• This is the first time that GQAM is used to model the network

18

Page 19: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Modeling requirementsModeling requirements

• Generic Quantitative Analysis Modeling (GQAM) sub-profile of MARTE profile are used to specify the semantics of some classes and their attributes

• This is the first time that GQAM is used to model the network

19

Page 20: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Modeling requirementsModeling requirements

• Generic Quantitative Analysis Modeling (GQAM) sub-profile of MARTE profile are used to specify the semantics of some classes and their attributes

• This is the first time that GQAM is used to model the network

20

Page 21: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Modeling requirementsModeling requirements

• Generic Quantitative Analysis Modeling (GQAM) sub-profile of MARTE profile are used to specify the semantics of some classes and their attributes

• This is the first time that GQAM is used to model the network

21

Page 22: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Modeling requirementsModeling requirements

• Generic Quantitative Analysis Modeling (GQAM) sub-profile of MARTE profile are used to specify the semantics of some classes and their attributes

• This is the first time that GQAM is used to model the network

22

Page 23: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Modeling requirementsModeling requirements

• Modeling of constraint:

– Application constraints are specified by using cardinality on the

relationships between classes

• Example of constraint: “maximum one instance of t3 can be assigned to a single node”assigned to a single node”

23

Page 24: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Application requirements

SystemC /TLM

Description of actual nodes & channels

Environmentdescription

Tasks & Data flows

Distributedarchitecture

SystemC NetworkSimulation

Library (SCNSL)

24

Task implementation

CASSE/ manipulation

Throughput & Latency

requirements

Communication & computationrequirements Environment constraints Description of actual nodes and channels

Nodes & channelsallocation

Network statistics:packet loss rate,

delay

System

View

Simulation

Page 25: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

System view simulationSystem view simulation

• UML/MARTE class diagram is extracted and used to generate SystemC/TLM model

– Transformations are straight forward also

(Villar,2009 and Vanderperren,2008)

• Execution of the SystemC model• Execution of the SystemC model

– Validate of functional behavior of the

application

– Fine-tune implementation details such as the

content of exchanged messages and their

sending rates

• Back annotation of throughput, latency and max error rate inside UML/MARTE model

25

Page 26: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Application requirements

SystemC /TLM

Description of actual nodes & channels

Environmentdescription

Tasks & Data flows

Distributedarchitecture

SystemC NetworkSimulation

Library (SCNSL)

26

Task implementation

CASSE/ manipulation

Throughput & Latency

requirements

Communication & computationrequirements Environment constraints Description of actual nodes and channels

Nodes & channelsallocation

Network statistics:packet loss rate,

delay

Network

synthesis

Page 27: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Network synthesisNetwork synthesis

• All the information about user constraints, communication requirements and actual channels and nodes are extracted from the UML/MARTE model and translated into Network synthesis mathematical representation

• CASSE provides a mathematical notation to specify the network • CASSE provides a mathematical notation to specify the network dimension of a distributed embedded system, preparing the way for network synthesis

Dataflow(f4) = [t3, t4, [3, 1, 0.3]].

27

Page 28: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Network Network synthesis cont’dsynthesis cont’d

Set of Set of tasks & tasks & data data flowsflows

UML deployment diagram:Assignment of tasks inside nodes

and data flows inside channels

NW Synthesis

28

The building geometryThe building geometry

Technological Technological librarylibrary

(network nodes and channels)(network nodes and channels)

Page 29: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Network Network synthesis cont’dsynthesis cont’d

Set of Set of tasks & tasks & data data flowsflows

UML deployment diagram:Assignment of tasks inside nodes

and data flows inside channels

NW Synthesis

29

The building geometryThe building geometry

Technological Technological librarylibrary

(network nodes and channels)(network nodes and channels)

Page 30: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Manipulation

• This step aims at obtaining several NW alternatives which are equivalent from the network perspectivenetwork perspective

• Mathematical-based rules

– Divide

– Split

– Merge

– Aggregate

30

Page 31: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Application requirements

SystemC /TLM

Description of actual nodes & channels

Environmentdescription

Tasks & Data flows

Distributedarchitecture

SystemC NetworkSimulation

Library (SCNSL)

31

Task implementation

CASSE/ manipulation

Throughput & Latency

requirements

Communication & computationrequirements Environment constraints Description of actual nodes and channels

Nodes & channelsallocation

Network statistics:packet loss rate,

delay

Network

View

Simulation

Page 32: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Network view simulationNetwork view simulation

• SCNSL is an extension of SystemC to allow modeling packet-based networks

– It allows the easy and complete modeling of distributed applications of networked

embedded systems such as wireless sensor networks, routers, and distributed

plant controllersplant controllers

32

SCNSL

Task t3

Task t4

Task t5

Node

n9 Node

n9

Channela2UML deployment diagram

Page 33: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Network view simulationNetwork view simulation

• Correspondence between UML/MARTE and SCNSL elements

UML/MARTE SCNSL

Node (n1) n1 = scnsl->createNode();

33E. Ebeid, F. Fummi, D. Quaglia, F. Stefanni

Channel (ch)

bound to node (n1)

CoreChannelSetup t ccs;

ch = scnsl->createChannel(ccs);

BindSetup base t bsb1;

scnsl->bind(n1,ch,bsb1);

Data flow between task (t1)

and task (t2)

CoreCommunicatorSetup t ccoms;

mac1 = scnsl ->createCommunicator(ccoms);

scnsl->bind(& t1,& t2,ch,bsb1,mac1);

Zones (z1…zn) Environment_if_t object

Page 34: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Case studyCase study

• one instance of actuator should be placed in each zone

• max……

+

34

User requirement

System View

modeling

NW synthesis tool

Page 35: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Case Case study cont’dstudy cont’d

NW view modeling

35

Network simulator (SCNSL)

Page 36: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Case Case study cont’dstudy cont’d

NW

36

NW simulation statistics

Page 37: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

Case Case study cont’dstudy cont’d

NW

37

NW simulation statistics

NW manipulation

Page 38: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

SummarySummary

• User requirements and constraints has been modeled by using UML/MARTE profile and simulated by SystemC/TLM at system view level

• Simulation results has been used to refine the user model

• Network synthesis tools have been used to solve the application problem

• Network solutions have been modeled and simulated by using SCNSL

• Network statistics have been used for the final refinement of application model

• Manipulation and Automatic design-space exploration

38

Page 39: Emad Ebeid Davide Quaglia Post-doc @ ENG Department … · 2016-05-02 · Emad Ebeid Post-doc @ ENG Department Aarhus University Denmark. 2 ... Zone IZone I Zone V Zone V Zone VI

ConclusionsConclusions

• Some UML/MARTE diagrams and stereotypes have been used as a first time to represent the building blocks of a distributed embedded application

– Elements from the MARTE specification have been applied to the context of

distributed embedded applicationsdistributed embedded applications

• Some gaps in MARTE standard have been identified concerning the representation of constraints and attributes related to error rate information

• SystemC code has been generated for both functional and network-aware simulation

39

A A UMLUML--centric centric design flow for networked embedded systems design flow for networked embedded systems has been has been createdcreated