Hardware image caching, Hardware image caching –3 – Altera Embedded Systems Development Kit, Cyclone III Edition User Manual
Page 51

8–3
Development Board Version 1.0.
Altera Corporation
Altera Embedded Systems Development Kit, Cyclone III Edition
July 2010
Hardware Image Caching
Hardware Image
Caching
Copying data from the SD Card to flash is slow due to both the read speed
from the SD Card and the write speed of the CFI flash. However the
remote update feature allows us to reconfigure the FPGA from anywhere
in flash, so we can benefit by persistently holding (caching) a certain
number of frequently used application hardware images in flash to avoid
having to copy them from the SD Card every time the application is
loaded.
The Application Selector utility can cache up to 10 application hardware
images in CFI flash. When the user chooses an application to load from
the SD Card using the Application Selector, the Application Selector first
scans through its catalog of hardware images currently stored in CFI flash
to see if any of them match the hardware image being requested. If one of
the images cached in CFI flash does match, the Application Selector
reconfigures from the offset of that cached hardware image instead of
copying the image from SD Card to flash. This significantly reduces the
load time.
Caching the hardware images requires the application selector to be able
to quickly tell if an image in CFI flash is the same as one on the SD Card.
To determine whether a hardware image in flash matches a hardware
image on the SD Card, a 32-bit timestamp value is used as a tag. During
the file conversion process, the sof2flash utility inserts a 32-bit timestamp
in the hardware image .flash file as an S0-type record on the first line of
the file. When the Application Selector is about to load a hardware image,
it inspects the .flash file on the SD Card. If the .flash file contains an S0
record on its first line which contains a 32-bit ASCII-encoded number, it
is considered to be a valid timestamp tag.
The Application Selector then scans the flash catalog for entries which
contain a matching timestamp. If a matching timestamp value is found,
then it means the desired hardware image is already stored in flash, and
can be used to directly reconfigure the FPGA without first copying it from
the SD-Card into the flash. For details on the flash catalog, refer to
.
0x2000000 - 0x237FFFF
Selector HW Image
0x2380000 - 0x3BFFFFF
Application HW Images (7)
0x3C00000 - 0x3FBFFFF
Unused
0x3FC0000 - 0x3FDFFFF
Ethernet Option Bits
0x3FE0000 - 0x3FE0080
PFL Option Bits
Table 8–1. Memory Map of CFI Flash
Flash Size
Flash Contents