Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

find mean and standard deviation in vhdl

hi all

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

and another for standard deviation.

thanks for advance .

5 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.