M Terrier

D Monfort

J Lambert

S Le Roy

R Pedreros

O Sedan

Method for Evaluating Vulnerability to Tsunamis of low-to-medium intensity: Application to the French Côte d'Azur

Keywords: tsunami, databases, simulation, damage, France

Today, the study of tsunami risk has become a recurrent concern for crowded coastal areas, and this is true even for those that normally seem to be the least prone to the phenomenon. In this framework, the BRGM has for the past five years been compiling and managing an historical database devoted to tsunamis that may have affected the shores of France. Concurrently, simulations of tsunamis for plausible major seismic or gravity-driven events have been conducted. These have indicated that the south of France is indeed subject to the risk of a tsunami of low to medium intensity. Between 2009 and 2010, the research project RATCOM has made it possible to establish the principles for assessing vulnerability and calculating damage and human losses for moderate tsunamis. The method thus developed is complementary to those already proposed for tsunamis of larger intensity. Applications of this method using the BRICE (©brgm) simulation tool for risk scenarios reveal that the level of risk has increased quite substantially over just a few decades, even for tsunamis of low to medium intensity (water height less than 1 m). This is essentially due to the exponential growth of urban development along the coastline and to tourist pressure. Although such events will not cause destructions to buildings comparable to those in Indonesia (2004) and Japan (2011), still weak phenomena can be responsible for serious human losses. On the Côte d"Azur, the potential number of victims is large enough to warrant immediately instating preparatory measures designed to cope with the possibility of such a scenario.

INTRODUCTION

Understanding the risk presupposes assessing the tsunami hazard (endangered zone, intensity of the phenomenon/probability of occurrence). It also presupposes an assessing the vulnerability of stakes with respect to tsunamis. Assessing the tsunami hazard for a region relies on two main components: a solid knowledge of past events and the simulation of tsunamigenic events. An interpretation of these data should make it possible to identify the zones most liable to risk as well as the corresponding level of intensity. Knowledge of past events involves studies of paleo-tsunamis (geological and/or archeological observations, over time intervals that may span several thousand years) and mining archives (intervals generally covering a few centuries, or more rarely Antiquity). The simulation of tsunamigenic events concerns not only plausible fictitious events, but also modeling actual ones in the past. In this latter case, it will be necessary to confront the output of models with information on the most reliable historical tsunamis. A synthesis of all this information (archives, simulations) then allows a hazard assessment to be performed.

In the wake of the catastrophic December 2004 tsunami in the Indian Ocean, a considerable amount of work was accomplished with the purpose of improving our understanding of structural and human vulnerability to tsunamis. On the basis of damage curves in structures versus the tsunami"s intensity, the methods developed follow an approach that is comparable to the ones called on in seismic vulnerability and risk assessments, such as those implemented under HAZUS (FEMA, 2004) or Risk-UE [START_REF] Lagomarsino | Macroseismic and mechanical models for the vulnerability and damage assessment of current buildings[END_REF][START_REF] Giovinazzi | The vulnerability assessment and the damage scenario in seismic risk analysis[END_REF]. These methods, being intended for strong-intensity tsunamis, do not allow risk to be calculated for low or medium intensity ones, that is, those characterized by energies too low inflict major structural damage, but high enough to result in human losses. Between 2009 and 2010, the research project RATCOM has made it possible to define, for moderate tsunamis, the principles for assessing vulnerability and calculating damage and human losses. Concurrently, with support from UNESCO, a CENtre d'Alerte aux Tsunamis, CENALT, has been set up. Its role is to monitor strong earthquakes that occur in the western Mediterranean and in the northeastern Atlantic. As to France, the Direction générale de la sécurité civile (DGSC, the directorategeneral for civil security) depending on the Ministry of the Interior was assigned the coordination of the ALDES project concerning the descending part of the tsunami alert system. In this framework, several tsunami scenarios with implementation of the assessment method developed in the RATCOM project were carried out along segments of France"s southern coast.

Work conducted by the BRGM over recent years, particularly for France"s Mediterranean shore, is integrated in the overall chain of assessment and management of tsunami risk, including: the establishment of a database containing historical events, the regional identification of tsunamigenic sources and simulation of plausible major tsunamis, the proposal of a method for assessing damage and losses for low to medium intensity tsunamis and its application for the purposes of local management of the risk.

RESEARCH ON TSUNAMIS THAT MAY HAVE REACHED THE SHORES OF FRANCE

Working method

Research on historical tsunamis that may have affected French coasts (continental France, Réunion Island, the Antilles, New Caledonia), undertaken since 2005, consists in:

 seeking out and acquiring original documentary sources, in manuscript or printed form, that are the most contemporary with the event: these are the so-called "primary sources";  covering a very wide scope of investigations, documents sourced in France and elsewhere, and of different sorts: books, scientific and historical articles, manuscripts, newspapers, travel journals, chronicles, earthquake catalogues, etc.;  simultaneously, looking for weather data: strong storms affecting the coasts of metropolitan France or offshore, hurricanes and cyclones in the French islands of the Indian Ocean, the Pacific Ocean and the Caribbean Sea;  if feasible (i.e., subject to the quality of data), analyzing and interpreting the physical characteristics and calibrating these phenomena according to the Ambraseys-Sieberg scale (six degrees of increasing intensity);  seeking to determine the cause of the event: earthquake, ground movement, underwater explosion, volcanic eruption, meteorite, seiche, meteorological depression, or still unknown.

Concerning events for which the documentary description leaves no doubt as to the tsunamigenic nature of the phenomenon (movements of ebb and flow of the water, retreat of the sea followed by inundation in a specific space-time frame, etc.), each event is described by a series of parameters characterizing the tsunamigenic wave at the location where the tsunami was observed. As of today, the catalogue references 80 events [START_REF] Lambert | Historical tsunami database for France and its overseas territories[END_REF] structured in a database accessible on the web at www.tsunamis.fr.

Catalogue of tsunamis identified along the French Mediterranean coastline

The origins of a majority of the tsunamis observed along the French Mediterranean coastline are still uncertain. Some submarine landslides, however, have been clearly identified, such as that of Nice in 1979 or the one at Antibes and Villefranche-sur-Mer in 1564, this latter having been triggered by an earthquake, the epicenter of which (Intensity VIII MSK) was situated 40 km inland. Other tsunamis on the Mediterranean coast are indisputably of seismic origin, like that of 1887, widely felt across the Côte d"Azur, or those in 1819 and 1831 that seem to have been limited to the immediate vicinity of French shores (San Remo).

SIMULATION OF TSUNAMI SCENARIOS CONCERNING THE FRENCH MEDITERRANEAN COAST

Together with the catalogue of historical tsunamis, the simulation of historical or fictitious tsunamigenic events is an essential prerequisite to assessing the hazard. Indeed, applying scenarios selected for their enhanced impact with respect to the coasts considered, the simulations allow general elements to be obtained as to the potential level of exposure of the coasts and to estimate the incidence and form that the tsunamis might take on reaching the shore. This is the framework in which several scenarios have been proposed. This portion of the work consisted in: 1) the characterization of tsunamigenic sources for the French Mediterranean coast; 2) the preparation of several bathymetric grids at various scales, adapted to near-and far-field tsunamis; 3) the choice and simulation of reference events; 4) the preparation of maps indicating the highest water levels and arrival times on the shore for each scenario.

Tsunamigenic sources of seismic origin

Because mapping and characterizing active faults of all the western Mediterranean Sea are not possible with the current level of knowledge, the identification phase for tsunamigenic sources of seismic origin necessarily had to be based on seismic zonation. For this purpose, different sources of geological (geological maps of Europe and seismotectonic ones of the Mediterraneean Basin, as well as other publications), bathymetric and seismological data were collected and interpreted. These gave rise to a deterministic seismic zonation for the Western Mediterranean (Fig. 1). The zonation obtained [START_REF] Terrier | Réalisation d"un zonage sismique de la Méditerranée occidentale à 1/2 000 000 préalable aux choix de scénarios de tsunamis[END_REF] describes for each seismic zone: 1) the main tectonic and seismic characteristics with, as appropriate, the return period for very strong earthquakes; 2) the largest earthquake, either recorded or mentioned in the archives; 3) the parameters of the maximum earthquake selected (magnitude, fault plane rupture dimensions, fault slip...).

Figure 1 -Seismic zonation and choice of scenarios for seismic sources used in the study of tsunami risk along the French Mediterranean coastline [START_REF] Terrier | Réalisation d"un zonage sismique de la Méditerranée occidentale à 1/2 000 000 préalable aux choix de scénarios de tsunamis[END_REF].

