Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

How to input an existing image file into the FPGA

I'm very new to FPGA's

so I was wondering, what are the possible methods of entering an image into an FPGA device?

I'm using a DE2 board by the way.

I wish to place the image in a mass storage device then let the FPGA read it for image processing..

currently wish the image to be *.bmp but any suggestions will be very much welcomed.

SO anyone have any suggestions on how I can get the image from a mass storage device?

(currently no specific mass storage device of choice so any will do)

Please and Thank you

6 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I have done this before.

    when I was new I did not have way to read bmp file on the FPGA.

    therefore I made C program which make bmp.h file from bitmap(raw) binary image.

    also I made C program which works on the NiosII.

    the NiosII program writes the data from bmp.h into flash-memory.

    after that, another NiosII program reads the image from flash to use.

    if you know a lot about ethernet / SD card or some other way.

    you can put image from LAN or SD card / USB and so on.

    the way I wrote is not professional but still works.

    see you.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    thank you for the replies...

    Honestly, I still don't fully understand what you guys said but I'm reading on it to get the idea..

    Ahmmm, so this flash-memory, is this an external source or is this already part of the FPGA?

    *still reading on this just now so sorry if my questions are a little silly
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    nevermind about the flash... i found out it is a memory of the FPGA..

    sorry,

    anyways, so in what specific ports can I download these files?

    can it be done on the SD card or USB port?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The DE2 board has two flash chips, external to the FPGA: an EPCS chip that is used to configure the FPGA, and a regular CFI flash that can hold the software and a readonly zip file system.

    The zip filesystem is probably the easiest way to do this, you can use the Nios programmer to flash the zip file in the DE2's flash memory. The SD card solution is a bit more complex, and the USB solution is probably the most difficult. Check if you have example designs with the kit that uses one of those solutions.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I have done it ,I get a hex-data of *.bmp from MATLAB,and to initial a rom of DE2 device,then I read the image data from rom ,and display by VGA;I also have used SD to display ,that using niosII and filesystem,you can read the datasheet form altera official website.