Full Subtractor Dataflow
Full Subtractor Dataflow
Full Subtractor Dataflow
Test code:
module test3_v;
reg A,B,C;
wire Diff,Borrow;
half_subtractor_dataflow uut(
.A(A)
.B(B)
.C(C)
.Diff(Diff)
.Borrow(Borrow)
);
initial begin
A=0;
B=0;
C=0;
#100;
A=0;
B=0;
C=1;
#100;
A=0;
B=1;
C=0;
#100;
A=0;
B=1;
C=1;
#100;
A=1;
B=0;
C=0;
#100;
A=1;
B=0;
C=1;
#100;
A=1;
B=1;
C=0;
#100;
A=1;
B=1;
C=1;
#100;
end
endmodule