Software Support for UFM Block
4.An 8-bit data is transmitted through SI .
5.nCS  is pulled back to high to indicate the end of transmission.
Figure 9–29 shows the WRITE  operation sequence for Base mode.
SECTOR-ERASE
SECTOR-ERASE  is the instruction of erasing one sector of the UFM block. Each sector contains 256 words. WEN  bit and the sector must not be protected for SE  operation to be successful. nCS  must be driven high before the instruction is executed internally. You may poll the nRDY  bit in the software status register for the completion of the internal self-timed SECTOR-ERASE  cycle. For SPI Extended mode, the SE  operation is performed in the following sequence, as shown in Figure 9–30:1.nCS  is pulled low.
2.Opcode  00100000 is transmitted into the interface.register for
3.The 16-bit address is sent. The eighth bit (the first seven bits will be discarded) of the address indicates which sector is erased; a 0 means sector 0 (UFM0) is erased,and a 1 means sector 1 (UFM1) is erased.
Figure 9–28.
WRITE Operation Sequence for Extended Mode
nCS
SCK
SI
SO
Figure 9–29.
WRITE Operation Sequence for Base Mode
nCS
SCK
SI
SO
Creating Memory Content File
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 (23 addresses), each word containing 16bits. 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 S
PI 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
512addresses (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 0to 255 (sector 0), and initialize sector 1 to all ones.
Figure 9–48.
Page 4 of the altufm Megafunction
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 512deep (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
Figure9–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
3Fh is mapped to the UFM block address location of 000h to 03Fh. The altufm_i2c
megafunction byte address location of 40h to 7Fh is mapped to the UFM block
address location of 1C0h to 1FFh. Altera recommends that you pad the unused
address locations of the UFM block with all ones.
Figure9–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
Memory Map for 2-Kbit Memory Initialization
Figure9–50 shows the memory map initialization for the altufm_i2c megafunction of
2 Kbits of memory. The altufm_i2c megafunction byte address location of 00h to 7Fh
is mapped to the UFM block address location of 000h to 07Fh. The altufm_i2c
megafunction byte address location of 80h to FFh is 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.
Chapter 12:Real-Time ISP and ISP Clamp for MAX II Devices
Document Revision History
Chapter 13:IEEE 1149.1 (JTAG) Boundary-Scan Testing for MAX II Devices
IEEE Std. 1149.1 BST Operation Control

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。