- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone,
I am having trouble understanding how to first of all put images into memory (a.k.a. how do I upload them from my computer) and then being able to access them using Verilog in order to display them using the vga controller. My vga controller works and I am able to draw things manually but it is hard to create complex designs this way. AKA. Image 1-4 are in memory If(state == 00) draw image 1 at some x & y location else if(state == 01) draw image 2 at some x & y location and so on.. If anyone could help me it would be most appreciated. Thanks, Pachu Edit: - Also.. I do not want to implement this using NIOS unless that is the only way.Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Pachu.
Read in this thread my last post, maybe it could help you. http://www.alteraforum.com/forum/showthread.php?t=3094- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi BTXSistemas,
Thanks for replying, but that does not really help me, I guess what I am asking for is an explanation on how to go about even getting the images into memory and how I can access multiple images and only display them when/where I want. Thanks, Pachu- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Pachu.
What I did ( in example mode) is to upload an image from my computer to the DE2 board using serial port, then I save it in SRAM, and then I show it in the VGA, at 320x240 in 24 bit color. I think it's only difeers from your needs, that you want more than one image. I can share the verilog code here, although all quartus project is a bit heavy to post. Then you can take a look at the code to know how I did it.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sure that would be great! When you store the image using the serial interface does that image get placed in SRAM? Does it store forever? Or will I need to restore everytime game is run? (Ideally it should be store once for my case and then only restore if I need to change the image).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Pachu.
When I get the image through serial port, it get saved into SRAM, but not forever, since SRAM lost their data when it haven't power supply. You could use FLASH for this, but I think this memory will not be enough fast to transfer the data from it to VGA controller, maybe you would need some code for pass the data from FLASH to SRAM first. Also you could save in the FLASH more than one image, and then, copy only one to SRAM at a time to show it. Here's the top level code, that I used for this. Be advice I'm a very beginer in this, so the coding is not very academic, and poor. (but works).- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Pachu. What I did ( in example mode) is to upload an image from my computer to the DE2 board using serial port, then I save it in SRAM, and then I show it in the VGA, at 320x240 in 24 bit color. I think it's only difeers from your needs, that you want more than one image. I can share the verilog code here, although all quartus project is a bit heavy to post. Then you can take a look at the code to know how I did it. --- Quote End --- Hi, can send it to me?? I am having this problem now. My email is Thank you very very much.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
kirakiat.
Look for that code in this thread please. Cheers. Alberto. --- Quote Start --- Hi, can send it to me?? I am having this problem now. My email is Thank you very very much. --- Quote End ---- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- kirakiat. Look for that code in this thread please. Cheers. Alberto. --- Quote End --- Do you have any idea that can send image from Matlab to DE2 board? I really need to work on it. Thank you very much.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I really don't have any ideas about Matlab, I never use it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
do you know hw to get image from serial port?? gt any example? Thank you very much,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The example code to send the image by serial port, is in the code of this thread, you should write the PC code by yourself.
Cheers. Alberto.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi BTXSistemas,
Thanks for sharing your code, it was quite useful to me. I am sending images from memory to compress them via JPEG200 standard (using ADV212 IC), but as you said, SRAM is too small to hold images greather than 240x320 pixels. Can you tell about your experience using SDRAM? Regards,- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use the HDL coder by Mathworks to transform your matlab code to VHDL and then store it in the DE2 board.
www[dot]mathworks[dot]com/products/hdl-coder/![](/skins/images/7FC17B7B85029576C25F1E43CE255B51/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page