1. Introduction
In order to operate the Nios® II processor, it must first be booted. It supports two boot methods: Boot Copier and Execute in Place (XIP).
And, it supports the following boot memory devices:
- User Flash Memory (UFM)
- EPCS/EPCQ/EPCQA
- QSPI Flash
- CFI Flash
- On Chip RAM
There are 9 types of Boot Option, depending on the combination of boot method and boot memory. (For a breakdown of the 9 options, see "3. Introduction of each Boot Option").
This article is a summary of the 9 Boot Option types and their settings.
2. Types of Boot Methods
The following Boot methods are available when you boot Nios® II.
- Boot Copier
- Execute in Place (XIP)
The advantages of each method are shown in Table 1.
[Table 1] Advantages and disadvantages of Boot Copier and XIP
| Boot Method | Advantages | Disadvantages |
| Boot Copier |
- Higher processing performance compared to XIP - Flexibility by editing Boot Copier |
- Requires RAM space to deploy application code |
| XIP |
- RAM space required to deploy application code is reduced. - Immediate startup is possible. |
- Slow processing time |
About Boot Copier
Boot Copier is a method to deploy and execute the Application code in On-Chip RAM or External RAM. As an example, we will explain how to use Intel® MAX® 10 FPGA.
After saving the Application code in MAX® 10 UFM and releasing reset, Nios® II will be executed by the following Boot Copier flow.
1) Release the reset of Nios® II
2) Nios® II executes Boot Copier on UFM
3) Application code is copied to On Chip RAM
4) Nios® II executes Application code on On Chip RAM
[Figure 1] Boot Copier flow in MAX® 10
The advantage of using Boot Copier is that the processing performance can be higher than that of XIP because the Application code is executed in On Chip RAM. However, since it requires internal RAM for execution, the memory resource requirement inside the FPGA is larger than that of the XIP.
As described in the reference material, the Boot Copier can be customized to compress the Application code to save memory space, or to prepare multiple Application codes and switch between them for execution, although the hurdle is slightly higher because the Boot Copier is not provided by the manufacturer as standard.
<Reference> Embedded Design Handbook > 5.3. Alternative Nios II Boot Methods
About Execute in Place (XIP)
XIP is a method to save the Application code in Boot Memory and execute Nios® II on Boot Memory without using On-Chip RAM or External RAM.
As an example, we explain the case of using MAX® 10.
The Application code is saved in the UFM of MAX® 10, and Nios® II is executed by the following XIP flow when the reset is released.
(1) Release the reset of Nios® II
(2) Application code on UFM is executed by Nios® II on UFM
[Figure 2] XIP flow in MAX® 10
The advantage of using XIP is that it saves RAM for execution, and since there is no need to copy the code to RAM, it can be started immediately.
Please consider which is more suitable for your needs after understanding the features of Boot Copier and XIP.
The Run As / Debug As procedure for XIP configuration is different from that of Boot Copier, so please refer to the following contents.
3. Introduction of each Boot Option
As explained above, there are 9 types of Boot Option to boot Nios® II depending on the combination of Boot method and Boot Memory, as shown in Table 2.
Please refer to the links in Table 2 for an overview of each type of Boot Option, as contents are provided for each Boot Memory type.
[Table 2] Boot Option Types
|
Supported Boot Memory |
Boot Option Type |
Application Code Storage Location |
Application Execution Location |
Boot Copier |
Embedded |
|
On Chip Flash (UFM) - (In Japanese) (MAX® 10 only) |
XIP from UFM | UFM |
UFM (XIP) + On chip RAM / External RAM (when using alt_load()) |
alt_load() function | |
| Execution via Boot Copier from UFM |
UFM | On chip RAM / External RAM |
Memcpy-based boot copier |
||
|
EPCQ Flash |
XIP from EPCQ Flash |
EPCQ Flash |
EPCQ Flash (XIP) + On chip RAM / External RAM (when using alt_load()) |
alt_load() function | User Guide |
| Execution via Boot Copier from EPCQ Flash | EPCQ Flash | On chip RAM / External RAM |
Memcpy-based boot copier |
||
|
QSPI Flash |
XIP from QSPI Flash |
QSPI Fash |
QSPI Flash (XIP) + On chip RAM / External RAM (when using alt_load()) |
alt_load() function | User Guide |
| Execution via Boot Copier from QSPI Flash | QSPI Fash | On chip RAM / External RAM |
Memcpy-based boot copier |
||
| XIP from On chip RAM |
On chip RAM | On chip RAM | Without Boot Copier | User Guide | |
|
CFI Flash |
XIP from CFI Flash |
CFI Flash |
CFI Fash (XIP) + On chip RAM / External RAM (when using alt_load()) |
alt_load() function | User Guide |
| Execution via Boot Copier from CFI Flash |
CFI Flash | On chip RAM / Extenal RAM |
Memcpy-based boot copier |
Please refer to the following contents for Boot method using Generic Serial Flash Interface Intel® FPGA IP.
Nios Nios® II Boot Option ~ Booting with Generic Serial Flash Interface ~ - (In Japanese)
Please refer to the last page of the Nios® II Configuration and Booting Solutions section of the following reference document for a summary of the various settings.
<Reference
Recommendations
We have prepared a "Nios® II Summary Page - (In Japanese)" that summarizes various information on Nios® II. Please refer to this page as well, as it is full of useful information in addition to this article.