• Aucun résultat trouvé

A Model for the Mixed-Design of Data-Intensive and Control-Oriented Embedded Systems

N/A
N/A
Protected

Academic year: 2023

Partager "A Model for the Mixed-Design of Data-Intensive and Control-Oriented Embedded Systems"

Copied!
27
0
0

Texte intégral

(1)

HAL Id: inria-00293909

https://hal.inria.fr/inria-00293909v2

Submitted on 23 Jul 2008

HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Control-Oriented Embedded Systems

Abdoulaye Gamatié, Eric Rutten, Huafeng Yu

To cite this version:

Abdoulaye Gamatié, Eric Rutten, Huafeng Yu. A Model for the Mixed-Design of Data-Intensive

and Control-Oriented Embedded Systems. [Research Report] RR-6589, INRIA. 2008, pp.26. �inria-

00293909v2�

(2)

a p p o r t

d e r e c h e r c h e

N 0 2 4 9 -6 3 9 9 IS R N IN R IA /R R -- 6 5 8 9 -- F R + E N G

Thème COM

A Model for the Mixed-Design of Data-Intensive and Control-Oriented Embedded Systems

Abdoulaye Gamatié — Éric Rutten — Huafeng Yu

N° 6589

July 2008

(3)
(4)

Centre de recherche INRIA Lille – Nord Europe Parc Scientifique de la Haute Borne

AbdoulayeGamatié

, ÉriRutten

, Huafeng Yu

ThèmeCOMSystèmesommuniants

Équipes-ProjetsDaRTet Pop-Art

Rapportdereherhe n°6589July200823pages

Abstrat: This paper presentsa model and its semantisfor the design of

embeddedsystemsthatontaindata-intensivepartssuhasmultimediaapplia-

tions,andrequireadaptivityw.r.t. riteriasuhasplatformresouresorquality

ofservie(QoS).Theproposedsolutionreliesonaombinationof: i)therepet-

itive model of omputation dediated to the design of high-performane em-

beddedsystemsandii) reativeontrolfeaturesbasedonnitestatemahines

and modes. It is dened within a framework, alled Gaspard2, that imple-

ments automati transformations that lead to various target languages, e.g.,

synhronouslanguages, SystemC, VHDL. The new model oersthe adequate

expressivepowertodesribeomplexbehaviorsofhigh-performaneembedded

systems. It alsoreonilesexeutionmodelsdediatedtoregularomputations

andontrol-orientedmodelsthatratherleadto irregularomputations.

Key-words: RepetitiveMoC, reativeontrol, high-performane embedded

systems,modes,designandmodeling,Gaspard2

CNRS/LIFL -INRIA Lille-NordEurope, Cité Sientique, Bât. A, 40avenueHalley,

59650Villeneuved'Asq,Frane,abdoulaye.gamatieli.fr

INRIARhne-Alpes,Inovallée655,avenuedel'Europe,Montbonnot38334Saint-Ismier

edex,FRANCE,eri.rutteninria.fr

INRIA Lille-NordEurope/LIFL, Bât. A, 40avenue Halley,59650 Villeneuved'Asq,

Frane,huafeng.yuinria.fr

(5)

données et ontrle

Résumé:

Cerapportprésente unmodèleet sasémantiquepourlaoneptiondesys-

tèmesembarquésontenantdutraitementintensifdedonnées(parexemple,les

systèmesmultimédia)etexigeantuneadaptationparrapportàdesritèrestels

quelesressouresdeplates-formesoulaqualitédeservie. Lasolutionproposée

ii repose sur une ombinaison: i) d'un modèlede alul répétitif dédié à la

oneptiondesystèmesembarquésàhautesperformanesetii)desnotionsde

ontrleréatifbaséessurlesmahinesàétatsnisetlesmodes. Elleestdénie

dansunadre,appelé Gaspard,quimeten÷uvredestransformationsautoma-

tiquesversdiérentslangagesibles ommeleslangages synhrones, SystemC

ouVHDL. Le nouveau modèle oreun pouvoirexpressif intéressant pourdé-

riredes omportementsomplexesdes systèmesvisés. Ilréonilieégalement

les modèles d'exéution dédiés aux aluls réguliers ave les modèles orientés

ontrlequiinduisentpluttdesalulsirréguliers.

Mots-lés: Modèled'exéutionrépétitif,ontrleréatif,systèmesembarqués

àhautes performanes,modes,oneptionet modélisation,Gaspard2

(6)

1 Introdution

Today,it iseasyto observehowmodernembeddedsystemshavebeomevery

sophistiatedandhavebeenrequiringmoreandmoreomputingresoures. This

ispartiularlytrueforhigh-performane systems,whihmassivelyadoptarhi-

teture paradigmswith multiple proessors orores. The range of onerned

appliation domains is wide: state-of-the-artmultimedia appliations suh as

high-denition digital television, medial imaging, biometri data proessing,

sonar,radar,et. Alltheseappliationsareharaterizedbydata-intensiveom-

putations,whih an beeientlyahievedwithparallelimplementations. On

theotherhand,embeddedsystemsusuallyhavespeirequirementsthatmust

be imperatively dealt with during their design. Typially, for mission-ritial

systems,suhassonarorradar, theresoureonstraints(e.g. limitedmemory

apaityorenergypower)imposetheabilitytoguaranteenonfuntionalprop-

erties. Inaddition, thereliabilityof thesesystemsneessitatesthe veriation

of their funtional properties. Further important requirements are adaptivity

andreongurability,whiharesometimesneededinordertomakethesystems

exibleenoughtoexeutew.r.tenvironmentandplatformonstraints.

Fromtheaboveobservations,thereislearlyaneedofpratial,well-founded

frameworksenablingtosuitablyaddressallmentionedaspetsaboutthedesign

ofembeddedsystems. Suhframeworksshouldprovidedesignerswithadequate

desription models and development tools. Here, we present a model for the

designofdata-intensiveandontrol-orientedembeddedsystemswithinaframe-

workdevotedto thedevelopmentofhigh-performanesystem-on-hip (SoC).

High-performanesystem-on-hip. Theinreasingintegrationapaityof

transistorsonasinglehippromotestheimplementationofparallelarhitetures

on-hip. As aresult, in reent years, multiproessor system-on-hip (MPSoC)

hasbeomemainstreamforembeddedsystemswithintensiveparallelomputa-

tions. Theyoer veryinterestingomputationalperformanes, whilereduing

poweronsumption. MPSoCsonsistofplatformsomposedofseveralproess-

ing elements, memoryand I/Oomponentsthat are interonnetedby anon-

hipdediatedstruture (e.g. see theTile64arhitetureof Tilera 1

). MPSoC-

based design of embedded systems needs new development methodologies in

order toredue theomplexityofdesignspae explorationand toinreasethe

produtivityofengineers. Onesolutiononsistsinonsideringhigh-levelmodels

thatareexpressiveenoughtodesribeallaspetsofMPSoCsystems,andasso-

iated automatitransformations that rene high-leveldesriptions into lower

levelones. Theresultingreneddesriptionsareusableforvarious purposes.

