Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21611 Discussions

find mean and standard deviation in vhdl

Altera_Forum
Honored Contributor II
2,163 Views

hi all 

i want a vhdl code to calculate the average from input data.  

and another for standard deviation. 

thanks for advance .
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
1,216 Views

What have you got so far? What problems do you have?

0 Kudos
Altera_Forum
Honored Contributor II
1,216 Views

i have a top level design and i want to take the output from it and save on register or ram then calculate their mean and std dev.

0 Kudos
Altera_Forum
Honored Contributor II
1,216 Views

sounds plausible - what exactly are you stuck with>?

0 Kudos
Altera_Forum
Honored Contributor II
1,216 Views

i am stuck with floating point and how i can represent it in vhdl code ,i.e the result from division is floating Numbers how i can overcome it and then i can make avg.

0 Kudos
Altera_Forum
Honored Contributor II
1,216 Views

If the inputs are two integers, the result from any arithmatic will be fixed point, not floating point. Fixed point is just an integer with a 2^n offset 

You havent specific anything about the system - how many samples to average? where the values come from, what the number sizes are? you havent even posted any code that even attempts to do the averaging yet.
0 Kudos
Reply