9–44
Chapter 9: Using User Flash Memory in MAX II Devices
Creating Memory Content File
Memory Initialization for the altufm_i2c Megafunction
The MAX II UFM physical memory block contains a 16-bit wide and 512 deep (9-bit
address) array. The altufm_i2c megafunction uses the following smaller array sizes:
■
■
■
■
An 8-bit wide and 128 deep (7-bit address) mapping for 1 Kbit memory size
An 8-bit wide and 256 deep (8-bit address) mapping for 2 Kbits memory size
An 8-bit wide and 512 deep (9-bit address) mapping for 4 Kbits memory size
An 8-bit wide and 1,024 deep (10-bit address) mapping for 8 Kbits memory size
Altera recommends that you pad the MIF or HEX file for both address and data width
to fill the physical memory map for the UFM block and ensure the MIF/HEX file
represents a full 16-bit word size and a 9-bit address space.
Memory Map for 1-Kbit Memory Initialization
Figure 9–49 shows the memory map initialization for the altufm_i2c megafunction of
1-Kbit memory size. The altufm_i2c megafunction byte address location of 00h to
3Fhis mapped to the UFM block address location of 000hto 03Fh. The altufm_i2c
megafunction byte address location of 40hto 7Fhis mapped to the UFM block
address location of 1C0hto 1FFh. Altera recommends that you pad the unused
address locations of the UFM block with all ones.
Figure 9–49. Memory Map for 1-Kbit Memory Initialization
MIF or HEX File Contents – to represent
the actual data and address size for the UFM block
1FFh
1-Kbit altufm_i2c Megafunction
Logical Memory Contents
Address 40h in logical memory maps to
1C0h in the MIF/HEX file. Address 7Fh in logical
memory maps to 1FFh in the MIF/HEX file, and all
data in between follows the order in the
logical memory
7Fh
1C0h
1BFh
Upper Half – Addresses
40h to 7Fh
This section of the UFM is unused –
the MIF/HEX file contents should be set to
all '1' for addresses 040h to 1BFh
40h
3Fh
Lower Half – Addresses
040h
03Fh
00h to 3Fh
Address 00h in logical memory maps to
address 000h in the MIF/HEX file. Address 3Fh in
logical memory maps to 03Fh in the MIF/HEX file,
and all data in between follows the order in the
logical memory
00h
000h
Memory Map for 2-Kbit Memory Initialization
Figure 9–50 shows the memory map initialization for the altufm_i2c megafunction of
2 Kbits of memory. The altufm_i2c megafunction byte address location of 00hto 7Fh
is mapped to the UFM block address location of 000hto 07Fh. The altufm_i2c
megafunction byte address location of 80hto FFhis mapped to the UFM block
address location of 180h to 1FFh. Altera recommends that you pad the unused
address location of the UFM block with all ones.
MAX II Device Handbook
© October 2008 Altera Corporation