Visible to Intel only — GUID: lro1432062078885
Ixiasoft
1. Nios II Custom Instruction Overview
2. Custom Instruction Hardware Interface
3. Custom Instruction Software Interface
4. Design Example: Cyclic Redundancy Check
5. Introduction to Nios® II Floating Point Custom Instructions
6. Nios II Floating Point Hardware 2 Component
7. Nios® II Floating Point Hardware (FPH1) Component
8. Document Revision History for Nios II Custom Instruction User Guide
4.1.1. Setting up the Environment for the CRC Example Design
4.1.2. Opening the Component Editor
4.1.3. Specifying the Custom Instruction Component Type
4.1.4. Displaying the Custom Instruction Block Symbol
4.1.5. Adding the CRC Custom Instruction HDL Files
4.1.6. Configuring the Custom Instruction Parameter Type
4.1.7. Setting Up the CRC Custom Instruction Interfaces
4.1.8. Configuring the Custom Instruction Signal Type
4.1.9. Saving and Adding the CRC Custom Instruction
4.1.10. Generating and Compiling the CRC Example System
6.1. Overview of the Floating Point Hardware 2 Component
6.2. Floating Point Hardware 2 IEEE 754 Compliance
6.3. IEEE 754 Exception Conditions with FPH2
6.4. Floating Point Hardware 2 Operations
6.5. Building the FPH2 Example Hardware
6.6. Building the FPH2 Example Software
6.7. FPH2 Implementation of GCC Options
6.8. Nios II FPH2 and the Newlib Library
6.9. C Macros for round(), fmins(), and fmaxs()
Visible to Intel only — GUID: lro1432062078885
Ixiasoft
5.2.2. Floating Point Value Encoding
The table below shows how single-precision values are encoded across the 32-bit range from 0x0000_0000 to 0xffff_ffff. Single-precision floating point numbers have the following characteristics:
- Precision (ρ) = 24 bits (23 bits in FRAC plus one hidden bit)
- Radix (β) = 2
- emin = -126
- emax = 127
The most-significant bit of FRAC is 0 for signaling NaNs (sNaN) and 1 for quiet NaNs (qNaN).
Hexadecimal Value | Name | S | EXP | FRAC | Value (Decimal) |
---|---|---|---|---|---|
0x0000_0000 | +0 | 0 | 0x00 | 0x00_0000 | 0.0 |
0x0000_0001 | min pos subnormal | 0 | 0x00 | 0x00_0001 | 1.40129846e–45 (βemin-ρ+1 = 2-126-24+1 = 2-149) |
0x007f_ffff | max pos subnormal | 0 | 0x00 | 0x7f_ffff | 1.1754942e-38 |
0x0080_0000 | min pos normal | 0 | 0x01 | 0x00_0000 | 1.17549435e–38 (βemin = 2-126) |
0x3f80_0000 | 1 | 0 | 0x7f | 0x00_0000 | 1.0 (1.0x20) |
0x4000_0000 | 2 | 0 | 0x80 | 0x00_0000 | 2.0 (1.0x21) |
0x7f7f_ffff | max pos normal | 0 | 0xfe | 0x7f_ffff | 3.40282347e+38 ((β – β1- ρ) * 2emax = (2 – 21-24) * 2127 = (2 – 223) * 2127 |
0x7f80_0000 | +∞ | 0 | 0xff | 0x00_0000 | |
0x7f80_0001 | min sNaN (pos sign) | 0 | 0xff | 0x00_0001 | |
0x7fdf_ffff | max sNaN (pos sign) | 0 | 0xff | 0x3f_ffff | |
0x7fe0_0000 | min qNaN (pos sign) | 0 | 0xff | 0x40_0000 | |
0x7fff_ffff | max qNaN (pos sign) | 0 | 0xff | 0x7f_ffff | |
0x8000_0000 | -0 | 1 | 0x00 | 0x00_0000 | -0.0 |
0x8000_0001 | max neg subnormal | 1 | 0x00 | 0x00_0001 | -1.40129846e–45 |
0x807f_ffff | min neg subnormal | 1 | 0x00 | 0x7f_ffff | -1.1754942e-38 |
0x8080_0000 | max neg normal | 1 | 0x01 | 0x00_0000 | -1.17549435e–38 |
0xff7f_ffff | min neg normal | 1 | 0xfe | 0x7f_ffff | -3.40282347e+38 |
0xff80_0000 | -∞ | 1 | 0xff | 0x00_0000 | |
0xff80_0001 | max sNaN (neg sign) | 1 | 0xff | 0x00_0001 | |
0xffdf_ffff | min sNaN (neg sign) | 1 | 0xff | 0x3f_ffff | |
0xffe0_0000 | max qNaN (neg sign) | 1 | 0xff | 0x40_0000 | |
0xffff_ffff | min qNaN (neg sign) | 1 | 0xff | 0x7f_ffff |