这是我的毕业设计,使用adderF_F.v和multFXF.v实现浮点数的加法和乘法用butter_2.v实现2点蝶形算子,用fft_16.v实现十六点FFT运算,前面三个都编译通过,并用MODELSIM进行了
仿真,但是把前几个综合到一起是fft.v就老是说文件过大,不能编译通过并提示:Error:Out of memotu in module quartus_map.exe(2132 megabytes used),才开始觉得是因为计算机内存不足,可是加了一个内存条以后仍然无法编译通过(大概编译到20%就停了),下面是fft_16.v的代码,大神帮忙看一下,感激不尽!!!!!!
module fft_16 (
clk,
rst,
butt16_real0,
butt16_imag0,
butt16_real1,
butt16_imag1,
butt16_real2,
butt16_imag2,
butt16_real3,
butt16_imag3,
butt16_real4,
butt16_imag4,
butt16_real5,
butt16_imag5,
butt16_real6,
butt16_imag6,
butt16_real7,
butt16_imag7,
butt16_real8,
butt16_imag8,
butt16_real9,
butt16_imag9,
butt16_real10,
butt16_imag10,
butt16_real11,
butt16_imag11,
butt16_real12,
butt16_imag12,
butt16_real13,
butt16_imag13,
butt16_real14,
butt16_imag14,
butt16_real15,
butt16_imag15,
y_real0,
y_imag0,
y_real1,
y_imag1,
y_real2,
y_imag2,
y_real3,
y_imag3,
y_real4,
y_imag4,
y_real5,
y_imag5,
y_real6,
y_imag6,
y_real7,
y_imag7,
y_real8,
y_imag8,
y_real9,
y_imag9,
y_real10,
y_imag10,
y_real11,
y_imag11,
y_real12,
y_imag12,
y_real13,
y_imag13,
y_real14,
y_imag14,
y_real15,
y_imag15,
);
parameter RST_LVL = 1'b0;
input clk;
input rst;
input [31:0] butt16_real0;
input [31:0] butt16_imag0;
input [31:0] butt16_real1;
input [31:0] butt16_imag1;
input [31:0] butt16_real2;
input [31:0] butt16_imag2;
input [31:0] butt16_real3;
input [31:0] butt16_imag3;
input [31:0] butt16_real4;
input [31:0] butt16_imag4;
input [31:0] butt16_real5;
input [31:0] butt16_imag5;
input [31:0] butt16_real6;
input [31:0] butt16_imag6;
input [31:0] butt16_real7;
input [31:0] butt16_imag7;
input [31:0] butt16_real8;
input [31:0] butt16_imag8;
input [31:0] butt16_real9;
input [31:0] butt16_imag9;
input [31:0] butt16_real10;
input [31:0] butt16_imag10;
input [31:0] butt16_real11;
input [31:0] butt16_imag11;
input [31:0] butt16_real12;
input [31:0] butt16_imag12;
input [31:0] butt16_real13;
input [31:0] butt16_imag13;
input [31:0] butt16_real14;
input [31:0] butt16_imag14;
input [31:0] butt16_real15;
input [31:0] butt16_imag15;
output [31:0] y_real0;
output [31:0] y_imag0;
output [31:0] y_real1;
output [31:0] y_imag1;
output [31:0] y_real2;
output [31:0] y_imag2;
output [31:0] y_real3;
output [31:0] y_imag3;
output [31:0] y_real4;
output [31:0] y_imag4;
output [31:0] y_real5;
output [31:0] y_imag5;
output [31:0] y_real6;
output [31:0] y_imag6;
output [31:0] y_real7;
output [31:0] y_imag7;
output [31:0] y_real8;
output [31:0] y_imag8;
output [31:0] y_real9;
output [31:0] y_imag9;
output [31:0] y_real10;
output [31:0] y_imag10;
output [31:0] y_real11;
output [31:0] y_imag11;
output [31:0] y_real12;
output [31:0] y_imag12;
output [31:0] y_real13;
output [31:0] y_imag13;
output [31:0] y_real14;
output [31:0] y_imag14;
output [31:0] y_real15;
output [31:0] y_imag15;
wire [31:0] L1_real[15:0];
wire [31:0] L1_imag[15:0];
wire [31:0] L2_real[15:0];
wire [31:0] L2_imag[15:0];
wire [31:0] L3_real[15:0];
wire [31:0] L3_imag[15:0];
wire [31:0] L4_real[15:0];
wire [31:0] L4_imag[15:0];
wire [31:0] factor_real[7:0];
wire [31:0] factor_imag[7:0];
assign factor_real[0] = 32'd8192;
assign factor_imag[0] = 32'd0;
assign factor_real[1] = 32'd7568;
assign factor_imag[1] = 32'd3135;
assign factor_real[2] = 32'd5793;
assign factor_imag[2] = 32'd5793;
assign factor_real[3] = 32'd3135;
assign factor_imag[3] = 32'd7568;
assign factor_real[4] = 32'd0;
assign factor_imag[4] = 32'd8192;
assign factor_real[5] = -32'd3135;
assign factor_imag[5] = 32'd7568;
assign factor_real[6] = -32'd5793;
assign factor_imag[6] = 32'd5793;
assign factor_real[7] = -32'd7568;
assign factor_imag[7] = 32'd3135;
butter_2 ButtL1_N1(
.clk (clk ),
.rst (rst ),
.butt2_real0(butt16_real0 ),
.butt2_imag0(butt16_imag0 ),
.butt2_real1(butt16_real8 ),
.butt2_imag1(butt16_imag8 ),
.factor_real(factor_real[0]),
.factor_imag(factor_imag[0]),
.y0_real (L1_real[0] ),
.y0_imag (L1_imag[0] ),
.y1_real (L1_real[8] ),
.y1_imag (L1_imag[8] )
);
butter_2 ButtL1_N2(
.clk (clk ),
.rst (rst ),
.butt2_real0(butt16_real4 ),
.butt2_imag0(butt16_imag4 ),
.butt2_real1(butt16_real12 ),
.butt2_imag1(butt16_imag12 ),
.factor_real(factor_real[1]),
.factor_imag(factor_imag[1]),
.y0_real (L1_real[4] ),
.y0_imag (L1_imag[4] ),
.y1_real (L1_real[12] ),
.y1_imag (L1_imag[12] )
);
butter_2 ButtL1_N3(
.clk (clk ),
.rst (rst ),
.butt2_real0(butt16_real2 ),
.butt2_imag0(butt16_imag2 ),
.butt2_real1(butt16_real10 ),
.butt2_imag1(butt16_imag10 ),
.factor_real(factor_real[2]),
.factor_imag(factor_imag[2]),
.y0_real (L1_real[2] ),
.y0_imag (L1_imag[2] ),
.y1_real (L1_real[10] ),
.y1_imag (L1_imag[10] )
);
butter_2 ButtL1_N4(
.clk (clk ),
.rst (rst ),
.butt2_real0(butt16_real6 ),
.butt2_imag0(butt16_imag6 ),
.butt2_real1(butt16_real14 ),
.butt2_imag1(butt16_imag14 ),
.factor_real(factor_real[3]),
.factor_imag(factor_imag[3]),
.y0_real (L1_real[6] ),
.y0_imag (L1_imag[6] ),
.y1_real (L1_real[14] ),
.y1_imag (L1_imag[14] )
);
butter_2 ButtL1_N5(
.clk (clk ),
.rst (rst ),
.butt2_real0(butt16_real1 ),
.butt2_imag0(butt16_imag1 ),
.butt2_real1(butt16_real9 ),
.butt2_imag1(butt16_imag9 ),
.factor_real(factor_real[4]),
.factor_imag(factor_imag[4]),
.y0_real (L1_real[1] ),
.y0_imag (L1_imag[1] ),
.y1_real (L1_real[9] ),
.y1_imag (L1_imag[9] )
);
butter_2 ButtL1_N6(
.clk (clk ),
.rst (rst ),
.butt2_real0(butt16_real5 ),
.butt2_imag0(butt16_imag5 ),
.butt2_real1(butt16_real13 ),
.butt2_imag1(butt16_imag13 ),
.factor_real(factor_real[5]),
.factor_imag(factor_imag[5]),
.y0_real (L1_real[5] ),
.y0_imag (L1_imag[5] ),
.y1_real (L1_real[13] ),
.y1_imag (L1_imag[13] )
);
butter_2 ButtL1_N7(
.clk (clk ),
.rst (rst ),
.butt2_real0(butt16_real3 ),
.butt2_imag0(butt16_imag3 ),
.butt2_real1(butt16_real11 ),
.butt2_imag1(butt16_imag11 ),
.factor_real(factor_real[6]),
.factor_imag(factor_imag[6]),
.y0_real (L1_real[3] ),
.y0_imag (L1_imag[3] ),
.y1_real (L1_real[11] ),
.y1_imag (L1_imag[11] )
);
butter_2 ButtL1_N8(
.clk (clk ),
.rst (rst ),
.butt2_real0(butt16_real7 ),
.butt2_imag0(butt16_imag7 ),
.butt2_real1(butt16_real15 ),
.butt2_imag1(butt16_imag15 ),
.factor_real(factor_real[7]),
.factor_imag(factor_imag[7]),
.y0_real (L1_real[7] ),
.y0_imag (L1_imag[7] ),
.y1_real (L1_real[15] ),
.y1_imag (L1_imag[15] )
);
butter_2 ButtL2_1_N1(
.clk (clk ),
.rst (rst ),
.butt2_real0(L1_real[0] ),
.butt2_imag0(L1_imag[0] ),
.butt2_real1(L1_real[4] ),
.butt2_imag1(L1_imag[4] ),
.factor_real(factor_real[0]),
.factor_imag(factor_imag[0]),
.y0_real (L2_real[0] ),
.y0_imag (L2_imag[0] ),
.y1_real (L2_real[4] ),
.y1_imag (L2_imag[4] )
);
butter_2 ButtL2_2_N1(
.clk (clk ),
.rst (rst ),
.butt2_real0(L1_real[8] ),
.butt2_imag0(L1_imag[8] ),
.butt2_real1(L1_real[12] ),
.butt2_imag1(L1_imag[12] ),
.factor_real(factor_real[0]),
.factor_imag(factor_imag[0]),
.y0_real (L2_real[8] ),
.y0_imag (L2_imag[8] ),
.y1_real (L2_real[12] ),
.y1_imag (L2_imag[12] )
);
butter_2 ButtL2_1_N2(
.clk (clk ),
.rst (rst ),
.butt2_real0(L1_real[2] ),
.butt2_imag0(L1_imag[2] ),
.butt2_real1(L1_real[6] ),
.butt2_imag1(L1_imag[6] ),
.factor_real(factor_real[2]),
.factor_imag(factor_imag[2]),
.y0_real (L2_real[2] ),
.y0_imag (L2_imag[2] ),
.y1_real (L2_real[6] ),
.y1_imag (L2_imag[6] )
);
butter_2 ButtL2_2_N2(
.clk (clk ),
.rst (rst ),
.butt2_real0(L1_real[10] ),
.butt2_imag0(L1_imag[10] ),
.butt2_real1(L1_real[14] ),
.butt2_imag1(L1_imag[14] ),
.factor_real(factor_real[2]),
.factor_imag(factor_imag[2]),
.y0_real (L2_real[10] ),
.y0_imag (L2_imag[10] ),
.y1_real (L2_real[14] ),
.y1_imag (L2_imag[14] )
);
butter_2 ButtL2_1_N3(
.clk (clk ),
.rst (rst ),
.butt2_real0(L1_real[1] ),
.butt2_imag0(L1_imag[1] ),
.butt2_real1(L1_real[5] ),
.butt2_imag1(L1_imag[5] ),
.factor_real(factor_real[4]),
.factor_imag(factor_imag[4]),
.y0_real (L2_real[1] ),
.y0_imag (L2_imag[1] ),
.y1_real (L2_real[5] ),
.y1_imag (L2_imag[5] )
);
butter_2 ButtL2_2_N3(
.clk (clk ),
.rst (rst ),
.butt2_real0(L1_real[9] ),
.butt2_imag0(L1_imag[9] ),
.butt2_real1(L1_real[13] ),
.butt2_imag1(L1_imag[13] ),
.factor_real(factor_real[4]),
.factor_imag(factor_imag[4]),
.y0_real (L2_real[9] ),
.y0_imag (L2_imag[9] ),
.y1_real (L2_real[13] ),
.y1_imag (L2_imag[13] )
);
butter_2 ButtL2_1_N4(
.clk (clk ),
.rst (rst ),
.butt2_real0(L1_real[3] ),
.butt2_imag0(L1_imag[3] ),
.butt2_real1(L1_real[7] ),
.butt2_imag1(L1_imag[7] ),
.factor_real(factor_real[6]),
.factor_imag(factor_imag[6]),
.y0_real (L2_real[3] ),
.y0_imag (L2_imag[3] ),
.y1_real (L2_real[7] ),
.y1_imag (L2_imag[7] )
);
butter_2 ButtL2_2_N4(
.clk (clk ),
.rst (rst ),
.butt2_real0(L1_real[11] ),
.butt2_imag0(L1_imag[11] ),
.butt2_real1(L1_real[15] ),
.butt2_imag1(L1_imag[15] ),
.factor_real(factor_real[6]),
.factor_imag(factor_imag[6]),
.y0_real (L2_real[11] ),
.y0_imag (L2_imag[11] ),
.y1_real (L2_real[15] ),
.y1_imag (L2_imag[15] )
);
butter_2 ButtL3_1_N1(
.clk (clk ),
.rst (rst ),
.butt2_real0(L2_real[0] ),
.butt2_imag0(L2_imag[0] ),
.butt2_real1(L2_real[2] ),
.butt2_imag1(L2_imag[2] ),
.factor_real(factor_real[0]),
.factor_imag(factor_imag[0]),
.y0_real (L3_real[0] ),
.y0_imag (L3_imag[0] ),
.y1_real (L3_real[2] ),
.y1_imag (L3_imag[2] )
);
butter_2 ButtL3_2_N1(
.clk (clk ),
.rst (rst ),
.butt2_real0(L2_real[4] ),
.butt2_imag0(L2_imag[4] ),
.butt2_real1(L2_real[6] ),
.butt2_imag1(L2_imag[6] ),
.factor_real(factor_real[0]),
.factor_imag(factor_imag[0]),
.y0_real (L3_real[4] ),
.y0_imag (L3_imag[4] ),
.y1_real (L3_real[6] ),
.y1_imag (L3_imag[6] )
);
butter_2 ButtL3_3_N1(
.clk (clk ),
.rst (rst ),
.butt2_real0(L2_real[8] ),
.butt2_imag0(L2_imag[8] ),
.butt2_real1(L2_real[10] ),
.butt2_imag1(L2_imag[10] ),
.factor_real(factor_real[0]),
.factor_imag(factor_imag[0]),
.y0_real (L3_real[8] ),
.y0_imag (L3_imag[8] ),
.y1_real (L3_real[10] ),
.y1_imag (L3_imag[10] )
);
butter_2 ButtL3_4_N1(
.clk (clk ),
.rst (rst ),
.butt2_real0(L2_real[12] ),
.butt2_imag0(L2_imag[12] ),
.butt2_real1(L2_real[14] ),
.butt2_imag1(L2_imag[14] ),
.factor_real(factor_real[0]),
.factor_imag(factor_imag[0]),
.y0_real (L3_real[12] ),
.y0_imag (L3_imag[12] ),
.y1_real (L3_real[14] ),
.y1_imag (L3_imag[14] )
);
butter_2 ButtL3_1_N2(
.clk (clk ),
.rst (rst ),
.butt2_real0(L2_real[1] ),
.butt2_imag0(L2_imag[1] ),
.butt2_real1(L2_real[3] ),
.butt2_imag1(L2_imag[3] ),
.factor_real(factor_real[4]),
.factor_imag(factor_imag[4]),
.y0_real (L3_real[1] ),
.y0_imag (L3_imag[1] ),
.y1_real (L3_real[3] ),
.y1_imag (L3_imag[3] )
);
butter_2 ButtL3_2_N2(
.clk (clk ),
.rst (rst ),
.butt2_real0(L2_real[5] ),
.butt2_imag0(L2_imag[5] ),
.butt2_real1(L2_real[7] ),
.butt2_imag1(L2_imag[7] ),
.factor_real(factor_real[4]),
.factor_imag(factor_imag[4]),
.y0_real (L3_real[5] ),
.y0_imag (L3_imag[5] ),
.y1_real (L3_real[7] ),
.y1_imag (L3_imag[7] )
);
butter_2 ButtL3_3_N2(
.clk (clk ),
.rst (rst ),
.butt2_real0(L2_real[9] ),
.butt2_imag0(L2_imag[9] ),
.butt2_real1(L2_real[11] ),
.butt2_imag1(L2_imag[11] ),
.factor_real(factor_real[4]),
.factor_imag(factor_imag[4]),
.y0_real (L3_real[9] ),
.y0_imag (L3_imag[9] ),
.y1_real (L3_real[11] ),
.y1_imag (L3_imag[11] )
);
butter_2 ButtL3_4_N2(
.clk (clk ),
.rst (rst ),
.butt2_real0(L2_real[13] ),
.butt2_imag0(L2_imag[13] ),
.butt2_real1(L2_real[15] ),
.butt2_imag1(L2_imag[15] ),
.factor_real(factor_real[4]),
.factor_imag(factor_imag[4]),
.y0_real (L3_real[13] ),
.y0_imag (L3_imag[13] ),
.y1_real (L3_real[15] ),
.y1_imag (L3_imag[15] )
);
butter_2 ButtL4_1_N1(
.clk (clk ),
.rst (rst ),
.butt2_real0(L3_real[0] ),
.butt2_imag0(L3_imag[0] ),
.butt2_real1(L3_real[1] ),
.butt2_imag1(L3_imag[1] ),
.factor_real(factor_real[0]),
.factor_imag(factor_imag[0]),
.y0_real (L4_real[0] ),
.y0_imag (L4_imag[0] ),
.y1_real (L4_real[1] ),
.y1_imag (L4_imag[1] )
);
butter_2 ButtL4_2_N1(
.clk (clk ),
.rst (rst ),
.butt2_real0(L3_real[2] ),
.butt2_imag0(L3_imag[2] ),
.butt2_real1(L3_real[3] ),
.butt2_imag1(L3_imag[3] ),
.factor_real(factor_real[0]),
.factor_imag(factor_imag[0]),
.y0_real (L4_real[2] ),
.y0_imag (L4_imag[2] ),
.y1_real (L4_real[3] ),
.y1_imag (L4_imag[3] )
);
butter_2 ButtL4_3_N1(
.clk (clk ),
.rst (rst ),
.butt2_real0(L3_real[4] ),
.butt2_imag0(L3_imag[4] ),
.butt2_real1(L3_real[5] ),
.butt2_imag1(L3_imag[5] ),
.factor_real(factor_real[0]),
.factor_imag(factor_imag[0]),
.y0_real (L4_real[4] ),
.y0_imag (L4_imag[4] ),
.y1_real (L4_real[5] ),
.y1_imag (L4_imag[5] )
);
butter_2 ButtL4_4_N1(
.clk (clk ),
.rst (rst ),
.butt2_real0(L3_real[6] ),
.butt2_imag0(L3_imag[6] ),
.butt2_real1(L3_real[7] ),
.butt2_imag1(L3_imag[7] ),
.factor_real(factor_real[0]),
.factor_imag(factor_imag[0]),
.y0_real (L4_real[6] ),
.y0_imag (L4_imag[6] ),
.y1_real (L4_real[7] ),
.y1_imag (L4_imag[7] )
);
butter_2 ButtL4_5_N1(
.clk (clk ),
.rst (rst ),
.butt2_real0(L3_real[8] ),
.butt2_imag0(L3_imag[8] ),
.butt2_real1(L3_real[9] ),
.butt2_imag1(L3_imag[9] ),
.factor_real(factor_real[0]),
.factor_imag(factor_imag[0]),
.y0_real (L4_real[8] ),
.y0_imag (L4_imag[8] ),
.y1_real (L4_real[9] ),
.y1_imag (L4_imag[9] )
);
butter_2 ButtL4_6_N1(
.clk (clk ),
.rst (rst ),
.butt2_real0(L3_real[10] ),
.butt2_imag0(L3_imag[10] ),
.butt2_real1(L3_real[11] ),
.butt2_imag1(L3_imag[11] ),
.factor_real(factor_real[0]),
.factor_imag(factor_imag[0]),
.y0_real (L4_real[10] ),
.y0_imag (L4_imag[10] ),
.y1_real (L4_real[11] ),
.y1_imag (L4_imag[11] )
);
butter_2 ButtL4_7_N1(
.clk (clk ),
.rst (rst ),
.butt2_real0(L3_real[12] ),
.butt2_imag0(L3_imag[12] ),
.butt2_real1(L3_real[13] ),
.butt2_imag1(L3_imag[13] ),
.factor_real(factor_real[0]),
.factor_imag(factor_imag[0]),
.y0_real (L4_real[12] ),
.y0_imag (L4_imag[12] ),
.y1_real (L4_real[13] ),
.y1_imag (L4_imag[13] )
);
butter_2 ButtL4_8_N1(
.clk (clk ),
.rst (rst ),
.butt2_real0(L3_real[14] ),
.butt2_imag0(L3_imag[14] ),
.butt2_real1(L3_real[15] ),
.butt2_imag1(L3_imag[15] ),
.factor_real(factor_real[0]),
.factor_imag(factor_imag[0]),
.y0_real (L4_real[14] ),
.y0_imag (L4_imag[14] ),
.y1_real (L4_real[15] ),
.y1_imag (L4_imag[15] )
);
assign y_real0 = L4_real[0];
assign y_imag0 = L4_imag[0];
assign y_real1 = L4_real[8];
assign y_imag1 = L4_imag[8];
assign y_real2 = L4_real[4];
assign y_imag2 = L4_imag[4];
assign y_real3 = L4_real[12];
assign y_imag3 = L4_imag[12];
assign y_real4 = L4_real[2];
assign y_imag4 = L4_imag[2];
assign y_real5 = L4_real[10];
assign y_imag5 = L4_imag[10];
assign y_real6 = L4_real[6];
assign y_imag6 = L4_imag[6];
assign y_real7 = L4_real[14];
assign y_imag7 = L4_imag[14];
assign y_real8 = L4_real[1];
assign y_imag8 = L4_imag[1];
assign y_real9 = L4_real[9];
assign y_imag9 = L4_imag[9];
assign y_real10 = L4_real[5];
assign y_imag10 = L4_imag[5];
assign y_real11 = L4_real[13];
assign y_imag11 = L4_imag[13];
assign y_real12 = L4_real[3];
assign y_imag12 = L4_imag[3];
assign y_real13 = L4_real[11];
assign y_imag13 = L4_imag[11];
assign y_real14 = L4_real[7];
assign y_imag14 = L4_imag[7];
assign y_real15 = L4_real[15];
assign y_imag15 = L4_imag[15];
endmodule
一周热门 更多>