Beruflich Dokumente
Kultur Dokumente
integer i,j;
begin
//all the partial products have been obtained and stored in a array of 8 X 8 matrix.
end
/*always@(posedge clock)
endmodule*/
always@(posedge clock)
s[431], s[415], s[398], s[380], s[361], s[341], s[320], s[298], s[275], s[252], s[230], s[209], s[189], s[170],
s[152],
s[135], s[119], s[104], s[90], s[77], s[65], s[54], s[44], s[35], s[27], s[20], s[14], s[9], s[5], s[2], s[0],
p[0][0]}; //p[0][0]=P0
endmodule
module FA(a,b,cin,sum,carry);
input a,b,cin;
output sum,carry;
reg T1,T2,T3,carry;
assign sum=a^b^cin;
begin
T1=a&b;
T2=a&cin;
T3=b&cin;
carry=T1|T2|T3;
end
endmodule
module HA(a,b,sum,carry);
input a,b;
output sum,carry;
assign sum=a^b;
assign carry=a&b;
endmodule