I have written verilog code for square root of a number which is parametrised. If the number of bits are even the code works.
If the number of bits are odd, the code divides the number of bits into groups of two starting from the right (LSB). The first iteration will select the group which has 1 bit starting from the left most bit.
I am using a counter to go through the required number of cycles. I do not understand how I should select the group of 1 bit for the first iteration, and 2 for the rest of the iterations.