Jump to content

Using DDR as a Video Frame Buffer


zygot

Recommended Posts

There are some nice tutorials available for anyone wanting to do FPGA based video using an HDL. Most of what I've come across, for HDMI at least, is based on work that Mike Field has published. None of them use external memory as a video frame buffer. This tutorial demo project aims to change that. Enjoy. Thanks Mike.

I've added a demo for the Genesys2 that implements a True Color 32-bit RGBA video frame buffer in DDR for 24-bit RGB HDMI displays. It's the obvious extension of the Nexys Video 8-bit indexed color demo.

 

NexysVideo_Demo_R1.zip

 

Genesys2VideoDemo_R1.zip

Edited by zygot
Link to comment
Share on other sites

Haven't figured out how to refresh posts to indicate that new content has been added, hence this post.

If you were interested in the Nexys Video demo, you should find the Genesys2 even more interesting as we go from 8-bit indexed color to 32-bit RGBA in our DDR video frame buffer.

Link to comment
Share on other sites

  • 3 months later...
Posted (edited)

@DBanks60

No, I haven't installed Vivado 2023.1. The demo tried to avoid version issues by providing commentary about how to re-create the IP in whatever version of the tools anyone might be using. Occasionally, Vivado makes changes that thwart even this approach.

Have you encountered a problem building the project in Vivado 2023.1? The MIG IP, in my experience, can be difficult depending on what version of the tools you are using. Specifying the target as a Genesys2 in your project settings instead of using the device product number is, in my experience, a good way to get all kinds of IO constraint artifacts that cause problems and have to be manually corrected. I've stopped using the board files many versions of Vivado ago. Be aware that older versions of the Digilent master constraints files have numerous errors. The schematic is golden as far as I can tell. I'm in the habit of checking the constraints against the schematic whenever I use pin for the first time.

[edit] The main reason why I don't use current versions of Vivado for Genesys2 projects is because my device license isn't supported by them.... I still use a LOT of vendor tool versions, on way too many PCs, for one reason or another. Sigh....

Edited by zygot
Link to comment
Share on other sites

2 hours ago, zygot said:

@DBanks60

No, I haven't installed Vivado 2023.1. The demo tried to avoid version issues by providing commentary about how to re-create the IP in whatever version of the tools anyone might be using. Occasionally, Vivado makes changes that thwart even this approach.

Have you encountered a problem building the project in Vivado 2023.1? The MIG IP, in my experience, can be difficult depending on what version of the tools you are using. Specifying the target as a Genesys2 in your project settings instead of using the device product number is, in my experience, a good way to get all kinds of IO constraint artifacts that cause problems and have to be manually corrected. I've stopped using the board files many versions of Vivado ago. Be aware that older versions of the Digilent master constraints files have numerous errors. The schematic is golden as far as I can tell. I'm in the habit of checking the constraints against the schematic whenever I use pin for the first time.

[edit] The main reason why I don't use current versions of Vivado for Genesys2 projects is because my device license isn't supported by them.... I still use a LOT of vendor tool versions, on way too many PCs, for one reason or another. Sigh....

Thanks. No problems yet--I have not started my project, since I don't have a Genesys 2 board yet. Once it have the board, and the IP voucher for Vivado ML Enterprise, I'll get started. Your code is very well commented, thanks for that!

Link to comment
Share on other sites

1 hour ago, DBanks60 said:

Once it have the board, and the IP voucher for Vivado ML Enterprise, I'll get started.

Don't hesitate to ask questions if something unexpected pops up. The Genesys2 has been a very useful platform for me.

Link to comment
Share on other sites

  • 2 weeks later...

Great project!

Please clarify some things for me concerning the readme file you provided. (1) I need to compile VideoDemo.cpp--there is no executable for this until I do, yes? (2) Once I have that executable, I can proceed with adding the Digilent ADEPT SDK dpti and dmgr libraries and headers to the project, implement the project, create the bitstream and program, and then execute the windows command line with the board connected to see the turkey image, right?

In other words, the parts about using GIMP and a hex editor, you already did, correct?

Link to comment
Share on other sites

16 hours ago, DBanks60 said:

In other words, the parts about using GIMP and a hex editor, you already did, correct?

Yes, all of the picture cropping and data manipulation has been incorporated into the header file that's been provided. The initial grid display is done in software. You don't need to install GIMP or a hex editor to complete the project.

Thanks for not mentioning all of the typos ( I still find more every time I re-read the documentation).

So, once you have a bitstream, all you need to do is install the Adept SDK and create a project to turn the software sources into ( for Windows ) a x64 executable. The software sources have a few display content headers for different display modes.

Link to comment
Share on other sites

3 hours ago, DBanks60 said:

I have it working on a Genesys2

Great! Thanks for the feedback. Hopefully, you can see the basic functionality as a starting point for more interesting projects.

Link to comment
Share on other sites

  • 4 weeks later...
On 8/4/2023 at 6:37 PM, zygot said:

Great! Thanks for the feedback. Hopefully, you can see the basic functionality as a starting point for more interesting projects.

Would you have any advice to offer on how to replace your dpti module with dvi2rgb to implement a hardware HDMI-in source solution?

Link to comment
Share on other sites

On 8/29/2023 at 8:30 AM, DBanks60 said:

Would you have any advice to offer on how to replace your dpti module with dvi2rgb to implement a hardware HDMI-in source solution?

I'm not sure what exactly that you have in mind. If I wanted to capture/manipulate/display a live video source, using the Genesys2 HDMI inputs and outputs, I'd likely have a very different architecture for such a project. The architecture would be highly dependent on what I wanted to accomplish. Simultaneously writing and reading video line buffers in external memory would require a faster MiG controller than the one that I use in the Nexys Video or Genesy2 demos in this tutorial; assuming that I needed external memory.

Both the Nexys Video and Genesys2 ( and the Mimas A7 ) can capture video using the HDMI input port.

I haven't used Digilent's dvi2rgb or rgb2dvi IP. As an alternative you might browse Mike Field's archive here: https://github.com/hamsternz

Be aware of content protection features in HDMI transport.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...