Embedded Design Handbook

ID 683689
Date 8/28/2023
Public
Document Table of Contents

4.2.3.2.1. System Initialization

The system initialization sequence begins when the system powers up. The initialization sequence steps for FPGA designs that contain a Nios® II processor are the following:

  1. Hardware reset event—The board receives a power-on reset signal, which resets the FPGA.
  2. FPGA configuration—The FPGA is programmed with a .sof file, from a specialized configuration memory or an external hardware master. The external hardware master can be a CPLD device or an external processor.
  3. System reset—The Platform Designer system, composed of one or more Nios® II processors and other peripherals, receives a hardware reset signal and enters the components’ combined reset state.
  4. Nios® II processor(s)—Each Nios® II processor jumps to its preconfigured reset address, and begins running instructions found at this address.
  5. Boot loader or program code—Depending on your system design, the reset address vector contains a packaged boot loader, called a boot image, or your application image. Use the boot loader if the application image must be copied from non-volatile memory to volatile memory for program execution. This case occurs, for example, if the program is stored in flash memory but runs from SDRAM. If no boot loader is present, the reset vector jumps directly to the .crt0 section of the application image. Do not use a boot loader if you wish your program to run in-place from non-volatile or preprogrammed memory.

    For additional information about both of these cases, refer to “Application Boot Loading and Programming System Memory”.

  6. crt0 execution—After the boot loader executes, the processor jumps to the beginning of the program's initialization block—the .crt0 code section. The function of the crt0 code block is detailed in the next section.