Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Regular Contributor
jjhewitson
Posts: 67
Registered: ‎11-12-2009
0
Accepted Solution

Floating-point core not overflowing??

[ Edited ]

Hi,

 

Has anyone experieneced the floating-point core not behaving as specified with regards to overflow?

 

I've created a standard single precision add/sub core which behaves as expected for some numbers but in other respects not at all.

 

For example adding 20+56=76 //41A00000+42600000=42980000 (hex) --perfect.

 

However, when I'm tring to test the overflow detection it only seems to work if I add large numbers.

Adding 1 to the theoretical largest representable number won't overflow or equal infinity!?!?!?  (7F7FFFFF+3F800000 = 7F7FFFFF) !?!

 

Adding 1/2 the largest value to the largest value overflows and equals infinty as you'd expect as does adding 1/4 or 1/8th of the largest to itself too, but anything small, even 100+largest, doesn't overflow...?!?

 

What's going on here?

 

Thanks!

(Using ise13.2, V5SX95, I'm talking about isim simulations)

Moderator
viviany
Posts: 480
Registered: ‎05-14-2008
0

Re: Floating-point core not overflowing??

Questions about the core itself (e.g. function, performance, parameters and etc.) should go to the correspongding board for that core. The board for floating-point core is "Digital Signal Processing - IP and Algorithms". I'll move your message to that board.

 

Questions about using Coregen tool, Core generating issue should be posted on the Design Entry board.

 

Vivian

Regular Contributor
jjhewitson
Posts: 67
Registered: ‎11-12-2009
0

Re: Floating-point core not overflowing??

Hi,

 

Appologies, I see what's going on here now.

 

In case anyone else makes the same mistake;

 

The largest representable number in single precision is;

7F7FFFFF = 340282346638528859811704183484516925440

 

Adding 1 = 340282346638528859811704183484516925441, which if you convert to single precision floating point is also 7F7FFFFF....  

 

Unless the value I add is sufficiently large enough that it would cause a rounding to a larger number the core won't detect an overflow as is correct according to the IEEE754 standard.