简体   繁体   中英

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. 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. Use 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. 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. Depending upon the size of your image you could choose to implement the rom using the internal block RAM or distributed RAM. As part of the ROM mega function creation, you will have the opportunity to create a MIF ( memory initialization file.)

Create a mif file from your txt file and specify that file as initialization file for your ROM.
Eg method to create mif from txt is described here - http://www.alteraforum.com/forum/showthread.php?t=27934

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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