Forum Discussion
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- i can't do this code in memory like register i try but failed process(addr_a) begin for i in data_a'range loop for j in data_a'range loop if data_a(i) = data_b(j) then d <= addr_a - addr_b; end if ; distance <= d; end loop; end loop; --- Quote End --- The code I suggested was for shift register(not ram). even then you have to use d(i) not just d if you want to use ram then use two rams one for s1 and one for s2 then subtract addresses without the need for loop