Design of 4-Bit Ripple Carry Adder Using Full adder:
module ripple_4adder(
input [3:0] a,
input [3:0] b,
input cin,
output [3:0] sum,
output carry );
wire [2:0]c;
fulladder
FA1(a[0],b[0],cin,sum[0],c[0]);
fulladder
FA2(a[1],b[1],c[0],sum[1],c[1]);
fulladder
FA3(a[2],b[2],c[1],sum[2],c[2]);
fulladder
FA4(a[3],b[3],c[2],sum[3],carry);
endmodule
Hint: For Module fulladder refer previous posts
No comments:
Post a Comment