Tsunamigenic sources of submarine landslide origin

Offshore of the French Mediterranean coast, the morphology of the maritime zone is highly irregular morphology, locally featuring steep slopes. It furthermore may be overlain by formations that are relatively thick and poorly consolidated. Thus these zones are conducive to submarine landslides.

Based on bathymetric data, as well as knowledge of submarine sedimentary bodies, and supported by known gravity-driven events, fossil or modern-day, a zoning of submarine gravity-driven movements on the continental shelf and foot-slope off the French Mediterranean shores was assigned to IFREMER [START_REF] Cattaneo | Etude préliminaire de l"aléa tsunamis en Méditerranée occidentale -Zonage des mouvements de terrain sous-marins sur le plateau et talus continental au large des côtes françaises[END_REF], Fig. 2. Each of these zones is characterized by a typical slide of maximum volume for a return period ranging between several centuries and several millennia. Each typical slide is described by the following parameters: length, width, maximum thickness, mean slope, mean depth, the nature of the destabilized sediments, "SLUMP" or "SLIDE", "RUNOUT" and direction of propagation. Details about the zoning and how it was achieved are given in [START_REF] Cattaneo | Etude préliminaire de l"aléa tsunamis en Méditerranée occidentale -Zonage des mouvements de terrain sous-marins sur le plateau et talus continental au large des côtes françaises[END_REF].

Simulations of plausible major events

More than twenty simulations performed on low-resolution grids (meshes ranging from 2250 m to 750 m per side) were initially performed. These concern either historical events or fictitious ones. These preliminary calculations allowed the choice of six reference scenarios (Fig. 1 and 2) to be oriented more judiciously, and calculations with a finer mesh were conducted for these. The events involved are maximum plausible ones with return periods ranging from several centuries to a few millennia. The results obtained [START_REF] Pedreros | Tsunamis : étude de cas au niveau de la côte méditerranéenne française -Modélisation numérique[END_REF][START_REF] Terrier | Tsunamis : Étude de cas au niveau de la côte méditerranéenne française -Open-file BRGM report[END_REF] demonstrate that France"s Mediterranean coast is not exempt from tsunamis (Table 1). This said, the expected intensity remains relatively moderate.

Table 1 -A summary of the results of the tsunami scenarios [START_REF] Terrier | Tsunamis : Étude de cas au niveau de la côte méditerranéenne française -Open-file BRGM report[END_REF].

ASSESSING DAMAGE AND LOSSES FOR TSUNAMIS OF WEAK TO INTERMEDIATE INTENSITY

For the French Mediterranean coastline, the analysis of historical tsunamis and simulations of major tsunamigenic events indicate a maximum water-level height of less than 4 m. The tsunamis concerned are accordingly of low to medium intensity, i.e., their degree is less than 4 on the Sieberg scale modified by [START_REF] Ambraseys | Data for the investigation of the seismic sea-waves in the eastern Mediterranean[END_REF] or than intensity VI on the Papadopoulos and Fokaefs scale (2005).

Between 2009 and 2010, the research project RATCOM has made it possible to define, for moderate tsunamis, the principles for assessing vulnerability and calculating damage and human losses for moderate tsunamis [START_REF] Monfort | Projet RATCOM : Méthode d"évaluation de la vulnérabilité aux tsunamis en Méditerranée occidentale[END_REF]. The method developed in this study is complementary to those already proposed for tsunamis of higher intensity. It enables us to obtain a quantitative estimate of damages to individuals and property for different levels of aggression (tsunami scenario), bearing in mind that: 1) The hazard predicted for the French Mediterranean coastline is weak to intermediate, with run-up that does not exceed 3 m; 2) The stakes most exposed there are port areas (the most severely impacted by historical tsunamis) and the population (the recent, postwar tourist phenomenon); 3) In light of the context, and according to the type of structure, this can act as a "shelter." The following methodological steps are distinguished: choosing and mapping the stakes, assessing their vulnerability, simulating the tsunami and evaluating losses.

Choosing and mapping the stakes

The choice of stakes takes into account an analysis of feedback from intermediate-intensity tsunamis as well as the socio-economic context (very high population density during tourist seasons). The stakes considered are:

-Population density for each quarter and for different times of year (winter, summer) and of day (night, afternoon), using data on Ponchettes beach in Nice [START_REF] Robert | Évaluer et représenter le nombre d"usagers sur une plage urbaine (Les Ponchettes[END_REF] as a reference.

The breakdown into quarters takes into account the type of building encountered, the nature of land-use (beach, commercial zone, etc.) and topography. Each geographic entity is considered to be uniform with respect to the three aforementioned criteria. -Camp grounds.

-Underground car parks (number of levels and parking spots). -Marinas and fishing harbors (number of moorage slips).

-Communication lines (highways and railways).

-Seaside buildings (their footprint and structural type). The structure"s typology takes into account openings at ground level, the number of stories and the presence of a basement. A distinction is made between light structures (beach huts, for example) and heavy, reinforced constructions.

The characterization of the stakes is defined on the basis of a survey in the field and consultation of regional authorities and tourist bureaus. It is completed by a thorough-going analysis of aerial photos for a range of dates (boundaries of the quarters, distribution of structures and, as appropriate, a mean indication of the level of occupation of the beaches via a head count).

Assessing the vulnerability of the stakes

Population situated outdoors

Assessing human vulnerability depends schematically on how capable individuals are of protecting themselves (notably through their ability to move around) or withstanding an inundation. Flooding may be characterized according to various physical factors such as duration of submergence, run-up, the current"s direction and speed, and the solid load that is transported. [START_REF] Koshimura | A method for estimating casualties due to the tsunami inundation flow[END_REF] propose limits beyond which the danger level is significant, with a risk of drowning, that is, a restricted capacity of mobility, calculated in terms of the run-up and current speed. The results in Koshimura et al. are globally coherent with those that have been selected by the French authorities in the framework of the elaboration of Plans de Préventions des Risques aux Inondations (flood risk prevention plans). In the context of RATCOM, the aggression component is expressed by the value couple "maximum flood level /maximum speed" at a given moment, Fig. 3. Thanks to this limit, it is possible to identify, over the time the inundation will last, those areas where people will be able or not to withstand the flow on their own. This curve, however, does not factor in the transport of heavy and/or voluminous debris, which are liable to further hinder the mobility of persons. Based on analyses of feedback from catastrophic tsunamigenic events, Guha-Sapir (2006) and Nishikiori et al. (2007) observed mortality rates of between 6% and 10% within a population of individuals swept away by the current. Following the 2011 tsunami in eastern Japan, [START_REF] Mimura | Damage from the Great East Japan Earthquake and Tsunami -A quick report[END_REF] calculated a mortality rate ranging between 3.3% and 15% according to location. Based on this work, for an affected population unable to move and situated outdoors, a mortality rate of 10% was determined.

Population situated indoors

The analysis of feedback from historical and modern-day events shows that, except in the case of a tsunami generated by a nearby earthquake (with strongly felt vibrations), in all other instances it is preferable to be inside (excluding basements) than out. The approach for assessing the vulnerability of persons situated inside buildings and subject to the tsunami aggression alone follows the four following steps:

1) Typology of the structure with respect to the number of stories and the transparency of the ground floor (Fig. 4) :

Type 1. A multi-story building surmounting a transparent ground floor (presence of shops, picture windows...) which allow water to enter the ground floor easily. Type 2. A multi-story building surmounting a closed ground floor, that is, with walls that protect against the wave impact. Type 3. A transparent one-story building (ground floor). Type 4. A one-story building (ground floor) with walls that protect against the wave impact. 2) Mapping the structure (location, footprint and structural type).

3) For each type of structure, an exposure matrix is defined (Fig. 4). Based on work by [START_REF] Kelman | Physical Flood Vulnerability of Residential Properties in Coastal, Eastern England[END_REF] and the values considered in the framework of the "Plans de Prévention des Risques" for France, several levels of exposure have been distinguished. These depend on the maximum speed of flow and the maximum run-up:

-Level 0, building not flooded.

-Level 1, building flooded, people on the ground floor not swept away. Those on the ground floor feel the effects of the wave but can move around. In the case of multi-story building, these individuals can take shelter in the upper levels. -Level 1.5, single-level building protected by an outside wall, flooded. People can move around but will have nowhere to take shelter. -Level 2, building flooded, people on the ground floor are swept away or trapped. Those on the ground floor are carried off by the waves or drowned. In the case of a multi-story building, people in the higher levels will remain protected. Certain parts of the building may be damaged.

