-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added test case in sw/example to demonstrate floating point normalize… #528
Added test case in sw/example to demonstrate floating point normalize… #528
Conversation
…r time out bug. Fixed the bug by adding a float exponent trigger for the float to int and addsub sections. The fix detects whether the normalization step is larger than the destination width and resolve to a default if so
One of the core safety features, the multi-cycle instruction time-out, is set to 128 cycles. The root cause was determined by increasing the time to 256 cycles making FCVT.W*.S instructions pass and 512 cycles making FADD.S/FSUB.S instructions pass. The issue was discovered with various FPGA builds where the FPU instructions timed out running the floating point test. The issue was seen on build server machines running RHEL and Ubuntu with Vivado 2020.2, 2022.2, 2022.2.1. FPGAs built in a non-server machine using Ubuntu with Vivado 2022.2 does not expose this issue. The issue was root caused and determined to be a real issue. Applying the fix causes all FPGA build to pass. The corner test case demonstrates the issue for the afflicted instructions. For FCVT.W*.S the normalizer shift time for a positive exponent is equal to the size of the exponent. The result is a worst case shift time of 127 cycles (max. positive exponent). From the corner test the instructions fail from a positive exponent of 123 (0x250) and up. Which when adding the additional cycle delays in the FPU results in 128 cycles. For FADD.S and FSUB.S the cross normalizer shift time is equivalent to the difference between the two exponents. This results in a worst case shift time of 127 - (-126) or 253 cycles. This far exceeds the 128 cycle limit. |
Hey @mikaelsky! Thanks for this PR! Just let me try to recap this:
Correct so far? 😅 |
Correct. Sorry for my wordy comment :) |
This is really great! Thank you very much for fixing! 👍 |
…r time out bug. Fixed the bug by adding a float exponent trigger for the float to int and addsub sections. The fix detects whether the normalization step is larger than the destination width and resolve to a default if so