UPGRADE YOUR BROWSER

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 
Search instead for 
Did you mean: 
Adventurer
Adventurer
1,354 Views
Registered: ‎01-09-2011

Reciprocal of fixed point number

Jump to solution

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

0 Kudos
1 Solution

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

Re: Reciprocal of fixed point number

Jump to solution

@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.

View solution in original post

4 Replies
Scholar hbucher
Scholar
1,564 Views
Registered: ‎03-22-2016

Re: Reciprocal of fixed point number

Jump to solution

@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.

View solution in original post

548 Views
Registered: ‎08-24-2019

Re: Reciprocal of fixed point number

Jump to solution

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.

0 Kudos
Scholar u4223374
Scholar
540 Views
Registered: ‎04-26-2015

Re: Reciprocal of fixed point number

Jump to solution

@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.

0 Kudos
Teacher drjohnsmith
Teacher
493 Views
Registered: ‎07-09-2009

Re: Reciprocal of fixed point number

Jump to solution

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

 

 

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos