N-sim
Emulation and simulation of
Wireless Sensor Networks



   Home


   Project Page


   Download


   CVS



   Installation


   Configuration


   Plug-ins




 Hosted by
SourceForge.net Logo

/home/brennan/n-sim/Vaike/linux/system-addons/apps/int_fft.c File Reference

Go to the source code of this file.

Defines

#define FIX_MPY(DEST, A, B)   DEST = ((long)(A) * (long)(B))>>15
#define N_WAVE   1024
#define LOG2_N_WAVE   10
#define N_LOUD   100
#define fixed   short

Functions

int db_from_ampl (fixed re, fixed im)
fixed fix_mpy (fixed a, fixed b)
int fix_fft (fixed fr[], fixed fi[], int m, int inverse)
void window (fixed fr[], int n)
void fix_loud (fixed loud[], fixed fr[], fixed fi[], int n, int scale_shift)
int iscale (int value, int numer, int denom)
fixed fix_dot (fixed *hpa, fixed *pb, int n)

Variables

fixed Sinewave [N_WAVE]
fixed Loudampl [N_LOUD]


Define Documentation

#define FIX_MPY DEST,
A,
 )     DEST = ((long)(A) * (long)(B))>>15
 

Definition at line 58 of file int_fft.c.

Referenced by fix_dot(), fix_mpy(), and window().

#define fixed   short
 

Definition at line 64 of file int_fft.c.

Referenced by fix_dot(), and fix_fft().

#define LOG2_N_WAVE   10
 

Definition at line 61 of file int_fft.c.

#define N_LOUD   100
 

Definition at line 62 of file int_fft.c.

Referenced by db_from_ampl().

#define N_WAVE   1024
 

Definition at line 60 of file int_fft.c.

Referenced by fix_fft(), and window().


Function Documentation

int db_from_ampl fixed  re,
fixed  im
 

Definition at line 218 of file int_fft.c.

References Loudampl, and N_LOUD.

Referenced by fix_loud().

fixed fix_dot fixed *  hpa,
fixed *  pb,
int  n
 

Definition at line 270 of file int_fft.c.

References a, FIX_MPY, and fixed.

int fix_fft fixed  fr[],
fixed  fi[],
int  m,
int  inverse
 

Definition at line 80 of file int_fft.c.

References fixed, and N_WAVE.

Referenced by sensor_app().

void fix_loud fixed  loud[],
fixed  fr[],
fixed  fi[],
int  n,
int  scale_shift
 

Definition at line 199 of file int_fft.c.

References db_from_ampl(), and max.

fixed fix_mpy fixed  a,
fixed  b
 

Definition at line 245 of file int_fft.c.

References FIX_MPY.

int iscale int  value,
int  numer,
int  denom
 

Definition at line 254 of file int_fft.c.

void window fixed  fr[],
int  n
 

Definition at line 179 of file int_fft.c.

References FIX_MPY, N_WAVE, and Sinewave.


Variable Documentation

fixed Loudampl
 

Initial value:

 {
  32767,  29203,  26027,  23197,  20674,  18426,  16422,  14636,
  13044,  11626,  10361,   9234,   8230,   7335,   6537,   5826,
   5193,   4628,   4125,   3676,   3276,   2920,   2602,   2319,
   2067,   1842,   1642,   1463,   1304,   1162,   1036,    923,
    823,    733,    653,    582,    519,    462,    412,    367,
    327,    292,    260,    231,    206,    184,    164,    146,
    130,    116,    103,     92,     82,     73,     65,     58,
     51,     46,     41,     36,     32,     29,     26,     23,
     20,     18,     16,     14,     13,     11,     10,      9,
      8,      7,      6,      5,      5,      4,      4,      3,
      3,      2,      2,      2,      2,      1,      1,      1,
      1,      1,      1,      0,      0,      0,      0,      0,
      0,      0,      0,      0,
}

Definition at line 430 of file int_fft.c.

Referenced by db_from_ampl().

fixed Sinewave
 

Definition at line 297 of file int_fft.c.

Referenced by window().


© 2007, Los Alamos National Security, LLC.