Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20687 Discussions

real an image in vhdl or verilog

Altera_Forum
Honored Contributor II
1,273 Views

Hi 

 

i am working on cyclone II. 

As i am new in vhdl so i do not know how to deal with images in vhdl. 

i want to read an image that is already stored in memory. 

please can you help me how i can read an image in vhdl or verilog ? 

 

Thank you 

Rizwan
0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
543 Views

Is this on an FPGA or in a testbench?

0 Kudos
Altera_Forum
Honored Contributor II
543 Views

Is this on an FPGA or in a testbench? 

 

Hi Tricky 

 

yes, it is on FPGA.  

 

Thank you 

Rizwan
0 Kudos
Altera_Forum
Honored Contributor II
543 Views

I it stored in internal or external memory? either way, you need an address controller to read the image out in the correct order. This is usueally just a couple of counters for x and y position.

0 Kudos
Altera_Forum
Honored Contributor II
543 Views

Dear Tricky! 

 

i think there is some understanding mistake, the image is already stored in PC memory and i want to read that image from PC memory and store it in the ROM of FPGA. 

Secondly, what type of memory is more feasible to use? (if my image size is 120X150 greyscale). 

 

Thank you. 

Rizwan
0 Kudos
Altera_Forum
Honored Contributor II
543 Views

If you want to store it as a ROM, you need to create a .mif file so that the onboard memory can be powered with the contents already in there. 

 

If you want to transfer from PC to FPGA on the fly, then you have to transfer it via some means - RS232, ethernet. etc. It isnt anything more exciting that just a data transfer.
0 Kudos
Altera_Forum
Honored Contributor II
543 Views

Dear Tricky! 

 

If I use ROM then i should use .mif or hex file. (Is there any difference to use .mif or hex file on design point of view or both of these files use for same purpose ? ) 

 

Thank you
0 Kudos
Altera_Forum
Honored Contributor II
543 Views

Both files can be used for the same purpose.

0 Kudos
Reply