Quartus ii generated Memory Initialization File (.mif) 编写方法
2014-04-17 22:17
901 查看
An ASCII text file (with the extension .mif) that specifies the initial content of a memory block (CAM, RAM, or ROM), that is, the initial values for each address. This file is used during project
compilation and/or simulation. You can create a Memory Initialization File in the Memory Editor, the In-System Memory Content Editor, or the Quartus II Text Editor.
A Memory Initialization File serves as an input file for memory initialization in the Compiler and Simulator. You can also use a Hexadecimal (Intel-Format) File (.hex) to provide memory initialization
data.
A Memory Initialization File contains the initial values for each address in the memory. A separate file is required for each memory block. In a Memory Initialization File, you must specify the memory depth and width
values. In addition, you can specify data radixes as binary (BIN), hexadecimal (HEX), octal (OCT), signed decimal (DEC), or unsigned decimal (UNS) to display and interpret addresses and data values. Data values must match the specified data
radix.
When creating a Memory Initialization File in
the Quartus II Text Editor, you must start with the DEPTH, WIDTH, ADDRESS_RADIX and DATA_RADIX keywords.
You can use Tab "\t" and Space " " characters as separators, and insert multiple lines of comments with the percent "%" character, or a single comment with double dash "--" characters. Address : data pairs represent data contained
inside certain memory addresses and you must place them between the CONTENT BEGIN and ENDkeywords,
as shown in the following examples.
% multiple-line comment
multiple-line comment %
-- single-line comment
DEPTH = 32; -- The size of memory in words
WIDTH = 8; -- The size of data in bits
ADDRESS_RADIX = HEX; -- The radix for address values
DATA_RADIX = BIN; -- The radix for data values
CONTENT -- start of (address : data pairs)
BEGIN
00 : 00000000; -- memory address : data
01 : 00000001;
02 : 00000010;
03 : 00000011;
04 : 00000100;
05 : 00000101;
06 : 00000110;
07 : 00000111;
08 : 00001000;
09 : 00001001;
0A : 00001010;
0B : 00001011;
0C : 00001100;
END;
compilation and/or simulation. You can create a Memory Initialization File in the Memory Editor, the In-System Memory Content Editor, or the Quartus II Text Editor.
A Memory Initialization File serves as an input file for memory initialization in the Compiler and Simulator. You can also use a Hexadecimal (Intel-Format) File (.hex) to provide memory initialization
data.
A Memory Initialization File contains the initial values for each address in the memory. A separate file is required for each memory block. In a Memory Initialization File, you must specify the memory depth and width
values. In addition, you can specify data radixes as binary (BIN), hexadecimal (HEX), octal (OCT), signed decimal (DEC), or unsigned decimal (UNS) to display and interpret addresses and data values. Data values must match the specified data
radix.
When creating a Memory Initialization File in
the Quartus II Text Editor, you must start with the DEPTH, WIDTH, ADDRESS_RADIX and DATA_RADIX keywords.
You can use Tab "\t" and Space " " characters as separators, and insert multiple lines of comments with the percent "%" character, or a single comment with double dash "--" characters. Address : data pairs represent data contained
inside certain memory addresses and you must place them between the CONTENT BEGIN and ENDkeywords,
as shown in the following examples.
% multiple-line comment
multiple-line comment %
-- single-line comment
DEPTH = 32; -- The size of memory in words
WIDTH = 8; -- The size of data in bits
ADDRESS_RADIX = HEX; -- The radix for address values
DATA_RADIX = BIN; -- The radix for data values
CONTENT -- start of (address : data pairs)
BEGIN
00 : 00000000; -- memory address : data
01 : 00000001;
02 : 00000010;
03 : 00000011;
04 : 00000100;
05 : 00000101;
06 : 00000110;
07 : 00000111;
08 : 00001000;
09 : 00001001;
0A : 00001010;
0B : 00001011;
0C : 00001100;
END;
相关文章推荐
- fileinput组件将文件上传到服务器的路径编写方法以及Tomcat的配置
- 编写最佳的Dockerfile的方法
- error C2220: warning treated as error - no object file generated解决方法
- Quartus中仿真时出现no simulation input file assignment specify 解决方法 (转载)
- error C2220: warning treated as error - no object file generated的处理方法
- Quartus II软件安装过程中的can't find Quartus II subscription Editon device file(.qdz)
- error C2220: warning treated as error - no object file generated的处理方法
- error C2220: warning treated as error - no object file generated的处理方法
- Informix 启动 Fatal error in shared memory initialization解决方法
- Quartus中仿真时出现no simulation input file assignment specify 解决方法 (转载)
- error C2220: warning treated as error - no object file generated的处理方法
- win下qt5.1 通过空项目纯源码编写项目时 -- QApplication: No such file or directory 问题的解决方法
- Quartus II modelsim使用与testbench编写
- 编写Dockerfile的方法
- C#反射之Assembly.Load,Assembly.LoadFile 与 Assembly.LoadFrom方法介绍
- QT跨目录编译及多工程集成(动态库的创建、引用及工程间相互依赖关系的pro文件编写方法)
- File and Code templates 不换行的解决方法
- [故障排除记录]虚拟目录程序中UploadFile控件失效问题的解决方法
- Uri转化为filepath的方法,及压缩图片的方法
- 编写查找一个单链表特定元素的程序。分别使用递归和非递归方法实现,并比较它们的运行时间。