Forum Discussion
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- regarding you code about register how i can find index in vhdl code. --- Quote End --- The index of register would be the loop
for i in 0 to n-1 loop
for j in 0 to n-1 loop
if s1_shift(i) = s2_shift(j) then
d(i) <= j-i;
end if;
end loop;
end loop;
you will get d(0) ~ d(n-1) as distance then you compute it further you need to get the type conversion right and test the code idea.