Laurent Cormier
email: laurent.cormier@sorbonne-universite.fr

Diffraction and X-ray absorption spectroscopy

Keywords: X-ray diffraction, neutron diffraction, X-ray absorption spectroscopy, structure

X-ray/neutron diffraction and X-ray absorption spectroscopy are complementary experimental techniques giving pair distribution functions. There are selective tools to obtain structural information, probing short and medium ranges (up to typically 1nm), such as coordination, bond distances but also valence state, even at a dilute concentration. Moreover, spatial or time resolution, specific environments (high pressure/temperature, controlled atmosphere) can be achieved. In this chapter, the theoretical basis of each techniques is given and case studies applied to glasses are used to illustrate the structural information that can be extracted.

Introduction

In order to verify the amorphicity of a glass, a primary tool is to use diffraction and to check that no Bragg peaks are apparent. However, diffraction patterns contain significant structural information. Indeed, the first structural characterizations were obtained by X-ray diffraction [START_REF] Zachariasen | The atomic arrangement in glass[END_REF][2] [START_REF] Warren | Fourier analysis of X-ray patterns of soda-silica glass[END_REF] leading to the famous Zachariasen-Warren model for oxide glasses.

Diffraction methods can successfully give direct information on the atomic structure, both at short and intermediate range order. Similarly X-ray absorption spectroscopy has become a popular tool to investigate the environment around specific elements. These experimental techniques can be easily compared to simulations. Finally, various environments can be adapted allowing measurements at high temperature and/or high pressure.

Diffraction by non-crystalline materials

Theoretical background

A theoretical description of the scattering processes can be found in various textbooks [START_REF] Fischer | Neutron and x-ray diffraction studies of liquids and glasses[END_REF] [START_REF] Chieux | Liquid structure investigation by neutron scattering[END_REF][6] [START_REF] Wright | The structure of amorphous solids by X-ray and neutron diffraction[END_REF]. Early X-ray diffraction studies have already shown that the diffraction pattern can be better understood after a Fourier transform to analyze the data in r-space. The structure factor, S(Q), is the diffraction intensity obtained after normalization and corrections. Its Fourier transform yields the pair distribution (correlation) function (PDF), g(r) [START_REF] Chieux | Liquid structure investigation by neutron scattering[END_REF]:

, ( 1
)
where Q (Å -1 ) is the magnitude of the scattering vector, r is the interatomic distance and ρ " (atoms Å -3 ) is the atomic number density. 𝑄 = 4π sin(θ) λ ⁄ with θ the scattering angle and λ the wavelength of the incident neutron or X-ray photon.

Different functions are frequently used in the literature that are all related [START_REF] Keen | A comparison of various commonly used correlation functions for describing total scattering[END_REF]:

-the pair distribution function g(r), describing the local fluctuations in density around the unit:

g(r) = ρ(r) ρ " ⁄ , where ρ(r) is the r-dependent atomic density [START_REF] Gaskell | Neutron-scattering studies of the structure of highly tetrahedral amorphous diamondlike carbon[END_REF];

-the differential (or reduced) correlation function D(r) = 4πrb 4 5 ρ " [g(r) -1], that considers deviations from the average atomic density ρ " and 𝑏 4 5 = ∑ 𝑐 = 𝑐 > 𝑏 = 𝑏 > =,>

, with 𝑐 = the atomic concentration for the element i and bi its the neutron scattering length;

-the (total) radial distribution function RDF(r) = 4πr 5 b 4 5 ρ " g(r) or the total distribution function T(r) = RDF(r) r ⁄ .

The Faber-Ziman formalism

For a polyatomic material, S(Q) is a weighted sum of all partial structure factors (PSFs), Sαβ(Q) [START_REF] Faber | A theory of the electrical properties of liquid metals III. The resistivity of binary alloys[END_REF], S(Q) = ∑ W FG F,G S FG (Q), with the weighting factors Wαβ for the chemical species α and ß: ,

The δαβ function takes into account that Sαβ(Q) = Sβα(Q). bi is the neutron scattering length and fi(Q,E) is the atomic form factor. They both describes the interaction between the incident particle and an atom i.

The PSFs only depend on the structure, while the weighting factors are different when diffraction is obtained by X-ray photons or neutrons. In consequence, a S Neutron (Q) and a S X-ray (Q) exhibit significant differences in peak positions and intensities. Each PSF is associated with a partial pair distribution function (PPDF), gαβ(r), that gives the probability of finding an atom of type β at distance r from an atom of type α taken at the origin (average distribution of atoms β around an atom α at the origin).

For a material containing n chemical species, 𝑛(𝑛 + 1) 2 ⁄ independent PSFs (or PPDFs) are required for a detailed description of the structure.

Fourier transformation

An important parameter in the diffraction technique is the highest accessible Q value, Qmax. A Fourier transform with a small Qmax value yields a peak broadening that prevents to resolve two close interatomic distances. High Qmax values are thus required to achieve high real space resolution. This is experimentally obtained by using short incident wavelength λ (high incident energy).

An example of using high energy x-ray diffraction (HE-XRD) can be found in Petkov et al. [START_REF] Petkov | Polyhedral units and network connectivity in calcium aluminosilicate glasses from high-energy X-ray diffraction[END_REF].

A Qmax value of 40 Å -1 has been achieved allowing to separate Si-O and Al-O distances that are separated by only 0.15 Å, in aluminosilicate glasses. A similar resolution can be obtained using neutron diffraction. The two P-O distances at 1.43 Å and 1.58 Å that exists in PO4 tetrahedra (terminal oxygen and bridging oxygen) can be resolved [START_REF] Hoppe | Structural specifics of phosphate glasses probed by diffraction methods: a review[END_REF].

Better to use neutron or X-ray?

Neutron and X-ray diffraction techniques are complementary tools to provide structural information. Table 1 summarizes the main differences between these two techniques. Since a X-ray photon and a neutron interacts differently with an atom, there are not sensitive to the same elements:

X-ray diffraction is useful to probe high-Z elements while neutron diffraction can investigate light elements such as H or Li, and gives a different signal for different isotopes of the same element. While the neutron scattering length b is a constant, the X-ray form factor f depends on Z and decreases to zero at large Q-values. This decay limits the Q-range that can be achieved in a X-ray diffraction experiment for samples containing low-Z elements.

The complementary of the two diffraction techniques can be emphasized in borate and phosphate glasses containing elements responsible for the ionic conduction (alkali oxides or salts) [START_REF] Hoppe | Structural specifics of phosphate glasses probed by diffraction methods: a review[END_REF][13] [START_REF] Swenson | Conductivity enhancement in PbI2-AgI-AgPO3 glasses by diffraction experiments and reverse Monte Carlo modeling[END_REF].

For such materials, the borate or phosphate networks can be determined by neutron diffraction while the mobile species (especially ionic salts) is probed by X-ray diffraction.

Table 1. Comparison of neutron and x-ray diffraction

X-ray Neutron

Interaction with electronic cloud Interaction with the nucleus

f(Q,E) atomic

Determination of the structural parameters

The structural information is mainly obtained from the real space functions (figure 1). The peak position, rαβ, gives directly the average interatomic bond length between two atoms a and b, with a great accuracy. For instance, using neutron diffraction, the Si-O bond length has been determined at

Difference methods

The pair distribution function gives average information on the global structure of the material and it is dominated by the PPDFs having the largest weighting factors. For instance, Si-O, O-O and Si-O pairs strongly dominate the neutron pair distribution function in silicate glasses. Furthermore, the overlapping of the various contributions beyond 3 Å prevent rigorous interpretation without the recourse to some sort of modeling.

For a system of n elements, 𝑛(𝑛 + 1) 2 ⁄ independent PSFs (or PPDFs) must be determined to obtain a complete description of the structure. This can be obtained by performing 𝑛(𝑛 + 1) 2 ⁄ distinct experiments. Neutron and X-ray diffraction offer two different experiments so that, even for a binary system, an additional experiment is required. This can be achieved using a contrast variation method for which a specific element in the material is investigated. This allows the extraction of the PPDFs associated with this element, which are otherwise buried beneath other contributions having strong weighting factors.

In the structure factor, the PSFs and the atomic concentration ci depends upon the structure and composition of the material, respectively. However, the scattering power (b or f(Q,E)) of a given element can both be modified. Important variation in the amplitude of b (and even its sign) can exist from one element to another or considering different isotopes of the same element. The first property has been used in isomorphic substitution where an element is replaced by another playing and identical role in the structure but having a significant different b value [START_REF] Martin | Structure of dysprosium and holmium phosphate glasses by the method of isomorphic substitution in neutron diffraction[END_REF]. The use of different isotopes allows a more rigorous contrast method, called isotopic substitution. Similarly, f(Q,E) can vary significantly when E is close to an absorption energy that is characteristic of the electronic structure of a specific element. This is at the origin of the anomalous diffraction. For these two contrast methods, neutron diffraction with isotopic substitution (NDIS) and Anomalous X-ray diffraction (AXRD), the higher the contrast variation for b or f, the higher the reliability of the results.

Neutron diffraction with isotopic substitution (NDIS)

The isotopic substitution method consists in measuring the scattering intensity for two samples, prepared rigorously identically (allowing the assumption that they have the same structure, i.e.

By taking the difference between these two functions, all terms not involving M are eliminated.

The subtraction gives a first difference function, DM(Q), that contains only the PSFs associated with M and, after Fourier transformation, the M-centered PDF: and D'M(Q) can be calculated:

𝐺 MN (𝑟) = 2 𝜋 Q Δ M (𝑄)𝑄𝑠𝑖𝑛(𝑄)𝑑𝑄 𝐺 MN (𝑟) = 2 ∑ 𝑐 N 𝑐 M 𝑏 N (𝑏 M -𝑏 V M )𝑔 MN (𝑟) NXM + 𝑐 M 5 Y𝑏 M 5 -𝑏 V M 5 Z𝑔 MM (𝑟), (5)
∆ M (Q)=2 ∑ c α c M b α Yb M -b ' M Z(S Mα (Q)-1) α≠M +c M 2 \b M 2 -b ' M 2 ] (S MM (Q)-1) ∆ ' M (Q)=2 ∑ c α c M b α Yb ' M -b '' M Z(S Mα (Q)-1) α≠M +c M 2 \b ' M 2 -b '' M 2 ] (S MM (Q)-1) , (6)
The equation [START_REF] Squires | Introduction to the theory of thermal neutron scattering[END_REF] separates the weighting factors between M and a chemical species a (a ≠ M) and the M-M weighting factor. Indeed, the isotopic composition of the three glasses can be judiciously chosen to equalize the quantities

𝑏 M -𝑏 M V = 𝑏 M V -𝑏 M VV . This is simply obtained if 𝑏 V = (𝑏 + 𝑏 VV ) 2 ⁄ .
The subtraction of DM(Q) and D'M(Q) allows the isolation of the M-M PPDF: ,

