diff --git a/fft.c b/fft.c index 3bd6b8c..321bc2e 100644 --- a/fft.c +++ b/fft.c @@ -80,7 +80,6 @@ int fix_fft(fixed fr[], fixed fi[], int m, int inverse) fi[mr] = ti; } - l = 1; k = LOG2_N_WAVE-1; while(l < n) diff --git a/fft_inst.tie b/fft_inst.tie index e7545ab..0ca83be 100644 --- a/fft_inst.tie +++ b/fft_inst.tie @@ -200,6 +200,9 @@ operation FFT_calc {inout FFT_reg data, in AR wr, in AR wi, in AR shift} {} wire [15:0] fii = data[31:16]; wire [15:0] fij = data[15:0]; + // TODO semantic for hardware implementation + // TODO shared functions + // TODO ersetzen durch TIEmac wire [31:0] tr1 = TIEmul(wr, frj, 1'b1); wire [15:0] tr1s = tr1[30:15]; wire [31:0] tr2 = TIEmul(wi, fij, 1'b1); @@ -215,6 +218,7 @@ operation FFT_calc {inout FFT_reg data, in AR wr, in AR wi, in AR shift} {} wire [15:0] qr = TIEmux(shift[0], fri, {fri[15], fri[15:1]}); wire [15:0] qi = TIEmux(shift[0], fii, {fii[15], fii[15:1]}); + // TODO multiple add wire [15:0] frio = TIEadd(qr, tr, 1'b0); wire [15:0] frjo = TIEadd(qr, ~tr, 1'b1); wire [15:0] fiio = TIEadd(qi, ti, 1'b0); @@ -300,7 +304,6 @@ immediate_range ld.FFT_reg_immed2 -32 24 8 // //-------------------------------------------------------------------------- - format flix64_0 64 { flix64_0_slot0, flix64_0_slot1, flix64_0_slot2 } slot_opcodes Inst { diff --git a/main.c b/main.c index 5d40a71..8f83db1 100644 --- a/main.c +++ b/main.c @@ -1,20 +1,17 @@ //main.c - #include "fft.h" #include "fft-org.h" #include #include -#define M 8 +//defined by Compile Target +#define M 3 //number of points #define N (1<