An ASCII text file (with the extension .hex). A Hexadecimal (Intel-Format) File can be used in the Quartus II software to store the initial memory values for a memory block, such as CAM, RAM, or ROM, that is implemented in an Altera device, or to build software project executables.
Hexadecimal (Intel-Format) Files are used as input files in the Quartus II software in the following ways:
-
The Memory Editor can create a Hexadecimal (Intel-Format) File for memory initialization in the Compiler and Simulator. You can also use a Memory Initialization File (.mif) to provide memory initialization data.
-
The In-System Memory Content Editor can use and create a Hexadecimal (Intel-Format) File to import and export data.
You can store configuration data for one or more Altera devices in an output file called a Hexadecimal (Intel-Format) Output File (.hexout). The Hexadecimal (Intel-Format) Output File format is an ASCII text file with the extension .hexout to avoid overwriting initial memory content files that have the extension .hex.
The data width of a Hexadecimal (Intel-Format) File is always a multiple of 8 bits. When you initialize a memory block that is not the same width as the Hexadecimal (Intel-Format) File, the Quartus II software wraps or pads the file as described below:
|
File data width greater than memory width |
File data width smaller than memory width |
|
Memory size is a multiple of 8:
Memory size is not a multiple of 8:
The Quartus II software wraps the data to the memory width equal to the multiple of 8 and just greater than the actual memory width, and then truncates the memory block to the actual size of the memory width, which is not a multiple of 8. |
|
|
File data width greater than memory width |
File data width smaller than memory width |
|
Memory size is a multiple of 8:
Memory size is not a multiple of 8:
The Quartus II software wraps the data to the memory width equal to the multiple of 8 and just greater than the actual memory width, and then truncates the memory block to the actual size of the memory width, which is not a multiple of 8. |
|
If the size of the Hexadecimal (Intel-format) File does not match the size of the memory you are initializing, the Quartus II software performs as described below:
|
File data depth greater than memory depth |
File data depth smaller than memory depth |
|
Ignores extra data. |
|
|
|
Note: In the Quartus II software, you have the option of reading or writing Hexadecimal (Intel-Format) Files in the byte addressable (Intel hexadecimal format) mode, or the word-addressable mode. You can choose between the two modes by changing the Read or write Hexadecimal Files (.hex) using byte addressing (Intel format) option in the Quartus II software. Setting this option in the More Compilation Process Settings dialog box in Settings dialog box applies only to the current project. Alternatively, you can apply this option to any Quartus II project with settings in the Memory Editor page in the Options dialog box. Turning on this option for the current project overrides the global setting.
The Quartus II software always reads word addressable Hexadecimal (Intel-Format) Files in the word addressable mode even if the Read or write Hexadecimal Files (.hex) using byte addressing (Intel format) option is turned on. |

