0% found this document useful (0 votes)
16 views1 page

Neda

NEDA

Uploaded by

楊佳承
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views1 page

Neda

NEDA

Uploaded by

楊佳承
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

module NEDA(clk,

y,
a11,a12,a13,a14,a15,a16,a17,a18,
x11,x12,x13,x14,x15,x16,x17,x18
);
input clk;
input signed[15:0] a11,a12,a13,a14,a15,a16,a17,a18,
x11,x12,x13,x14,x15,x16,x17,x18
;
output signed[34:0] y;

wire signed [31:0] temp1,temp2,temp3,temp4,temp5,temp6,temp7,temp8;


reg signed[34:0] s_temp;
reg signed[27:0] s;
assign y=s;

z0 u0(.a(a11),.x(x11),.sum(temp1),.clk(clk));
z0 u1(.a(a12),.x(x12),.sum(temp2),.clk(clk));
z0 u2(.a(a13),.x(x13),.sum(temp3),.clk(clk));
z0 u3(.a(a14),.x(x14),.sum(temp4),.clk(clk));
z0 u4(.a(a15),.x(x15),.sum(temp5),.clk(clk));
z0 u5(.a(a16),.x(x16),.sum(temp6),.clk(clk));
z0 u6(.a(a17),.x(x17),.sum(temp7),.clk(clk));
z0 u7(.a(a18),.x(x18),.sum(temp8),.clk(clk));

always@(posedge clk)
begin
assign s_temp=(temp1+temp2+temp3+temp4+temp5+temp6+temp7+temp8)>>7;
assign s=s_temp;
end
endmodule

You might also like