Forum Discussion
Altera_Forum
Honored Contributor
12 years agoHow to measure distance between two data
really i have a problem for measure the distance between these data as the following.could i can make it in vhdl from enter this data to vhdl to measure distance between them. d(s1,s2)=(1+1+0+1+1)...
Altera_Forum
Honored Contributor
12 years agoif you want to use ram then use two rams one for s1 and one for s2 then subtract addresses without the need for loop
--- Quote End --- actually i use dual port ram for s1 and s2 and make this code if data_a = data_b then distance <= addr_a - addr_b; end if; the big problem is if and only if data_a = data_b at the same clock cycle not for all data index ,you understand me