Measurement of execution time of FFT ising library "UIT_FFT_Real"

Dependencies:   UIT_FFT_Real mbed

Files at this revision

API Documentation at this revision

Comitter:
MikamiUitOpen
Date:
Sun Jan 17 05:45:20 2016 +0000
Commit message:
1

Changed in this revision

UIT_FFT_Real.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/UIT_FFT_Real.lib	Sun Jan 17 05:45:20 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/MikamiUitOpen/code/UIT_FFT_Real/#9649d0e2bb4a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Jan 17 05:45:20 2016 +0000
@@ -0,0 +1,38 @@
+//-----------------------------------------------------------
+//  Measurement execution time of "FftReal"
+//      for Nucleo-401 and DISCO-F746
+//
+//  2016/01/17, Copyright (c) 2016 MIKAMI, Naoki
+//-----------------------------------------------------------
+
+#include "fftReal.hpp"
+using namespace Mikami;
+
+
+const int N_FFT_ = 128;     // number of date for FFT
+//const int N_FFT_ = 256;     // number of date for FFT
+//const int N_FFT_ = 512;     // number of date for FFT
+
+DigitalOut dOut(D7);
+
+int main()
+{
+    printf("SystemCoreClock = %d MHz\r\n", SystemCoreClock/1000000);
+    
+    FftReal fft(N_FFT_);    // Declaration of FFT object
+
+    float xn[N_FFT_];
+    Complex y[N_FFT_];
+    
+    srand(1234);
+    for (int n=0; n<N_FFT_; n++)
+        xn[n] = 2.0f*rand()/(float)RAND_MAX - 1.0f;
+    
+    while (true)
+    {
+        dOut = 1;
+        fft.Execute(xn, y);
+        dOut = 0;
+        wait_ms(1);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Jan 17 05:45:20 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/6f327212ef96
\ No newline at end of file