Using such double difference method, a single PPDF can be extracted in a multicomponent glass.

This GMM(r) PPDF gives directly the distribution of cations M within the structure. Gaskell et al. have obtained GCaCa(r) showing well-defined Ca-Ca distances in a CaSiO3 glass that they interpreted as edge-sharing Ca polyhedra forming corrugated rafts in the silicate network [START_REF] Gaskell | Medium-range order in the cation distribution of a calcium silicate glass[END_REF]. This approach has been extended to various cations (Ca, Ti, Ni, Li) in oxide glasses and has revealed cation organization with periodic M-M distances (and specific distances which are absent). Figure 3 shows these M-M correlations that are convincing evidences of clustering and percolation domains in silicate glass structures [START_REF] Greaves | Inorganic glasses, glass-forming liquids and amorphizing solids[END_REF]. A few elements have isotopes with both positive and negative scattering lengths (H, Li, Ti, Cr, Ni, Sm, Dy, W). An appropriate mixture of isotopes enables to have an element with a zero scattering length. For a binary glass, this implies that the substituted element does not have scattering and only the other element is contributing to the scattering. As an example, the null isotopic substitution method applies to a binary Dy7Ni3 metallic glass has allowed the isolation of all partial functions [START_REF] Wright | The neutron diffraction double-null isotopic substitution technique[END_REF].

For such a binary system, a matrix form can summarize the treatment:

^𝑆`( 𝑄) 𝑆 5 (𝑄) 𝑆 a (𝑄) b = c 𝑐 N 5 𝑏 N 5 𝑐 M 5 𝑏 M 5 2𝑐 N 𝑐 M 𝑏 N 𝑏 M 𝑐 N 5 𝑏 N 5 𝑐 M 5 𝑏 V M 5 2𝑐 N 𝑐 M 𝑏 N 𝑏 V M 𝑐 N 5 𝑏 N 5 𝑐 M 5 𝑏 VV M 5 2𝑐 N 𝑐 M 𝑏 N 𝑏 VV M d ^𝑆NN (𝑄) 𝑆 MM (𝑄) 𝑆 NM (𝑄) b , [𝑆(𝑄)] = [𝐴][𝑃𝑆𝐹(𝑄)] (8)
S1(Q), S2(Q) and S3(Q) are three distinct measurements using three isotopic mixture for the element M. A matrix inversion can then be calculated to obtain each PSFs:

[𝑃𝑆𝐹(𝑄)] = [𝐴] h`[ 𝑆(𝑄)], (9)

Anomalous x-ray diffraction (AXRD)

The anomalous X-ray diffraction technique takes advantage that the atomic form factor f depends upon the incident energy, E: By measuring the scattering intensities of a sample at two different energies (figure 4), a first difference function similar to NDIS can be obtained. Contrary to NDIS, one sample is needed, avoiding inaccuracies in sample preparation. A second difference function can also be extracted by measuring the sample at three different energies. This was used for instance to determine the distribution of Ba in Ba-silicate glasses [START_REF] Schlenz | Structure analyses of Ba-silicate glasses[END_REF]. Anomalous neutron diffraction also exists for a limited number of elements (e.g. Sm) [START_REF] Wright | The neutron diffraction anomalous dispersion technique and its application to vitreous Sm2O3•4P2O5[END_REF].

, ( 10
AXRD can be used for a large number of elements (K or L absorption edges for low-and high-Z elements, respectively). However, the Q range has to be sufficient to ensure a good real space resolution. A Qmax value of 10 Å -1 , which can be considered as a lower limit, corresponds to an energy of 10 keV. This implies that AXRD can be used to probe elements for Z ≥ 26 (iron K-edge).

As an example, AXRD was used to investigate the structure of GexSe1-x binary glasses.

Experiments at Ge and Se K absorption edges allowed the isolation of the partial functions, showing a gradual change with x. The SSeSe(Q) PSF exhibits a pre-peak at low Q values associated with intermediate-range structure and shows variations at x = 0.20, in agreement with a stiffness transition [START_REF] Hosokawa | Anomalous x-ray scattering study of GexSe1-x glassy alloys across the stiffness transition composition[END_REF]. The Reverse Monte Carlo (RMC) method consists to move randomly the atomic position in order to reproduce the diffraction data [START_REF] Mcgreevy | RMC -Progress, problems and prospects[END_REF][31] [START_REF] Mc Greevy | Reverse Monte Carlo modelling of network glasses: useful or useless ?[END_REF]. If the move improves the agreement between the model and the experimental data, it is accepted. If the move does not improve the fit, it is accepted with some probability to avoid to be trapped in local minima. The model needs to be constrained by additional parameters: density, known coordination numbers, distance of closest approach between atomic pairs etc.

This approach was particularly useful to understand the atomic structure of bulk metallic glasses [START_REF] Miracle | A structural model for metallic glasses[END_REF][33] [START_REF] Hwang | Nanoscale structure and structural relaxation in Zr50Cu45Al5 bulk metallic glass[END_REF] that are based on packing of spheres as in RMC. Analysis of structural models has allowed the determination of the short range corresponding to polyhedra of 9-13 atoms with the solute atom at the center, surrounded by the solvent atoms. Surprisingly, these models show also important medium range ordering due to the packing of these polyhedra arranged in 5-fold symmetry. This symmetry, that is not compatible with crystal periodicity, can explained the glass forming ability of these materials.

Empirical Potential Structural Refinement (EPSR) is now widely used and includes realistic intra-and inter-molecular potentials [START_REF] Soper | Partial structure factors from disordered materials diffraction data: an approach using empirical potential structure refinement[END_REF], giving more realistic atomic models. The agreement with the experimental data is obtained by fitting an empirical potential acting as a perturbation to the potentials. Again atomic displacements are generated and a Monte Carlo refinement modifies the empirical potential to reproduce the experimental data. This method was particularly useful to simulate molecular systems [START_REF] Finney | Structures of high and low density amorphous ice by neutron diffraction[END_REF] but was also employed for complex oxide glasses [START_REF] Weigel | Intermediate-range order in the silicate network glasses NaFexAl1-xSi2O6 (x=0, 0.5, 0.8, 1): a neutron diffraction and empirical potential structure refinement modeling investigation[END_REF].

X-ray absorption spectroscopy

X-ray absorption spectroscopy (XAS) is another method allowing a measurement that gives a pseudo pair distribution function. Since it is a chemically selective probe, the information is similar to a NDIS or AXRD experiment. This technique emerges with the development of synchrotron radiation sources in the 1970s that allow electromagnetic multi-wavelengths radiation and high flux of photons. XAS began to be used as a quantitative tool for structural investigation of glasses at the beginning of the 1980s [START_REF] Greaves | EXAFS and the structure of glass[END_REF][39] [START_REF] Petiau | Local structures about some transition elements in oxide glasses using X-ray absorption spectroscopy[END_REF] and soon some crucial results were obtained, which were at the origin of the Modified Random Network model proposed by Greaves [38][39]. This is a technique well suited for disordered systems, offering many advantages: structural and electronic information, complementary to diffraction, applicable to all the elements with a high sensitivity (few ppm of a dilute chemical species can be detected), complex environment (high pressure, high temperature, controlled atmosphere …), space and time resolution.

XAS basics

The principle of XAS corresponds to the measurement of an absorption coefficient, µ, as a function of the energy E of the incident X-ray photon beam, following the Beer-Lambert law:

𝜇(𝐸) = k 𝑙𝑛 \ m(n) m o (n) ], (11)
with x the thickness of the sample. I0 and I are the intensities of the incident and transmitted beams, respectively.

The absorption coefficient shows discontinuities, called edges, at discrete energies specific to each element, which are due to the absorption of the incoming photon through the photo-electric effect.

When the energy of the incident photon is smaller than the edge energy, E < E0 (figure 5, below the edge), no absorption event can take place and only a monotonic decrease of the absorption coefficient is observed.

When E > E0 (figure 5), the energy of the photon is sufficient to promote an electronic transition for the absorbing atom (absorber): a core level electron is ejected towards the first empty electronic states and then towards an unoccupied state located above the Fermi energy level, E f (continuum).

This creates a photoelectron, with a kinetic energy, 𝐸 p = 𝐸 -𝐸 " , that propagates as a spherical wave.

The photoelectron mean free path, 𝜆(𝐸 p ), presents a minimum as a function of EC (figure 6). For low kinetic energies (EC < 50 eV), the photoelectron has a long lifetime and a mean free path extending over several tens of Å. It is then possible for the photoelectron to probe the medium range environment. This corresponds to the XANES (X-ray Absorption Near Edge Structure) region (see below). For high kinetic energies (EC > 50 Å), the photoelectron has a short life-time and it interacts predominantly with its first neighbors (acting as scatterers), which corresponds to the EXAFS (Extended X-ray Absorption Fine Structure) region (see below). These two domains (XANES and EXAFS) are approximatively separated around 50 eV above the edge (figure 6). Following a X-ray absorption event, the atom is left with a core hole, that is a vacancy in the initial electronic level, which is energetically unstable. This excited state rapidly relaxes, in typically ~1 fs:

-either by a higher-lying electron filling the core hole and the simultaneous emission of a fluorescence photon, -or in a two electrons process (Auger emission). Two higher-lying electrons are implied: one fills the core hole and the other one is ejected in the continuum. This process dominates at low energies (< 2 keV).

Data acquisition

The usual acquisition mode to obtain the absorption coefficient µ is by measuring the incident intensity, I0, and the intensity transmitted through the sample, I (figure 7). The main constraint concerns the sample thickness: it must be adapted according to the element, its concentration, the glass composition, and must be uniform. A good signal is typically obtained for concentration higher than 5 weight%. It is often useful to measure a reference using a second transmission detector.

The two deexcitation processes give values proportional to the absorption coefficient and they can be used experimentally to determine µ:

-fluorescence mode: the incident and fluorescence intensities are determined and 𝜇(𝐸) ∝ 𝐼 t 𝐼 " ⁄ . This detection is advantageous for dilute species, down to 10 ppm, and is more surface dependent (~1 µm) than transmission that probes the bulk structure;

-total electron yield (TEY): this mode detects the current of emitted electrons in the Auger process. This is well suited for low-energy edges and thus for light elements with a concentration ~1 weight%. This is a surface method, typically ~100 Å, and problems of charging may be encountered for low-conducting samples. The experimenter has to wonder which detection mode is required for its sample and its element of interest. The most important criteria is to optimize the signal to noise S/N ratio and to achieve an edge jump close to 1. Transmission is the most accurate method, giving the best S/N ratio and must be always favored. Fluorescence yield must be privileged for dilute species, large sample that cannot be damaged or thinned down to a desired thickness (e.g. cultural heritage sample, thin films). TEY is adapted to investigate surface or low-energy edges. Sample preparation and data reduction are clearly explained in "XAFS for everyone" by Calvin [START_REF] Calvin | XAFS for everyone[END_REF].

