Question

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

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top