Can someone tell me the difference between the two processes?
Code:
process(A)
variable start : bit :='0';
begin
Start :='0';
For i in 0 to 3 loop
start := start or A(i);
end loop;
x <= Start;
end process;
Code:
process(A)
variable start : bit_vector(4 downto 0);
begin
start(0) :='0';
For i in 0 to 3 loop
start(i+1) := start(i) or A(i);
end loop;
x <= start(4);
end process;
From what i see these two give the same result, the first one uses a 1 bit start which stores the new result in each value of the loop,
the second one has a 4bit vector which stores the result to the bit on the left.
I don't know if there will be any difference in the gates used after fitting.