Ourdesignenvironment,alledGaspard2 [16℄,exatlyrelies onthis solu-

tion. Itadoptsthemodel-drivenengineering(MDE)approahtoimplementthe

methodology illustratedin Figure 1. Here, anMPSoC systemunder design is

modeledusing the OMG standardprole dediated to Modeling and Analysis

ofReal-timeandEmbeddedsystems (Marte 2

). ThisproleextendsUMLwith

new onepts that an be used to model the software and hardware parts as

wellasthemappingoftheformeronthelatter. Suhmodelsontaintheuseful

information that enable to address dierent design aspets: parallelism, per-

1

http://www.tilera.om.

2

www.omgmarte.org.

(7)

Figure1: TheGaspard2designmethodology.

formaneand sheduling,et. InGaspard2,thehigh-levelmodelsarerened

towardsspei tehnologies: synhronouslanguages[1℄for formal validation,

SystemCforsimulation,OpenMPFortranforexeutionandVHDLforiruitry

synthesis. At eah level of this renement, the oneptsare haraterized by

adediated metamodel, and the transitions from onelevelto another areob-

tainedviaautomatimodeltransformationsw.r.t. orrespondingmetamodels.

Thebakboneenvironmentthat implementsthismethodologyisElipse.

ThedesignofMPSoCinGaspard2speiallyreliesontherepetitivemodel

of omputation (MoC) [3℄, whih oers a very suitable way to express and

managedierentdegrees of parallelismin asystem. This MoC is inspired by

Array-Ol[3,6℄,amixedgraphial-textualdomain-speilanguageoriginally

dediatedtointensivesignalproessingappliations. Itoersanelegantwayto

desribebothtaskparallelism anddataparallelism intheappliations. Another

majoradvantage ofthe repetitive MoCis the regularity of thestrutures and

omputationsitdesribes. Thisfeatureisprotablyexploitedtodeneeient

algorithms and ompilation tehniques towards well-known high-performane

arhiteturessuhasSIMD.

Control in high-performane omputations. Let us onsider asenario

ofadaptationinalastgenerationellularphone. Suhaphoneintegratesvideo-

streamingappliationsthatprovidetheuserwithvideo-on-demandprograms,or

televisionbroadast. Suhappliationsaredata-intensiveandoftenperformin

dierentmodesinordertofulltheirfuntionalityaordingtovariousriteria:

Qualityofservie(QoS)e.g.,regardingimagedisplay,thefollowingaspetsare

takeninto aount:

(8)

ˆ modes: high vs. medium vs. lowresolution, blak and whitevs. olour

display,andompressionlevel.

ˆ levels of quality: aninterestingfeature isto have"graeful"degradation

w.r.t. riteria from the multimedia appliation domain. These riteria

haveto deidewhether blakand whitein highresolution isbetterthan

olourin mediumresolution, orwhether it is preferableto haveaverage

qualityofimagestoavoidabrupthangingofquality,ortokeepthehighest

quality.

Platformresoureonsumption. Itanhavequitedierentharateristisifsev-

eralalgorithmversionsofthefuntionalityareavailable,regarding: omputing

(in terms of WCETorCPU load), ommuniation (swithing on oro signal

ompressionaordingtoavailablebandwidth),memoryfootprint,aess time

betweenmainandseondarymemories,andenergy.

Themanagementoftheaboveaspetsleadstothedenitionofanadaptation

poliy w.r.t. environment. Thegeneralgoalis nomatter how the environment

hanges, funtionality must be fullled, at a good level. One of the reating

modesin aphoneisaninomingmessage,withattahedimages. Ifthereeipt

modeinvolvesimmediatedownload,thenitouldimplydegradedvideoquality

inordertoreleasesomeresoures. Otherwise,thereeiptanbeshutobythe

userwhilelooking atvideouninterruptedandundisturbed, andresumed later.

This latter point illustrates how knowledge of the appliation state allowsfor

lookaheadintheontrol.

Theaboveexamplegivesanideaoftheadaptationriteria,qualitylevelson

funtionality,appliation-speiaspetsandresouremanagementpoliiesthat

havetobedealtwithduringthedesignofhigh-performaneembeddedsystems.

Itpartiularlymotivatestheneedofdesignmodelsombiningtwobasifeatures:

i)oneptsthatenabletoexpressdata-intensiveomputationsandii)onepts

that oer a way to express the adaptivity w.r.t. various onstraints suh as

QoS.Thispaperaimsatansweringthis demand.

Ourproposition. OurontributionistoenrihtherepetitiveMoCwithnew

onstrutsthatenabletheexpressionofontrolbetweendierentmodesofom-

putation. Animportanthallengeistopreservetheregularityoftherepetitive

MoC in preseneof ontrol onepts (whih potentially leadto irregularom-

putations) soastoontinueto benetfromthisfeature foreientimplemen-

tations. We dene an assoiated formal model, and in addition, we propose

struturedonstrutsthat takeinto aounthierarhyand omposition in the

ontrol extension ofGaspard2models. This extensionis inspiredbyreative

modeautomata[5,13℄andimprovesthepreliminaryinformalsuggestionof[10℄.

Thedenedformalmodelisthesemantisupportforreasoningduringthedif-

ferenttransformations(whiharenotin thesopeofthis paper) supportedby

the framework illustrated in Figure 1. The presentedstrutured ontrol on-

strutsoerabetterexpressivitythanin[10℄andenableomplexyetveryuseful

modelsasillustratedin Setion4.

The remainder of the paper is organized as follows: Setion 2 introdues

the basi design elements of the repetitive MoC by dening a orresponding

behavioralsemantis.Then,Setion3presentstheproposedextensionenabling

to denemixed data-intensiveandontrol-orientedspeiations. A fewillus-

trativesituations aregivenin Setion 4,desribing someadaptivitysenarios.

(9)

Setion 5disusses our solutionw.r.t. existing works. Finally, onluding re-

marksaregivenin Setion6.

2 Repetitive struture modeling

We present the design onepts of Gaspard2 and we propose an assoiated

behavioral semantis. Mostof these oneptshavebeen integratedin Marte

standardprole.

2.1 An overview of the onepts

ThemaindatatypemanipulatedinGaspard2ismultidimensionalarray. Three

kindsoftasks are distinguished: elementary, repetitive and hierarhial tasks.

Let

T

denote the set of any of these kinds of tasks. The abstrat grammar

presentedin Figure 2desribesthe basispeiation oneptsof Gaspard2.

Byonvention,thenotation

x : X

in thegrammarmeansthat

X

isthetypeof

x

,and

{X }

denotesaset ofelementstyped

X

.

T ask ::= Interf ace; Body (r1)

Interf ace ::= i, o : {P ort} (r2)

P ort ::= id; type;shape (r3)

Body ::= Body h | Body r | Body e (r4)

Body e ::= some f unction (r5)

Body r ::= t i , t o : {T iler}; ( s r ; T ask); {Ird} (r6)

Ird ::= Connexion; d ; c p (r7)

Connexion ::= p i , p o : P ort (r8) T iler ::= Connexion; (F ; o ;P ) (r9) Body h ::= {T ask}; {Connexion} (r10)

Figure2: A grammarofGaspard2onepts.

All tasks shareommon features. Theyhavethesameglobal struture, as

desribedinrule

(r1)

:

ˆ an interfae dened in rule

(r2)

that speies input and output ports,

respetivelyrepresentedby

i

and

o

. Ports areharaterizedin rule

(r3)

bytheiridentier thetype ofreeivedarrayelements,andtheshape (i.e.

dimension)ofthesearrays. Wedenoteby

P

and

V

respetivelythesetof ports,andtheirassoiatedvaluedomain(i.e. setofarrays).

ˆ abody (rule

(r4)

), whihdesribesthefuntiondened bythetask.

The remaining rules are explained in setion 2.2. Before going through their

explanation,wehaveto notethat there areseveral existing programminglan-

guagesto dealwithhigh performane, mostlyforparallelsientiomputing.

The most popular is High-Performane Fortran [9℄, whih manipulates mul-

tidimensional arrays and proposes parallel loop onstruts and regular data

distributions. Morereentlanguageproposals areStreamIt[18℄ and thehigh-

produtivity omputing languages[12℄: Chapel, Fortressand X10. The main

objetive of these languages is to failitate the programming of next genera-

tion parallel systems and signiantly inrease the produtivity of program-

mers. Theyaredeneduponexistingprogramminglanguages,e.g. Fortranfor

(10)

FortressandJavaforX10. Theynativelysupporttheontrolstruturesoftheir

underlying languages.

While all above languages are dediated to programming, the Gaspard2

formalism is rather devoted to high-level modeling. Via its tiling onstrut

(see Setion 2.2.2), it oersaveryelegantand powerfulabstration levelthat

allowsonetodesribethewaymanipulateddataareaessedbyomputingele-

ments. Then,thetransformationhainsimplementedinitsdesignenvironment

automatiallygeneratemulti-targetodefromhigh-levelmodels. Regardingall

theseaspets,theAlphalanguage[20℄isverylosetoGaspard2. However,a

notablediereneisthatAlphamanipulatespolyhedrainsteadofarrays. This

leadstodierentspeiationstyles.

2.2 Behavioral semantis

Werstintroduesomebasidenitionsinspiredby[2℄, whih willbeusedto

denetheGaspard2model.

Denition1(Environment). Let

P ⊂ P

representsaset ofports,anenviron-

ment

ε

assoiatedwith

P

isdenedasafuntion

P → V

.

Theset ofenvironmentsassoiatedwith

P

isnoted

ε P

. Aport(or aset of

ports)

p

taking avalue

v

in the exeutionenvironment

ε

is noted

p(v) ∈ ε

,or

equivalently

ε(p) = v

.

Denition 2 (Environmentomposition). Let

ε 1 ∈ ε P 1

and

ε 2 ∈ ε P 2

denote

twoenvironments. Theyareomposablei

∀p ∈ P 1 ∩ P 2

,

ε 1 (p) = ε 2 (p)

. Their

omposition,noted

,isthereforeasfollows:

:

ε P 1 × ε P 2 → ε P 1 ∪P 2

(ε 1 , ε 2 ) 7→ ε 1 ∪ ε 2

Thebehavioralsemantisof atask isgivenbyalabelledtransition system

wherethestatesonsistoftasksasfollows:

C T 1

− −− ε → T 2

where

T 1 , T 2 ∈ T

,

ε

denotes anexeutionenvironmentofthetasks

T 1 , T 2

, and

C

is aonditionon

T 1

,

T 2

and

ε

. The environment

ε

xes the valueof ports

assoiatedwith

T 1

and

T 2

duringatransition. Theondition

C

mustbesatised

in order to perform thetransition between

T 1

and

T 2

aordingto

ε

. Forany

task

T ∈ T

, we denote by

[[T ]]

its orresponding semantis, i.e., the funtion that transformsitsinputsintoitsoutputs. Forsyntatialonveniene,weuse

a"dot"notationtodesignatesub-partsofaoneptaordingtothegrammar

ofFigure 2, e.g.,if

I 1

denotes aninterfae,wewrite

I 1 .i

to designateitsinput

ports.

2.2.1 Elementary tasks

An elementary task

E

(rule

(r5)

) informallyonsists of a funtion that is ex-

euted atomially. We adopt a graphialnotation slightlysimplied from [3℄,

illustratedbyFigure3.

(11)

i E o

Figure3: An elementarytask.

Denition3(Elementarytask). Let

E

beanelementarytask. Its behavioral

semantis withinanenvironment

ε

isasfollows:

ε(o) = φ(ε(i)) E ε E

where

φ = [[E.Body]]

and

(i, o) = E.Interf ace

.

2.2.2 Repetitivetasks: data parallelism

Arepetitivetask

R

(rule

(r6)

) expressesdata-parallelism. InFigure 4,

T ∈ T

denotes the basi funtionality to be repliated on dierent subsets of data

obtained from the input arrays of task

R

. The resulting instanes of

T

are

assumedtobeindependentandshedulablefollowinganyorder,eveninparallel.

Inrule

(r6)

,

T

isdenotedby

T ask

inthetaskbody. Theattribute

s r

denotesthe repetitionspae,whihenablestodeterminethenumberoftask instantiations,

i.e.,

| s r |

. Itisdeneditselfasamultidimensionalarray. Eahdimensionofthis repetition spaeanbeseenasaparallelloop andtheshapeof therepetition

spaegivestheboundsoftheloopindiesof thenestedparallelloops.

i p i p o o

t o F o

t i : P

R

T s r

Figure4: A repetitivetask: dataparallelism.

Eah task instane onsumes and produes sub-arrays, alled patterns or

tiles, whih havethe sameshape. They are onstrutedby tilers (rule

(r9)

),

whih are assoiated with eah pair of ports, alled Connexion in rule

(r8)

.

A tilerextrats (resp. stores)patterns from (resp. in) anarraybased onthe

following information:

F

: tting matrix (desribing how array elements ll

patterns);

o

: originofthereferenepattern;and

P

: apavingmatrix(speifying

how patterns overan array). We briey reall belowthe basipriniples for

patternttingandarraypaving. Formoredetails,thereadermayreferto[3℄.

Givenatile,letitsrefereneelement denotetheoriginpointfromwhihall

its other elements an be extrated. The tting matrix is used to determine

these elements. Their oordinates, represented by

e i

, are built as the sumof theoordinatesoftherefereneelementandalinearombinationofthetting

vetors, the whole modulo the size of the array(sine arrays are toroidal) as

follows:

∀ i , 0 ≤ i < s

pattern

, e i = ref + F × i mod s

array

(1)

(12)

where

s

pattern

is theshapeofthepattern,

s

array

is theshapeofthearrayand

F

isthettingmatrix. Figure5illustratesthettingresultfora

(2, 3)

-pattern

with the tiling information indiated on the same gure. The tting index-

vetor

i

,indiatedineahpoint-wiseelementofthepattern,variesbetween

( 0 0 )

and

( 1 2 )

. Therefereneelementisharaterizedbyindex-vetor

( 0 0 )

.

Now,foreahrepetitioninstane,oneneedstospeifytherefereneelements

oftheinputandoutputtiles. Therefereneelementsofthereferenerepetition

are given bythe origin vetor,

o

, of eah tiler. The refereneelementsof the otherrepetitionsarebuiltrelativelytothisone. Asabove,theiroordinatesare

builtasalinearombinationofthevetorsofthepaving matrixasfollows:

∀ r , 0 ≤ r < s

repetition

, ref r = o + P × r mod s

array

(2)

where

s

repetition

is theshapeoftherepetitionspae,

P

thepavingmatrixand

s

array

theshapeof thearray. ThepavingillustratedbyFigure 5showshowa

(2, 3)

-patternstilea

(6, 6)

-array.Here,thepavingindex-vetor

r

,variesbetween

( 0 0 )

and

( 2 1 )

.

Figure 5: Exampleofpavingandttingsenarios.

Given a repetitive task

R

, we denote the tiling operation on an input or

output array

α

of

R

byusing thefollowingonvention:

α = U

t (α k )

, meaning

that

α

istiled bythe set of patterns

k |k ∈ 1..| s r |}

, aordingto thetiler

t

.

Thisnotionisextendedtoaset

{α 1 , .., α j }

of

j

inputoroutputarraysasfollows:

{α 1 , .., α j } = U

t 1 ..t j (α k 1 )..(α k j )

,whihisequivalentto

α 1 = U

t 1 (α k 1 ) ∧ .. ∧ α j = U

t j (α k j )

. Ontheotherhand,forshortwewillmeanby

{p} 1..j

theenumeration of

j

patterns

(p 1 ..p j )

.

(13)

Denition4(Repetitivetask). Let

R

bearepetitivetaskwith

s

inputsand

q

outputs. Itsbehavioralsemantiswithinanenvironment

ε

isasfollows:

∀k ∈ 1..| s r |, {p k o } 1..q = φ({p k i } 1..s ), ε(i) = U

t i 1 ..t is (p k i 1 )..(p k i s ), ε(o) = U

t o 1 ..t oq (p k o 1 )..(p k o q ) R ε R

where

φ = [[R.Body.T ask]]

and

(i, o) = R.Interf ace

.

Taskinstanesmaysometimesdependonothertaskinstanes. Forexample,

thishappenswhenomputingthesumoftheelementsofanarraybyonsidering

thepartialsumpreviouslyalulatedat eahstep. Suhaonstrainttherefore

induesatotalexeutionorderonarepetitivetask.

F P t i :

i p i p o o

t o

o R

T c p def

d s r

Figure6: Inter-repetitiondependeny.

Figure6illustratesasimpliednotationforarepetitivetaskwithaninter-

repetition dependeny, haraterized by rule

(r7)

.

Connexion

represents the

pairofportsonnetedbythedependenylink: oneisaninputtotherepeated

task

T

e.g.,

c p

,andtheotherisoneofitsoutputse.g.,

p o

. Thevetor

d

speies

theoordinatesoftheinter-repetitiondependenylinkontherepetitionspae.

Foreah repetition,

c p

denotesanewpattern valueto beused asinputinthe

next repetition. Initially,

c p

holds a default value, given by

def

. Note that

thereould beat thesametime severalinter-repetitiondependenieswithin a

repetitivetasksineaninstanemayrequirevaluesfrommorethanoneinstane

toomputeitsoutputs. Thisiswhyrule

(r6)

speies asetofdependenylink

vetors

{Ird}

.

Denition 5 (Inter-repetition dependeny). Let

R

be a repetitive task with

s

inputs and

q

outputs, where

u ≤ q

outputs are assoiated with an inter-

repetition dependenylink. Its behavioral semantiswithin an environment

ε

isasfollows:

∀k ∈ 1..| s r |, R.Body k

({p k i } 1..s+u ,{p k o } 1..q )

−−−−−−−−−−−−−−−−−−→ R.Body k , R.Body k+1 = R.Body k ,

ε(i) = U

t i 1 ..t is (p k i 1 )..(p k i s ), ε(o) = U

t o 1 ..t oq (p k o 1 )..(p k o q ) R ε R

where

{p k o } 1..q = φ({p k i } 1..s , Body

ind( r

k +Body k .Ird 1 . d ) .Ird 1 .c p , ..., Body ind( r

k +Body k .Ird u . d ) .Ird u .c p ),

∀l ∈ 1..u, Body k .Ird l .c p = p k o l

Body k

({p k i } 1..s+u ,{p k o } 1..q )

−−−−−−−−−−−−−−−−−−→ Body k

and

φ = [[R.Body.T ask]]

,

(i, o) = R.Interf ace

, and theexpression

ind( r k ) ∈

1..| s r |

returnsanindexvalueassoiatedwithvetor

r k

.

(14)

Intherstpart,just likeinDenition4,therepetitivetask

R

performsthe

wholerepetitionandbeomes

R

itself,while

ε

hastheorrespondingvaluesfor the

i

and

o

arrays. Thediereneisthat,foreahrepetitiondesignatedby

k

in

therepetitionspae

s r

,thebody

R.Body k

performsatransitioninto

R.Body k

,

and the order imposed by the dependeny makes that the next

R.Body k+1

is

theurrent

R.Body k

. Note thatinitially inthis reurrene,theinputpatterns

of

R.Body k

inlude thedefaultvaluesspeiedin

def

foreahinter-repetition dependeny.

In the seond part of the denition, the latter transition is dened: the

repeated funtion

φ

is omputed, and the port value

c p

of the body's

Ird

is

updatedin orderto produe

R.Body k

. Theomputation of eah

R.Body k

in-

stane takes into aount all patterns produed by all other instanes whih

it depends on. This is ahieved byalulatingthe ombination ofthe urrent

position-vetor

r k

in

s r

andthe dependenyvetor

d

, allowingoneto retrieve

the

c p

values.

2.2.3 Hierarhial tasks: task parallelism

Ahierarhialtaskisdenedbyanaylidependenygraphoftasks,asillus-

tratedbyanexamplein Figure7.

Given any twotasks

T 1 , T 2 ∈ T

, theirfuntional omposition, denoted by

H = T 1 ⊲ T 2

, onsists of the denition of a unidiretional data dependeny relation from the output ports of

T 1

to the input ports of

T 2

. The body of

theresultinghierarhialtask

H

(see rule

(r10)

)onsistsof i)the setof tasks

{T 1 , T 2 }

and ii) aset of onnexions

C

s.t.

∀c = (p i , p o ) ∈ C, ∀ε ∈ ε P , p i ∈ T 1 .o, p o ∈ T 2 .i, ε(p 1 ) = ε(p 2 )

.

T 1

i 1

T 2

T 3

o 3

T 4

o 4

o 2

i 4 a

i 4 b i 4 c i 3 a

i 3 b

i 2 a o 1 b

o 1 a

i 2 b

Figure7: Taskparallelism.

Hierarhial tasks

T ∈ H

are obtained by ombining tasks of

T

pairwise

usingtheaboveompositionoperation.

Denition6(Hierarhialtask). Ahierarhialtask

R = {T 1 ⊲ T 1 ; ...; T n ⊲ T n }

onsists of an ayligraphof tasks, obtained byomposition. Its behavioral

semantiswithin asetofenvironments

{ε 1 , ..., ε n }

isasfollows:

(T 1 ⊲ T 1 ) −−→(T ε 1 1 ⊲ T 1 ), ..., (T n ⊲ T n ) −−→(T ε n n ⊲ T n ), ε 1

...

ε n

are omposable

{T 1 ⊲ T 1 ; ...; T n ⊲ T n } −−−−−−−−−−→ {T ε 1 ⊕ ... ⊕ ε n 1 ⊲ T 1 ; ...; T n ⊲ T n }

where

T 1 −−→ ε 1 T 1 , T 2 −−→ ε 2 T 2 , ε 1

and

ε 2

areomposable

(T 1 ⊲ T 2 ) −−−−−−→(T ε 1 ⊕ ε 2 1 ⊲ T 2 )

(15)

Figure7illustratessituationswhereoutputsarefeaturedinmultipledepen-

denies,and where inputoroutputs are notfeaturedin anydependeny(i.e.,

theyarepartoftheinterfaeofthehierarhialtask).

The task resulting from the suessiveomposition of several tasks forms

ahierarhial ayli graph,where nodes are tasks, and edges are labeledby

arraysexhangedbetweentasksthroughtheirinterfaeports.

2.3 Examples

Downscaler

Vfilter HFilter

Horizontal filter

Vertical filter

t o t o

t” o

[(80,60,*)℄

t” i

[(320,240,*)℄

[(4)℄

[(8)℄

[(4,8)℄ [(4)℄ [(4,4)℄

[(4)℄

[(8)℄

t i : o

[(4,8)℄

[(640,480,*)℄

P F F = (1, 0) o = (0,0) P = (0, 1)

[(8,8)℄

[(8,8)℄

[(8)℄ [(4,4)℄

Figure8: Exampleofadownsaler.

Figure8showstheexampleofarepetitionofahierarhialtask,wherethe

sub-tasksarethemselvesrepetitions. Here,forthe sakeofsimpliity, onlythe

shapeinformationisshownontaskports.

Thismodelrepresentsadownsaler,whihtakesaninnitearray(intuitively,

aow, whih is noted *) of images of size

640 × 480

; the output is a ow of

320 × 240

images. Inside, arepetition spaeof shape[(80,60,*)℄ is applied to thehierarhialtask. Theinputtiler

t ′′ i

aordinglyextratspatternsofshape

[(8,8)℄,and theoutput tiler

t ′′ o

reonstruts,frompatternsof shape[(4,4)℄,the outputimage. Thehierarhialtaskisinstantiatedanumberoftimesgivenby

therepetitionspae,andeahrepetitioninvolvestheexeutionofoneinstane

ofhorizontallterandofoneinstaneofvertiallter,thelattertakingasinput

someoftheoutputsofhorizontallter. Eahofthemisitselfarepetition,with

itsowntilers and repeated funtion (respetively, Hlter and Vlter) applied

topatterns.

Beyond the modeling of system behaviors and omputations, the repeti-

tive MoC of Gaspard2 also enablesto desribe purely strutural features of

a hardware arhiteture aswell as the mapping of appliation funtionalities

onhardwarearhitetures. Figure9showshowahardwarearhiteturemodel

representing a

16 × 16

-grid of proessing units. Eah unit is omposed of a

rossbar, amemory and aMIPS proessor. Here, the inter-repetition depen-

deny link is used to express the way proessing units are inter-onneted in

(16)

thegrid. Using thesameonepts,oneanalsorepresentbothtaskalloation

and data alloation of asoftware appliation model (e.g. the downsaler) on

a hardware arhiteture model (e.g. the

16 × 16

-gridof proessingunits) [4℄.

Forthat,tilersareused ateah extremityofan alloation link tospeify, e.g.

whih appliation taskand data instanes are assoiatedwith whih platform

memory and proessorsinstanes. They enable to desribe dierent types of

regulardistributions: perblok,ylior

k

-yli.

MIPS Memory

(1, 0) (0, 1)

n

CrossBar4 b

b cpu

mem w e

n

s s

e

ProcessingUnit

w

16x16_Grid

[(16,16)]

Figure9: A

16 × 16

-gridofproessingunits.

Averyinterestingfeature oftheabovemodelsis theirelegantwaytoallow

a ompatrepresentation of theparallelism degreeinherent to a data-parallel

appliation aswell as amassively parallel arhiteture, and the blok alloa-

tion of the rst on the seond. The obtainedmodels do not suer from any

salability problem regardingthe parallelism degree, ontrarily to other mod-

eling formalisms. This is a majoradvantageof using the repetitive model for

high-performanesystemspeiation.

3 A reative ontrol extension

The reative ontrol modeling presented here relies on nite state mahines

desribed following the same style as the Gaspard2 task models introdued

in the previous setion. The onnetion between the ontrol and data parts

is established by implementing dierents modes for data tasks. Through this

modeling,theregularityinherenttotherepetitiveMoCremainspreservedwhile

omputationsbeomeontrollable.

3.1 Mode tasks

o

i T 2

m 0 m 1 m 2 m 3

m

Figure10: Amodetask.

(17)

Amodetask expressesahoieamongseveralpossiblealternativeomputa-

tions[10℄. Figure10illustratessuhatask, inspiredbywindowswithmultiple

tabs. Itisomposed ofseveralmodes,identiedbysomevaluesof anenumer-

ateddatatype:

m 0

,

m 1

,

m 2

,...,

m k

. Theomputationdened bythetask

T k

transformstheinputdata

i

into theoutput data

o

aordingto themode

m k

determinedbytheinputmodevalue

m

. Weextendthelanguageasfollows:

Body mt ::= {(m k , T k ) : (mode

_

id, T ask)}, ∀i 6= j

⇒ T i .Interf ace = T j .Interf ace (r11) Body ::= Body mt | Body h | Body r | Body e (r4 )

Theinterfaeof

Body mt

omprisesatleastaninput

m

denotingthereeived

modevalueonwhihreliesthehoieofthemodetoexeute. Alltasks

T k

asso-

iatedwithmodes

m k

havethesameinterfae,suhthat:

∀T k , Interf ace(T k ) = Interf ace(Body mt )\{m}

.

Themodesrunexlusively,meaningthatwheneverthemodetaskexeutes,

only the task

T k

assoiated with the seletedmode

m k

is omputed. This is

alsotheaseinmodeautomata[5,13℄. It ispartiularlyusefulwhenanalyzing

thebehaviorof the modetask sine it eliminates byonstrution the riskfor

possible interation between faultyand non-faultymodes, henefavoring safe

designs.

Givenaolletion

(m 1 , T 1 ), ..., (m k , T k )

ofmodesandtheirassoiatedtasks

inamodetask,weonsideranarbitraryorderofevaluationtohoosethemode

toexeute: from lefttoright in Figure10. Thehosenmodeisalwaystherst

enountered,whihsatisestheinputmodevalue

m

. Whentwomodesormore

are idential, only the rst one aording to the previous order is exeuted.

Thisisakinto"ase"and"math"statementsinrespetivelythesynhronous

languagesSignalandLuid Synhrone[1℄.

Denition 7 (Mode task). Let

M

be amodetask. Its behavioral semantis

withinanenvironment

ε

isasfollows:

ε(m) = m k , ε(o) = φ(ε(i)) M ε M

where

φ = [[M.Body.T k ]]

and

i, o ∈ M.Interf ace

.

The waya mode task

M

interats with any other task is ditated by the

nature of itsembedded tasks

T k

. E.g., if

T k

features anelementarytask then

wheneveritsassoiated mode

m k

isseleted,

M

reatsasanelementarytask;

if

T k

featuresarepetitivetask,

M T

will reatsasarepetitivetask andso on.

Notethat sineall

T k

's haveidential interfaes,thediereneof theirnature

isnotexternallyvisible.

3.2 Transition funtions

AgreatadvantageofintroduingtransitionfuntionsinGaspard2isthatthey

anbeusedtodenemodevaluesthatservetoahievedierentomputations.

So,theyare idealompanionsofmode tasks. Figure11illustratesatransition

funtioninapartiularontext,orrespondingtotheproposalofanautomaton

omponentinGaspard2[10℄.

(18)

i tf s

R

s i t i

Body tf p i

tf c

o t o

( − 1)

s r

Figure11: Atransition funtioninontext.

i

tf c

tf s s 1 s 2

i

¬i tf

Figure12: Simpletransitionfuntion.

Context and interfae of a transition funtion A transition funtion is

atask dened byaninterfae andabody

Body tf

, thatomputes, givensome

inputs

p i

fromitsenvironment(usedinthetransitiononditions),andaurrent state

tf c

, thenewvalueofitsstate

tf s

(resultingfrom thetransition). Hene, it has to be used within the ontext of a repetition, with an inter-repetition

dependeny, sothat theresult

tf s

fromthepreviousrepetition(

−1

)isusedas

input

tf c

. The initialstate

s i

is given asdefaultvalue. This ontextis just a

verylassialenodingofanautomatonasasequentialiruit.

Inorder to dissoiate themode valuefrom thepartiular oding of states

inside the body of the transition funtion, one aninsert an elementary task

µ

that transforms eah state value into a mode value. Here, for the sake of

simpliity,weonsiderthediretodingofmodesasstatevalues. Inthisontext,

theautomatonperformstransitionsonanarrayofinputs,andprodueanarray

ofstate/modevaluesasoutput(seeFigure 11).

Wewill propose further otherinterestingontexts within whih transition

funtions an beused. Theideais alwaysthat atransitionfuntion isdened

in thesopeofarepetition, andthisdenesthepaeofitsreations.

Body of a transition funtion In orderto dene what transition to take

aordingto theurrentstate and an inoming input, we onstrutthe body

Body tf

intermsofastategraphnotation3, asexemplied inFigure 12,whih

iseasierthanaomplexonditionalstatement:

Body tf ::= {(tf

_

id;S;T r;s i )} (r12) S ::= {state

_

id | (state

_

id;Body tf ; reset)} (r13) T r ::= {(state

_

id; label; state

_

id)} (r14) Body ::= Body tf | Body mt | Body h | Body r |

Body e (r4 ′′ )

Abodyisasetofstategraphs,eahofwhihisafour-tuple: aname

tf

_

id

,

a set

S

of states, aset

T r

of transitions and aninitial state

s i

. States in the

3

Eventhoughournotationoftransitionfuntionsisverylosetothatofautomata,itdoes

not havethe samemeaning. Itonlyspeies aset of transitionsbetween states. Fireable

transitionsareseleteduponthevaluesoftheinputs(seeFigure12 ),denotingthelabelling

onditionandtheurrentstatefromwhihthetransitionsshouldtakeplae.

(19)

set

S

are either a simple state with a name

state

_

id

, orreursively, a state

graphharaterizedbyatriple: itsname

state

_

id

,thesub-body

Body tf

,anda

Boolean

reset

statingwhetherreinitializationshouldourwhenre-enteringthe state. Transitionsaretripleswiththenameofthesourestate,a

label

whihis

aBooleanexpressiononinputs,andthenameofthedestinationstate.

An importantrequired property of these state graphsis that theyare de-

terministi, meaning that for eah state

s ∈ S

, if there are several possible

transitionsfrom

s

,thevaluesofinputeventssatisfyonlyonetransition.

The ontrol partof asysteman be desribed hierarhially. In this ase,

thestateanhaveasub-body. WedeneitsbehaviorinasimilarwayasStat-

eCharts,EsterelandSynCharts,orModeAutomata. Theinterfaemust

feature orresponding inputsand outputs for eah of the transition funtions,

asshowninFigure13,wherestate

h 2

ofthehigh-leveltransitionfuntion

h

has

asub-body

l

,forwhihthestar

indiatedthat

rst

istrue.

h 1

i 1 i 1

i 2

¬i 1

l 1

¬i 1 i 2

l 2

h

h c l c

h s

l s h 2 = l∗

Figure13: Hierarhialtransitionfuntion.

Denition8(Hierarhialtransitionfuntion). Let

a

beahierarhialtransi-

tionfuntion,itssemantis withinanenvironment

ε

isasfollows:

ε(a

_

id c ) = s c a , ∃(s c a ; e; s d a ) ∈ T r a , ε(e) = tt, (s d a ; b; rst) ∈ S a ⇒

ε(a

_

id s ) = s d a , rst ⇒ ε(b.tf

_

id s ) = b.s i ∧

¬rst ⇒ ε(b.tf

_

id s ) = ε(b.tf

_

id c ) (s d a ; b; rst) ∈ / S a ⇒ ε(a

_

id s ) = s d a

(a

_

id; S a ; T r a ; s i a ) ε (a

_

id; S a ; T r a ; s i a )

and

ε(a

_

id c ) = s c a , ∀(s c a ; e; s d a ) ∈ T r a , ε(e) =

, (s c a ; b; rst) ∈ S a ⇒

ε(a

_

id s ) = s c a , b ε b (s c a ; b; rst) ∈ / S a ⇒ ε(a

_

id s ) = s c a

(a

_

id; S a ; T r a ; s i a ) ε (a

_

id; S a ; T r a ; s i a )

where

∀(s; b; rst) ∈ S a , s 6= ε(a

_

id s ), ε(b.tf

_

id s ) = ε(b.tf

_

id c ).

Intheabovedenition,givenatransition funtion

a

,from itsurrentstate

a

_

id c

:

ˆ either thereexistsatransitionforwhihthelabellingexpression

e

evalu-

atestotrue(tt),and

ifthedestinationstate

s d a

hasasub-body

b.tf

_

id

,i.e.

s d a

isofthe

form

(s d a ; b; rst)

:

(20)

* either

reset

is true, then the output value for

b.tf

_

id s

is the

initial state

b.s i

;

* or not,then the output valuefor

b.tf

_

id s

isthe input urrent

state

b.tf

_

id c

.

otherwise,

s d a

issimplyreturned;

ˆ or,foralloutgoingtransitionsthelabelexpressionevaluatestofalse(),

andtheurrentstate

s c a

remainsthesame. Then,

ifthisstate

s c a

ofthetransitionhasasub-body

b.tf

_

id

,thetransi-

tionsof

b.tf

_

id

areperformedinthesameenvironment;

otherwise,

s c a

issimplyreturned.

Finally,thevalueofstatesthatarenotonernedbyurrenttransitionsinthe

hierarhialtransition funtionremainunhanged.

Transitionfuntionsanbealsoombinedsoastoobtainaparallelexeution

asillustratedin Figure14. Theassoiatedbehavioris that allfuntions make

theirtransitionsinparallel,withinthesameglobaltransition.

i 2

f 1c

i 1 f 1s

f 2 s

s 1 s 2

¬i 1 f 1

f 2

i 1

s 3 s 4

i 2

¬i 1

f 2 c

Figure14: Paralleltransitionfuntion.

Denition 9 (Parallel transition funtions). Let

A

be a parallel transition

funtion,itssemantis withinanenvironment

ε

isasfollows:

∀a ∈ A.Body, a ε a A ε A

Paralleltransitionfuntionsmaysynhronizethroughdatadependenies,the

outputfromtheonebeinganinputoftheother. Thesedatadependenieshave

to be ayli. Of ourse, parallel and hierarhial onstrutions of transition

funtions anbeombinedfreely.

4 Typial design examples

The above onstrutsanbe now onsidered todene behaviorsorstrutures

that ombine data-intensive omputations with ontrol. We propose ways of

usingthetransitionfuntionsandmodetasks,whihareremarkableinthatthey

exhibitabehavioromparableto,e.g.,modeautomataorstruturedhierarhial

automata.

(21)

Mode automaton An exampleof useful maro onstrutis one that oers

asimilar semantisto synhronousmode automata [5,13℄. Statements repre-

senting thedata intensivepart are exeuteddepending on the state, whih is

updatedbytransitions,bothatthesamerateorlok. InFigure15,whihillus-

tratesthephoneexamplementionedinSetion1,thismaroonstrutonsists

ofarepetitivetask

RT

withaninter-repetitiondependeny. Here,therepeated taskisahierarhialtask

HT

in whih, amodetaskexeutesadata-intensive algorithm to dene the resolution of some images reeivedfrom asoure, de-

pendingonthepowerstatusinaphone. Thestatusinformationisharaterized

bytheoutputvaluesofthetransitionfuntion

T F

,dened byitsstategraph.

Typially,eahstateof

T F

enodesapowerlevel. Werefertotherepeatedtask

asamode transition funtion,andtheenlosing repetitivetaskasaontrolled

task.

F t i : P def c p

T Fc T F

T Fs

t s

p s s

o p i i

T Fi

image

display

RT

HT

→ d

e

t e p e

o t o

p o om m3 m2 m1 m0 m

resolutiondenition

algorithm#2

im

monitor p ower

soure image

s r

Figure15: Exampleofmodeautomaton.

Hierarhial task with paralleltransition funtions Parallelautomata

anbesimplyenodedasshownin Figure16byarepetitivetaskin whihthe

mode transition funtions assoiated with eah automaton are dened at the

samehierarhial level, while sharing the samerepetition spae. Hene, they

maketheir transitionssimultaneouslyateah step. This partiularpattern of

onstrution is remarkable in the sense that it is similar to the synhronous

omposition of transition funtions, with unilateral data dependenies. Here,

R

H

T F 1s

e 1 T F1 T F1 s

i 1

p e2 e 2

T F 2

def 1 T F 1c

i 2 i 2 a

T F 2c T F 2s

s1

s 2

t s2 t s 1

c p 1

def 2

c p 2

p e 1

T F 2s

(-1) (-1)

t e 2 t e 1

s r

Figure16: Paralleltransitionfuntions.

transitionfuntion

T F 1

performsonestepateahrepetition, takingasinputa patternfrom thearray

e 1

. It produes

T F 1s

asoutput, whih isintegrated in

theresultingarray

s 1

,and whihis also usedasinput bytheother transition

(22)

funtion

T F 2

. The funtion

T F 2

takesanother input from the array

e 2

, and

produes

T F 2s

in the same repetition, as

T F 1

beause both are in the same

repeatedhierarhialtask. Finally,

T F 2s

is integratedin

s 2

.

Mode task with hierarhial transition funtions This partiular pat-

ternofonstrutionisremarkableinthesensethatitisanenodingofahierar-

hialautomatonintermsofrepetitivetasks,asshowninFigure17. Itbehaves

similarlyto hierarhialautomatainreativelanguages[5,13℄.

(-1)

(-1)

R

H

m0 m1 m2 m3 m

t s

T F 1 s s

T F 1

T F 2

p e

e 1 T F 1s

i 1

im

o t o

p o def 2

c p 2

T F 2c

T F 2s

p i

e 2

c p def 1

T F 1c

t e 1

t e2

s r

Figure 17: A hierarhyoftransitionfuntions.

Ateahstep(orrepetition),theupper-levelautomaton,haraterizedbythe

modetransition funtion

T F 1

, makes atransition. This resultsin seletinga modetorunwithinthemodetask. Theseletedmodesarethemselvesautomata

haraterized by themodetransition funtion

T F 2

. They representthe lower

level automata in the global one. One an notie that both

T F 1

and

T F 2

share thesamerepetitionspae. Itmeansthat theirtransitionsareperformed

synhronously.

Oversampled transition funtions Anotheroriginal ombination is illus-

tratedin Figure18,where theautomatonorrespondingtotransitionfuntion

T F 2

performsawholerunatthepaeofrepetition

R l

,duringeahsinglestepof

transitionfuntion

T F 1

,whihisatthestepofrepetition

R h

. Nestedrepetitions givewaytonestedloks,inaformofoversampling.

Intheaboveresultingmodels, ontextswithesfrom onemodeto another,

at agivenhierarhiallevel,areonlyperformedbetween repetitions denedat

this level. Contrarily to usual exeptions, whih must beserved immediately,

hereonehastowaitfortheompletionoftheurrentrepetitionsoastopreserve

theregularityoftherepetitiveexeutionshema. However,thankstothehier-

arhyofourmodels,ne grainontrollabilityispossiblebydening theswith

funtions at the suitable repetition granularity levels. For instane, onsider

a repetitive task

R

that transformsa set of images suh that eah repetition

instane

R k

of

R

transforms one image from the set. The instanes

R k

are

themselvesrepetitivetasksfor whih eah instane

R kl

transforms apixel-line

from an image. Both repetition levels assoiated with

R k

and

R kl

anbeas-

soiatedwithtransitionfuntions toontrol atthesametimewhat algorithms

applytoawholeimageandwithinanimage,whatspeialgorithmsapplyto

apixel-line.

(23)

def 2 c p 2

T F 1s T F 1

e 1 T F 1s

i 1

def 1

T F 1c

s1

s 2

t s 2 t s 1

c p 1 p e 1

T F 2s

R h

T F 2 i 2 i 2 a

p e 2 t e 2 e 2

T F 2s

T F2 c

t e 1

(-1)

(-1)

H

R l s

r2

s r1

Figure18: Oversamplingtransition funtions.

5 Disussion and related work

Theombinationofontrolanddata-parallelfeaturestodenehigh-performane

algorithms has been investigated for several years in the ontext of various

languages,e.g. Mentat [19℄,PSather [11℄,MasParprogramminglanguage[8℄.

These studiespartiularly onsider ontrol parallelism that amounts to aon-

urrent exeution of dierent instrution streams. They showed that the ex-

eution performanes of parallel systems an be signiantly improved. The

oneptsused todesribeontrolin thesestudiesaremostlytheusualsystem-

levelshedulingandsynhronizationmehanismssuhasfork/joininstrutions,

master/slave model or monitors. In our model, ontrol is desribed in terms

of omputation modes: there are several possible ways to ompute the same

data,whihareonsideredexlusivelyatanytime. Thewaydata-parallelom-

putationsswith from amode to another isdesribedby transition funtions.

Forthis purpose, afew onstruts havebeenidentied that anbeexpressed

using the data-parallel onepts of Gaspard2. This limited degree of on-

trolis expressiveenoughto permit themodelingof bothappliation-leveland

arhiteture-leveladaptability senariosin high-performanesystems. The re-

sult ould be onsidered for either simulationor iruitry synthesis orformal

veriation.

Similar ontrol-oriented onepts have been introdued in other dataow

modelstoexpressdynamihangesorreongurationinstreamingappliations

[17℄[14℄. Thesolutionsproposed in these studiesonsist ofSynhronous Data

Flow (SDF) model variantsthat integratenewfeatures to speify modes. For

instane, in [17℄, authors use a spei notionalled senario to express how

theexeutionis arriedout in theirSDF variant. A majordierene between

ourGaspard2modelandSDFvariantsomesfromtheinterestingexpressivity

oeredbytherepetitivemodel ofomputation, whihis moresuitableforthe

uniformandompatexpressionoftheparallelisminomplexhigh-performane

embeddedsystemssuhasMPSoC.

Inomparison with [10℄,we haveextended expressivityinside,by allowing

forparallelandhierarhialtransitionfuntionsinthebody,andoutside,inthe

sense that ourtransition funtion anbeused in ontextsother than thesole

automatonomponent. Wehavealso onsideredtheuse ofontrol andmodes

(24)

notonlyattheappliationlevel,withswithesbetweendierentfuntionalities,

as was the ase before, but also to represent dierent exeution modes, with

swithesbetweendierentimplementationsofthe samefuntionality,whih is

awaytoonsidertheontrol ofarhiteturalaspetsin themodel.

BeyondthesolutionadoptedheretodesribeontrolaspetsinGaspard2,

analternativesolutionthatmaybealsoonsideredonsistsinusingloks. For

instane in [15℄,the authors dene a spei lok notion, alled ane lok,

whih is well adapted to speify synhronization relations in the data-parallel

languageAlpha[20℄. Ideally,suhaloknotionshouldbemultidimensionalso

astobeadequatetoGaspard2datatypes. Themultidimensionaltimemodel

proposedin[7℄anthereforeappearasapossiblesolutionideatothisissue.

6 Conlusion

We have presented amodel that serves, in adesign environment alled Gas-

pard2,forthedevelopmentofhigh-performaneembeddedsystemswithadapt-

ability senariosw.r.t. various aspets: QoS,platform-dependentonstraints,

et. Thismodelombinestherepetitivemodelofomputation(MoC)withideas

basedonnitestatemahinesandmodes. Weformallydenedthesemantisof

theresultingmixedmodelthatouldbeusedfurtherforreasoningondesigns.

Weshowed,throughsimpleexamples,thatthismodelinreasestheexpressivity

in Gaspard2 while still preserving the benetsof regularityof the repetitive

MoC.

TheexisteneoftransformationhainsinGaspard2,towardsdierenttar-

get tehnologies (SystemC, VHDL, OpenMP Fortran and synhronous lan-

guages) oers the opportunity to exploit the new model from various view-

points in the future. In partiular, simulation and formal veriation will be

madepossibleviasupportedsynhronouslanguages(urrentlyLustreandSig-

nal). Control an be omfortably extratedunder theform of reativemode

automata that may be onsidered for behavioral simulation and formalveri-

ationbymodel-heking. Thegenerationofsynhronousmodeautomatafrom

Gaspard2modelsonsists of theenhanement of theexisting transformation

hain[21℄.

Referenes

[1℄ A. Benveniste, P. Caspi, S. Edwards, N. Halbwahs, P. Le Guerni, and

R.deSimone. Thesynhronouslanguagestwelveyearslater. Pro. ofthe

IEEE,91(1):6483,2003.

[2℄ Albert Benveniste, Paul Le Guerni, and Christian Jaquemot. Syn-

hronousprogrammingwitheventsandrelations: theSignallanguageand

itssemantis. SieneofComputer Programming,16(2):103149,1991.

[3℄ P. Boulet. FormalSemantis ofArray-Ol,aDomain Spei Language

forIntensiveMultidimensional SignalProessing. Tehnial Report 6467,

INRIA,Frane,Marh2008. http://hal.inria.fr/inria-00261178/en.

(25)

[4℄ P. Boulet, P. Marquet, E. Piel, and J. Taillard. Repetitive alloation

modelling with marte. In Forum on speiation and Design Languages,

FDL'07, Barelona,Spain,september2007.

[5℄ J.-L.Colaço,G.Hamon,andM.Pouzet. Mixingsignalsandmodesinsyn-

hronousdata-owsystems. In6thACM&IEEEInternationalonferene

on Embeddedsoftware(EMSOFT'06), pages7382,NewYork,NY,USA,

2006.ACM Press.

[6℄ A.DemeureandY.DelGallo. Anarrayapproahforsignalproessingde-

sign. InSophia-Antipolis Conf. onMiro-Eletronis (SAME'98), Frane,

Ot. 1998.

[7℄ P.Feautrier. Someeientsolutionstotheaneshedulingproblem,part

ii. multidimensionaltime. Int.journalof parallel programming,21(6):389

420,Deember1992.

[8℄ V. Garg andD. E. Shimmel. Exploitation of ontrol parallelismin data

parallel algorithms. In 5th Symp. on the Frontiers of Massively Parallel

Computation (Frontiers'95),Washington, DC,USA,1995.

[9℄ HighPerformaneFortranForum.Highperformanefortranlanguagespe-

iation,January1997. http://hpff.rie.edu/versions/hpf2.

[10℄ OuassilaLabbani,Jean-LuDekeyser,PierreBoulet,andÉriRutten. In-

troduing ontrol in the gaspard2data-parallelmetamodel: Synhronous

approah. InWorkshop on Modeling andAnalysis of Real-Time and Em-

beddedSystems(MARTES'05), Montego Bay, Jamaia,otober2005.

[11℄ Chu-Cheow Lim, Jerome A. Feldman, and Stephan Murer. Unifying

ontrol-anddata-parallelisminanobjet-orientedlanguage.InJointSym-

posium on Parallel Proessing, pages261268,Waseda University,Tokyo,

May1993.

[12℄ E. LuskandK.Yelik. LanguagesforHigh-ProdutivityComputing: The

DARPA HPCS LanguageProjet. Parallel Proessing Letters, 17(1):89

102,marh2007.

[13℄ F. Maraninhi and Y. Rémond. Mode-automata: a new domain-spei

onstrutforthedevelopmentofsaferitialsystems.SieneofComputer

Programming,46(1-2):219254,2003.

[14℄ S.NeuendorerandE.Lee.Hierarhialreongurationofdataowmodels.

In 2ndInt'l Conf. on Formal Methodsand Models for Co-Design (MEM-

OCODE'04), pages179188,june2004.

[15℄ I.M. Smarandahe, T. Gautier, and P. Le Guerni. Validation of mixed

Signal-Alphareal-timesystemsthroughanealulusonloksynhro-

nisation onstraints. In World Congress on Formal Methods (2), pages

13641383,1999.

[16℄ TheGaspard2platform.https://gforge.inria.fr/projets/gaspard2.

(26)

[17℄ B.D.Theelen,M.C.W.Geilen,T.Basten,J.P.M.Voeten,S.V.Gheorghita,

and S. Stuijk. A senario-aware data ow model for ombined long-run

averageandworst-aseperformaneanalysis.In4thInt'lConf.on Formal

MethodsandModelsforCo-Design(MEMOCODE'06),pages185194,july

2006.

[18℄ W.Thies,M.Karzmarek,andS.Amarasinghe.StreamIt: ALanguagefor

StreamingAppliations.InInternationalConf.onCompilerConstrution,

Grenoble,Frane,2002.

[19℄ Emily A. West. Combining ontrol and data parallelism: Data parallel

extensionstothementatprogramminglanguage. TehnialReportCS-94-

16,UniversityofVirginia,Charlottesville,VA,USA,18,1994.

[20℄ D. Wilde. The Alphalanguage. Tehnial Report 827, IRISA -INRIA,

Rennes,1994. www.irisa.fr/entredo/publis/PI/1994.

[21℄ H. Yu, A. Gamatié, E. Rutten, and J.-L. Dekeyser. Embedded Systems

Speiation andDesign Languages, Leture NotesEletrial Engineering,

Vol. 10, Villar Eugenio (Ed.), hapter 13: Model Transformations from

aData Parallel Formalism towardsSynhronousLanguages. Spr.Verlag,

2008.

(27)

Parc Scientifique de la Haute Borne - 40, avenue Halley - 59650 Villeneuve d’Ascq (France)

Centre de recherche INRIA Bordeaux – Sud Ouest : Domaine Universitaire - 351, cours de la Libération - 33405 Talence Cedex Centre de recherche INRIA Grenoble – Rhône-Alpes : 655, avenue de l’Europe - 38334 Montbonnot Saint-Ismier

Centre de recherche INRIA Nancy – Grand Est : LORIA, Technopôle de Nancy-Brabois - Campus scientifique 615, rue du Jardin Botanique - BP 101 - 54602 Villers-lès-Nancy Cedex

Centre de recherche INRIA Paris – Rocquencourt : Domaine de Voluceau - Rocquencourt - BP 105 - 78153 Le Chesnay Cedex Centre de recherche INRIA Rennes – Bretagne Atlantique : IRISA, Campus universitaire de Beaulieu - 35042 Rennes Cedex Centre de recherche INRIA Saclay – Île-de-France : Parc Orsay Université - ZAC des Vignes : 4, rue Jacques Monod - 91893 Orsay Cedex

Centre de recherche INRIA Sophia Antipolis – Méditerranée : 2004, route des Lucioles - BP 93 - 06902 Sophia Antipolis Cedex

Éditeur

INRIA - Domaine de Voluceau - Rocquencourt, BP 105 - 78153 Le Chesnay Cedex (France)

http://www.inria.fr

Références

Documents relatifs

In this section, we have presented the concept of plasmon resonance of gold and silver spherical nanoparticles and its dependence with the nanoparticles metal,

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des

Unit´e de recherche INRIA Lorraine, Technopˆole de Nancy-Brabois, Campus scientifique, ` NANCY 615 rue du Jardin Botanique, BP 101, 54600 VILLERS LES Unit´e de recherche INRIA

Scheduling strategies for mixed data and task parallelism on heterogeneous processor grids Olivier Beaumont, Arnaud Legrand, Yves Robert.. To cite this version: Olivier Beaumont,

This project focused on automat- ing the logical design and optimization of hybrid data ows, enabling engine independent design and composition of data ows spanning dierent

• 5 simulations in 1 - for a fixed value of δ, 5 simulations are performed successively for the same plant, for each type of control considered: continuous-time , emulated, first

From the perspective of energy efficiency, a cloud computing data center can be defined as a pool of computing and communication resources organized in the way to transform the

It can be found that, 70.0% of the included papers (14 papers) were mentioning or addressing the requirements within the Self and Environmental Awareness category. In