EXAFS

EXAFS region concerns the modulation in the absorption coefficient that is observed above the edge for non-isolated atoms. For an isolated atom (case of a monatomic gas), the absorption coefficient equals the atomic absorption coefficient, 𝜇(𝐸) = 𝜇 " (𝐸), and exhibits a monotonic decay above the edge E0. For an atom bonded to other atoms (case of a solid or liquid), the photoelectron ejected by an absorber is scattered by the neighboring atoms and returns back to the absorber. The photoelectron backscattered wave function interferes with itself, giving oscillations (called fine structure) that are superimposed over µ0. This autointerference phenomenon is the signal of interest as it depends on the electronic and geometrical environment around the absorber. The EXAFS region is arbitrarily chosen about 50 eV above the edge jump and extends typically over ~1000 eV.

The EXAFS signal C(k) is extracted with the following formula:

Χ(𝑘) = w(x)hw o (x) ∆w o (x) , ( 12
)
where ∆𝜇 " is the edge step and

𝑘 = z 5{ | (nhn o ) ℏ ~, (13)
k(Å -1 ) is the photoelectron wavenumber and is thus equivalent to Q in a diffraction experiment.

me is the electron mass. 𝜇 " is not measured but estimated by fitting a smooth spline function above the edge. The procedure to extract the C(k) is explained in various books and reviews [41][42].

Due to the short electron mean free path, the EXAFS region is dominated by single scattering.

In this approximation, the theoretical expression of the EXAFS signal is a sum of damped sinusoidal oscillations due to the scattering contributions from the various absorber-scatterer paths:

Χ(𝑘) = ∑ 𝐴 > (𝑘)𝑠𝑖𝑛 \2𝑘𝑅 > + 2𝛿 > (𝑘)] > 𝐴 > (𝑘) = 𝑆 " 5 • ' xƒ ' ~𝑓 > (𝑘)𝑒𝑥𝑝Y-2𝜎 > 5 𝑘 5 Z𝑒𝑥𝑝 \ h5ƒ ' ‰(x) ] , ( 14
)
The sum is over the j shells of neighbors (or scattering paths) of the central absorbing atom. 𝑆 " 5 is a reduction factor (0.75-1.00) due to many body effects. 𝑓 > (𝑘) and 𝛿 > (𝑘) are scattering amplitude and phase shift functions that depend both of the absorber and the scatterer j. Thanks to these functions, the nature of the scatterer can be distinguished, an information which is not contained in a diffraction experiment. 𝑓 > (𝑘) and 𝛿 > (𝑘) are theoretically calculated by different programs such as FEFF [START_REF] Rehr | Theoretical X-ray absorption fine structure standards[END_REF],

GNXAS [START_REF] Filipponi | X-ray absorption spectroscopy and n-body distribution functions in condensed matter. I. Theory[END_REF] and EXCURVE [START_REF] Binstead | The Excurve Programs[END_REF]. The bond length between the absorber and its neighbor, 𝑅 > , the coordination number, 𝑁 > , and the Debye-waller factor, 𝜎 > , are the structural parameters for the shell j that the experimenter wants to extract. The Debye-Waller factor includes the mean-square deviation of the absorber-scatterer distance due to thermal motion and static disorder. These different parameters are correlated and the fitting procedure must be taken with care. The average bond length, 𝑅 > , is usually known with an accuracy ± 0.02 Å, while the error on the coordination number is more severe (± 20%). Note that EXAFS gives average information: if an average four fold coordination is obtained, N=4, it is not possible to draw conclusions on the site geometry (tetrahedron or square planar for instance). However, such information on the site geometry can be deduced from the XANES region (see below). If the EXAFS equation is still used, ab initio EXAFS codes (FEFF, GNXAS) allow nowadays fitting the data routinely by using multiple scattering formulations.

After extracting the C(k) signal, a Fourier transform is performed to visualize a real space function. In figure 8, the EXAFS C(k) signal and its Fourier transform are obtained at Ti K-edge for a K2TiSi2O7 glass. The real space function is a pseudo-radial distribution function corresponding to the sum of all the PPDFs associated with Ti (note that, due to the 𝛿 > (𝑘) function, the apparent distances are shifted towards lower r-values by 0.2-0.5 Å compared to the real distances) and, thereby, is similar to the first difference function obtained in a NDIS experiment (figure 2). Figure 8 compares the EXAFS and NDIS results in reciprocal and real space for Ti in K2TiSi2O7. The EXAFS signal is cut at low-k values to avoid the XANES part dominated by multiple scattering effects. In consequence, the medium range ordering is difficult to probe by EXAFS and the information for glasses is usually limited to first and second neighbors. The k-range is also limited in a XAS experiment compared to NDIS, which also prevents high resolution in real space. This is illustrated in figure 8: the high resolution of a NDIS experiment allows the separation of two Ti-O distances that are merged and unresolved in the EXAFS real space function. The best resolution that can be achieved in an EXAFS experiment is Δ𝑅 ≥ 𝜋 2Δ𝑘 ⁄ , i.e. Δ𝑅 ≥ 0.13Å for a k-range up to 12 Å -1 . Alternatively the advantage of a XAS experiment compared to NDIS is to enable systematic investigation of glass systems, without requiring expensive isotopic enrichment, and allows various pressure/temperature/atmosphere equipments to be used. A quantitative analysis can be performed as illustrated in figure 9 and table 2 at Zr K-edge for an aluminosilicate glass. An average coordination number can be calculated allowing the determination of the Zr local site. Moreover, the nature and number of second neighbors can be determined, which give valuable information on the connectivity between the Zr polyhedral and the aluminosilicate network. Figure 10 illustrates another case at Mo K-edge for a simplified nuclear waste borosilicate glass.

The peak can be fitted to give a M-O bond length of 1.78 Å with 4 O neighbors [START_REF] Calas | Structural role of molybdenum in nuclear glasses: an EXAFS study[END_REF]. This is in agreement with Mo 6+ in tetrahedral position. Contrary to Zr, no second neighbors can be detected.

The reason is that (MoO4) 2-groups are not directly connected to the silicate network. The charge compensation of this site is provided by alkali and alkaline-earths that form a loose shell of neighbors with a large distribution of distances; all these distances interfere destructively. Therefore, the lack of peak does not indicate the lack of neighbors but a large disorder in the second shell of neighbors. This environment is also consistent with the propensity of Mo to separate in alkali or alkaline-earth molybdate phases in silicate glasses.

XANES

The XANES domain starts at the edge and extend up to about 50 to 100 eV above the edge and exhibits usually a complex shape. It allows access to the local electronic properties (orbitals hybridization, crystal field, density of available electronic states) and structural arrangement (coordination, valence, medium range ordering up to ~8 Å). The EXAFS equation cannot be used in this region in which important multiple scattering phenomena can occur due to the large photoelectron mean free path. These multiple scattering pathways imply that three-dimensional information are contained in this region, contrary to two-dimensional information in EXAFS or diffraction methods.

XANES can be analyzed using a fingerprint approach or theoretical calculations to reproduce the spectra.

In the fingerprint approach, the shape of the XANES spectrum from an unknown sample is compared with spectra from model compounds. This method gives only qualitative information on the local coordination but can be very successfully and straightforwardly applied. As an example, figure 11 shows the Zr L2,3-edges for an a lithium aluminosilicate glass (LAS) of unknown geometries compared to crystalline references with Zr in different sites. A very simple comparison indicates that the shape of the spectra for the glass is similar to the reference spectra for Zr in octahedral environment. A similar fingerprint approach can also be used at Zr K-edge [START_REF] Galoisy | Evidence for 6coordinated zirconium in inactive nuclear waste glasses[END_REF]. This qualitative determination of the site geometry can be further supported by an EXAFS analysis that confirms 6 O neighbors around Zr [START_REF] Cormier | Zr environment and nucleation role in aluminosilicate glasses[END_REF]. The position of the edge can also give qualitative information on the valence state as there is a systematic shift in the edge towards higher energies as the considered cation becomes more oxidized.

A quantitative interpretation of XANES is challenging since it includes single and multiple scattering effects. To progress in the understanding of XANES spectra and completely exploit this spectroscopy, it is necessary to go beyond the preliminary fingerprint step. The exploitation of the richness of the XANES spectrum requires its simulation from a theoretical model. This is very delicate in the case of glasses for which a precise representation of the structure at medium range distance is difficult to obtain. However, theoretical calculations have made enormous progress during the last two decades and several codes are available to users to calculate XANES spectra. Two different methods can be distinguished [START_REF] Cabaret | Single-particle modeling of X-ray absorption near-edge structure: Theoretical development and applications[END_REF].

(1) The ligand field multiplet (LFM) theory does not require the detailed structure but only the site symmetry, the crystal field effects due to the ligands and the atomic spin-orbit interactions of the photoabsorber. This is a semi-empirical model as multiplet calculations require the adjustment of a number of parameters by comparing calculated and experimental spectra (crystal field value, type and intensity of site distortion, value of the spin-orbit coupling …). This approach considers only localized orbitals for the final state and local symmetry in the real space. It is thus well suited to describe the L2,3-edges for 3d transition elements or M4,5 for rare earth elements.

(2) Contrary to the LFM theory which is multielectronic (all the electrons of the absorber are considered in the initial or excited state), several monoelectronic theories are developed and based on ab initio calculations. These theories consider extended final states which are more sensitive to the environment involving several shells of neighbors. The most used approach is the real space multiple scattering theory that calculates the electronic structure of a cluster around the absorbing atom. The requirement is to have a good structural model, which can be obtained by Molecular Dynamics simulation for a disordered sample. This method enables the development of popular codes: FEFF, FDMNES. Alternatively, band structure calculations based on the DFT (Density Functional Theory) can be used to calculate XANES spectra [START_REF] Taillefumier | X-ray absorption near-edge structure calculations with the pseudopotentials: Application to the K edge in diamond and α-quartz[END_REF]. These calculations consider XANES as a probe of the projected density of unoccupied electronic states. This approach has been implemented in a package XSpectra [START_REF] Gougoussis | First-principles calculations of x-ray absorption in a scheme based on ultrasoft pseudopotentials: From α -quartz to high-Tc compounds[END_REF] of the Quantum-Espresso code. A major difficulty is to accurately describe the final excited state to take into account many-body effects and relaxations due to the creation of the corehole. Many-body Green's function methods [START_REF] Onida | Electronic excitations: density-functional versus many-body Green's-function approaches[END_REF], including time-dependent DFT (TD-DFT), GW calculations and the Bethe-Salpeter equation, are still in developments to rigorously describe the excitations.

Pre-edge feature

