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

How to read a .mif file from ROM correctly?

TPico
Beginner
1,593 Views

Hi, I want to do some image processing with the DE2-115 altera board. So I have converted a 28x28 bmp gray image into a .mif file and initialised the ROM with it. Now I read the pixels from the rom and want to show it on the monitor via the vga interface. But the image I'm becoming is not good. Can someone help me? Thank you.

0 Kudos
3 Replies
AndyN
New Contributor I
1,374 Views

What do you mean by "not good"? What exactly are you seeing versus what you expect? Can you share your code?

0 Kudos
TPico
Beginner
1,374 Views

Hi,

 

I added how I instantiated the ROM (third one) in MegaWizard Plug-In Manager, the original gray image (28x28 in bmp) (first one), the result image (second one). I will share the code later.28_28_gray_lena.bmpvga_Bild.jpgROM_IP_Configuration.png

0 Kudos
Deshi_Intel
Moderator
1,374 Views
HI, I presume you are using DE2-115 board with university program ? Refer to below doc to learn more about capability of DE2-115 board and its Quartus example design (DE2-115_Computer) • C:\intelFPGA\18.0\University_Program\Computer_Systems\DE2-115\DE2-115_Computer\doc_Nios\DE2-115_Computer_NiosII.pdf • In this doc, you will learn about VGA output is source from either "pixel buffer DMA controller" or "character buffer for VGA display" IP block • • On board VGA port can support 640x480 video resolution but Quartus video IP limit the video performance to 320x240 resolution only The detail info about each video IP block can be found in below link - video IP suite doc • https://www.intel.com/content/www/us/en/programmable/support/training/university/materials-ip-cores.html Ultimately my best advise to you is to try out the DE2-115 board, video function NIOS2 c code example design directly. You can use either NIOS2 c code or NISO2 HAL function. You can then modify and play around with the example design once you get it working first. • C:\intelFPGA\18.0\University_Program\Computer_Systems\sample_programs\nios2\c\video\video.cC:\intelFPGA\18.0\University_Program\Computer_Systems\sample_programs\nios2\hal\video\video.c • These c code example design will show you how to perform draw function to VGA output You can also use "Intel FPGA Monitor Program" from the University Program installer to help you build the example design. Thanks. Regards, dlim
0 Kudos
Reply