From 5c18f2ee3bd1194b560da4c643fadcd4179a92f9 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 9 Mar 2015 16:54:34 +0100 Subject: [PATCH] =?UTF-8?q?FFT=5Fbit=5Freverse=20f=C3=BCr=20m=20>=203=20er?= =?UTF-8?q?weitert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fft_inst.tie | 24 ++++++++++++++++-------- main.c | 2 +- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/fft_inst.tie b/fft_inst.tie index 501249d..045beb5 100644 --- a/fft_inst.tie +++ b/fft_inst.tie @@ -130,7 +130,7 @@ table SIN_wave 16 1024 { -1607, -1406, -1206, -1005, -804, -603, -402, -201 } -regfile FFT_reg 128 2 fftv +regfile FFT_reg 64 2 fftv operation FFT_shift_check {in AR *base, in AR offset, out AR needs_shift} {out VAddr, in MemDataIn128} { @@ -162,13 +162,21 @@ operation FFT_bit_reverse {inout AR m, out AR mr, in AR mm} {} { wire [15:0] x = TIEadd(m, 1'b0, 1'b1); assign mr = { - TIEmux(mm[2:0], 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, x[0]), - TIEmux(mm[2:0], 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, x[0], x[1]), - TIEmux(mm[2:0], 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, x[0], x[1], x[2]), - TIEmux(mm[2:0], 1'b0, 1'b0, 1'b0, 1'b0, x[0], x[1], x[2], x[3]), - TIEmux(mm[2:0], 1'b0, 1'b0, 1'b0, x[0], x[1], x[2], x[3], x[4]), - TIEmux(mm[2:0], 1'b0, 1'b0, x[0], x[1], x[2], x[3], x[4], x[5]), - TIEmux(mm[2:0], 1'b0, x[0], x[1], x[2], x[3], x[4], x[5], x[6]) + TIEmux(mm[3:0], 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, x[0]), + TIEmux(mm[3:0], 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, x[0], x[1]), + TIEmux(mm[3:0], 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, x[0], x[1], x[2]), + TIEmux(mm[3:0], 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, x[0], x[1], x[2], x[3]), + TIEmux(mm[3:0], 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, x[0], x[1], x[2], x[3], x[4]), + TIEmux(mm[3:0], 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, x[0], x[1], x[2], x[3], x[4], x[5]), + TIEmux(mm[3:0], 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, x[0], x[1], x[2], x[3], x[4], x[5], x[6]), + TIEmux(mm[3:0], 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7]), + TIEmux(mm[3:0], 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8]), + TIEmux(mm[3:0], 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9]), + TIEmux(mm[3:0], 1'b0, 1'b0, 1'b0, 1'b0, 1'b0, x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9], x[10]), + TIEmux(mm[3:0], 1'b0, 1'b0, 1'b0, 1'b0, x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9], x[10],x[11]), + TIEmux(mm[3:0], 1'b0, 1'b0, 1'b0, x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9], x[10],x[11],x[12]), + TIEmux(mm[3:0], 1'b0, 1'b0, x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9], x[10],x[11],x[12],x[13]), + TIEmux(mm[3:0], 1'b0, x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9], x[10],x[11],x[12],x[13],x[14]) }; assign m = x; } diff --git a/main.c b/main.c index 2503da1..5d40a71 100644 --- a/main.c +++ b/main.c @@ -7,7 +7,7 @@ #include -#define M 3 +#define M 8 //number of points #define N (1<