Pre-edge transitions can be observed before the edge and arise from bound state transitions towards empty or partially filled atomic levels. For the first row transition metals, the 1s → 3d transition is theoretically prohibited for a K-edge according to the dipole selection rule. However 3d + 4p mixing and quadrupolar coupling can break this restriction and allows transition to occur.

This pre-edge is highly sensitive to the site geometry. Its intensity increases as the site becomes more distorted from a centrosymmetric environment: intensity(tetrahedra) > intensity(square pyramid) > intensity(octahedra). The effect of symmetry can also give 1s → 4p transitions which can be intense for a square-planar geometry.

The pre-edge is obtained together with XANES measurement and provides a rapid, possibly quantitative, estimation of the coordination, site symmetry and valence state.

Chromium is an archetypical example how the pre-edge is related to the site geometry (figure 12).

Cr 3+ is located in octahedral centrosymmetric geometry with no p-d mixing. This yields very weak pre-edge (quadrupolar) transitions. Cr 6+ is in tetrahedral non-centrosymmetric symmetry that allows important p-d mixing. A very intense pre-edge at 5993 eV, with an intensity almost similar to the Kedge jump, can be observed. The intensity of this pre-edge transition is thus very sensitive to Cr speciation and can be used to quantify the proportion of Cr 6+ in glasses even in dilute content [START_REF] Villain | XANES determination of chromium oxidation states in glasses: comparison with optical absorption spectroscopy[END_REF]. XANES spectra for glasses with different ratio Cr 6+ /Cr 3+ (adapted from [START_REF] Villain | XANES determination of chromium oxidation states in glasses: comparison with optical absorption spectroscopy[END_REF]).

Figure 13 shows the pre-edge XANES feature at the Ti K-edge for the K2TiSi2O7 glass. Its position perfectly matches with that for fresnoite (Ba2TiSi2O8) in which Ti is five-fold coordinated in a square based pyramid. The position is clearly different to a simple mixture of references with sixfold and four-fold coordinated Ti. The square based pyramid geometry agrees with the two Ti-O distances that can be found in a NDIS experiment (figure 2). This pre-edge is easily measured together with XANES providing straightforward determination of site geometry and this has been exploited by Farges et al. to systematically investigate the Ti environment in numerous silicate glasses [START_REF] Farges | Coordination chemistry of Ti(IV) in silicate glasses and melts: II. Glasses at ambient temperature and pressure[END_REF]. Ti, fresnoite Ba2TiSi2O8 = [5] Ti, benitoite BaTiSi3O9 = [6] Ti.

Iron in glasses is still a challenging problem since iron can be present in Fe 2+ and Fe 3+ oxidation states and, for each case, four-fold, five-fold and six-fold coordination are possible, so that in total six different Fe states can be present with specific structural role and influence on the physicochemical properties of oxide glasses. XAS is very efficient to determine the iron oxidation state: as emphasized in figure 14a, the pre-edge position is highly sensitive to the iron valence with a pre-edge near 7112.3 eV due to Fe 2+ and a pre-edge near 7113.8 eV due to Fe 3+ . These two separate pre-edges allow the quantitative estimation of Fe 3+ /SFe ratio in glasses. Usually, the pre-edge is extracted from the main edge by a curve fitting (see Farges et al. for discussion on the correct choice of background [START_REF] Farges | The effect of redox state on the local structural environment of iron in silicate glasses: a combined XAFS spectroscopy, molecular dynamics, and bond valence study[END_REF]) and a simple linear combination of the two end members is used to determine intermediate states.

This approach has been successfully applied to follow the redox evolution with the temperature (Figure 14b) or the kinetics of iron oxidation in a supercooled melt [START_REF] Magnien | Kinetics of iron oxidation in silicate melts: a preliminary XANES study[END_REF]. For complex natural glasses [START_REF] Galoisy | High-resolution XANES spectra of iron in minerals and glasses: structural information from the pre-edge region[END_REF], such fitting procedure lead to about 90% confidence using Fe 2+ augite glass and two references for [4] Fe 3+ and [6] Fe 3+ (see figure 15), enabling to determine both the oxidation and geometry of the different iron sites.

  form factor strong variation of scattered intensity with q information on high-Z elements weak scattering for low-Z elements weak contrast for elements with close Z f varies with the energy ⇒ anomalous scattering No isotopic effect b neutron scattering length constant, independent of q not a monotonous function of Z light elements are visible (H, Li, N, O, etc) possibility to distinguish elements with close Z b can vary at some energies for some elements ⇒ anomalous scattering limited b varies among isotopes of the same element

1 .

 1 605 ± 0.003 Å[START_REF] Wright | Neutron scattering from vitreous silica. V. The structure of vitreous silica: What have we learned from 60 years of diffraction studies?[END_REF]. The coordination number, Nαβ, defines the average number of neighbors b around an atom a. Nαβ is obtained by integrating the area under the a-b peak:, (3)where r1 and r2 delimit the coordination shell. The choice for r1 and r2 can be delicate when several contributions are overlapping, which reduce the accuracy. The peak width, sαβ, reflects the distribution of interatomic distances resulting from both static structural and thermal disorder.However, sαβ is also broaden by the Fourier transform over a finite Q-range. rαβ, Nαβ and sαβ are usually extracted by performing a Gaussian fit of the peak.

Figure 1 .

 1 Figure 1. Correlation function and real space information.

  identical cα, cβ and gαβ(r)) but one species, M, has different isotopic concentrations. Two structure factors are obtained for the two samples, where only the PSFs involving M have different weighting factors: ,

Figure 2

 2 Figure 2 illustrates a first difference function obtained on a K2TiSi2O7 using isotopic substitution for Ti ( 46 Ti and 48 Ti isotopes) [17]. This glass contains 𝑛(𝑛 + 1) 2 ⁄ = 10 partial functions that overlaps. The first difference function, GTia(r) presents a first contribution with two Ti-O distances: a small peak at 1.68 Å whose Gaussian fitting indicate 1 O neighbor and a more intense one at 1.96 Å corresponding to 4 O neighbors. This short range order is compatible with a square-based pyramid geometry, effectively encountered in crystalline structures. The advantage of the first difference

Figure 2 .

 2 Figure 2. Total differential correlation functions (top curve) for a K2TiSi2O7 glass containing 46 Ti isotope and first difference functions (lower curve, displaced for clarity) for Ti. Insert shows the TiO5 square pyramid site with the two Ti-O distances. The figure is adapted from [17].

Figure 3 .

 3 Figure 3. Second difference functions corresponding to the M-M PPDF showing the cation-cation distribution in glasses with specific distances. From top to bottom: Ni Ca2NiSi3O9, Ti in K2TiSi2O7, Ca in Ca2NiSi3O9, Li in LiAlSiO4. The figure is adapted from [23].

  ) with f0(Q) the usual Q-dependent term. f'(E) and f''(E) are the real and imaginary parts of the anomalous term and they strongly vary near the energy of an absorption edge, Eedge, for a given element, M, which drastically change the scattering by the atoms M [25][26].

Figure 4 .

 4 Figure 4. Variation of f' and f'' near an absorption edge energy Eedge (l2, l3). AXRD usually considers two experiments at the edge (l2 or l 3, where the variation of f is the highest, and far below the edge (l1) where f' and f" are almost constant, rather than above the edge (l4) due to oscillations in f".

Figure 5 .

 5 Figure 5. Typical X-ray absorption spectrum (Ni K-edge in a glass).

Figure 6 .

 6 Figure 6. Evolution of the photelectron mean free path as a function of the kinetic energy.

  Incident and transmitted intensities are usually detected by ionization chambers containing excited gas during the transmission of the beam. The fluorescence intensity is measured with different types of energy-resolving detectors (Si or Ge solid-state detectors, photoelectric diodes...). The acquisition of a XAS spectra can be obtained in few tens of milliseconds either using a dispersive energy set-up and a white incident beam or using a quick-EXAFS setup in a step by step measurement (scanning of the incident energy).

Figure 7 .

 7 Figure 7. Drawing of a detection by a transmission and fluorescence mode.

Figure 8 .

 8 Figure 8. Comparison of NDIS and EXAFS data for Ti in a K2TiSi2O7 glass: (a) Difference structure factor obtained by neutron diffraction with Ti isotopic substitution, (b) corresponding Fourier transform, (c) EXAFS signal at Ti K-edge, (d) corresponding Fourier transform. EXAFS data are from [46] and NDIS from [47]. Note the different Q-and k-range for the reciprocal functions and the different r-range for the distribution functions.

Figure 9 .

 9 Figure 9. (Left) EXAFS signal and its GNXAS fit (top curves, exp and fit) at Zr K-edge from [48]. The lower curves are the decomposition of the fit in different shells. (Right) Model that can be deduced from the EXAFS analysis, indicating the ZrO7 polyhedra (in blue) connected together or with the (Si,Al) polyhedra (in yellow).

Figure 10 .

 10 Figure 10. (Left) EXAFS signal at Mo K-edge for a borosilicate glass [49]. (Right) Model for Mo environment that can be deduced from the EXAFS analysis.

Figure 11 .

 11 Figure 11. (a) Zr L3-edge and (b) L2-edge for crystalline references with different Zr environment compared with a lithium aluminosilicate glass (LAS) for which Zr environment is not a priori known. Data adapted from [54].

Figure 12 .

 12 Figure 12. (a) Cr K-edge XANES spectra of Cr 6+ and Cr 3+ (adapted from [60]). (b) Cr K-edge

Figure 13 .

 13 Figure 13. (a) Ti K-edge XANES spectra for a K2TiSi2O7 glass an zoom on the pre-edge (insert).(b) Ti K-edge pre-edge features for crystalline references with different Ti geometries: Ba2TiO4 =[START_REF] Fischer | Neutron and x-ray diffraction studies of liquids and glasses[END_REF]

Figure 14 .

 14 Figure 14. (a) Fe K-edge XANES spectra for a reduced and oxidized pyroxene glass an zoom on the extracted pre-edge features (insert). (b) Evolution with temperature of the Fe oxidation state with the replacement of Fe 2+ by Fe 3+ at high temperature. Figures adapted from [63].

Figure 15 .

 15 Figure 15. Fe K-edge XANES spectra for a volcanic glass, Erta'Ale, with a fit obtained by a linear combination of an Augite glass ([ 5] Fe 2+ ) and two components for Fe 3+ . Adapted from [64].

Figure 16 .Table 3 .

 163 Figure 16. Plots of the pre-edge information (normalized height or integrated intensity vs energy position) for K pre-edge features in crystalline references showing domains for fourfold, fivefold and sixfold coordination for Ti 4+ [46], Ni 2+ [65] and Fe 2+ /Fe 3+ [62].

