- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Floating-p oint core not overflowin g??
[ Edited ]
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-09-2011 01:20 PM - edited 11-09-2011 11:42 PM
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)
Solved! Go to Solution.
Re: Floating-p oint core not overflowin g??
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-09-2011 05:55 PM
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
Re: Floating-p oint core not overflowin g??
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-09-2011 11:47 PM
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.











