Integer Square Root Calculator (in the UDBs) | Cypress Semiconductor
Integer Square Root Calculator (in the UDBs)
Over on the PSoC Sensei Blog, Brad has started posting about my implementation of an Integer Square Root Calculator using datapaths. Here is the component.
A quick overview:
8, 16, 24 & 32 bits.
In 32-bit mode, takes a 32-bit input and calculates a 16-bit square root in at most 114 clock cycles. Smaller widths are even faster.
CPU-mode for easy firmware interaction, DMA-mode for HW-controlled, CPU-free operation.
Even if you have no use for a hardware-based square-root calculator, I think this is another good example of just how flexible and powerful the PSoC datapaths are.