Fixed-Point Square Root Calculator | Cypress Semiconductor
Fixed-Point Square Root Calculator
I fiddled with the Integer Square Root Calculator a little bit, and by modifying the underlying datapath algorithm slightly, was able to double the resolution of the calculated square root. I've called the new component a "Fixed-Point Square Root Calculator." Instead of a 32-bit integer resulting in a 16-bit integer square root, a 32-bit integer will now produce a 32-bit square root in Q16.16 format (16 integer bits and 16 fractional bits). The included datasheet has more info on how to use the fixed-point math. Here's a quick overview of the component:
8, 16, 24 & 32 bits.
In 32-bit mode, takes a 32-bit input and calculates a 32-bit fixed-point (Q16.16) square root in at most 220 cycles (slower than the Integer Square Root Calculator, but for twice the resolution!).
CPU-mode for easy firmware interaction, DMA-mode for HW-controlled, CPU-free operation.
220 cycles in 32-bit mode, 164 cycles in 24-bit mode, 108 cycles in 16-bit mode, and 52 cycles in 8-bit mode.