I want to implement HA (half Adder), and I have a problem. When I click simulate, it displays this warning:
Warning: Instantiation depth of '/TM_HA/HA/HA/HA .....This might indicate a recursive instantiation.
I don't know what's going on.
HA.v
`timescale 1ns/1ns
module HA(a,b,c,sum,cout);
input a,b,c;
output sum,cout;
wire e1,e2,e3;
xor(e1,a,b);
and(e2,a,b);
and(e3,e1,c);
xor(sum,e1,c);
or(cout,e3,e2);
endmodule
TM_HA.v
`timescale 1ns/1ns
module TM_HA;
reg A,B,Cin;
wire Sum,Cout;
TM_HA HA(.a(A), .b(B), .c(Cin), .sum(Sum), .cout(Cout));
parameter t = 200;
initial
begin
#(2*t)
A = 1'b0;
B = 1'b0;
Cin = 1'b0;
#t
A = 1'b0;
B = 1'b0;
Cin = 1'b1;
....
#t
$stop;
end
endmodule