Jump to content
  • 0

NEXYS4: VGA BMP Overlay


iGary

Question

I apologize if I'm asking a question with an obvious answer but web searches and forum searches weren't helpful.

I've recently started looking at the Nexys4's VGA output. And I'm using the User Demo Source for ISE 14.7 for reference. I'm intrigued by the simplicity of the method used to generate the on-screen images from a memory overlay. But I haven't found any documentation of how the COE file was generated from the original BMP file. Is the method documented and/or is there a utility for converting BMP files into a COE compatible format? 

 

Thanks

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Hi iGary,

I don't know if any such utility exists - , but if you save your image as a 24 bpp BMP file then the pixel data starts at offset 54, and there will be (width * height * 3)  bytes of it.

I've got the source for something close that I used on a project of mine at http://hamsterworks.co.nz/mediawiki/index.php/MiniSpartan6%2B_DVID_Logo to convert a 128x128 bitmap into the data required for a inferred memory block. To use this to generate a '.COE' file, then use the same output and remove the 'x's, and '"'s with search and replace in notepad, then add the the following lines to the top of the file:

memory_initialization_radix=16;
memory_initialization_vector=

 

 

 

Link to comment
Share on other sites

hamster, thanks for your input. If I were starting from scratch today, I'd approach it the same as you. The cool thing about the COE file for the overlay in the demo project is that it is a binary file i.e. memory_initialization_radix_2, The bits represent black and white I'm sure. I can see how much headache that saves in converting on the fly as all the VGA routine has to do is grab the next bit from the 1 bit wide memory.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...