For a population trapped on the ground floor of buildings exposed to level 2 conditions, based on work by Guha-Sapir ( 2006), a 4% mortality rate is obtained.

Underground levels (cellars and car parks) constitute a specific type. The risk is considered to be level 2 once flooding reaches them.

For aggressions higher than those appertaining to levels 0 to 2, the behavior of the structure can be estimated using vulnerability curves derived from observations of the 2004 Indian Ocean tsunami or those proposed by [START_REF] Guillande | Uncertainties in modelling and damage assessment of tsunami risk, implications for crisis management (FP6 SCHEAMA project)[END_REF], [START_REF] Garcin | Geographic Information Systems for Coastal Hazards -Application to a pilot zone in Sri Lanka[END_REF], [START_REF] Peiris | Vulnerability functions for tsunami loss estimation[END_REF]Léone et al. (2006).

The vulnerability of port areas

During a moderate-level tsunami, boats moored in ports number among the property incurring the severest damage. In the Mediterranean, where tides are weak, boats are moored with little slack. In the event of a sudden and strong variation in sea level, docking lines, quickly over-stretched, break, allowing the boats to float free. These will then crash into each other, toss up against port facilities or hit bottom. The variations in level due to the ebb and flow generate strong currents in ports. As to the methodology implemented, the aggression is expressed in terms of a variation in water level (Table 2). The damage estimate is based on analyses of feedback from events occurred in the Mediterranean, like the tsunami owed to the Boumerdès earthquake (2003) or the seiche ("eigen oscillation"), from 2006 in the Balearic Islands than caused damages in the harbour zones comparable to those of the tsunami. As a rule, damage to small crafts (fishing boats or yachts) is far more extensive than for large ships. For small boats, the risk to those on board will be directly linked to that of the boat itself.

APPLICATION TO A 1979-TYPE TSUNAMI SCENARIO IN NICE (FRANCE)

The vulnerability assessment method was tested via an application on the Côte d"Azur (southern France), using an event of the Nice 1979 landslide type and four time scenarios: mid-January 2012 at 2 a.m. and 3 p.m. and mid-August 2012 at 2 a.m. and 3 p.m. The landslide parameters chosen for the simulation (Table 3) are drawn from work by Silva [START_REF] Jacinto | RatCom -Réseaux d"alerte aux Tsunamis et submersions Côtières en Méditerranée[END_REF]. The numerical simulation of the tsunami"s generation and propagation was performed using the GEOWAVE software [START_REF] Watts | Landslide tsunami case studies using a Boussinesq model and a fully nonlinear tsunami generation model[END_REF]. Subsequently, to model the submergence on land in an urban context (taking into account structures and coastal installations), a coupling was established between the GEOWAVE and SURFWB programs [START_REF] Marche | Evaluation of well-balanced bore-capturing schemes for 2D wetting and drying processes[END_REF]. As to the bathymetric and topographical data used, these allowed three interconnected calculation grids to be implemented, with a resolution that increased between the foot slope and the shoreline (pixels at 45 m, 15 m and 4 m).

The contour and elevation of the built environment and coastal installations drawn from the "building footprint" layer of the BDTopo (topographic database) of the Institut Géographique National (France"s national geographic institute) were superimposed on the digital elevation model. Details about the simulations are given in Le [START_REF] Roy | ALDES : Modélisation numérique du tsunami survenu à Antibes en[END_REF].

Simulation of the tsunami

The maximum heights of the free surface reached during the entire 20-minute interval that was simulated indicate the significant size the tsunami probably attained in Antibes (Fig. 5).

Submergence was computed on a grid with meshes measuring 3.75 by 3.75 m. It indicates that the arrival on the coast of the first wave seems to have caused most of the flooding, with subsequent waves simply reinforcing it, and this with generally lower current speeds. Maximum run-up averages 1 to 2.5 m and, very locally, even 4 to 5 m (Fig. 6). As to the maximum run-up distance (inland from the coastline), the simulation yields 150 to 200 m in the northern portion of the area studied, about 100 m on the wide beach to the north-west (i.e., reaching the buildings), some 60 m at the beach next to the port of La Salis (or slightly more when the water succeeded in spilling over into the streets, and on the order of 110 m in the port of La Salis itself. The outlines of the flooded areas obtained by simulation are fairly compatible with those reported by witnesses [START_REF] Sahal | The 1979 Nice airport tsunami : mapping of the flood in Antibes[END_REF]. The simulation indicates furthermore that at the port of La Salis, the arrival of the tsunami results in a slight hollow a little over 5 minutes after the airport landslide (less than 5 cm, undetectable by witnesses), cf. Fig. 7. A wave almost 1.5 m high then penetrated the port some 6 minutes after the slide. The water in the port seems to have had difficulties in flowing out again. This can be explained by the fact that the port"s dikes had been largely submerged (the run-up height of the water being on the order of 0.80 m), hence the immediate filling of the basin, whereas once the sea had ebbed, it took much longer for the basin to empty again by overflowing the dikes or via the breach. The maximum level of water in the port was attained after some 11mn40 s., with a water-level increase of 2.5 m. The maximum simulated speeds reached by the ebb and flow (norm and direction) very generally indicate values exceeding 3 m/s near the shore (Fig. 8). The analysis of the simulation film shows that the highest speeds were reached during the flow (the wave arrival) phase.

Damage assessment

In 1979, the area most severely impacted by the tsunami was the shore of Antibes, with the death of one individual caught in the basement of his house located near the La Salis beach. In the same part of Antibes, the wave had flooded a street and borne away a dozen cars. The local newspaper reported some one hundred buildings affected by the surge, as well as thirty or so people injured. This event took place on October 16 th in the early afternoon..

Using the results of the simulation of the 1979-type tsunami, a damage calculation was performed following vulnerability assessment principles described above and using the BRICE@brgm risk scenario simulation tool (Sedan, 2012). The scenario took into account the current distribution and typology of the built environment, as well as the population density off-season and during tourist season, nowadays situation.

Damage to the built environment

The analysis of the tsunami"s impact on buildings does not depend on the season of the year or the time of day when the tsunami arrives. It indicates (Fig. 9), for the 68 buildings affected by the inundation, that 25 would undergo a run-up height exceeding 0.75 m, 34 would be subjected to a current speed of over 1.5 m/s and 42 would present an exposure level of 2 (impossibility for persons inside to escape). This large number of building affected can be explained by the type of buildings with transparent ground floors which are frequently encountered by the shore. As to masonry (reinforced concrete) structures impacted, the damage expected would be very minor. Damage would essentially be associated with the impact of the wave and of floating objects against the most fragile portions of the ground floor (windows, doors, picture windows and garden walls). With these water levels, only the lightest-weight structures would incur serious damage, such as the facilities of beach operators.

Human losses

An estimation of human losses takes into account the season (summer or winter) and the time of day.

The simulation yields run-up heights exceeding 1.5 m and current speeds above 1 m/s for the La Salis quarter. With such a level of aggression, people are unable to withstand the flood. This estimate does not take into account fore-warning or the securing of people on the beach prior to the arrival of the flood. The inundation of the La Salis quarter affects the beaches, walkways, car parks and the busiest adjacent streets.

The number of individuals outside the affected buildings would amount to: 1) 2000 to 4000 people on August 15 th in mid-afternoon and 2) 60 to 80 people on January 15 th in mid-afternoon.

The mean estimate of the number of persons situated on the ground floor when the event occurs depends on the mean level of occupation of the buildings, according to the season, but also the time of day. Based on the mean occupancy rates proposed for earthquake scenarios [START_REF] Coburn | Earthquake protection[END_REF], mean occupations of 45% in the mid-afternoon and 80% at night have been selected. As to the individuals situated inside the buildings, 42 buildings are considered to present an exposure level of 2. The number of people impacted for a mid-August scenario is at least ten times smaller than that of persons outside: nearly 200 in the middle of the afternoon and 300 at night. However, in winter, the number of persons impacted (between 90 and 150) is higher than that outdoors.

Damage in ports

Antibes has several marinas and harbors for fishing boats, totaling about 3000 berths, and an occupation rate in excess of 90%, whatever the season. The assessment for a 1979-type scenario would indicate damage to 8.5% of the boats. The most heavily damaged port would be that of La Salis, with a risk of crafts being stranded (thus with a strong likelihood of damage) in the neighborhood of 50% of the total present.

Scenario results extended to several municipalities

