R
Roosta
Guest
Anyone know why you have to use IntA and IntB in this example (found
in Bhasker's book)
module NotEquals (A, B, Z)
input [0:3] A, B;
output Z;
reg Z;
always @ (A or B)
begin: DF_LABEL
integer IntA, IntB
IntA = A; <--- why is this a necessary step
IntB = B;
Z = IntA != IntB;
end
endmodule
Im interested in why you could not have omitted the whole integer
assignment, unless you have to explicity use the integer module
declaration to compare signed numbers. If so, then to compare
unsigned numbers, I guess you could omit it...
Thanks in advance.
in Bhasker's book)
module NotEquals (A, B, Z)
input [0:3] A, B;
output Z;
reg Z;
always @ (A or B)
begin: DF_LABEL
integer IntA, IntB
IntA = A; <--- why is this a necessary step
IntB = B;
Z = IntA != IntB;
end
endmodule
Im interested in why you could not have omitted the whole integer
assignment, unless you have to explicity use the integer module
declaration to compare signed numbers. If so, then to compare
unsigned numbers, I guess you could omit it...
Thanks in advance.