MAC eingeführt

This commit is contained in:
unknown 2015-03-09 12:05:12 +01:00
parent 4490e459ca
commit 8efb1c014b
2 changed files with 5 additions and 9 deletions

2
fft.c
View File

@ -98,7 +98,7 @@ int fix_fft(fixed fr[], fixed fi[], int m, int inverse)
++scale; ++scale;
break; break;
} }
} }
} }
else else
{ {

View File

@ -183,16 +183,12 @@ operation FFT_calc {inout FFT_reg data, in AR wr, in AR wi, in AR shift} {}
wire [15:0] fij = data[15:0]; wire [15:0] fij = data[15:0];
wire [31:0] tr1 = TIEmul(wr, frj, 1'b1); wire [31:0] tr1 = TIEmul(wr, frj, 1'b1);
wire [15:0] tr1s = tr1[30:15]; wire [31:0] tr2 = TIEmac(wi, fij, tr1, 1'b1, 1'b1);
wire [31:0] tr2 = TIEmul(wi, fij, 1'b1); wire [15:0] tr = tr2[30:15];
wire [15:0] tr2s = tr2[30:15];
wire [15:0] tr = TIEadd(tr1s, ~tr2s, 1'b1);
wire [31:0] ti1 = TIEmul(wr, fij, 1'b1); wire [31:0] ti1 = TIEmul(wr, fij, 1'b1);
wire [15:0] ti1s = ti1[30:15]; wire [31:0] ti2 = TIEmac(wi, frj, ti1, 1'b1, 1'b0);
wire [31:0] ti2 = TIEmul(wi, frj, 1'b1); wire [15:0] ti = ti2[30:15];
wire [15:0] ti2s = ti2[30:15];
wire [15:0] ti = TIEadd(ti1s, ti2s, 1'b0);
wire [15:0] qr = TIEmux(shift[0], fri, {fri[15], fri[15:1]}); 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]}); wire [15:0] qi = TIEmux(shift[0], fii, {fii[15], fii[15:1]});