quartus - Contains the Quartus II software
ip - Contains the Altera IP Library and third-party IP cores
altera - Contains the Altera IP Library source code
<IP core name> - Contains the IP core source files
www.altera.com
101 Innovation Drive, San Jose, CA 95134
Parallel Flash Loader IP Core User Guide
UG-01082
Subscribe
Send Feedback
This document describes how to instantiate the Parallel Flash Loader (PFL) IP core in your design,
programming flash memory, and configuring your FPGA from the flash memory.
FPGAs’ increasing density requires larger configuration storage. If your system contains a flash memory
device, you can use your flash memory as the FPGA configuration storage as well. You can use the PFL IP
core in Altera® MAX® Series (MAX II, MAX V and MAX 10 devices) or all other FPGAs to program
flash memory devices efficiently through the JTAG interface and to control configuration from the flash
memory device to the Altera FPGA.
Features
Use the PFL IP core to:
• Program Common Flash Interface (CFI) flash, quad Serial Peripheral Interface (SPI) flash, or NAND
flash memory devices with the device JTAG interface.
• Control Altera FPGA configuration from a CFI flash, quad SPI flash, or NAND flash memory device
for Arria series, Cyclone series, and Stratix series FPGA devices.
Installing and Licensing IP Cores
The Altera IP Library provides many useful IP core functions for production use without purchasing an
additional license. You can evaluate any Altera® IP core in simulation and compilation in the Quartus® II
software using the OpenCore® evaluation feature. Some Altera IP cores, such as MegaCore® functions,
require that you purchase a separate license for production use. You can use the OpenCore Plus feature to
evaluate IP that requires purchase of an additional license until you are satisfied with the functionality and
performance. After you purchase a license, visit the Self Service Licensing Center to obtain a license
number for any Altera product.
2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information,
product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device
specifications before relying on any published information and before placing orders for products or services.
ISO
9001:2008
Registered
2
Device Support
Note: The default IP installation directory on Windows is <drive>:\altera\<version number>; on Linux it is
<home directory>/altera/ <version number>.
Related Information
• Altera Licensing Site
• Altera Software Installation and Licensing Manual
Device Support
This user guide focuses on implementing the PFL IP core in an Altera CPLD. The PFL IP core supports all
Altera FPGAs. You can implement the PFL IP core in an Arria®, Cyclone®, or Stratix® device family
FPGA to program flash memory or to configure other FPGAs.
Related Information
AN478: Using FPGA-Based Parallel Flash Loader with the Quartus II Software
Provides more information about using the FPGA-based PFL IP core to program a flash memory device.
Supported Flash Memory Devices
The Quartus II software generates the PFL IP core logic for the flash programming bridge and FPGA
configuration.
UG-01082
2015.01.23
Table 1: CFI Flash Memory Devices Supported by PFL IP Core
If your CFI device is not in the following table, but is compatible with an Intel or Spansion CFI flash device, Altera
recommends selecting Define CFI Flash Device in the Quartus II software.
ManufacturerProduct FamilyData WidthDensity (Megabit)Device Name
(1)(2)
828F800C3
1628F160C3
C316
3228F320C3
6428F640C3
Micron
3228F320J3
8 or 16
6428F640J3
J3
12828F128J3
16256JS29F256J3
(1)
Spansion has discontinued the Spansion S29GL-N flash memory device family. Altera does not recommend
using this flash memory device. For more information about an alternative recommendation, see related
information.
(2)
The PFL IP core supports top and bottom boot block of the flash memory devices. For Micron flash memory
devices, the PFL IP core supports top, bottom, and symmetrical blocks of flash memory devices.
Altera Corporation
Parallel Flash Loader IP Core User Guide
Send Feedback
UG-01082
2015.01.23
Supported Flash Memory Devices
3
ManufacturerProduct FamilyData WidthDensity (Megabit)Device Name
Spansion has discontinued the Spansion S29GL-N flash memory device family. Altera does not recommend
using this flash memory device. For more information about an alternative recommendation, see related
information.
(2)
The PFL IP core supports top and bottom boot block of the flash memory devices. For Micron flash memory
devices, the PFL IP core supports top, bottom, and symmetrical blocks of flash memory devices.
Parallel Flash Loader IP Core User Guide
Send Feedback
Altera Corporation
4
Supported Flash Memory Devices
UG-01082
2015.01.23
ManufacturerProduct FamilyData WidthDensity (Megabit)Device Name
Spansion has discontinued the Spansion S29GL-N flash memory device family. Altera does not recommend
using this flash memory device. For more information about an alternative recommendation, see related
information.
(2)
The PFL IP core supports top and bottom boot block of the flash memory devices. For Micron flash memory
devices, the PFL IP core supports top, bottom, and symmetrical blocks of flash memory devices.
(3)
Supports page mode.
Altera Corporation
Parallel Flash Loader IP Core User Guide
Send Feedback
UG-01082
2015.01.23
Supported Flash Memory Devices
5
ManufacturerProduct FamilyData WidthDensity (Megabit)Device Name
EN29LV1616EN29LV160B
Eon Silicon
Solution
EN29GL16
32EN29LV320B
128EN29GL128
Table 2: Quad SPI Flash Memory Device Supported by PFL IP Core
ManufacturerProduct FamilyDensity (Megabit)Device Name
N25Q 1.8V
Micron
128N25Q128
N25Q 3.3V
32S25FL032P
SpansionFL-P
64S25FL064P
128S25FL129P
(1)(2)
(1)
Spansion has discontinued the Spansion S29GL-N flash memory device family. Altera does not recommend
using this flash memory device. For more information about an alternative recommendation, see related
information.
(2)
The PFL IP core supports top and bottom boot block of the flash memory devices. For Micron flash memory
devices, the PFL IP core supports top, bottom, and symmetrical blocks of flash memory devices.
Parallel Flash Loader IP Core User Guide
Send Feedback
Altera Corporation
6
Supported Flash Memory Devices
ManufacturerProduct FamilyDensity (Megabit)Device Name
The PFL IP core allows you to configure the FPGA in passive serial (PS) or fast passive parallel (FPP)
scheme. The PFL IP core supports configuration with FPGA on-chip data compression and data
encryption.
When you use compressed or encrypted configuration data for FPP configuration, the PFL IP core holds
one data byte for one, two, four, or eight DCLK cycles to ensure the DCLK frequency runs at the required
data rate as specified by the DCLK-to-DATA[] Ratio. The PFL IP core checks if the compression or
encryption feature is turned on in the configuration image before configuring in FPP mode. Hence, no
additional setting is required in the PFL IP core to specify whether the configuration file stored in the
flash memory device is a compressed or uncompressed image.
Note: When you turn on the enhanced bitstream compression feature, data encryption is disabled.
Supported Schemes and Features
7
You can program the Altera CPLDs and flash memory device in Programmer Object File (.pof), Jam
Standard Test and Programming Language (STAPL) Format File (.jam), or JAM Byte Code File (.jbc) file
format. The PFL IP core does not support Raw Binary File (.rbf) format.
Logic element (LE) usage varies with different PFL IP core and Quartus II software settings. To determine
the exact LE usage number, compile a PFL design with your settings using the Quartus II software.
IP Catalog and Parameter Editor
The Quartus II IP Catalog (Tools > IP Catalog) and parameter editor help you easily customize and
integrate IP cores into your project. You can use the IP Catalog and parameter editor to select, customize,
and generate files representing your custom IP variation.
Note:
The IP Catalog lists IP cores available for your design. Double-click any IP core to launch the parameter
editor and generate files representing your IP variation. The parameter editor prompts you to specify an
IP variation name, optional ports, and output file generation options. The parameter editor generates a
top-level Qsys system file (.qsys) or Quartus II IP file (.qip) representing the IP core in your project. You
can also parameterize an IP variation without an open project.
Use the following features to help you quickly locate and select an IP core:
The IP Catalog (Tools > IP Catalog) and parameter editor replace the MegaWizard™ Plug-In
Manager for IP selection and parameterization, beginning in Quartus II software version 14.0. Use
the IP Catalog and parameter editor to locate and paramaterize Altera IP cores.
™
• Filter IP Catalog to Show IP for active device family or Show IP for all device families.
• Search to locate any full or partial IP core name in IP Catalog. Click Search for Partner IP, to access
partner IP information on the Altera website.
• Right-click an IP core name in IP Catalog to display details about supported devices, open the IP core's
installation folder, andor view links to documentation.
Parallel Flash Loader IP Core User Guide
Send Feedback
Altera Corporation
Search and filter IP for your target device
Double-click to customize, right-click for information
8
Using the Parameter Editor
Figure 2: Quartus II IP Catalog
UG-01082
2015.01.23
Note: The IP Catalog is also available in Qsys (View > IP Catalog). The Qsys IP Catalog includes
exclusive system interconnect, video and image processing, and other system-level IP that are not
available in the Quartus II IP Catalog. For more information about using the Qsys IP Catalog, refer
to Creating a System with Qsys in the Quartus II Handbook.
Using the Parameter Editor
The parameter editor helps you to configure IP core ports, parameters, and output file generation options.
• Use preset settings in the parameter editor (where provided) to instantly apply preset parameter values
for specific applications.
• View port and parameter descriptions, and links to documentation.
• Generate testbench systems or example designs (where provided).
Altera Corporation
Parallel Flash Loader IP Core User Guide
Send Feedback
View IP port
and parameter
details
Apply preset parameters for
specific applications
Specify your IP variation name
and target device
Legacy parameter
editors
UG-01082
2015.01.23
Figure 3: IP Parameter Editors
Functional Description
9
Functional Description
The PFL IP core allows you to program flash memory devices with Altera CPLDs through the JTAG
interface and provides the logic to control configuration from the flash memory device to the Altera
FPGA.
Programming Flash Memory
You can use the PFL IP core to program the following flash memory devices with JTAG interface:
• Programming CFI Flash
• Programming Quad SPI Flash
• Programming NAND Flash
Related Information
• Supported Flash Memory Devices on page 2
• Third-party Programmer Support on page 39
Provides more information about programming the flash memory using third-party tools.
Programming CFI Flash
Altera configuration devices support programming through the JTAG interface to allow in-system
programming and updates. However, standard flash memory devices do not support the JTAG interface.
You can use the JTAG interface in Altera CPLDs to indirectly program the flash memory device.
Parallel Flash Loader IP Core User Guide
Send Feedback
The Altera CPLD JTAG block interfaces directly with the logic array in a special JTAG mode. This mode
brings the JTAG chain through the logic array instead of the Altera CPLD boundary-scan cells (BSCs).
Altera Corporation
Altera CPLD
CFI Flash
Memory
Altera
FPGA
Configuration Data
Common
Flash
Interface
PFL
Quartus II
Software
via JTAG
Altera FPGA Not Used
for Flash Programming
V
CC
V
CC
V
CC
P30/P33 CFI Flash
Altera CPLD
Altera FPGA
P30/P33 CFI Flash
16
16
10kΩ
10kΩ
10kΩ
ADDR[24..0]
NCE
NWE
NOE
DATA[15..0]
ADDR[24..0]
NCE
NWE
NOE
DATA[15..0]
flash_addr[24..0]
flash_nce
flash_nwe
flash_noe
flash_data[31..0]
fpga_conf_done
fpga_nstatus
fpga_nconfig
fpga_data
fpga_dclk
CONF_DONE
nSTATUS
nCONFIG
DATA
nCE
DCLK
10
Programming Quad SPI Flash
The PFL IP core provides JTAG interface logic to convert the JTAG stream provided by the Quartus II
software and to program the CFI flash memory devices connected to the CPLD I/O pins.
Figure 4: Programming the CFI Flash Memory With the JTAG Interface
Figure shows an Altera CPLD configured as a bridge to program the CFI flash memory device through the
JTAG interface.
The PFL IP core supports dual P30 or P33 CFI flash memory devices in burst read mode to achieve faster
configuration time. Two identical P30 or P33 CFI flash memory devices connect to the CPLD in parallel
using the same data bus, clock, and control signals. During FPGA configuration, the FPGA DCLK
frequency is four times faster than the flash_clk frequency.
UG-01082
2015.01.23
Altera Corporation
Figure 5: PFL IP core With Dual P30 or P33 CFI Flash Memory Devices
The flash memory devices in the dual P30 or P33 CFI flash solution must have the same memory density
from the same device family and manufacturer. In the Quartus II software version 9.1 SP1 onwards, dual
P30 or P33 flash support is available in the PFL IP core.
Programming Quad SPI Flash
You can also use the JTAG interface in Altera CPLDs to program a quad SPI flash memory device with
the PFL IP core.
The PFL IP core instantiated in the Altera CPLD functions as a bridge between the CPLD JTAG program‐
ming interface and the quad SPI flash memory device interface that connects to the Altera CPLD I/O pins.
You can connect up to four identical quad SPI flashes in parallel to implement more configuration data
storage.
Note: When connecting quad SPI flashes in parallel, use identical flash memory devices with the same
memory density from the same device family and manufacturer. In the Quartus II software version
10.0 onwards, quad SPI flash support is available in the PFL IP core.
Figure 6: Programming Quad SPI Flash Memory Devices With the CPLD JTAG Interface
Figure shows an Altera CPLD functioning as a bridge to program the quad SPI flash memory device
through the JTAG interface. The PFL IP core supports multiple quad SPI flash programming of up to four
devices.
11
Related Information
Supported Flash Memory Devices on page 2
Parallel Flash Loader IP Core User Guide
Altera Corporation
Send Feedback
Altera CPLD
NAND Flash
Memory
Altera
FPGA
Configuration Data
Open NAND
Flash
Interface
PFL
Quartus II
Software
using JTAG
Altera FPGA Not Used
for Flash Programming
Altera CPLD
Flash
Memory
Altera
FPGA
Flash
Interface
PFL
Passive Serial or
Fast Passive Parallel
Interface
12
Programming NAND Flash
Programming NAND Flash
You can use the JTAG interface in Altera CPLDs to program the NAND flash memory device with the
PFL IP core. The NAND flash memory device is a simpler device that has faster erase and write speed with
higher memory density in comparison with the CFI flash.
You can use the JTAG interface in Altera CPLDs to indirectly program the flash memory device. The
CPLD JTAG block interfaces directly with the logic array in a special JTAG mode. This mode brings the
JTAG chain through the logic array instead of the Altera CPLD BSCs. The PFL IP core provides JTAG
interface logic to convert the JTAG stream from the Quartus II software and to program the NAND flash
memory device that connects to the CPLD I/O pins.
Figure 7: Programming NAND Flash Memory Devices With the JTAG Interface
Figure shows an Altera CPLD functioning as a bridge to program the NAND flash memory device
through the JTAG interface.
UG-01082
2015.01.23
Controlling Altera FPGA Configuration from Flash Memory
Altera Corporation
You can use the PFL logic in Altera CPLDs as a configuration controller for FPGA configuration. The PFL
logic in the CPLD determines when to start the configuration process, read the data from the flash
memory device, and configure the Altera FPGA in PS or FPP configuration scheme.
Figure 8: FPGA Configuration With Flash Memory Data
Figure shows the Altera CPLD as the configuration controller for the FPGA. The flash memory includes
CFI, quad SPI and NAND flash.
Parallel Flash Loader IP Core User Guide
Send Feedback
UG-01082
2015.01.23
Mapping PFL and Flash Address
You can use the PFL IP core to either program the flash memory devices, configure your FPGA, or both;
however, to perform both functions, create separate PFL functions if any of the following conditions apply
to your design:
• You want to use fewer LEs.
• You modify the flash data infrequently.
• You have JTAG or In-System Programming (ISP) access to the Altera CPLD.
• You want to program the flash memory device with non-Altera data. For example, the flash memory
device contains initialization storage for an ASSP. You can use the PFL IP core to program the flash
memory device with the initialization data and also create your own design source code to implement
the read and initialization control with the CPLD logic.
Creating Separate PFL Functions
To create separate PFL functions, follow these steps:
1. To create a PFL instantiation, select Flash Programming Only mode.
2. Assign the pins appropriately.
3. Compile and generate a .pof for the flash memory device. Ensure that you tri-state all unused I/O pins.
4. To create another PFL instantiation, select Configuration Control Only mode.
5. Instantiate this configuration controller into your production design.
6. Whenever you must program the flash memory device, program the CPLD with the flash memory
device .pof and update the flash memory device contents.
7. Reprogram the CPLD with the production design .pof that includes the configuration controller.
13
Note:
All unused pins are set to ground by default. When programming the configuration flash memory
device through the CPLD JTAG pins, you must tri-state the FPGA configuration pins common to
the CPLD and the configuration flash memory device. You can use the
pfl_flash_access_request and pfl_flash_access_granted signals of the PFL block to tri-state
the correct FPGA configuration pins.
Related Information
• Mapping PFL and Flash Address on page 13
• Implementing Page in the Flash .pof on page 15
• Using Enhanced Bitstream Compression and Decompression on page 18
• Using Remote System Upgrade on page 20
Mapping PFL and Flash Address
The address connections between the PFL IP core and the flash memory device vary depending on the
flash memory device vendor and data bus width.
Parallel Flash Loader IP Core User Guide
Send Feedback
Altera Corporation
23
22
21
-
-
2
1
0
PFL
address: 24 bits
23
22
21
-
-
2
1
0
Flash Memory
address: 24 bits
22
21
20
-
-
2
1
0
PFL
address: 23 bits
23
22
21
-
-
3
2
1
Flash Memory
address: 23 bits
23
22
21
-
-
2
1
0
PFL
address: 24 bits
22
21
20
-
-
1
0
D15
Flash Memory
address: 24 bits
14
Mapping PFL and Flash Address
Figure 9: Micron J3 Flash Memory in 8-Bit Mode
The address connection between the PFL IP core and the flash memory device are the same.
Figure 10: Micron J3, P30, and P33 Flash Memories in 16-Bit Mode
The flash memory addresses in Micron J3, P30, and P33 16-bit flash memory shift one bit down in
comparison with the flash addresses in the PFL IP core. The flash address in the Micron J3, P30, and P33
flash memory starts from bit 1 instead of bit 0.
UG-01082
2015.01.23
Altera Corporation
Figure 11: Spansion and Micron M28, M29 Flash Memory in 8-Bit Mode
The flash memory addresses in Spansion 8-bit flash shifts one bit up. Address bit 0 of the PFL IP core
connects to data pin D15 of the flash memory.
Parallel Flash Loader IP Core User Guide
Send Feedback
22
21
20
-
-
2
1
0
PFL
address: 23 bits
22
21
20
-
-
2
1
0
Flash Memory
address: 23 bits
UG-01082
2015.01.23
Figure 12: Spansion and Micron M28, M29 Flash Memory in 16-Bit Mode
The address bit numbers in the PFL IP core and the flash memory device are the same.
Implementing Page in the Flash .pof
The PFL IP core stores configuration data in a maximum of eight pages in a flash memory block. Each
page holds the configuration data for a single FPGA chain. A single FPGA chain can contain more than
one FPGA. For an FPGA chain with multiple FPGAs, the PFL IP core stores multiple SRAM Object Files
(.sof) in the same page.
Implementing Page in the Flash .pof
15
The total number of pages and the size of each page depends on the density of the flash. These pages allow
you to store designs for different FPGA chains or different designs for the same FPGA chain in different
pages.
Use the generated .sof files to create a flash memory device .pof. When converting these .sof files to a .pof,
use the following address modes to determine the page address:
• Block mode—Allows you to specify the start and end addresses for the page.
• Start mode—Allows you to specify only the start address. You can locate the start address for each page
on an 8-KB boundary. If the first valid start address is 0×000000, the next valid start address is an
increment of 0×2000.
• Auto mode—Allows the Quartus II software to automatically determine the start address of the page.
The Quartus II software aligns the pages on a 128-KB boundary; for example, if the first valid start
address is 0×000000, the next valid start address is an increment of 0×20000.
Note:
If you are programming NAND flash, you must specify the NAND flash memory device reserved
block start address and the start address to ensure the files reside within a 128-KB boundary
Storing Option Bits
The PFL IP core requires you to allocate space in the flash memory device for option bits. The option bits
sector contains information about the start address for each page, the .pof version used for flash
programming, and the Page-Valid bits. You must specify the options bits sector address in the flash
memory device when converting the .sof files to a .pof and creating a PFL design.
Parallel Flash Loader IP Core User Guide
Send Feedback
Altera Corporation
16
Storing Option Bits
UG-01082
2015.01.23
Table 4: Option Bits Sector Format
Offset address 0x80 stores the .pof version required for programming flash memory. This .pof version applies to all
eight pages of the configuration data. The PFL IP core requires the .pof version to perform a successful FPGA
configuration process.
The Quartus II Convert Programming File tool generates the information for the .pof version when you
convert the .sof files to .pof files.
The value for the .pof version generated by the Quartus II software version 7.1 onwards is 0x03. However,
if you turn on the enhanced bitstream-compression feature, the value for the .pof version is 0x04.
Caution:
Do not overwrite any information in the option bits sector to prevent the PFL IP core from
malfunctioning, and always store the option bits in unused addresses in the flash memory
device.
(4)
.pof version occupies only one byte in the option bits sector.
Figure 13: Implementing Page Mode and Option Bits in the CFI Flash Memory Device
• The end address depends on the density of the flash memory device. For the address range for devices
with different densities, refer Byte Address Range table.
• You must specify the byte address for the option bits sector.
17
Figure 14: Page Start Address, End Address, and Page-Valid Bit Stored as Option Bits
Bits 0 to 12 for the page start address are set to zero and are not stored as option bits. The Page-Valid bits
indicate whether each page is successfully programmed. The PFL IP core programs the Page-Valid bits
after successfully programming the pages.
Table 5: Byte Address Range for CFI Flash Memory Devices with Different Densities
Parallel Flash Loader IP Core User Guide
Send Feedback
CFI Device (Megabit)Address Range
80x0000000–0x00FFFFF
Altera Corporation
18
Using Enhanced Bitstream Compression and Decompression
Using Enhanced Bitstream Compression and Decompression
The enhanced bitstream compression and decompression feature in the PFL IP core reduces the size of
the configuration file in the flash memory device. On average, you can reduce the file size by as much as
50% depending on the designs. When you turn on the enhanced bitstream compression feature, the PFL
IP core disables data encryption.
Table 6: Comparison Between Typical, Enhanced, and Double Compression
Note: When using the PFL with compression, set the device MSEL pins set for compression or
decompression. When generating or converting a programming file, you can enable compression.
In the first few bytes during the generation of the programming file (with compression enabled), a
bit set notifies the PFL that the incoming files is a compressed file. The ×4 DCLK-to-data are
handled automatically in the PFL.
Note: For more information about the typical data compression feature, refer to the Configuration Data
Decompression section in the configuration chapter of the relevant device handbook.
(5)
(5)
The FPGA receives compressed bitstream which decreases the duration to transmit the bitstream to the
FPGA.
(6)
For FPP with on-chip bitstream decompression enabled, the DCLK frequency is ×2, ×4, or ×8 the data rate,
depending on the device. You can check the relationship of the DCLK and data rate in the FPP
Configuration section in the configuration chapter of the respective device handbook.
(7)
For FPP with enhanced bitstream decompression enabled, the DCLK frequency is ×1 the data rate.
Altera Corporation
Parallel Flash Loader IP Core User Guide
Send Feedback
Loading...
+ 39 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.