Table 2 .

 2 EXAFS-derived structural parameters for the Zr environment in magnesio-aluminosilicate glass (from[START_REF] Dargaud | Structural role of Zr 4+ as a nucleating agent in a MgO-Al2O3-SiO2 glass-ceramics: A combined XAS and HRTEM approach[END_REF]). Errors are CN ± 0.5, R ± 0.01 Å, Var. ± 0.03 Å 2 .

		R (Å)	N	s 2 (Å 2 )
	Zr-O shell	2.11	7.33	0.021
	Zr-(Si,Al) shell	3.13	2.30	0.016
	Zr-Zr shell	3.42	0.81	0.007

Summary

In this chapter, the fundamental concepts of neutron/X-ray diffraction and X-ray absorption spectroscopy have been introduced. These structural techniques are complementary as they focus on different information. A comparison of the contributions brought by each method is summarized in Table 3. They are widely accessible on large facilities (synchrotron, neutron source) though proposal evaluation, which usually required preliminary investigation and/or a careful preparation of the experiment. Developments of new neutron sources and upgrade of synchrotrons will offer new opportunities, allowing specialized environments to be used for extreme conditions of pressure and/or temperature or controlled atmosphere and providing the opportunity for X-ray absorption spectroscopy to reach higher spatial resolution (currently down to ~20-30 nm) to investigate heterogeneous samples and better time resolution (currently ~10ms) to elucidate kinetics phenomena.

These major and versatile experimental tools remain essential for structural determination and give invaluable information on the structure of disordered materials.


Alexander Jungmann

Jan Jatzkowski
email: janj@c-lab.de

Bernd Kleinjohann

Combining Service-oriented Computing with Embedded Systems -A Robotics Case Study

Keywords: Embedded Systems, Service-oriented Computing, Serviceoriented Architecture, Services, Behaviour-based Robotics, Mobile Robots

In this paper, we introduce an approach for combining embedded systems with Service-oriented Computing techniques based on a concrete application scenario from the robotics domain. Our proposed Service-oriented Architecture allows for incorporating computational expensive functionality as services into a distributed computing environment. Furthermore, our framework facilitates a seamless integration of embedded systems such as robots as service providers into the computing environment. The entire communication is based on so-called recipes, which can be interpreted as autonomous messages that contain all necessary information for executing compositions of services.

Introduction

Embedded Systems such as mobile robots are usually restricted in their computational capabilities. Although technology is progressing and computing capacities for embedded systems are gradually increasing, algorithms applied to embedded systems usually have to be highly specialized in order to ensure feasibility. Furthermore, although sophysticated algorithms may already exist for a problem at hand, those algorithms might be too computationally expensive. Consider, e.g., an autonomous robot that has to navigate based on visual information in a non-deterministic environment. Camera images have to be processed (at least in soft real-time), natural or artificial landmarks have to be detected, and a robust localization mechanism has to estimate the robot's pose.

In our work, we investigate to what extend techniques from Service-oriented Computing (SOC) can be applied to the field of embedded systems in order to overcome these limitations and consequently increase the functionality of computationally restricted embedded systems. SOC represents a new generation distributed computing platform [START_REF] Erl | SOA Principles of Service Design[END_REF]. It is a cross-disciplinary paradigm for distributed computing that gradually changes the way software applications are designed, delivered, and consumed. For our work, that means, that computational expensive functionalities are outsourced into a distributed computing environment and provided as services to all entities in this environment. At the same time, we investigate how embedded systems can be integrated as service providers into the entire environment, so that distributed applications can make use of them.

In this work, we make use of a concrete application scenario in the robotics domain: autonomous, mobile robots have to accomplish an objective, which they could not solve under normal circumstances due to their limited computational capabilities. Apart from the robots, the realized system makes use of several servers for computational expensive tasks. That is, functionality for tasks such as an Extended Kalman Filter (EKF) [START_REF] Thrun | Probabilistic Robotics (Intelligent Robotics and Autonomous Agents)[END_REF] based localization are provided as services. The whole system builds upon a Service-oriented Architecture (SOA), which handles the overall communication.

The remainder of this paper is organized as follows. Section 2 introduces the case study including the BeBot as embedded system and the concrete application scenario. Section 3 introduces our SOA framework as basis for the entire system. The node-based architecture that enables a BeBot to act autonomously is described in Section 4. Section 5 presents the integration of the BeBot into the SOA and briefly describes the overall system that realizes the application scenario. Section 6 finally concludes the paper.

Case Study

The main purpose of our case study is to provide a concrete application context for identifying promising application possibilities of techniques from Serviceoriented Computing to the field of embedded systems.

Embedded System: Miniature Robot BeBot. The BeBot is a miniature chain driven robot, which has been developed at the Heinz Nixdorf Institute of the University of Paderborn [START_REF] Gausemeier | Miniature robot bebot: Mechatronic test platform for self-x properties[END_REF]. Despite its small size (approximately 9cm×9cm×8cm), it is equipped with modern technology such as an ARM Cortex-A8 CPU with a maximum frequency of 600 MHz accessing up to 256MB RAM of main memory for running an embedded Linux environment. By illuminating its so-called light guide in arbitrary colours during runtime, the miniature robot can express its current state to human observers and other robots. The network based TCP/IP communication is enabled by an integrated W-LAN module.

In order to extend the field of view for our application scenario, we replaced the built-in camera by a Firefly MV USB camera attached on top of the BeBot. Furthermore, we additionally replaced the integrated W-LAN chip by a customary W-LAN USB stick, resulting in a significantly higher network performance (117 kb/s vs. 2 mb/s). Attaching all devices on top of the BeBot finally leads to the rather unconventional construction depicted in Figure 1a.

Application Scenario. The objective to be solved in the application scenario is i) to utilize BeBots as mobile physical sensors in order to locate artificial objects (henceforth simply referred to as objects) in a predefined yet partially non-deterministic environment and to ii) reconstruct 3-dimensional models of these objects based on images taken by BeBots. Figure 1b shows the setup of the scenario environment. The system may use several BeBots to fulfil the task stated above. In order to facilitate the localization process of the BeBots, the playground contains several artificial, colour-coded landmarks (cf. Figure 1c). The objects consist of fixed sized cubes with blue and magenta coloured faces on the sides. The top and bottom face are coloured in black (cf. Figure 1d). Furthermore, the edges of the cubes are also coloured in black to allow a better distinction between separate cubes next to each other.

Service-oriented Architecture

The main goal of our Service-oriented Architecture (SOA) is to provide a distributed computing framework for all participating entities such as BeBots or dedicated servers. The framework enables the BeBots to outsource computationally expensive tasks, while it simultaneously enables the entire system to make use of the BeBots as physical sensors in the environment.

Overview. The key concept of our framework are services. Services are distributed and usually stateless components that encapsulate distinct functionality [START_REF] Erl | Service-Oriented Architecture: Concepts, Technology, and Design[END_REF]. For addressing a composition of services, we developed a uniform and data-driven protocol based on so-called recipes. Recipes are autonomous messages travelling through the network containing all information and data to complete a complex task step by step. The main idea is that a service receives a recipe, extracts the required data, processes this data, appends the processed data (i.e., the result) to the recipe, and finally forwards the updated recipe to the next services defined in the recipe. Please note that we use the terms recipe and message synonymously in this work.

Another building block of our SOA are service providers, which realize the environment for executing services. Service providers are interconnected via network and take care of the recipe packing, unpacking, and parsing, execution management, as well as the routing and transmission of a recipe to the next ' recipe ' :

' id ' : 0 , ' service ' : ' G a u s s i a n F i l t e r S e r v i c e ' , ' provider ': ( ' 192 service-provider (if necessary). In fact, our SOA corresponds to a network of loosely coupled service providers. That is, each entity (BeBot or server) participating in the overall system features a local management unit in terms of a service provider instance.

Recipes. A recipe is a data driven construct to define i) an order in which specific services have to be executed and ii) how input and output parameters of the services have to be connected to achieve a certain goal. That is, a recipe defines and describes an orchestration of services. Initial input as well as intermediate and final result values are stored in a dedicated data section of the recipe.

Figure 2a shows an excerpt of an exemplary recipe. The 'recipe' section contains two services. The first service ('id': 0) is provided by a service provider located at IP 192.168.0.1 and accessible via port 5000. The service implements a Gaussian filter for reducing image noise. The input parameters (kernel size 'k size' and 'image' to be processed) are stored in the 'data' section. The second service ('id': 1) displays the processed image on a different entity in the network. The corresponding input data 'image' is not yet available in the recipe, but will be stored with key (0, 'result') by the first service in the data section.

Service Provider. A service provider resides directly on top of the network and consists of multiple components on three different levels of abstraction (cf. Figure 2b). The dispatcher implements the application-level protocol for sending and receiving messages over the network. On top of this, the queue manager handles parsing of recipes, manages local services, and acts as intermediary between them. The top layer consists of individual services and so-called local behaviours.

Figure 3 gives a detailed overview of the processes within a service provider. The dispatcher is responsible for the communication between different service Fig. 3: Internal processes of a service provider.

provider instances among the network. Each message is serialized before it is sent across the network, and is de-serialized after it was received. In order to allow concurrent message processing, each message reception and sending task is handled in an individual thread. After de-serialization, the dispatcher puts the respective recipe into the task queue of the queue manager. The queue manager is the heart of a service provider: Recipes are parsed and processed. That is, the next service to be executed and the associated input parameters are extracted from the recipe. The extracted information is put into the input queue of the corresponding service type. Service instances of the same type are polling on this queue. Whenever data is available in a queue, one service instance takes the data, processes it, and puts the result data into a public result queue. The queue manager appends the computed result value to the corresponding recipe. In order to keep track of which result belongs to which recipe, unique task ids are generated and stored in a so-called task table. In this way, the execution of services is strictly separated from any recipe parsing.

After being repacked, a recipe is processed by the routing component of the queue manager in order to determine the next recipe-specific processing step. If the next service is located at the same service provider, the recipe is put into the task queue of the queue manager again. Otherwise, the recipe is forwarded to the dispatcher, which takes care of sending the recipe to the respective service provider in the network.

Services vs. Local Behaviours. Within our SOA, there are two main types of computation units: services and local behaviours. These modular units provide a standardized way of computation steps that can be accessed and combined by means of recipes. They form the main logic of every application that uses our SOA for distributed computing. According to the design principles of Service-oriented Computing [START_REF] Erl | Service-Oriented Architecture: Concepts, Technology, and Design[END_REF], services provide a stateless execution of a predefined task. However, in order to cope with inherent stateful tasks such as localization, we introduce so-called local behaviours as "stateful services". In contrast to services, which are only executed if input data is available, local behaviours can be executed periodically. Furthermore, local behaviours may have multiple input queues and have full control over them. That is, behaviours are not automatically executed when new recipes are available, but recipes are explicitly taken out of the input queues by the behaviour according to its application logic. Finally, in comparison to services, local behaviours can make use of other services by creating and emitting recipes. That is, local behaviours access the routing component of the queue manager (cf. Figure 3) and directly inject new recipes into the overall system. This concept allows to seamlessly integrate stateful and more complex functionality into the SOA framework.

