User Flash Memory for Data
Storage in Manufacturing Flow
Introduction
Small capacity, non-volatile memory is commonly used in storing manufacturing data (e.g., manufacturer’s IDs, serial numbers). This data is important in differentiating products, inventory referencing, and storing test results during manufacturing.The MAX® II user flash memory (UFM) is ideal for storing manufacturing data instead of using a separate low-density, non-volatile memory device.
This solution creates a low-cost, portable medium for storing and controlling access to information. You can read and write manufacturing data using the IEEE Std. 1149.1 Joint Test Action Group (JTAG) interface.
Using the MAX II UFM block for data storage in manufacturing does not require additional I/O other than the JTAG pins. However, the UFM is not limited to specific standard interface protocols (you can implement any interface protocol in the programmable logic array of a MAX II device) to communicate with the UFM block. Integrating board-level flash memory, EEPROM capabilities, and system logic into one MAX II device improves the board space efficiency and minimizes system cost.
This chapter provides guidelines in utilizing the MAX II UFM for manufacturing data storage, including programming and reading stored data from the UFM block.
f For more information on the MAX II UFM features, refer to the chapter on Using User Flash Memory in MAX II Devices.
Manufacturing Data
Manufacturing data is a type of non-volatile information used to uniquely identify a device or chipset on the board. The variety of manufacturing data that is commonly stored in small-capacity, non- volatile memory devices include:
■ Product ID or Product Name
■ Manufacturer’s ID
■ Serial or Part Numbers
■ Manufacturing Date or Lot Codes
■ Hardware Revision
■ All other Related Product and Manufacturers’ Information
■ Manufacturer Test Counts and Results
MII51011-1.1
Manufacturing date or lot codes are used to identify when a board was manufactured. Placing a manufacturer’s lot code or a manufacturing date on the board makes future tracking easier. Manufacturing data storage on products is also important in organizing the inventory system.
Manufacturing data is typically represented in ASCII text. Refer to Appendix A, ASCII Code Table for the standard characters in ASCII format.
Storing
Manufacturing Data in the UFM
Figure 11–1 shows the flow for writing manufacturing data to the UFM.
Every manufacturing data storage flow should start with determining the constant data for UFM and the design function. Choosing the right standard interface protocol to access the UFM block is important to be compatible with the entire board design and to simplify the data read flow.
The initial memory content file which consists of the constant data is created in either Hexadecimal (.hex) format or in Memory Initialization File (.mif) format. You can develop the interface between the UFM block and other devices on the board using the MegaWizard® Plug-In Manager in the Quartus® II software. The initial memory content file is then included using the altufm megafunction of the MegaWizard Plug-In Manager. You can then generate different types of programming files including Programmer Object File (.pof) and Jam™ Standard Test and Programming Language (STAPL) Files (.jam) using the Quartus II assembler. You can program the UFM block either using the Quartus II Programmer (.pof, .jam) or using the Jam Player (.jam).
Dynamic manufacturing data (which is the information that will change such as a lot code, date codes, and manufacturing test result data) is produced in HEX format only during board testing. Recompiling the project and also regenerating a new programming file to include all the static and dynamic data in the Quartus II software is impractical in test environments. Therefore, you can convert the HEX file into a Jam file using a UFM HEX to Jam Utility. You can use this Jam file with the in- circuit tester to program or update the UFM.
However, during this stage of updating the UFM with the dynamic manufacturing data, it can overwrite the existing constant data. To retain the constant data, you can take advantage on the UFM which is organized into two separate sectors, and program the constant manufacturing data into one sector of the UFM during the compilation flow. Subsequently, in the board testing stage, you can then program the dynamic
manufacturing data into the other sector of the UFM.
f Refer to “Data Storage Using the JTAG Interface” on page 11–6 for more information on programming the UFM block through the JTAG port.
Refer to the chapter on Using User Flash Memory in MAX II Devices for details on using the altufm megafunction.
Figure 11–1. Data Storage Flow Chart
Start
Quartus II Assembler
Quartus II Environment
Determine Constant Data for UFM
Create Initial Memory Initialization File
(.hex/.mif)
Interface Development with MegaWizard Plug-In
Manager
Test Board and Determine Dynamic Manufacturing Data
UFM HEX to Jam Utility .pof/
.jam
Program Device
HEX Jam
Update UFM Sector 0 Compilation of the
Complete Design for MAX II Devices
Update UFM Sector 1 Programming Files
Reading
Manufacturing Data from UFM
Accessing manufacturing data from the MAX II UFM block starts with determining the data needed to be read. You can read the manufacturing data from the UFM block in two ways: You can read the entire contents of sector 0 and/or sector 1 of the UFM block through the JTAG port using the Jam Player; or you can access the UFM contents through the MAX II device I/O pins that are assigned as the interface signals, where the interface between the UFM block and the other devices was developed earlier in the Quartus II software. Tracking the UFM address where the specific data is located is important for accessing the correct data. After obtaining this data, you can then display it on any user interface (such as a monitor or LCD, or save it to a file through the manufacturing software).
See Figure 11–2.
Figure 11–2. Reading Storage Flow Chart
Start
Determine Data to Read
Data Location (Address)
Access Data Through Interface Port Accessing
Through the JTAG Port
Jam Player
Display Data Read UFM
Sector 0
Read UFM Sector 1
Yes No
Data Storage Using the JTAG Interface
You can program and read manufacturing data using the IEEE Std. 1149.1 JTAG interface. You can program the UFM block and the MAX II logic array together using the JTAG interface in in-system programming (ISP) mode. Also, you can program to and read from the UFM block
independently through the JTAG interface when the MAX II device is in user mode with the real-time ISP feature. You can program and read through the JTAG interface by using the Jam file output from the Quartus II and the standardized Jam Player software.
This design example describes one way to create manufacturing data for storage in the UFM block. All manufacturing data is converted into ASCII data format to maximize the memory efficiency. The code below shows the example manufacturing data.
<DESIGN name= "LED Driver FUNCTION">
<COMPANY> ALTERA CORPORATION www.altera.com
<BoardData>
<DeviceName> EPM1270T144C3
<PartNo> 2003-MAX2-113
<ManucDate> 11/3/2003 2.17PM
<Revision> a0.95
Table 11–1 shows the ASCII text of a manufacturing data example. This text is then written into either HEX or MIF format. The address radix is in HEX format.
Table 11–1. ASCII Text of Manufacturing Data Example (Sector 0) (Part 1 of 2)
Address +0 +1 +2 +3 +4 +5 +6 +7
000 003C 0044 0045 0053 0049 0047 004E 0020
008 006E 0061 006D 0065 003D 0020 0022 004C
010 0045 0044 0020 0044 0072 0069 0076 0065
018 0072 0020 0046 0055 004E 0043 0054 0049
020 004F 004F 0022 003E 000D 003C 0043 004F
028 004D 0050 0041 004E 0059 003E 0020 0041
030 004C 0054 0045 0052 0041 0020 0043 004F
038 0052 0050 004F 0052 0041 0054 0049 004F
040 004E 0020 0077 0077 0077 002E 0061 006C
048 0074 0065 0072 0061 002E 0063 006F 006D
050 000D 003C 0044 0065 0076 0069 0063 0065
058 004E 0061 0074 0061 003E 000D 003C 0044
Figure 11–3 shows the HEX file containing the manufacturing data in the Quartus II software (MIF format is also available).
070 0037 0030 0054 0031 0034 0034 0043 0033
078 000D 003C 0050 0061 0072 0074 004E 006F
080 003E 0020 0032 0030 0030 0033 002D 004D
088 0041 0058 0032 002D 0031 0031 0033 000D
090 003C 004D 0061 006E 0075 0063 0044 0061
098 0074 0065 003E 0020 0031 0031 002F 0033
0A0 002F 0032 0030 0030 0033 0020 0032 002E
0A8 0031 0037 0050 004D 003C 0052 0065 0076
0B0 0069 0073 0069 006F 006E 003E 0020 0061
0B8 0030 002E 0039 0035 000D 003C 0043 0068
0C0 0065 0063 006B 0053 0075 006D 003E 0020
0C8 0030 0030 0030 0030 0043 0038 0039 0039
0D0 000D 0000 0000 0000 0000 0000 0000 0000
0D8 0000 0000 0000 0000 0000 0000 0000 0000
0E0 0000 0000 0000 0000 0000 0000 0000 0000
0E8 0000 0000 0000 0000 0000 0000 0000 0000
0F0 0000 0000 0000 0000 0000 0000 0000 0000
0F8 0000 0000 0000 0000 0000 0000 0000 0000
Table 11–1. ASCII Text of Manufacturing Data Example (Sector 0) (Part 2 of 2)
Address +0 +1 +2 +3 +4 +5 +6 +7
Figure 11–3. HEX File Format
Generating a Programming File
A POF for the entire device is generated when you compile the design file in the Quartus II software. The Quartus II Programmer gives you an option to target the portion of device you wish to program. You can convert the POF to Jam STAPL or JBC File format targeting certain areas of the device using the Convert Programming Files feature in the Quartus II software. A Jam STAPL or JBC File can also be generated during compilation using the Settings option in the Quartus II software.
Conclusion
The MAX II UFM block is the best choice for storing manufacturing data, helping to improve board space efficiency and minimizing system cost by integrating board-level flash memory, EEPROM capabilities, and system logic into one MAX II device. You can customize the UFMcommunication system to comply with different manufacturers’ standard interface protocols to access manufacturing product data.