Forum Discussion
Altera_Forum
Honored Contributor
14 years agoHow to use multiple megafunctions
Hi, I want to create a program where it reads in some values, divide the values by a certain coefficient, multiple them by another coefficient and then finally output them. I read in the v...
Altera_Forum
Honored Contributor
14 years agoWithout seeing your actual design, my guess is you are not taking into account the dynamic range of the values.
IE If you are considering the initial numbers as integers, but the results of the divide are only fractional, you'll get a result of zero plus a remainder.. If you are only using the resultant register in the multiply your answer will be zero. If you have control over the divide, in that you can limit the dividend to power's of 2, I would highly recommend you just use a programmable shift. Pete