The scenario extended to several municipalities in the bay of Nice indicates that if an event similar to that of 1979 were to occur at the height of the tourist season (busiest peak in mid-August, mid-day), the tsunami could impact several thousand people. However, the interval when the beaches are crowded is estimated at 7% of the total time in a year. Generally speaking, the application of this riskassessment method to an event-based scenario like that of the Nice airport in 1979 allows the following conclusions to be drawn:

 During a summer day, for the bay of Nice, several thousand individuals could be victims of the tsunami (including several dozen fatalities).  Few urban sectors would be flooded by the event. Only light-weight structures (beach-side straw huts, structures made of wood, sheet metal and with large windows) would be severely damaged. The other buildings (masonry, reinforced concrete), particularly those with one or more stories, represent a risk-reduction factor for the population inside them.  Ports are the infrastructures most prone to damage by tsunamis. Results indicate that several hundred boats could suffer from this type of event. More precise information concerning the seasonal occupation of each port would enable these estimates to be refined.  The quality of results on damage assessments depends not only on a knowledge of the stakes and of vulnerability functions, but also on indications concerning flooding (height/speed) caused by the tsunami.

CONCLUSION

Historical studies indicate that the French Mediterranean coast has, on several occasions, undergone tsunamis of low to medium intensity. Today, seasonal crowding on the coast results in a level of risk that can be high during certain times of the year. The method currently implemented takes into account the fact that: 1) the built environment can be a risk-reduction factor for people under certain conditions (height and speed of the inundation, building typology, situation of the population when the event occurs) and 2) low to medium intensity tsunamis can cause substantial human losses. Beside exposure of the population, the method also addresses other stakes such as ports, seaside facilities (car parks, camp grounds and highways) and the built environment. In view of the complexity and diversity of the different parameters required to assess damage from tsunamis, it is difficult today to assign an approximate level to the margin of uncertainty inherent to the results obtained. To ensure better credibility to the method that has been developed, and subsequently to the results it produces, the development of the method should be pursued though dedicated research.

Figure 2 -

 2 Figure 2 -Zoning of submarine landslides and choice of scenarios for the study of tsunami risk along the FrenchMediterranean coast[START_REF] Cattaneo | Etude préliminaire de l"aléa tsunamis en Méditerranée occidentale -Zonage des mouvements de terrain sous-marins sur le plateau et talus continental au large des côtes françaises[END_REF].

Figure 3 -

 3 Figure 3 -Limit to the ability to move used in the framework of the RATCOM project.

Figure 4 -

 4 Figure 4 -Matrixes for exposure to tsunamis versus structural type.

Table 3 -

 3 Parameters determined to describe the Nice airport landslide for modelling the tsunamigenic source.

Figure 5 -

 5 Figure 5 -Simulation of the Nice 1979-type tsunami: maximum elevation (in m) de highest water level.

Figure 6 -

 6 Figure 6 -Simulation of the Nice 1979-type tsunami : maximum run-up heights on land (in meters) and the flooded area identified by Sahal and Lemahieu (2010), in purple.

Figure 7 -

 7 Figure 7 -Simulation of a Nice 1979-type tsunami: elevation of the free surface in the port of La Salis.

Figure 8 -

 8 Figure 8 -Simulation of a Nice 1979-type tsunami: Maximum speeds attained by the currents: norms (in m/s) and directions.

Figure 9 -

 9 Figure 9 -Exposure levels for buildings in the La Salis quarter (Antibes) obtained with the Nice 1979 scenario.

Table 2 -

 2 Risk assessment for ports and harbor areas.

	Water level
	variation into the	Damage level	Damage ratio for ships
	port
	< 0.5 m	Acceptable
			Between 10 and 20%
	0.5 -2 m	Some ships are damaged. Damages to mobile facilities from the harbor.	(situation of Boumerdès in Menorca or Théoule-sur-Mer, Port Salis in
			Antibes 1979)
		High risk to break the moorings.
	> 2 m, strong currents	High risk of damages to ships and boats. Damages to	Situation after seiche
		some fixed facilities of the harbour.	event	in	2006	in
	Harbor dried, big	Boats and ships hit the bottom. High damage ratio for	Ciutadella (Menorca)
	waves above the	the ships and facilities.
	embankment

ACKNOWLEDGEMENTS

The authors wish to thank the French Ministry for the Environment and the Ministry of the Interior, for their contributions to funding the projects Tsunami.fr and ALDES, and the Ministry of the Economy and Finance as well as the Ministry for Research and Education for their contributions to funding the project RATCOM.


Khaled Jerbi
email: khaled.jerbi@insa-rennes.fr

Mickaël Raulet

Olivier Déforges

Mohamed Abid

Automatic Generation of Optimized and Synthesizable Hardware Implementation from High-Level Dataflow Programs

In this paper, we introduce the Reconfigurable Video Coding (RVC) standard based on the idea that video processing algorithms can be defined as a library of components that can be updated and standardized separately. MPEG RVC framework aims at providing a unified high-level specification of current MPEG coding technologies using a dataflow language called Cal Actor Language (CAL). CAL is associated with a set of tools to design dataflow applications and to generate hardware and software implementations. Before this work, the existing CAL hardware compilers did not support high-level features of the CAL. After presenting the main notions of the RVC standard, this paper introduces an automatic transformation process that analyses the non-compliant features and makes the required changes in the intermediate representation of the compiler while keeping the same behavior. Finally, the implementation results of the transformation on video and still image decoders are summarized. We show that the obtained results can largely satisfy the real time constraints for an embedded design on FPGA as we obtain a throughput of 73 FPS for MPEG 4 decoder and 34 FPS for coding and decoding process of the LAR coder using a video of CIF image size. This work resolves the main limitation of hardware generation from CAL designs.

Introduction

User requirements of high quality video are growing which causes a noteworthy increase in the complexity of the algorithms of video codecs. These algorithms have to be implemented on a target architecture that can be hardware or software. In 2007, the notion of Electronic System Level Design (ESLD) has been introduced in [START_REF] Bailey | ESL Design and Verification: A Prescription for Electronic System-Level Methodology[END_REF] as a solution to decrease the time to market using high-level synthesis which is an automatic compilation of high-level description into a lowlevel one called register transfer level (RTL). The high-level description is governed by models of computation which are the rules defining the way data is transferred and processed. Many solutions were developed to automate the hardware generation of complex algorithms using ESLD. Synopsys developed a C to gate compiler called synphony [START_REF]Synopsys: Synphony C compiler[END_REF]. Mentor Graphics also created a C to HDL compiler called Catapult C [START_REF]Mentor Graphics: Designing High-Performance DSP Hardware Using Catapult C Synthesis and the Altera Accelerated Libraries[END_REF][START_REF]ESL design and verification: a prescription for electronic system-level methodology[END_REF]. For their NIOS II, Altera introduces C2H as a converter from C to HDL [START_REF] Plavec | Towards compilation of streaming programs into FPGA hardware[END_REF][START_REF] P R I T C H A R D ,A N Dp .M O L S O N | A u t o m a t e dg e n e r a t i o n of hardware accelerators with direct memory access from ANSI/ISO standard C functions[END_REF]. To extend Matlab for hardware generation from functional blocks, Mathworks created a hardware generator for FPGA design [START_REF] Bhatt | Matlab as a development environment for FPGA design[END_REF]. In the university research field, STICC laboratory in France developed a highlevel synthesis tool called GAUT that extracts parallelism and generates VHDL code from a pure C description [START_REF] Coussy | An introduction to high-level synthesis[END_REF][START_REF] Coussy | GAUT: a high-level synthesis tool for DSP applications[END_REF]. The common point between all previously quoted tools is the fact that they are application-specific generators which means that they are not always efficientonanentir em ulticomponent system description.

In this context, CAL [START_REF] Eker | CAL language report[END_REF] was introduced in the Ptolemy II project [START_REF] B R O O K S | HZ: PtolemyII-heterogeneous concurrent modeling and design in Java (Volume 1: introduction to ptolemyII)[END_REF] as a general-use dataflow target agnostic language based on the dataflow Process Network (DPN) Model of Computation [START_REF] Lee | Dataow process networks[END_REF] related to the Kahn Process Network (KPN) [START_REF] Kahn | Proceedings of the IFIP Congress The Semantics of a Simple Language for Parallel Programming[END_REF]. The MPEG community standardized the RVC-CAL language in the MPEG RVC (Reconfigurable Video Coding) standard [START_REF] Mattavelli | The reconfigurable video coding standard[END_REF]. This standard provides a framework to describe the different functions of a codec as a network of functional blocks developed in RVC-CAL and called actors. Some hardware compilers of RVC-CAL were developed but their limitation is the fact that they cannot compile high-level structures of the language so these structures have to be manually transformed.

