Comparison
The FPU implements the following floating point comparisons:
•
compare less-than, fcmp.lt
•
compare equal, fcmp.eq
•
compare less-or-equal, fcmp.le
•
compare greater-than, fcmp.gt
•
compare not-equal, fcmp.ne
•
compare greater-or-equal, fcmp.ge
•
compare unordered, fcmp.un (used for NaN)
Conversion
The FPU implements the following conversions (available if
•
convert from signed integer to floating point, flt
•
convert from floating point to signed integer, fint
Exceptions
The floating point unit uses the regular hardware exception mechanism in MicroBlaze.
When enabled, exceptions are thrown for all the IEEE standard conditions: underflow,
overflow, divide-by-zero, and illegal operation, as well as for the MicroBlaze specific
exception: denormalized operand error.
A floating point exception inhibits the write to the destination register (Rd). This allows a
floating point exception handler to operate on the uncorrupted register file.
Software Support
The SDK compiler system, based on GCC, provides support for the Floating Point Unit
compliant with the MicroBlaze API. Compiler flags are automatically added to the GCC
command line based on the type of FPU present in the system, when using SDK.
All double-precision operations are emulated in software. Be aware that the xil_printf()
function does not support floating-point output. The standard C library printf() and related
functions do support floating-point output, but will increase the program code size.
MicroBlaze Processor Reference Guide
UG984 (v2016.2) June 8, 2016
UG984 (v2016.1) April 6, 2016
www.xilinx.com
Chapter 2: MicroBlaze Architecture
C_USE_FPU = 2, EXTENDED
Send Feedback
):
84
Need help?
Do you have a question about the MicroBlaze and is the answer not in the manual?
Questions and answers