Brain Vision

BeBot -Basic Node-based Architecture

The robot's software system for autonomous behaviour is built based on a nodebased software framework that facilitates the periodic execution of tasks. Figure 4 gives an overview of the node hierarchy of the system. Ports and port interconnections implement the data flow between nodes. The control flow corresponds to the applied computation model such as sequential execution. Furthermore, nodes can be initialized as a Thread with a distinct frequency. That is, executing a node's application logic can be decoupled from other nodes. Copying the data from one port to another, however, always depends on the defined computation model of the corresponding parent node.

Brain: The Brain node is the root node of the hierarchy. The Brain node's own input and output ports serve as a connection between node architecture and the SOA framework of the overall system. The computation model corresponds to the following sequence: [Vision, Localization, Behaviour, Move, Light Guide]. That is, data is copied among the ports based on the defined port interconnections according to the order of the nodes in this list. The Brain node itself is not a Thread. Its compute handler is explicitly called by a Wrapper that glues together node architecture and SOA framework (cf. Section 5).

Vision, Camera, and Image Processing: The functionality for capturing and processing images is split up into three nodes: Camera node, Image Processing node, and Vision node. The Camera node implements the image acquisition step. Captured images are sent to the Image Processing node. However, if triggered by its input port, single snapshots are additionally sent to the Brain node. In this manner, whenever necessary, images can be provided to services. The Image Processing node extracts scenario specific information from captured images by means of a colour-based segmentation algorithm [START_REF] Jungmann | Image segmentation for object detection on a deeply embedded miniature robot[END_REF] and creates landmark-and cube-data. Also, the intersection points that are used for the collision avoidance are calculated in this node.

The Vision node implements no application logic but encapsulates the distinct functionalities of the Camera node and the Image Processing node. Furthermore, the Vision node is running threaded to decouple the vision functionality from other functions such as localization. This is necessary, since the vision node is the slowest node within the hierarchy: It runs with 3-5 Hz, depending on the amount of features that were detected within an image.

Light Guide: The Light Guide node implements the interface to the robot's light guide and offers different functions. For example, the light guide gives a visual feedback to indicate that a BeBot has captured an image for the 3D reconstruction process: After an image was taken, the robot blinks three times.

Localization:

The Localization node provides the currently estimated position of the robot to the Behaviour node. Due to the high computational effort of the necessary algorithms, an EKF-based estimation of the robot position cannot be done on the BeBot. As a consequence, the functionality is outsourced into a local behaviour within the SOA (cf. Section 3). The Localization node gathers the data coming from the Vision node and the odometry data from the Move node and transmits it to the localization provider.

Behaviour and Move: The Behaviour node coordinates the robot's behaviour. In each computation cycle, it executes one step of a behaviour state machine [START_REF] Arkin | Behavior-based Robotics[END_REF] according to the currently assigned task in order to obtain the next move command. A move command is composed of a translational velocity and a heading direction, and is subsequently passed on to the Move node. The Move node implements an abstraction layer for the actuator's related functionality by mapping a move command to the actual chain speeds. It also incorporates collision avoidance techniques based on an efficient occupancy grid map approach [START_REF] Borenstein | Histogramic in-motion mapping for mobile robot obstacle avoidance[END_REF]. Furthermore, the Move node gathers the raw odometry data and transmits the data to the Localization node in order to make a local pose prediction.

Integration: Service-Oriented Robotics

So far, we presented the application scenario, our proposed SOA framework, and the BeBot with its node-based software architecture for autonomous behaviour. We now describe how BeBot architecture and SOA framework are integrated. Furthermore, we briefly describe the overall system that realizes the application scenario.

BeBot Wrapper: A Local Behaviour. A BeBot is offering services such as "drive to position" and demanding services such as EKF-based localization at the same time. To enable a BeBot to interact with the SOA, a so-called BeBot Wrapper is introduced as adapter. It allows for passing messages from the SOA framework to the node hierarchy and offers an interface to the nodes for emitting recipes into the system (e.g., a recipe that contains gathered data for the EKF-based localization process). More precisely, the Wrapper implements a local behaviour in the SOA and explicitly invokes the compute handler of the BeBot's Brain node. The wrapper encapsulates the entire node-architecture as a local behaviour, which runs on a BeBot within the scope of a service provider instance. After each execution cycle, a blocked service is unblocked if data was produced for it.

A BeBot (i.e., the service provider instance running on a BeBot) also offers services. These services can pass data to the input ports of the Brain node by calling the Wrapper's delegate methods. For example, if the system wants a BeBot to drive to a specific position in the environment, the corresponding service is executed with the desired position as input values. Internally, the service uses the wrapper to delegate the task to the Brain node and blocks until it is informed by the wrapper that the task terminated.

Overall System. Figure 5 shows a schematic overview of the basic functional components. Please note, that only local behaviours are depicted. Stateless services (e.g., for image processing) are not displayed. The entire system corresponds to a network of loosely coupled service providers, which are either located on BeBots or dedicated servers. The application logic is distributed in terms of services and local behaviours among the service providers. The entire communication is based on recipes. We already introduced the Wrapper behaviour which integrates the node-architecture of the BeBot into the overall system. For that reason, let us take a closer look at the other functional components. the scenario. For each BeBot in the system, a dedicated instance of the EKF is created. Each instance receives localization data (e.g., detected landmarks) from the corresponding BeBot. More concretely, the localization node of a BeBot gathers the localization data and emits a recipe by using the interfaces provided by the Wrapper behaviour. After the computation step, the localization and mapping behaviour emits a recipe with the newly estimated position to the service provider instance of the corresponding BeBot. Furthermore, a notification recipe is sent to the GUI behaviour for updating the visualization, and the global behaviour is notified about newly tracked objects.

EKF-based

GUI:

The GUI behaviour is created for monitoring the localization and mapping process. The behaviour receives notification updates from the localization and mapping behaviour and visualizes the current state in a two dimensional map. The actual GUI is running in a separate Thread created by the behaviour. Furthermore, the GUI provides some convenient control elements, e.g., in order to reset the EKF of a BeBot or to manually move a BeBot to a certain position in the environment.

Global Behaviour: This behaviour is responsible for coordinating the BeBots and delegating the 3D reconstruction process. It sends recipes including tasks such as "explore environment and discover objects" or "capture image of side X of object Y " to a selected BeBot, which adjusts its strategy accordingly. Whenever the global behaviour receives a notification about a newly tracked object, it organizes the reconstruction process. That is, four waypoints for taking images from each side of the object are created. The waypoints are subsequently used for assigning tasks to the BeBots. Furthermore, the waypoints are also integrated into the global map for enabling BeBots to identify waypoints in their direct surroundings.

3D Reconstruction: This local behaviour is responsible for the actual reconstruction process. If four images of the same object (an image from each side) are available, the reconstruction process takes place. The resulting 3D model is subsequently sent to the GUI in order to visualize it. A detailed description of the concrete reconstruction process, however, is beyond the scope of this paper.

Conclusion

In this work, we introduced an approach for combining embedded systems with techniques from SOC. That is, computational expensive as well as coordination tasks are outsourced as services and so-called local behaviours, and integrated into a distributed computing environment. While services correspond to stateless functional components, local behaviours allow for integrating statefull, periodically executed functionality into a distributed application. Furthermore, the presented approach allows for a seamless integration of embedded systems into a distributed application in order to provide distinct functionalities as services to other entities.

In the future, starting from our latest results in the On-The-Fly Computing project [START_REF] Jungmann | An approach towards adaptive service composition in markets of composed services[END_REF], we want to investigate to what extend processes such as service composition (recipe generation) and service integration and deployment can be automated in our SOA framework.

Fig. 1 :

 1 Fig. 1: Ingredients and setting of the application scenario.

Fig. 2 :

 2 Fig. 2: (a) Exemplary recipe. (b) Fundamental components of our SOA.

Fig. 4 :

 4 Fig. 4: Node-based software architecture of a BeBot. Ports are not labelled.

Fig. 5 :

 5 Fig. 5: Overview of the entire system.

  Localization and Mapping: The localization and mapping behaviour encapsulates the EKF-based localization methods and maintains a global map of

	BeBots		Request / Assign Task
	Service Provider Wrapper Behaviour Brain Service Provider Wrapper Behaviour Brain Service Provider Wrapper Behaviour Brain Brain Service Provider Wrapper Behaviour	Data Localization Position	Service Provider Notification Mapping and EKF-based Localization	Waypoints Add/Trigger Objects	Service Provider Global Delegate Task Behaviour
			GUI	3D Models	3D Reconstruction
		Image	Service Provider		Service Provider

Acknowledgments. This work was partially supported by the German Research Foundation (DFG) within the Collaborative Research Center "On-The-Fly Computing" (SFB 901) and by the German Ministry of Education and Research (BMBF) through the project "it's OWL Intelligente Technische Systeme OstWestfalenLippe" (02PQ1021) and the ITEA2 project AMALTHEA4public (01IS14029J).

The authors gratefully acknowledge the contribution of Mouns R. Husan Almarrani, Maarten Bieshaar, Dominik Buse, Dominic Jacobsmeyer, Simon Merschjohann, Florian Pieper, and Christopher Skerra to the project "SoPhysticated -Service-oriented Cyber Physical Systems".


Paulo C Santos

Marco A Z Alves
email: mazalves@inf.ufrgs.br

Luigi Carro
email: carro@inf.ufrgs.br

HMC and DDR performance trade-offs

Keywords: HMC, DDR, Main Memory, Performance Evaluation

The evolution of main memories, from SDR to the current DDR, presents multiple technological breakthroughs, but still far from the requirements of the processors. With the advent of Hybrid Memory Cube (HMC), a promise of high bandwidth with low energy consumption and less area may provide better efficiency than the traditional DDR modules. This is especially attractive for embedded systems. In this paper, we perform a comprehensive performance comparison between HMC and DDR memories, to understand the capabilities and limitations of both. Simulation results running SPEC-CPU2006 and SPEC-OMP2001 benchmarks show that applications with low memory pressure behave similarly with HMC or DDR. We make the new observation that HMC performs better than DDR specially for applications with a high memory pressure and low spatial data locality. However, for applications with a streaming behavior, commonly present in the embedded system domain, our experiments show that current HMC row-buffer specifications do not take advantage of the spatial locality present in those applications.

Introduction

