FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6359 Discussions

lpm divider output binary format

Altera_Forum
Honored Contributor II
977 Views

Is there an easy way to determine or predict the output fixed-point binary format of the lpm_divide function based on the formats of the inputs? I know if multiplying a Qm.n number (e.g. Q16.8 which has 16 integer bits & 8 fractional bits) by a Qp.q number, the output will be Q(m+p).(n+q), e.g. multiplying Q16.8 by Q4.8 will yield a Q20.16 output. For the divider, I used a numerator of Q24.8 and denomiator Q8.8 and it yielded a quotient in Q32.0 and remainder in Q8.8, but I had to determine that by trial & error. Someone know an easier way to know the formats in advance? 

Thanks, GMM
0 Kudos
0 Replies
Reply