Chapter 9: Using User Flash Memory in MAX II Devices
Creating Memory Content File
9–43
Figure 9–48.
Page 4 of the altufm Megafunction
Memory Initialization for the altufm_parallel Megafunction
For the parallel interface, if a HEX file is used to initialize the memory content for the
altufm megafunction, you have to fully specify all 16 bits in each memory address,
regardless of the data width selected. If your data width is less than 16 bits wide, your
data must be placed in the MSBs of the data word and the remaining LSBs must be
padded with 1’s.
For an example, if
address_width = 3
and
data_width = 8
are selected for the
altufm_parallel megafunction, the HEX file should contain eight addresses of data (2
3
addresses), each word containing 16 bits. If the initial content at the location
000
is
intended to be
10101010,
you should specify
1010101011111111
for address
000
in the HEX file.
1
This specification applies only to HEX files used with the parallel interface. MIFs do
not require you to fully specify 16 bits for each data word. However, both MIF and
HEX files require you to specify all addresses of data according to the
address_width
selected in the megafunction.
Memory Initialization for the altufm_spi Megafunction
The same 16-bit data padding mentioned for altufm_parallel is required for HEX files
used with the SPI Base (8 bits) and Extended (16 bits) mode interface. In addition, for
SPI Base and Extended mode, you must fully specify memory content for all
512 addresses (both sector 0 and sector 1) in the HEX file and MIF, even if sector 1 is
not used. You can put valid data for SPI Base mode addresses 0 to 255 (sector 0), and
initialize sector 1 to all ones.