基于分布式算法的FIR的VERILOG程序?
基于分布式算法的FIR的VERILOG程序? module FIR_Gaussian_Lowpass(Data_out,Data_in,clock,reset,test,result9);//8阶高斯低通FIR
parameter order = 8;
parameter word_size_in = 8;
parameter word_size_out = 2*word_size_in + 2;
parameter b0 = 8'd7;
parameter b1 = 8'd17;
parameter b2 = 8'd32;
parameter b3 = 8'd46;
parameter b4 = 8'd52;
parameter b5 = 8'd46;
parameter b6 = 8'd32;
parameter b7 = 8'd17;
parameter b8 = 8'd7;
parameter H = 1'b1,L = 1'b0;
output Data_out;
input Data_in;
input clock,reset;
reg Samples;
output test;
output result9;
integer k;
//multip mult1(.datain1(b0),.datain2(Data_in),.clock(clock),.result(Data_out1));
/*assign data_out = b0*Data_in
+b1*Samples
+b2*Samples
+b3*Samples
+b4*Samples
+b5*Samples
+b6*Samples
+b7*Samples
+b8*Samples;*/
/*assign data_out = result0
+result1
+result2
+result3
+result4
+result5
+result6
+result7
+result8;*/
adder16X1 (
data0x,data10x,
data11x,data12x,
data13x,data14x,
data15x,data1x,
data2x,data3x,
data4x,data5x,
data6x,data7x,
data8x,data9x,
result
);
adder add1 (.data0x(result0),.data1x(result1),
.data2x(result2),.data3x(result3),
.data4x(result4),.data5x(result5),
.data6x(result6),.data7x(result7),
.result(result9));
adder add2 (.data0x(result8),.data1x(result9),
.data2x(8'h00),.data3x(8'h00),
.data4x(8'h00),.data5x(8'h00),
.data6x(8'h00),.data7x(8'h00),
.result(result10));
assign test = {Samples,Samples,Samples,Samples,
Samples,Samples,Samples,Samples};
wire result0;
wire result1;
wire result2;
wire result3;
wire result4;
wire result5;
wire result6;
wire result7;
wire result8;
wire result9;
wire result10;
assign data_out = result9;
multiplex mult1(.dataa(b0),.datab(Data_in),.result(result0));
multiplex mult2(.dataa(b1),.datab(Samples),.result(result1));
multiplex mult3(.dataa(b2),.datab(Samples),.result(result2));
multiplex mult4(.dataa(b3),.datab(Samples),.result(result3));
multiplex mult5(.dataa(b4),.datab(Samples),.result(result4));
multiplex mult6(.dataa(b5),.datab(Samples),.result(result5));
multiplex mult7(.dataa(b6),.datab(Samples),.result(result6));
multiplex mult8(.dataa(b7),.datab(Samples),.result(result7));
multiplex mult9(.dataa(b8),.datab(Samples),.result(result8));
always @(posedge clock)
if(reset == H)
begin
/*for(k=1;k<=order;k=k+1)
Samples <= 0;*/
Samples <= 0;
Samples <= 0;
Samples <= 0;
Samples <= 0;
Samples <= 0;
Samples <= 0;
Samples <= 0;
Samples <= 0;
end
else
begin
Samples <= Data_in;
/*for(k=2;k<=order;k=k+1)
Samples <= Samples;*/
Samples <= Samples ;
Samples <= Samples ;
Samples <= Samples ;
Samples <= Samples ;
Samples <= Samples ;
Samples <= Samples ;
Samples <= Samples ;
end
endmodule 好厉害 哈 我哈哈 求分布式算法原理。。。谢谢 求分布式算法原理。。。谢谢 求分布式算法原理。。。谢谢 基于分布式算法的FIR的VERILOG程序? 基于分布式算法的FIR的VERILOG程序
页:
[1]