15.1 Nios II Processor and EDS New Features
Nios II Processor New Features
- The FPH2 has been enhanced to support exclusion of the sqrt() custom instruction. The sqrt() instruction is a look-up table based implementation and relies on a pre-populated FPGA memory, however for some MAX 10 device configurations, FPGA memory block initialisation is not supported; this means that this instruction will not function correctly for those configurations. In these cases the instruction can be manually omitted from the FPH2 module and the sqrt() operation will be performed correctly in software.
- For simplicity, the default name of the Gen2 cores in Qsys has been modified to omit the gen2 label, the register transfer level (RTL) name remains the same.
- The Qsys graphical user interface (GUI) for the Nios II vectored interrupt controller (VIC) has been modified; a widget has been added that allows selection of the number of pipeline stages used in the core. The default value is five cycles latency but with the new GUI option this can be reduced, although the penalty for this is a reduction in the fMAX of the VIC.
Nios II EDS New Features
- GCC has been upgraded to v4.9.2
GCC for Nios II v4.9.2 Release Notes
Code density and performance
Use of the -mgpopt=global setting is recommended as it generally deliver results with better code density *and* performance. (Note: this requires that everything is compiled with the same -Gn switch setting; use of -Gn is not generally recommended).
C++ code size reduction: -fno-exceptions
When a developer is using C++ but trying not to link in the (big) C++ exception-handling machinery nios2-elf-g++ will, in some cases, link in the exception-handling machinery where it is not actually required. This switch suppresses that behaviour, which results in a smaller code footprint for those situations.
Response to address 0x00 access: -fdelete-null-pointer-checks
Developers often have RAM at address 0x00 (== NULL pointer in gcc and most C compilers). From gcc 4.9 onwards, by default gcc detects attempts to read or write to address 0x00 and converts them to traps; typically in embedded/Nios II-based systems, these traps are not handled so the code will fail silently. This means that code that works when compiled with earlier versions of gcc could silently fail when compiled with gcc-4.9 (onwards).
In order to avoid this for Nios II this behaviour has been modified so that accesses to address 0x00 will work as expected for Nios II systems but there may be a slight negative effect on code performance. In Nios II systems that are known not to read/write RAM at address 0x00, use of the switch --fdelete-null-pointer-checks restores the original gcc behaviour and may provide a small performance boost.
Expansion of __builtin_trap
GCC now produces trap 3 instead of break 3 in the expansion of the __builtin_trap function and in other situations where a trap is emitted to indicate undefined runtime behaviour. This is for compliance with the Nios II ABI for Linux targets, which does not permit the use of the break instruction in user code.
Memory corruption bug fix
A bug in support for long pathnames on Windows hosts has been fixed that could lead to memory corruption, causing potential crashes and unpredictable behaviour.
GDB breakpoint instruction
GDB now uniformly uses trap 31 instead of a break instruction for software breakpoints. This is for consistency with the Nios II ABI for Linux targets.
For more information on gcc, see:
Embedded IP New Features
- The 16550 UART IP has been updated to add support for 9 bit data and sticky bit.
- A descriptor prefetcher capability has been added to the mSGDMA IP to support the ability to automatically fetch descriptors from memory.