I have a file something similar to
module AB(A,B,Out); input A,B; output Out; wire Out; assign Out = A & B; endmodule
I need to use N number of these calculations. those. has a = 1001; b = 0001, I need to do something like bitwise AND, and I have N bits.
I used it as an instance:
op[0] = a[0] & b[0]; op[1] = a[1] & b[1]; op[2] = a[2] & b[2]; op[3] = a[3] & b[3]; op[4] = a[4] & b[4];
When I try to do this with index i, I have:
AB g(a[i],b[i],Op[i]) for i = 0 to N-1.
If I do, he says that AB is not declared.
It's impossible? If so, what is the alternative?
source share