Visible to Intel only — GUID: lro1432145764151
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: lro1432145764151
Ixiasoft
6.6. Building the FPH2 Example Software
The Software Build Tools (SBT) are used to create Intel® HAL-based Board Support Packages (BSP) and application and library makefiles for embedded software running on a Nios II. These tools come in command-line and Eclipse GUI-based forms.
When these tools are used to generate a BSP for a Nios II with the FPH2 component connected to that Nios II, the sw.tcl file in the component causes the BSP and any applications or libraries that use that BSP to be aware of the presence of the FPH2. In particular, sw.tcl performs the following functions:
- Examines the system you created in Platform Designer, and determines the correct GCC flags for your floating point hardware.
- Creates makefile rules to pass the -mcustom-<operation> options to GCC, so it knows to use the available FPH2 operations instead of the software emulation code to implement the specified floating point operations.
- Creates makefile rules to pass the -fno-math-errno option to GCC, to eliminate the overhead of detecting NaN results and setting the errno variable for calls to sqrtf().
- Adds #define macro declarations to system.h for the newlib math library routines that GCC does not reliably replace with custom instructions. For more information, refer to "C Macros for round(), fmins(), and fmaxs()".
- Creates makefile rules to generate a correct version of newlib. Uses the GCC flags determined from your hardware system.
Note: If you modify your floating point hardware configuration, you must regenerate and rebuild your BSP to ensure that newlib is built correctly.