In [START_REF] Jerbi | Automatic method for efficient hardware implementation from rvc-cal dataflow: a lar coder baseline case study[END_REF], we presented an original functional method to quicken the HDL generation using a software platform for rapid design and validation of a high complexity dataflow architecture but going from high to low-level representation used to be manual. Therefore, we proposed to add automatic transformations to make any RVC-CAL design synthesizable.

This paper extends a preliminary work presented in [START_REF] Jerbi | Automatic generation of synthesizable hardware implementation from high level RVC-CAL design[END_REF] by introducing efficient optimizations and their impact on the area and time consumption of the design. The transformation tool analyzes the RVC-CAL code and performs the required transformations to obtain synthesizable code whatever the complexity of the considered actor. In Section 2,we explain the main advantages of using MPEG RVC standard for signal processing algorithms and the key notions of the RVC-CAL language and its behavioral structures and mechanisms. The proposed transformation process is detailed in Section 4 and finally hardware implementation results of MPEG4 Part2 decoder and LAR codec are presented in Sections 5 and 6.

Background

Since the beginning of ISO/IEC/WG11 (MPEG) in 1988 with the appearance of MPEG-1, many video codecs have been developed (MPEG-4 part2, MPEG SVC, MPEG AVC, HEVC, etc.) with an increasing complexity and so they take longer time to be produced. In addition, every standard has a set of profiles depending on the implementation target or the user specifications. Consequently, it became a tough task for standard communities to develop, test, and standardize a decoder at any given time. Moreover, the standards specification is monolithic which makes it harder to reuse or update some existing algorithms. This ascertainment originated a new conception methodology standard called Reconfigurable Video Coding introduced by MPEG.

In the following, we present an overview of MPEG RVC standard and associated tools and frameworks, we also present the main features of CAL actor language and the limitations that motivated this work.

MPEG RVC.

RVC presents a modular library of elementary components (actors). The most important and attractive features of RVC are reconfigurability and flexibility. An RVC design is a dataflow directed graph with actors as vertices and unidirectional FIFO channels as edges. An example of a graph is shown in Figure 1.

Actually, defining video processing algorithms using elementary components is very easy and rapid with RVC since every actor is completely independent from the rest of the other actors of the network. Every actor has its own scheduler, variables, and behavior. The only communication of an actor are its input ports connected to the FIFO channels to check the presence of tokens and as explained later an internal scheduler is going to allow or not the execution of elementary functions called actions depending on their corresponding firing rules (see Section 3). Thus, RVC insures concurrency, modularity, reuse, scalable parallelism, and encapsulation. In [START_REF] Janneck | Synthesizing hardware from dataflow programs: an mpeg-4 simple profile decoder case study[END_REF], Janneck et al. show that, for hardware designs, RVC standard allows a gain of 75% of development time and considerably reduces the number of lines compared with the manual HDL code. To manage all the presented concepts of the standard, RVC presents a framework based on the use of the following.

(i) A subset of the CAL actor language called RVC-CAL that describes the behavior of the actors (see details in Section 2.2).

(ii) A language describing the network called FNL (Functional unit Network Language) that lists the actors, the connections and the parameters of the network.

FNL is an XML dialect that allows a multilevel description of actors hierarchy which means that a functional unit can be a composition of other functional units connected in another network.

(iii) Bitstream syntax Description Language (BSDL) [START_REF] Mattavelli | MPEG reconfigurable video coding[END_REF][START_REF] Janneck | Reconfigurable video coding: a stream programming approach to the specification of new video coding standards[END_REF] to describe the structure of the bitstream.

(iv) An important Video Tool Library (VTL) of actors containing all MPEG standards. This VTL is under development and it already contains 3 profiles of MPEG 4 decoders (Simple Profile, Progressive High Profile and Constrained Baseline Profile).

(v) Tools for edition, simulation, validation and automatic generation of implementations:

