Figure A-5: BOOT ROM FLOW
CPU 0?
no
yes
Reset
Warm Boot
from On-Chip
RAM?
no
yes
Valid
Preloader
Image?
no
yes
Load Preloader
Image from Flash Memory
Valid
Preloader
Image
Found?
no
yes
Fallback
Image
Found?
no
yes
Perform Post-
Mortem Dump
Execute Code
in On-Chip RAM
Execute Second
Stage Boot Loader
Execute Fallback
Image
Wait for Reset
Cold Boot
from
FPGA?
no
yes
Cold Boot from
Flash Memory
Valid
Preloader
Image
Found?
no
yes
Fallback
Image
Found?
no
yes
Perform Post-
Mortem Dump
Execute Code
in FPGA
Execute Second
Stage Boot Loader
Execute Fallback
Image
Wait for Reset
Jump to CPU1
Boot Code
During a cold boot from the FPGA portion of the device, the boot ROM code waits until the FPGA is ready
and then attempts direct execution at address 0xC0000000 across the HPS-to-FPGA bridge. For example,
the boot software could be provided by initialized on-chip RAM in the FPGA portion of the device at address
0xC0000000 (offset 0x0 from HPS-to-FPGA bridge). During a cold boot from flash memory, the boot ROM
code attempts to load the first preloader image from flash memory to on-chip RAM and pass control to the
preloader. If the image is invalid, the boot ROM code attempts to load up to three subsequent images from
flash memory. If there is still no valid image found after the subsequent loads, the boot ROM code checks
the FPGA portion of the device for a fallback image.
Warm boot from on-chip RAM has the highest priority to execute if the
warmramgrp
registers in the
romcodegrp
group in the system manager has been configured to support booting from on-chip RAM
on a warm reset. When the enable in
warmramgrp
is enabled and length is set to 0x0, boot ROM will not
perform CRC on the preloader image and immediately jump to the address in execution. If the length is not
0x0, boot ROM will ensure the preloader image passes the CRC check before the preloader image is executed.
If a valid preloader image cannot be found in the on-chip RAM, or the preloader in the on-chip RAM fails
the CRC check, boot ROM code attempts to load the last valid preloader image loaded from the flash memory,
Booting and Configuration Introduction
Altera Corporation
cv_5400a
Boot ROM Flow
A-6
2013.12.30