Presentation is loading. Please wait.

Presentation is loading. Please wait.

Transformation of Beam forming Algorithm Using MMX Instructions

Similar presentations


Presentation on theme: "Transformation of Beam forming Algorithm Using MMX Instructions"— Presentation transcript:

1 Transformation of Beam forming Algorithm Using MMX Instructions
Bret Martin & Maimoon Nasim

2 Beam Forming Filters signals by the direction they are coming from.
By delaying each input a certain amount can select a certain direction to look with the array. Using different delays gives different directions Direction with the most energy is the source for the signal

3 Beam Forming Algorithm
#define NUMCHAN 4 #define NUMBEAMS 21 #define WINDOWLENGTH 20 long beams[NUMBEAMS]; short data[NUMCHAN][1000]; void beamform(void) { int Delay = 10; int Offset = 400; int i, k, j; long data2 [WINDOWLENGTH]; for (i=0; i<NUMBEAMS; i++) { beams[i] = 0; for (k=0; k<WINDOWLENGTH; k++) { data2[k] = 0; for (j=0; j<NUMCHAN; j++) { data2[k] += data[j][Offset + k - j * Delay]; } data2[k] *= data2[k]; beams[i] += data2[k]; Delay--;

4 Beam Forming System Hardware configuration Software Four microphones
Sampled at 100 kHz 16 bit signed samples from each Software Beam forming function periodically called when data buffers filled Finds energy in each of the desired number of beams

5 MMX Instruction Analysis
Since we are getting 16 bit data, can use signed saturate word instructions Because of the large number of adds and squaring output will be double words. MOVQ – loads 64 bits so we should do four rows of the window at once. PMADDWD – can perform two squarings at once and gives necessary output size. PSHUFD – will easily do data rearrangement needed.

6 Algorithm Transformations
Unrolled innermost loop in algorithm In addition, we have unfolded the next loop to process four rows of the window in parallel


Download ppt "Transformation of Beam forming Algorithm Using MMX Instructions"

Similar presentations


Ads by Google