(a) open DF framework [START_REF] Bhattacharyya | OpenDF-a dataflow toolset for reconfigurable hardware and multicore systems[END_REF] is an interpreter infrastructure that allows the simulation of hierarchical actors network. Xilinx contributed to the project by developing a hardware compiler called OpenForge (available at http:// openforge.sourceforge.net/) [START_REF] J A N N E C K | Exploring the concurrency of an MPEG RVC decoder based on dataflow program analysis[END_REF] to generate HDL implementations from RVC-CAL designs. (b) open RVC-CAL Compiler (Orcc) (available at http://orcc.sourceforge.net/) [START_REF] Janneck | Reconfigurable video coding: a stream programming approach to the specification of new video coding standards[END_REF]i sa nR V C -CAL compiler under development. It compiles a network of actors and generates code for both hardware and software targets. Orcc is based on works on actors and actions analysis and synthesis [START_REF] Roquier | Automatic software synthesis of dataflow program: an MPEG-4 simplpe profile decoder case study[END_REF][START_REF] Wipliez | Software code generation for the RVC-CAL language[END_REF]. In the front-end of Orcc, a graph network and its associated CAL actors are parsed into an abstract syntax tree (AST) and then transformed into an intermediate representation that undergoes typing, semantic checks and several transformations in the middle-end and in the back-end. Finally, pretty printing is applied on the resulting IR to generate a chosen implementation language (C, Java, Xlim, LLVM, etc.).

At this level, the question is that why RVC-CAL and not C? Actually, a C description involves not only the specification of the algorithms but also the way inherently parallel computations are sequenced, the way data is exchanged throw inputs and outputs, and the way computations are mapped. Recovering the original intrinsic properties of the algorithms by analyzing the software program is impossible. In addition, the opportunities for restructuring transformations on imperative sequential code are very limited compared to the parallelization potential available on multi-core platforms. For these reasons, RVC adopted the CAL language for actors specification. The main notions of this language are presented below.

CAL Actor Language.

The execution of an RVC-CAL code is based on the exchange of data tokens between computational entities (actors). Each actor is independent from the others since it has its own parameters and finite state machine if needed. Actors are connected to form an application or a design, this connection is insured by FIFO channels. Executing an actor is based on firing elementary functions called actions. This action firing may change the state of the actor in case of an FSM. An RVC-CAL dataflow model is shown in the network of Figure 2. Figure 3 presents an example of a CAL actor realizing the sum between two tokens read from its two input ports.

Like in VHDL, an actor definition begins by defining the I/O ports and their types then actions are later listed. An action begins also by defining the I/O ports it uses from the list of ports of the actor and this definition includes the number of tokens this action have to find in the FIFO to be fireable. In the "sum" actor, the internal scheduler allows action "add" only when there is at least one token in the FIFO of port "INPUT1" and one token in the FIFO of port "INPUT2" and this property explains how an actor can be totally independent and can neither read nor modify the state of any other actor. Of course, an actor may contain any number of actions that can be governed by an internal finite state machine. At a specific time two or more actions may have the required conditions to be fired so the notion of priority was introduced (see details in Section 3).

For the same behavior, an actor may be defined in different ways. Let us consider the "sum-5" actor of Figure 4 that reads 5 tokens in a port "IN," computes their sum and produces the result in a port "OUT."

In Figure 4(a), the required algorithm is defined in only one action. The condition of 5 required tokens is expressed by the instruction "repeat 5." Action "add" fires by consuming the 5 tokens from the FIFO into an internal buffer "I." After data storage, the algorithm of the action is applied. Finally the action firing finishes by writing the result in the port "OUT".

Such description is very fast to develop and implement on software targets but for hardware implementations a multitoken read is not appropriate. This is the reason of developing the equivalent monotoken code of Figure 4(b). In this description, we use a finite state machine to lock the actor in the state "state0." While counter¡5, only the action "read" can be fired to store tokens one per one in "data" buffer. Once the condition of action "read done" (counter = 5) is true, both of "read" and "read done" actions are fireable. This is why the priority "read done ≻ read" is important to keep the determinism of the actor. Finally, the firing of "read done" action involves an FSM update to "state1" where only "process" action can be fired and the actor is back to the initial state.

Actor Behavior Formalism

Actor execution is governed by a set of conditions called firing rules. Moreover, during this firing many internal features of the actor are updated (state, state variables, etc.). All these concepts and behavior evolutions are detailed below. The actor execution, so called firing, is based on the dataflow Process Network (DPN) principle [START_REF] Lee | Dataow process networks[END_REF]derived from the Kahn Process Network (KPN) [START_REF] Kahn | Proceedings of the IFIP Congress The Semantics of a Simple Language for Parallel Programming[END_REF]. Let Ω be the universe of all tokens values exchanged by the actors and S = Ω * , the set of all finite sequences in Ω. We denote the length of a sequence s ∈ S k by |s| and the empty sequence by λ. Considering an actor with m inputs and n outputs, S m and S n are the set of m-tuples and n-tuples consumed and produced. For example,

s 0 = [λ[t 0 , t 1 , t 2 ]] and s 1 = [[t 0 ], [t 1 ]
] are sequences of tokens that belong to S 2 and we have |s 0 |= [0, 3] and

|s 1 |=[1, 1].

Actor Firing. A dataflow actor is defined with a pair

f , R such as: (i) f : S m → S n is the firing function;

(ii) R ⊂ S m are the firing rules;

(iii) for all r ∈ R, f (r) is finite.

An actor may have N firing rules which are finite sequences of m patterns (one for each input port). A pattern is an acceptable sequence of tokens for an input port. It defines the nature and the number of tokens necessary for the execution of at least one action. RVC-CAL also introduces the notion of guard as additional conditions on tokens values. An example of firing rule r j in S 2 is

g j,k : [x] | x>0 r j = t 0 ∈ g j,k , [t 1 , t 2 , t 3 ] , (1)
Equation ( 1) means that if there is a positive token in the FIFO of the first input port and 3 tokens in the FIFO of the second input port then the actor will select and execute a fireable action. An action is fireable or schedulable iff: (i) the execution is possible in the current state of the FSM (if an FSM exists);

(ii) there are enough tokens in the input FIFO;

(iii) a guard condition returns true.

An action may be included in a finite state machine or untagged making it higher priority than FSM actions.

Actor

Transition. The FSM transition system of an actor is defined with σ 0 , Σ, τ, ≺ where Σ is the set of all the states of the actor, σ 0 is the initial state, ≺ is a priority relation and τ ⊆ Σ × S m × S n × Σ is the set of all possible transitions. A transition from a state σ to a state σ ′ with a consumption of sequence s ∈ S m and a produced sequence s ′ ∈ S n is defined with (σ, s, s ′ , σ ′ ) and denoted.

σ s →s ′ -→ σ ′ τ .
(

) 2
To solve the problem of the existence of more than one possible transition in the same state, RVC-CAL introduced the notion of priority relation such as for the transitions t 0 , t 1 ∈ τ, t 0 a higher priority than t 1 is written t 0 ≻ t 1 .A s explained in [START_REF] Eker | A structured description of dataflow actors and its application[END_REF]

a transition σ s →s ′ --→ σ ′ τ is enabled iff: ¬∃σ p →q -→ τ σ ′′ ∈ τ : p ∈ S ∧ σ s →s ′ -→ τ σ ′′ ≻ σ s →s ′ -→ σ ′ τ . (3)
This section presented and explained the main RVC-CAL principles. In the next section we present an automatic transformation as a solution to avoid these limitations without changing the overall macrobehavior of the actor.

Hardware Generation Problematic.

A firing rule is called multitoken iff : ∃e ∈| s| : e>1 otherwise it is called a monotoken rule. The limitation of OpenForge is the fact that it does not support multitoken rules which are omnipresent in most actors. The observation of Figure 4 shows the incontestable complexity difference between the multitoken (a) and the monotoken (b) code. Moreover, manually changing a CAL code from high-level to low-level by creating the new actions, variables and state machine is contradictory to the main purpose of RVC standard which is the fact that CAL is a target agnostic language so we have to write in CAL the same way for hardware of software implementation. Our work consists in automatically transforming the data read/write processes from multitoken to monotoken while preserving the same actor behavior. All the required actions, variables and finite state machines are created and optimized directly in the Intermediate representation of Orcc compiler. The following section explains the achieved transformation mechanism.

Methodology for Hardware Code Generation

As shown in Figure 5, our transformation acts on the IR of Orcc. The HDL implementation is later generated using OpenForge.

Actor Transformation Principle.

Let us consider an actor with a multitoken firing rule r ∈ S k such as |r|= [r 0 , r 1 , ..., r k-1 ], this rule fires a multitoken action a realizing the transition source a -→ τ target and I the set of all input ports. The transformation creates for every input port an internal buffer with read-and-write indexes and clips r into a set R of k firing rules so that:

∀i ∈ I, ∃!ρ ∈ R : ⎧ ⎪ ⎪ ⎨ ⎪ ⎪ ⎩ ρ : S 1 -→ S 0 |r|=1 g ρ : IdxWrite i -IdxRead i ≤ sz i , (4)
with ρ a monotoken firing rule of an untagged action untagged i , g ρ is the guard of ρ,a n dsz i the size of the associated internal buffer defined as the closest power of 2 of r i . This guard checks that the buffer contains an empty place for the token to read. The multitoken action is consequently removed, and new read actions that read one token from the internal buffers are created. While reading tokens another firing rule may be validated and causes the firing of an unwanted action. To avoid the nondeterminism of such a case, we use an FSM to put the actor in a reading loop so it can only read tokens. The loop is entered using a transition For example, the actor A of Figure 6 is defined with f :S 3 → S 2 with a multitoken firing rule: The transformation creates the FSM macroblock of Figure 7.

r ∈ S 3 : r = [[t 0 , t 1 ], [t 2 ,

FSM Creation

Cases. We consider an example of an actor defined as f : S 3 → S 2 containing the actions a1••a5suchas a3 is the only action applying a multitoken firing rule r ∈ S 3 .

Creating an FSM only for action a3 is not appropriate because a1, a2, a4, a5 will be a higher priority which may not be true. The solution is to create an initial state containing all the actions and add the created FSM macroblock of a3 (previously presented in Figure 7). The resulting FSM is presented in Figure 8.

We now suppose the same actor scheduled with an initial FSM as shown in Figure 9.

The transition t = S1 s →s ′ --→ τ S2 is substituted with the macroblock of a3 as shown in Figure 10.

Optimizations.

To improve the transformation, some optimization solutions were added. In the previously presented transformation method we used the untagged actions to store data in the internal buffers, then we used read actions to peek the required tokens from the internal buffers using R/W indexes and masks. To preserve the schedulability, the action is split into a transition action that contains the firing rule and a process action that applies the algorithm. The proposed optimization consists in making the action reading directly from the internal buffers. The firing rule of the action is transformed as presented in (4)t od e t e c t the presence of enough data in the internal buffers. Let us reconsider the basic example of the "sum-5" actor of Figure 4 of Section 2.2. The transformation explained above and the optimized transformation of this actor are presented in Figure 11. This actor is transformed this way. First an internal buffer and an untagged action are created to store data inside the actor. The input pattern of the read action is transformed into a connection to the internal buffer. Every read or write from the internal buffer must be masked to make the modulo of th buffer size since it is circular.

RVC Case of Study: MPEG 4 SP Intradecoder

To assess the performance of the previously presented transformation, we applied it on the whole MPEG 4 simple profile intradecoder. This choice is explained by the fact that there exists a stable design in the VTL and also because this decoder includes various image processing algorithms with more or less complexity. In the following we present an overview of this codec architecture and basic actors. We also present the implementation results and a comparison with an academic high-level synthesis tool called GAUT.

Concept.

MPEG codecs have all a common design. It begins with a parser that extracts motion compensation and texture reconstruction data. The parser is then followed by reconstruction blocs for texture and motion and a merger as presented in Figure 12. This decoder is a full example of coding techniques that encapsulates predictions, scan, quantization, IDCT transform, buffering, interpolation, merging and especially the very complex step of parsing.

Ta b l e 1 gives an idea about the complexity of parsers in MPEG 4 Simple Profile and MPEG Advanced Video Coding (AVC). Actors of Figure 12 are the main functional units some of them are hierarchical composition of actor networks. An actor may be instantiated more than one time so for 27 FU there are 42 actor instantiations.

Implementation and Results

. The achieved automatic transformation was applied on MPEG4 SP intradecoder (see design in Orcc Applications (available at http://orcc .sourceforge.net/)) which contains 29 actors. We omitted the inter decoder part because it is very memory consuming. The HDL generated code was implemented on a virtex4 (xc4vlx160-12ff1148) and the area consumption results we obtained are presented in Ta b l e 2 . The removal of read actions buffers and process actions had an important impact on the area consumption since it has decreased about 50%.

After the synthesis of the design, we applied a simulation stream of compressed videos. Ta b l e 3 below presents the timing results of a CIF (352 × 288) image size video.

We notice that timing results were partially improved. This is due to the presence of division operations in some actors. In our transformation we replaced divisions by an Euclidean division which is very costly and time consuming. The impact is noticeable since these divisions reduced the maximum frequency by 60%. Therefore, we applied the transformation on the inverse discrete cosine 2D transform (IDCT2D). We chose this actor because it contains very complex algorithm, functions and procedures. We tried to compare with an optimal low-level architecture designed by Xilinx experts and also with an existing implementation study of a direct VHDL written algorithm in [START_REF] Megalingam | Hardware implementation of low power, high speed DCT/IDCT based digital image watermarking[END_REF]. For a significant comparison, we used the same implementation target of the study which is the Xilinx Spartan 3 XC3S4000. Timing and area consumption results comparison are presented in Ta b l e s 4 and 5.

Obviously, Ta b l e 5 reveals that area results for the optimized design are very close to those of the Xilinx low-level design. This property is noted for all actors containing more computing algorithms then data control and management algorithms. Concerning the area consumption of the VHDL design, it is expectable to find results nearby the optimal design and clearly worse than the Xilinx design and this is due to the synthesis constraints indicated in [START_REF] Megalingam | Hardware implementation of low power, high speed DCT/IDCT based digital image watermarking[END_REF] that favor treatment speed in spite of the surface. This is what explains also the very high FPS rate of the design presented in Ta b l e 4 . Timing results of the other designs show that the optimized design performances are far from the optimal Xilinx design. This is due to the low level architecture made by Xilinx experts which is completely different and oriented for hardware generation. This architecture is a pipelined set of actors realizing the IDCT2D (rowsort, fairmerge, IDCT1D, separate, transpose, retranspose, and clip) which is a relatively complex design compared with the high-level IDCT2D code used for the transformation.

After comparing with the Xilinx design and a VHDL directly written design, we compared our results with existing generation tools and we considered GAUT hardware generator. This tool is an academic high-level synthesizer from C to VHDL. It extracts the parallelism and creates a scheduled dependency graph made of elementary operators. Potentially, GAUT synthesizes a pipe-lined design with memory unit, communication interface and a processing unit. However, like most existing hardware generators, GAUT is not able to manage a system level design with very high complexity and a variety of processing algorithms. Moreover, there are so many restrictions on the C input code to have a functioning design. As it was impossible to test the whole MPEG 4 decoder we chose the IDCT2D algorithm to have a comparison with previously presented results.

The IDCT2D is so generated with GAUT and we obtained the results of Ta b l e 6 below.

Results show that the optimized transformation generates a better design even for the specific case of study of the IDCT2D.

Still Image Codec: LAR Case of Study

The LAR is a still-image coder [START_REF] Déforges | Color LAR codec: a color image representation and compression scheme based on local resolution adjustment and self-extracting region representation[END_REF] developed at the IETR/ INSA of Rennes laboratory. It is based on the idea that the spatial coding can be locally dependent on the activity in the image. Thus, the higher the activity the lower the resolution is. This activity is dependent from the variation or the uniformity of the local luminance which can be detected using a morphological gradient. In the following, we detail coding principle of the LAR and we present the implementation techniques and results using the automatic transformation approach.

6.1. Concept. The LAR coding is based on considering that an image is a superposition of a global information image (mean blocks image), and the local texture image, which is given by the difference between the original image and the global one. This principle is modeled by

I = I + ⎛ ⎜ ⎝I -I E ⎞ ⎟ ⎠,( 5
)
where I is the original image, I is the global information image and I -I is the error image, E.Thedynamicrangeof the error image is consequently dependent on the local activity. In uniform regions, I values are close or equal to I consequently I -I values are around zero with a low dynamic range.

Considering these principles, the LAR coder concept (Figure 13) is composed of two parts: the FLAT LAR [START_REF] Deforges | LAR method: from algorithm to synthesis for an embedded low complexity image coder[END_REF] which is the part insuring the global information coding and the spectral part which is the error spectral coder.

Different profiles have been designed to fit with different types of application. In this paper, we focus on the baseline coder. Its mechanisms are detailed in the following.

The FLAT LAR. The Flat LAR is composed of 3 main parts: the partitioning, the block mean value computation and the DPCM (Differential Pulse Coding Modulation). In our work, only the DPCM is not yet developed with RVC-CAL.

(i) Partitioning: in this part, a Quad-tree partitioning is applied on the image pixels. The principle is to consider the lowest block size (2×2) then to compare the difference between the maximum (MAX) and the minimum (MIN) values of the block with a threshold (THD) defined as a generic variable for the design. If (MAX-MIN) > THD then the actual block size is considered. In the other case, the (N ×2)×(N ×2) size block is required. this process is recursively applied on the whole image blocks. The output of the overall is the block size image.

(ii) Block mean values computation process: this process is based on the Quad-tree output image. For each block of the variable size image, a mean value is put in the block as presented in the example of Figure 14.

(iii) The DPCM: the DPCM process is based on the prediction of neighbor values and the quantization of the block mean value image. The observation that a pixel value is mostly equal to a neighbor one led to the following estimation algorithm. If we consider the pixels in Figure 15, X value is estimated with the following algorithm:

If |B -C| < |A -B| then X = A else X = C.
The spectral coder, also called the texture coder, is composed of a variable block size Hadamard transform [START_REF] Poncin | Utilisation de la transformation de Hadamard pour le codage et la compression de signaux d'images[END_REF] and the Golomb-Rice [START_REF] Rice | Some practical universal noiseless coding techniques[END_REF][START_REF] Golomb | Run length codings[END_REF] H 0 is the identity matrix so H 0 = 1. For any m>0, H m is then deducted recursively by:

H m = 1 √ 2 H m-1 H m-1 H m-1 -H m-1 . ( 6
)
Here are examples of Hadamard matrices:

H 0 = 1, H 1 = 1 √ 2 11 1 -1 , H 2 = 1 √ 2 11 1 1 1 -11-1 11-1 -1 1 -1 -11
, and so forth.

(7)

Implementation and Results

. This Section explains the mechanisms of the Hadamard transform and the Quad-tree used in the implementation. 16.

As a first step, the memory management block stores the pixels values of the original image line by line. Once an 8 × 8 block is obtained, the actor divides it into sixteen 2×2 blocks and sends them in a specific order as presented in Figure 18.

This order is very important to improve the performance of remaining actors. In fact, considering the Figure 18, when the tokens are so ordered the first 4 tokens correspond to the first 2 × 2 block, the first 16 tokens to the first 4 × 4 block, and so forth Consequently, and as presented in Figure 16, the output of the H 1 is automatically the input of the H 2 and the output of the H 2 is automatically the input of the H 3 .

In the Quad-tree, this order is also crucial. As presented in Figure 17, the superposition of the same actor (max for example) three times provides in the output of the first actor the maximum values of 2 × 2 blocks, in the output of the second actor the maximum values of 4 × 4 block and finally the maximum values of 8 × 8 blocks in the output of the third one. Using the maximum values and the minimums the morphological gradient in the Gradstep actors can process to extract the block size image. The same tip is used to calculate the block sums with three superposed sum actors. The block mean value actor considers the sums and the sizes to build the block mean value image.

We also notice that an (H 2 ) transform can be achieved using the (H 1 ) results of the four 2×2 blocks constituting the 4 × 4 block. The same observation can be made for the (H 3 ) one. This ascertainment is very important to decrease the complexity of the process. In fact, the Hadamard transform The (H 2 ) and the (H 3 ) transforms are different from the full transforms as they are much less complex. Consequently, as shown in Figure 16, we designed the H 2 and the H 3 using H 1 actors associated with memory management units. They sort tokens in the adequate order and, considering the block size, whether the block is going to undergo the transform or not. It is very important to mention that almost actors have been developed with generic variables for memory sizes or gradsteps which means that the design are flexible for easy transformation from an image size to another or for adding higher Hadamard process (H 4 , H 5 ,etc.).

In [START_REF] Jerbi | Automatic method for efficient hardware implementation from rvc-cal dataflow: a lar coder baseline case study[END_REF], we added some optimizations on the processes using a Ping-Pong memory management algorithm [START_REF] Chang | A flexible twolayer external memory management for H.264/AVC decoder[END_REF]t o pipeline the process.

Results and Comparison.

As mentioned above, this work aims at comparing hardware implementation performances of the same LAR architecture generated with the optimized automatic transformation and with a manual transformation. The achieved automatic transformation was applied on the 23 actors of the LAR using Orcc. The HDL generated code was implemented on a virtex4 (xc4vlx160-12ff1148). The area consumption results obtained are presented with those of manual transformations in Ta b l e 7 .

After the synthesis of the design, we applied a simulation stream of compressed videos. Ta b l e 8 below presents the timing results of a CIF (352 × 288) image size video.

For area consumption, the difference is not considerable for LUTs and occupied slices and it can be explained by the fact that the transformation applies a general modification whatever the complexity of the actor. Also, the fact of creating an internal buffer for every input port involves more area consumption.

Concerning the timing results, the automatic and the manual transformed designs performances remain close and acceptable. The latency difference is explained by the fact that the untagged actions, as always given priority over the rest of actions, promote the data reading. It means that, as long as there is data in the FIFO, the untagged action fires even if there are enough data to fire the processing actions. This problem will also be resolved by further optimizations of the buffer size.

Conclusion

This paper presented an automatic transformation of RVC-CAL from high-to low-level description. The purpose of this work is to find a general solution to automate the whole hardware generation flow from system level. This transformation allows avoiding structures that are not understandable by RVC-CAL hardware compilers. We applied this automatic transformation on the 29 actors of MPEG4 part2 video intradecoder and successfully obtained the same behavior of the multitoken design and a synthesizable hardware implementation. To change the test context, we automatically transformed a high-level design of the LAR still image codec and obtained relatively acceptable results.

Several optimization processes were added to the transformation to reduce the area consumption about 50%. The transformation process is currently generalized for all actors.

The most important in this work is that we contributed in making RVC-CAL hardware generation very rapid with an average gain of 75% of conception, development, and validation time compared with manual approach. We insured that the generation is applicable at system level whatever the complexity of the actor.

Currently, improvements are also in progress to customize the transformation depending on the actor complexity analysis. A future work will be the study of the impact of the transformation on the power consumption of the generated implementation.

Figure 1 :Figure 2 :

 12 Figure 1: Graph example. Block diagram of the motion compensation of an MPEG 4 part 2 decoder.

Figure 3 :

 3 Figure 3: Example of sum actor.

Figure 4 :

 4 Figure 4: Two-way definition example of sum-5 actor behavior.

Figure 5 :

 5 Figure 5: Automatic transformation localization in Orcc compiling process.

Figure 6 :Figure 7 :

 67 Figure 6: RVC-CAL code of actor A.

Figure 8 :Figure 9 :

 89 Figure 8: FSM with created initial state.

Figure 10 :

 10 Figure 10: Resulting FSM transformation.

Figure 11 :

 11 Figure 11: Transformed and optimized sum-5 actor.

Figure 12 :

 12 Figure 12: MPEG 4 SP architecture.

Figure 15 :

 15 Figure 15: DPCM prediction of neighbor pixels.

  t 3 , t 4 ], [t 5 ]]. Consequently, |r|=[2, 3, 1] which means that there is an action in A that fires if 2 tokens are present in IN1 port, 3 tokens are present in IN2 and one token is present in IN3.

Table 1 :

 1 Composition of MPEG-4 simple profile and MPEG-4 advanced video coding RVC-CAL description.

		Actors	Levels	Parser size kSLOC	Decoder size kSLOC
	MPEG-4 SP	27	3	9.6	2.9
	MPEG-4 AVC	45	6	19.8	3.9

Table 2 :

 2 MPEG4 decoder area consumption.

	Criterion	Transformed design	Optimized design
	Slice flip flops	21,624/135,168 (15%) 13,575/135,168 (10%)
	Occupied slices	45,574/67,584 (67%) 18,178/67,584 (26%)
	4 input LUTs	68,962/135,168 (51%) 34,333/135,168 (25%)
	FIFO16/RAMB16s	14/288 (4%)	14/288 (4%)
	Bonded IOBs	107/768 (13%)	107/768 (13%)

Table 3 :

 3 MPEG4 decoder timing results.

	Criterion	Tr a n s for m e d design	Optimized design
	Maximum frequency (MHz)	26.4	26.67
	Latency (µs)	381.8	306.4
	Cadency (MHz)	1.9	2.33
	Processing time (ms/image)	13.55	11.01
	Throughput frequency (MHz)	1.8	2.2
	Global image processing (FPS)	73.8	90.82

Table 4 :

 4 IDCT2D timing results.

	Image size	Xilinx design	Transformed design	Optimized design	VHDL design
	Maximum frequency (MHz)	37	37	43	41
	Latency (µs)	11.52	82.7	28.4	*
	Cadency (MHz)	30	18.49	21.7	71
	Processing time (µs/64 Tokens)	1.99	3.4	2.8	0.89
	Throughput frequency (MHz)	26.62	0.72	2.43	62.4
	Global image processing (FPS)	1064	31	101	2518

* Not mentioned in the literature.

Table 5 :

 5 IDCT2D area consumption.

	Criterion	Xilinx design	Transformed design	Optimized design	VHDL design
	Slice flip flops	1415/55296 (2%)	4002/55296 (7%)	2113/55296 (3%)	*
	Occupied slices	1308/27648 (4%)	5238/27648 (18%)	2523/27648 (9%)	3571/27648 (12%)
	4 input LUTs	2260/55296 (4%)	9861/55296 (17%)	4777/55296 (8%)	4640/55296 (8%)
	Bonded IOBs	48/489 (9%)	49/489 (10%)	49/489 (10%)

* * Not mentioned in the literature.

Table 6 :

 6 IDCT2D area consumption with GAUT.

	Criterion	GAUT design			Optimized design
	Slice flip flops	2.080/135.168 (2%)	1.988/135.168 (2%)
	Occupied slices	2.477/67.584 (3%)		2.353/67.584 (3%)
	4 input LUTs	4.243/135.168 (3%)	4.458/135.168 (3%)
	Bonded IOBs	627/768 (81%)			49/768 (6%)
	Original image	FLAT coder	FLAT decoder	Low resolution image
		Transmission
	+				+
	-				-
		Spectral	Spectral
		coder	decoder
		Transmission
					Middle/high
					resolution
					image
		Figure 13: LAR concept.

  e n t r o p yc o d e r .T h e Golomb-Rice coder is still in development with the RVC-CAL specifications.The Hadamard transform derives from a generalized class of the Fourier transform. It consists of a multiplication of a 2 m × 2 m matrix by an Hadamard matrix (H m ) that has the same size. The transform is defined as follows.

	11	10	..	25 25	29 30	222 2	4 44 4
	10	9	..	26 27	36	40	2222	4444
		Quad tree . Figure 14: Block mean value process example. Original image Block size image Block mean value image Block mean value process 2222 2222 222 2 222 2 222 2 222 2 4 44 4 4444 4 44 4 4 44 4 4 44 4 4 44 4 10 10 10 10 25 20 28 30 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 39 39 40 41 . .

  6.2.1. Hardware Implementation. The LAR coding is dependent from the content of the image. It applies in the Quad-Tree a morphological gradient to extract information about the local activity on the image. The output is the block size image represented by variable size blocks: 2 × 2, 4 × 4o r × 8. Using the block size image, the Hadamard transform applies the adequate transform on the corresponding block. I tm e a n st h a ti fw eh a v eab l o c ks i z eo f2× 2 in the size image this block will undergo a 2 × 2 Hadamard (H 1 )a n d a normalization specific to the 2 × 2 blocks. This process is identically applied for 4 × 4and8× 8 blocks. A quantization step, adapted to current block size, is applied on the Hadamard output image. For each block size, a quantization matrix is predefined. Practically, the normalization during the Hadamard transform is postponed to be achieved with the quantization step so that to decrease the noise due to successive divisions. The implemented LAR is presented in Figure

			Quad-tree	Block size
	Image	Memory management	2 × 2 blocks	H 1	H 2	H 3	Norm. and quant.
	H2 input	H 1	H2 output	H3 input	H 1	H3 output
	memory		memory	memory		memory
	management		management	management		management
		Figure 16: LAR baseline developed model.

8

Table 7 :

 7 LAR coder area consumption.

	Transformation	Automatic	Manual
	Slice flip flops	20.452/135.168 (15%)	12.157/135.168 (8%)
	Occupied slices 47.576/67.584 (70%)	43.602/67.584 (67%)
	4 input LUTs	59.868/135.168 (44%) 53.417/135.168 (39%)
	Bonded IOBs	41/768 (5%)	41/768 (5%)

Table 8 :

 8 LAR timing results.

	Transformation	Automatic	Manual
	Development time	30%	100%
	Maximum frequency (MHz)	61.43	85.27
	Latency (ms)	0.42	0.12
	Throughput frequency (MHz)	3.5	5.6
	Processing time (ms/image)	35	19
	Global image processing (FPS)	34	53

. . . . . . . . .. . . . . . . . . . . . . . . .. . . . . . . . . . . . .. .. . . . . . . . . . . . .. . . . . . . . . . . . . . . .. . . . . . . . . . . .

Acknowledgments

Special thanks to Matthieu Wipliez, Damien De Saint-Jorre, and Hervé Yviquel for their relevant contributions in the source code.