Due to increasing requirements from embedded applications, the architectures of embedded systems are becoming similar to high performance computers in the sense that performance techniques are being adapted to this new context. Following this trend embedded systems are commonly applying Double Data Rate (DDR) memories. The evolution of DDR systems brought benefits in terms of performance, while keeping power consumption levels constant. However, for the new Hybrid Memory Cubes (HMCs), the trade-off between energy consumption and performance is more interesting. The industry is predicting that HMC will provide both higher performance and considerably lower energy consumption in comparison to the current memory systems [START_REF]Altera: Hybrid memory cube controller ip core user guide[END_REF][START_REF] Yoshida | Sparc64 xifx: Fujitsu's next generation processor for hpc[END_REF]. However, simulation platforms and evaluation experiments are required to understand the new trade-offs.

In this paper, we aim to understand the performance difference between the HMC and traditional DDR 3 memories. In addition, we intend to evaluate what type of application exploits more efficiently each memory architecture. We also adapt a cycle-accurate simulator to model both memory systems to perform detailed experiments, which are capable of explaining the sources of performance differences between these two memory systems.

The main contributions of this paper are the following: HMC simulator: We extended a cycle-accurate simulator to implement a detailed HMC model, considering the internal vaults, the DRAM signal latencies and the link bandwidth. DDR and HMC comparison: Using 29 single-threaded and 7 multi-threaded benchmark applications, we performed an analysis comparing HMC to DDR 3 memories, in order to understand the limits imposed by the number of DDR 3 channels and HMC links, as well as the characteristics that allow each application to benefit most from each memory system. Application behavior correlation: In our experiments we show, as expected, that applications with low memory pressure keep the performance at the same level when changing between HMC and DDR 3 memories. We make the new observation that applications with high memory pressure (i.e., memory pressure higher than 0.5 GB/s) with low spatial memory locality benefits more from the HMC, because of the closed-row policy and the high bank parallelism. However, applications with a high memory locality performs better with DDR 3 memories mainly because of its 8 KB row buffer.

We evaluate the HMC and DDR 3 memories modeling an Atom-inspired embedded system consisting of 8 cores with 32 KB L1 and 256 KB L2 caches. Simulations executing the SPEC-CPU2006 and SPEC-OMP2001 benchmarks show that HMC with 4 links improves the performance by up to 27% for SPEC-CPU2006 and up to 109% for SPEC-OMP2001 when compared to the DDR 3 with 4 channels, and improves up to 27% and 50% respectively when compared to the DDR 3 with 8 channels. Such improvements are observed for those applications with high memory pressure and non-contiguous data access behavior. However, for applications with high memory pressure and a contiguous data access behavior, DDR 3 with 8 channels performed up to 26% better.

Technological Constraints of Memory Designs

In this section, we present the architecture of DDR devices and the HMC internals. For the rest of this paper, we focus on the DDR 3 and HMC specification version 2.0. The DDR and the HMC systems are presented at a level of abstraction that is sufficient to understand the terminology and key concepts of this paper. For a detailed description, we refer the reader to [START_REF] Davis | Modern dram architectures[END_REF][START_REF] Jacob | Memory systems: cache, DRAM, disk[END_REF][START_REF] Consortium | Hybrid memory cube specification rev[END_REF].

DRAM and DDR Architectures

Traditional main memory modules are formed by multiple devices that act in a coordinated way [START_REF] Jacob | Memory systems: cache, DRAM, disk[END_REF]. The highest memory structure level is the module, which consists of a set of devices. A module may have multiple ranks, each rank consisting of multiple devices, which will operate in synchrony. The devices are composed of a set of banks, and all the devices in a given rank react to an operation signal, always operating in the same bank for a given signal. These banks are composed of sub-arrays, formed by rows that are accessed per column.

Figure 1 shows a basic schematic of the DDR 3 x8 device.

The DRAM protocol manages these arrays using these 5 basic, simplified operations: precharge (prepares the arrays and sense amplifiers to read a new row), row access strobe (reads a specific row using the sense amplifiers into a SRAM row buffer, with 1 buffer for each bank), column access strobe (bursts data of a specific column of the row buffer from the DRAM devices to the bus), column write (receives data from the bus and overwrites the addressed column of an opened row) and refresh (refresh capacitor charges a row, usually done automatically by each device).

Since processors have been increasing their throughput demand, DRAMbased memories have evolved trying to meet the requirements of modern processors. DDR memories emerged as a major technological breakthrough, providing the ability of transmitting data at both clock edges. However, its evolutions as DDR 2, DDR 3, DDR 4 and so forth generally increased the I/O frequency by increasing the data burst capability and bus operating frequency. However, the organization of a DDR device in all versions experienced few architectural modifications. Despite these advancements in memory technology, the operat-ing frequency of the basic devices to a certain data width is limited, providing a lower throughput than what is required by modern processors. Thus, besides the burst technique, sets of devices are deployed in a module to increase parallelism and increase data throughput.

To achieve high bandwidth using the DDR memories, the multi-channel technique is widely adopted. This approach allows accessing multiple memory modules in parallel and independently, enabling data transfers from more than one row buffer at same time. Thus, if a system requires large bandwidth, for example, four channels may be required, using 256 wires in a half-duplex fashion. However, such a large number of wires in a bus is prohibitive for embedded systems, mainly because of area and power consumption constraints. To control all the devices of each channel, the memory controller must issue all the signals to the devices's bank. This control also increases with the number of channels [START_REF] Zhu | Fine-grain priority scheduling on multi-channel memory systems[END_REF].

HMC Architecture

Breaking the traditional way of DDR evolution, HMC is not concerned with increasing I/O frequency by using burst techniques. Despite using the same DRAM cell and its restrict accessing times, HMC changes the paradigm by hiding its device latencies internally, mostly with the aid of 3D integration and Through-Silicon Via (TSV) technology [START_REF] Olmen | 3d stacked ic demonstration using a through silicon via first approach[END_REF], which enables the integration of a massive bank parallelism [START_REF] Consortium | Hybrid memory cube specification rev[END_REF][START_REF] Jeddeloh | Hybrid memory cube new dram architecture increases density and performance[END_REF][START_REF] Pawlowski | Hybrid memory cube (hmc)[END_REF].

Basically HMC memories are composed of up to 8 layers of DRAM memory and one logical layer per vault, all integrated in the same device. Figure 2 illustrates the main HMC architectural details. The three main components inside the HMC are the following: Memory vaults: HMC memories store data on contiguous row buffers, interleaving throw the memory vaults and then to memory banks inside the vaults. HMC may have up to 32 vaults, each one can be composed by up to 16 banks, where each row in the bank has up to 256 bytes. In theory, the HMC can fetch data from 32 different banks (one per vault) in parallel and copy it to the internal read buffers. Only after the data is ready in the read buffers, the links may send it to the processor's memory controller. Memory controller: The 3D integration technology enabled the integration of memory and logic in the same chip on different layers. Thus, an HMC has a dedicated memory controller attached to each vault, providing great data access parallelism. In this way, the processor's memory controller can be simplified to work with simple data request commands, reducing its complexity, area and energy consumption. Serial links: Unlike DDR 3 memories, which transmit 64 bits per channel, HMC memory uses serialization, to transmit data through 16 full-duplex lanes per link (each lane is a pair of differential signal lines). However, each link is not strongly attached to a specific portion of the memory, which means that any link can be used to transfer data from/to any HMC vault. The adoption of this communication technique leads to a smaller area for buses. Moreover, these Fig. 2. HMC block diagram formed by 32 vaults with 8 banks each. Adapted from [START_REF] Consortium | Hybrid memory cube specification rev[END_REF]. links are capable of achieving higher frequencies with less interference during the transmissions [START_REF] Consortium | Hybrid memory cube specification rev[END_REF][START_REF] Thanh-Hoang | Performance and energy limits of a processor-integrated fft accelerator[END_REF].

As mentioned, other differences between HMC and DDR memories are the row buffer size and the bank parallelism. Typically, DDR memories have row buffers of 8192 bytes per bank (split among the devices), while HMC specifies row buffers of up to 256 bytes per bank. Meanwhile, the DDR modules provides only 8 memory banks which can act in parallel, while the HMC has up to 512 DRAM banks.

Previous work mentions that these architectural differences in the HMC architecture may result in up to 70% less energy consumption than DDR3-1333, and a 15 times theoretical speedup of the system [START_REF] Consortium | Hybrid memory cube specification rev[END_REF][START_REF] Jeddeloh | Hybrid memory cube new dram architecture increases density and performance[END_REF][START_REF] Pawlowski | Hybrid memory cube (hmc)[END_REF]. However, it is not clear if all applications can benefit from the HMC. In the remainder of this paper, we present the methodology for our experiments and the results showing the most important aspects of an application to perform better in the HMC compared to DDR memories.

Evaluation Methodology

This section presents the simulation details, the application kernels and the evaluation methodology, showing how we compare our mechanism to the baseline embedded system and previous work.

Modeling DDR and HMC Simulation

To evaluate DDR and HMC memories, we used an in-house cycle-accurate simulator [START_REF] Alves | Increasing Energy Efficiency of Processor Caches via Line Usage Predictors[END_REF][START_REF] Alves | Sinuca: A validated microarchitecture simulator[END_REF]. Simulator of Non-Uniform Cache Architectures (SiNUCA) is a trace-driven simulator, thus it executes traces generated on a real machine with a real workload without the influence from the OS or other processes. The traces are simulated in a cycle-accurate way, where each component is modeled to execute its operations on a clock cycle basis. SiNUCA currently focuses on the x86 32 and x86 64 architectures.

SiNUCA originally offered support only for modeling DDRx memories with an open-row policy. However, few modifications in the source code were necessary to model HMC, due to SiNUCA's high parameterization. To model a HMC, the memory controllers are used as HMC controllers, which are located inside the HMC device. The channels can be configured to act as memory vaults. However, changes were made to provide support on closed-row policy and new HMC instructions. Although HMC-aware compilers are not available yet, synthetic codes can be evaluated with this version of SiNUCA.

Configuration Parameters and Workload

The simulation parameters are inspired by Intel's Atom processor with the Silvermont Out-of-Order (OoO) micro-architecture [START_REF]Intel: Intel Atom Processor E3800 Product Family[END_REF]. Table 1 shows the simulation parameters used for our tests. The Silvermont micro-architecture only supports 2 memory channels. In order to build a possible future scenario for comparison, we also extrapolate the baseline configuration with up to 8 memory channels. We apply the same extrapolation idea to the HMC, in order to evaluate the influence of the number of links to the performance.

