We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for
Did you mean:
Highlighted
1,342 Views
Registered: ‎01-09-2011

## Reciprocal of fixed point number

I see Xilinx Divider generator IP core does integer division. Any solution available for finding reciprocal of fixed point numbers ?

1 Solution

Accepted Solutions
Scholar
1,551 Views
Registered: ‎03-22-2016

## Re: Reciprocal of fixed point number

@sridar-s The truth is, fixed point numbers are integers. You just use the decimal information to convert from/to a string representation. The rest is all integer algebra.

Fixed point division is integer division, there's not much to do about it.

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
4 Replies
Scholar
1,552 Views
Registered: ‎03-22-2016

## Re: Reciprocal of fixed point number

@sridar-s The truth is, fixed point numbers are integers. You just use the decimal information to convert from/to a string representation. The rest is all integer algebra.

Fixed point division is integer division, there's not much to do about it.

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
Newbie
536 Views
Registered: ‎08-24-2019

## Re: Reciprocal of fixed point number

According to your answer: "Fixed point division is integer division, there's not much to do about it."
I think you're wrong.
Finding the arithmetic reciprocal is a bit simpler than dividing, because the value of the dividend in the first case is predetermined, i.e. equal to 1.0 (in the interpretation of integers as fixed point values).
It follows that the hardware implementation of the inverse arithmetic determination should be somewhat simpler, i.e. use less hardware resources and determine the result in a smaller number of cycles.
So, in my opinion, THERE IS something important to do here, i.e. adding the appropriate Core IP.

Scholar
528 Views
Registered: ‎04-26-2015

## Re: Reciprocal of fixed point number

@andrzejprzybyl That's true, but the synthesis tools are very good at logic optimization. I strongly suspect that if you just tie the dividend input to a constant value, they'll happily optimize away a lot of the block and produce hardware that looks very much like a purpose-built reciprocal calculator.

Teacher
481 Views
Registered: ‎07-09-2009

## Re: Reciprocal of fixed point number

how big is the number ?

how oftern does it change ?

If its defined at compile / synthesis , then you can do it for free as a constant.

If its say 16 bits or less , then use a Look Up table in a BRAM

If it changes slowly, use a recursive divide, as you would  on paper