I am working on a function that takes in a signal and adds it into a vector.
Once enough signals have been added, in my case 4, then I loop through the vector and add it to an integer variable in my process.
I am having trouble converting the individual elements into integers.
I tried using to_integer(unsigned(myVector)), but this was a binary to decimal conversion.
I just want it so that when i loop through my vector like this:
for i in 0 to myVector'length loop
Sum := Sum + to_integer(myVector(i));
end loop;
that a bit value of 1 or 0 gets converted to a 1 or 0 that I can use to add to my sum.
Any ideas?
Thanks
PS - myVector is a signal, Sum is an integer variable in my process. If there is no simple way, how else can I do this?