As the workloads for our experiments, we chose the 29 serial applications from the SPEC-CPU2006 [START_REF] Henning | Spec cpu2006 benchmark descriptions[END_REF] and 7 parallel applications from the SPEC-OMP2001 [START_REF] Saito | Large system performance of spec omp2001 benchmarks[END_REF] benchmark suite. The SPEC-CPU2006 benchmark suites (integer and floating point) were executed using the reference input set, executing a representative slice of 200 million instructions selected by PinPoints [START_REF] Patil | Pinpointing representative portions of large intel itanium programs with dynamic instrumentation[END_REF]. The SPEC-OMP2001 OoO Execution Cores -2 GHz; 8 cores; Front-end 2-wide; 16 B fetch block size 14 stages (3-fetch, 3-decode, 3-rename, 2-dispatch, 3-commit); 24-entry fetch buffer, 32-entry decode buffer, 32-entry ROB; 16-entry BOB; INT: 2-alu, 1-mul. and 1-div.; FP: 1-alu, 1-mul. and 1-div. (1-3-20; 5-5-20 cycle); 1-load and 1-store functional units ( Open-row first policy; CAS, RP, RCD, RAS and CWD latency (12-17-14-34-6 cycles); HMC Module and Interconnection -Bi-directional ring, 1∼4-links @ 8GHz; 32 Vaults, 16 LP-DRAM banks per Vault @ 800 MHz, 256 B row buffer per bank, 2 burst length; Closed-row policy; CAS, RP, RCD, RAS and CWD latency (12-17-14-34-6 cycles); benchmarks were executed using the reference input set as well, executing up to one time step from its parallel region.

Experimental Results

This section presents the results for SPEC-CPU2006 and SPEC-OMP2001 benchmark suites when simulating HMC and DDR memories.

SPEC-CPU2006 Results

The first result regarding the SPEC-CPU2006 benchmark suite shows the average performance when executing all the applications for each one of the systems, with DDR 3 varying the number of channels and the HMC varying the number of links. Figure 3 presents the speedup results over the DDR 3 with 1 channel. Memory Usage and Pressure: In order to understand the behavior of the different applications executing on HMC 4 links and DDR 3 8 channels, we correlate performance compared to the memory footprint and the memory pressure. Figure 4 presents the SPEC-CPU2006 applications sorted by their performance. It shows the speedup of the HMC over the DDR 3, also showing in the secondary axis the amount of requests per second (pressure) the HMC serviced average. On the top of the figure, the memory footprint is presented.

The plot shows some performance difference between DDR 3 and HMC only for those applications with pressure higher than 0.50 GB/s. This also correlates with the memory footprint, where applications with more than 32 MB tends to have some performance difference between DDR 3 and HMC.

Both metrics show insignificant performance change for applications with low memory footprint and consequently low memory pressure. However, both metrics (memory footprint and pressure) cannot explain alone if a specific application will benefit or not from the HMC.

Memory Contiguity: Selecting only the SPEC-CPU2006 benchmarks with pressure higher than 0.50 GB/s, we obtained the list of applications with a reasonable memory pressure. For those applications, Figure 5 speedup with the memory access contiguity observed. The contiguity was obtained for the 8 KB row buffer hit ratio of the DDR 3. Thus, the higher contiguity indicates that more contiguous accesses happened in a short period of time. The main aspects from the DRAM architecture that influence the performance of contiguous accesses are the row buffer size, and the row buffer policy. In the case of the DDR 3, the row buffer contains 8 KB of contiguous data, for HMC it holds only 256 B. Regarding the row buffer policy, the DDR 3 usually adopts the open-row policy, while the HMC specification describes the use of closed-row policy.

The HMC uses smaller row buffers compared to DDR 3 mainly to reduce the energy DRAM array consumption while it also increases the parallelism between the vaults. Open-row policies makes more sense with large row buffers.

Considering that smaller row buffers will service less cache misses, the closedrow policy will close the row buffer as soon as the actual request is serviced. Performing the early row precharge command improves the performance for future accesses to different rows, while it can hurt performance if future accesses map to the recently closed row.

In our experiments, we implemented a smart closed-row policy, which identifies if multiple requests inside the read/write buffer map to the same row, and just close the actual row after all the requests have been serviced. However, even with such scheme, the performance is reduced when contiguous accesses happen.

SPEC-OMP2001 Results

In order to understand if scenarios with higher memory pressure would change our conclusions, we evaluated the multi-threaded applications from SPEC-OMP2001. Figure 6 presents the results when executing the applications with a different number of threads. The speedup results are normalized to the DDR 3 with 1 channel. We can observe that HMC with a single link performed 50% better than DDR 3 with a single channel. Comparisons considering the maximum commercial products, HMC with 4 links and DDR 3 with 4 channels, show and average speedup of 1.75 for HMC. Comparing the best version of the DDR 3 and the HMC, we can observe that HMC performed 15% better.

Memory Contiguity: To evaluate the speedup change between the HMC and DDR memories, we took the DDR 3 with 8 channels and HMC with 4 links execution cycles in order to calculate the speedup between the HMC and its counterpart with DDR. Figure 7 presents the results with different numbers of threads, showing the HMC speedup for each application, compared to the same application with same amount of threads using DDR. In order to observe how contiguous the applications from the SPEC-OMP2001 benchmark suite are, the figure also presents in the secondary axis the contiguity ratio (8 KB row buffer hit ratio) for each application with different numbers of threads.

We can observe for SPEC-OMP2001 the same behavior reported previously, that HMC can perform better than DDR for applications with lower contiguity. In this case, the number of parallel threads influences the contiguity of the accesses arriving to the main memory. Another factor that influences the performance of the multi-threading applications is the higher memory pressure present in the main memory.

Summary of Evaluations

As we could observe in the results with single and multi-threaded applications, the performance improvements when using HMC are for the applications with high memory pressure and low spatial data locality. For those applications with low memory pressure, the performance differences between HMC and DDR memories are negligible. Due to its smaller row buffers and closed-row policy, the HMC can hurt the performance of applications with contiguous data access behavior.

We can observe that when executing parallel applications, the spatial locality of the addresses arriving to the main memory reduces. It can be explained by the domain division per thread, where each thread tends to work in a different range of addresses. Moreover, with multi-threads generating requests, the memory pressure rises leading to a better exploration of the multiple HMC vaults.

In our experiments, we showed that applications with low memory pressure do not benefit from a different memory architecture. In this sense, low-end systems with very low performance processors may not benefit from HMC memories. The same can be said for streaming applications with high spatial locality, which benefit more from the DDR row buffer size. Furthermore, for systems with higher processing capabilities, the HMC can become more interesting when executing multi-threaded or multi-programmed workloads, which may create enough memory pressure with low spatial locality.

Related Work

The work presented in [START_REF] Rosenfeld | Peering over the memory wall: Design space and performance analysis of the hybrid memory cube[END_REF] and [START_REF] Rosenfeld | Performance Exploration of the Hybrid Memory Cube[END_REF] verifies the maximum HMC memory bandwidth achievable, evaluating different high performance computing systems. The authors used the HMC-Sim simulator [START_REF] Leidel | Hmc-sim: A simulation framework for hybrid memory cube devices[END_REF] varying HMC configurations coupled to a 16-core x86 processor. The authors only performed the experiments based on the HMC specification version 1.0 [START_REF] Consortium | Hybrid memory cube specification rev[END_REF], which states a maximum theoretical bandwidth of 160 GB/s through 256 memory banks.

Fujitsu XIfx [START_REF] Yoshida | Sparc64 xifx: Fujitsu's next generation processor for hpc[END_REF] introduces the usage of 8 HMC memories coupled to a set of SPARC64 processors. The work shows the performance achieved when HMC memory is adopted replacing DDR 3 memories. The processor coupled with HMC memories is 3.5 times faster on average, than previous DDR 3 memories with 4 channels. Due to the great reduction of the main memory bottleneck with the adoption of HMC, processor performance is dramatically expanded.

The HMC-Sim [START_REF] Leidel | Hmc-sim: A simulation framework for hybrid memory cube devices[END_REF] is a cycle accurate simulator for HMC memories only, not modeling the cache hierarchy, interconnections and the processor. We choose to adapt the SiNUCA [START_REF] Alves | Sinuca: A validated microarchitecture simulator[END_REF] memory model to support HMC, due to its capabilities of simulating the full system. Thus, we provide another tool capable to model HMC, while we can compare the findings the other simulator.

Previous work explore only high performance processors, leaving it unclear whether the same behavior presents itself in the embedded system domain. In this work, we model an embedded system environment comparing the HMC 2.0 specification which supports up to 512 DRAM banks. In our evaluations we show the performance difference between HMC (with 1∼4 links) and DDR 3 (with 1∼8 channels), explaining the application behavior behind the performance results.

Conclusions and Future Work

Following the trend to move embedded systems closer to the high performance system domain, several high-end embedded systems are adapting multiple high performance mechanisms, such as DDR memories. However, the new HMC memories lack evaluations regarding their trade-offs when compared to DDR memories, especially in the embedded domain.

In this paper, we present a performance evaluation comparing HMC and DDR memories, in order to understand the possible speedup scenarios of this new memory architecture. We point the new finding that applications with streaming behavior that have high memory access locality perform better on DDR 3 memories, while sparse accesses are better serviced by the HMC. However, applications with low memory pressure keep the same performance in both systems.

As future work, we intend to extend the evaluation for the energy consumption domain. We also plan stress different processor parameters that most affect the memory pressure, such as the number of entries in the Memory Order Buffer (MOB), and cache Miss-Status Handling Registerss (MSHRs), as well as memory disambiguation techniques.

Fig. 1 .

 1 Fig. 1. DDR 3 x8 functional block diagram of a single device. Adapted from [12].

Fig. 3 .

 3 Fig. 3. Performance results for SPEC-CPU2006.

Fig. 4 .

 4 Fig.[START_REF] Consortium | Hybrid memory cube specification rev[END_REF]. HMC speedup over DDR 3 and the memory pressure (GB/s) for SPEC-CPU2006 applications.

Fig. 5 .

 5 Fig. 5. HMC speedup and contiguity results for SPEC-CPU2006.

Fig. 6 .

 6 Fig. 6. Performance results for SPEC-OMP2001.

Fig. 7 .

 7 Fig. 7. HMC speedup over DDR 3 and the contiguity ratio for SPEC-OMP2001 applications.

Table 1 .

 1 Baseline system configuration.

  1-1 cycle); MOB entries: 10-read and 10-write;

	Branch Predictor -1 branch per fetch; 4 K-entry 4-way set-associative BTB;
	Two-Level PAs predictor; 16 K-entry BHT, 2-bits prediction;
	L1 Data + Inst. Cache -32 KB, 8-way, 2-cycle; 64 bytes line; LRU policy;
	MSHR entries: 10-request, 8-write-back; Stride Prefetcher: 1-degree, 16-strides table;
	L2 Cache -256 KB shared for every 2 cores; 8-way, 4-cycle; 64 bytes line; LRU policy;
	MSHR entries: 10-request, 6-write-back; Inclusive LLC; MOESI coherence;
	Stream Prefetcher: 2-degree, 16 prefetch distance, 32-streams;
	Low Power DDR3-1600 Controller and Interconnection -Bi-directional ring, 1∼8-channels;
	8 LP-DRAM banks, 8 KB row buffer per bank (1 KB per device), 8 burst length;

We acknowledge the support of CNPq and CAPES.