module halfadder(a,B,sum,carry);
input a,B;
output sum,carry;
always@(a,B)
begin
sum=a^B;
carry=a&B;
end
endmodule
For the above code, I am getting error:
: sum is not a valid l-value in tb_halfadder.ha.
: sum is declared here as wire.
: carry is not a valid l-value in tb_halfadder.ha.
: carry is declared here as wire.