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 ago --- Quote Start --- interfacing with PC is done commonly through nios. If you want a short cut then use realtime editable rams and update them with your new file. for that you need to instantiate rams and activate the realtime edit feature. for adding values of distance use accumulator(just feedback register). for each sum first clear it then sum up in the feedback loop till some 2^n samples so that at the end you truncate n LSBs and clear it for next update. --- Quote End --- my above note on truncation of n bits applies if you want the average. If you just want sum then read accumulator value at the end.