Forum Discussion
Altera_Forum
Honored Contributor
14 years agoLPM_DIVIDE Megafunction
Hey guys, I posted something earlier here about NLMS on an FPGA. So far, I have the LMS working, but I need to perform a fixed point division to perform normalization. My question ...
Altera_Forum
Honored Contributor
14 years agoThanks for the reply rbugalho.
I understand the format of the quotient and remainder, but you really did confirm and clear up my understanding. The problem I'm having is how to conver the remainder and quotient back into Q4 form. For example, let's say you are dividing 5 by 2. You should get 2 for a quotient and 1 for the remainder. As a decimal this would be 2.5, or 0010.1000. The quotient would be 0101 and the remainder would be 0001.0000. The grade school way of doing the conversion would be to add 1/2 to the quotient to yield 0010.1000, or 2.5. But, again it introduces another divsion with the same problem.