user2045143
user2045143

Reputation: 249

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 :)

Upvotes: 1

Views: 3162

Answers (1)

shparekh
shparekh

Reputation: 830

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.
E.g. method to create mif from txt is described here - http://www.alteraforum.com/forum/showthread.php?t=27934

Upvotes: 8

Related Questions