• 沒有找到結果。

Chapter 4 Simulation Environment and Result

4.1 Simulation Environment

In this section, we discuss the OffsetStone suite [11] which is designed for address offset assignment problem. We describe the simulation flow, the benchmarks program, and the proposed approaches that we will compare with in the OffsetStone suite.

4.1.1 Simulation Flow

The experimental flow in Figure 4-1, we show how each application program is extracted for address offset assignment problem instances by means of several steps and the relation among address offset assignment algorithm execution and other execution stages.

Figure 4-1 Simulation Flow

The complete simulation flow is described as follows:

1. The ANSI C sources of the application are translated into a three address code intermediate representation (IR) by means of the LANCE C Front-End, in order to make the variable access sequences explicit. Additionally, this step inserts temporary variables for intermediate results that a compiler would normally generate. The IR is optimized by standard techniques used in most compilers, including common sub-expression elimination, dead code elimination, constant

LANCE Frond-End

C Program

LANCE IR Access Sequence

Extraction

Access Sequences Address Offset

Algorithm Execution

Address Arithmetic Cost Calculator

Address Assignment

folding, jump optimization, etc. This step ensures that the IR does not contain superfluous variables and computations, which a compiler would eliminate anyway.

2. From the optimized IR, the detailed variable access sequence is extracted from each basic block. Since any offset assignment is valid throughout an entire C function, on global access graph is constructed per function by merging the local access graphs of the basic blocks. In this way, all local access sequences are represented in a single graph. Each global access graph forms one instance of the address offset assignment problem.

3. In this step, address offset assignment algorithm is executed. For all access sequence instances extracted from application program, they are taken as input to all address offset assignment algorithms. Then each address offset assignment algorithm outputs an address assignment solution.

4. In the last step, we calculate the total address arithmetic cost for application program. Here, we have two inputs:Access sequence and address assignment solution, then we calculate the cost by our cost function defined in Definition 3-2.

4.1.2 OffsetStone Benchmarks

OffsetStone suite is composed of a large suite of SOA problem instances extracted from 31 complex real-world application programs written in ANSI C. These include computation-intensive DSP applications and control-dominated standard applications [11]. We take computation-intensive DSP applications to evaluate our design compare to related work. Here, we give a description of these DSP application as follow:

Adaptive Differential Pulse Code Modulation (ADPCM) is a technique for converting sound or analog information to binary information by taking frequent samples of the sound and expressing the value of the samples of the sound modulation in binary terms.

„ DSPSTONE:

The DSPstone benchmark consists of the following three suites:

1. Application benchmarks are complete program widely employed by the DSP user community.

2. DSP – kernel benchmarks consist of code fragments or functions which cover the most often used DSP algorithms.

3. C – kernel benchmarks consist of typical C statements (loops, function calls, etc).

„ FFT:

Fast Fourier Transform (FFT) is an algorithm which converts a sampled complex-valued function of time to a sampled complex-valued function of frequency. It is suited to analyze digital audio recordings or synthesize sounds.

„ GSM:

The Global System for Mobile communication (GSM) is a world-wide standard for digital wireless mobile phones. European GSM 06.10 is a provisional standard for full-rate speech transcoding, prI-ETS 300 036, which uses residual pulse excitation/long term prediction coding at 13Kbit/s.

GSM 06.10 compresses frames of 160 13-bit samples (8 KHz sampling rate, i.e. a frame rate of 50 KHz) into 260 bits.

„ JPEG:

images. JPEG is lossy, meaning that the output image is not exactly identical to the input image. Two application are derived from the JPEG source code: cjpeg, which does image compression, and djpeg, which does decompression.

„ MP3:

MPEG Audio Layer 3 (MP3) s a compression algorithm developed by the Motion Picture Experts Group. Very generally, the algorithm takes a digital audio file and reduces its size, while maintaining the quality of the recording.

„ MPEG2:

MPEG-2 is the designation for a group of audio and video coding standards agreed upon by MPEG (Moving Picture Experts Group. MPEG-2 is typically used to encode audio and video for broadcast signals, including digital satellite and Cable TV.

„ VITERBI:

The Viterbi algorithm is a way to find the most likely sequence of hidden states (or causes) that result in a sequence of observed events. It is commonly used in information theory, speech recognition and computation linguistics.

4.1.3 Address Offset Assignment Approaches in Simulation Environment

We evaluate our two approaches and other three offset assignment algorithms for the extracted benchmarks. Let us review these approaches as following:

1. OFU:A trivial offset assignment, where variables are assigned to offsets in the

non-optimizing compilers without a dedicated SOA phase, and thus serves as baseline case for our experiments.

2. Liao:Liao’s SOA heuristic algorithm based on the access graph model.

3. TB:SOA-Liao extended by the tie-break heuristic algorithm.

4. Pruning:Our approach 1 based on the access graph model.

5. GA:Our approach 2 by mapping problem to genetic algorithm.

For the address offset assignment solutions of above approaches, we compute their cost by the cost function in Definition 3-2 with one address register and various number of modify registers.

相關文件