简体   繁体   English

使用Quartus II将.txt文件加载到FPGA中?

[英]Loading a .txt file into FPGA using Quartus II?

So I am new to FPGAs and I am currently using an Altera DE-1 Board and Quartus II software along with it for a hardware project. 因此,我刚接触FPGA,目前正在将Altera DE-1开发板和Quartus II软件与它一起用于硬件项目。 So here is my question, I have a .txt file with binary image data of 0's and 1's, what is the best way to load this data onto registers on the FPGA for further calculations. 所以这是我的问题,我有一个.txt文件,其中二进制图像数据为0和1,将这种数据加载到FPGA上的寄存器进行进一步计算的最佳方法是什么。 Use SDRAM? 使用SDRAM? ROM? 只读存储器?

I am currently coding in verilog and have used the verilog file I/O statements earlier but I read somewhere that it obviously can't be used for synthesis. 我目前正在用verilog进行编码,并且较早使用过verilog文件的I / O语句,但我在某处读到它显然不能用于综合。 So what would be the best way for me to go about this. 所以对我来说最好的方法是什么。 Any suggestion is welcome. 任何建议都欢迎。 Thanks :) 谢谢 :)

Using quartus megawizard create a rom mega function. 使用quartus megawizard创建rom mega功能。 Depending upon the size of your image you could choose to implement the rom using the internal block RAM or distributed RAM. 根据图像的大小,您可以选择使用内部Block RAM或分布式RAM来实现rom。 As part of the ROM mega function creation, you will have the opportunity to create a MIF ( memory initialization file.) 作为ROM巨型功能创建的一部分,您将有机会创建MIF(内存初始化文件)。

Create a mif file from your txt file and specify that file as initialization file for your ROM. 从txt文件创建一个mif文件,然后将该文件指定为ROM的初始化文件。
Eg method to create mif from txt is described here - http://www.alteraforum.com/forum/showthread.php?t=27934 例如,从txt创建mif的方法描述如下-http: //www.alteraforum.com/forum/showthread.php? t=27934

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM