NTSC -> VGA using Altera University Program IP Cores

Written By: Gerry Finlay - (Group 15)

This application note will show how to configure the SOPC builder to facilitate getting an NTSC signal from the TV Decoder and outputting it to the VGA output. It has been confirmed to work with Quartus 10.1 SP1.

Here is the test project as a zip file. Hook up your DE2 to any digital camera via the RCA Video In port and any VGA monitor via the onboard VGA port and program the board with the toplevel.sof file to see results.

The Altera University Program Video documentation is also included. This pdf has extremely useful information about all of the University Program IP cores.

A quick explanation of what is going on.

All the components in the project seem to be needed. We've played with removing certain components that we didn't think were crucial (such as the clipper, or the two DMA controllers and SRAM) however doing so results in a noisy video signal being output to the screen. When/if we figure out why we will update this application note with a more thourough explanation


Comments

For the audio/video configuration core make sure that auto initialize is selected.

Change pixel format of clipper to 8 bits and 2 planes (format of 4:2:2 YCbCr)

Ensure that both DMA controllers set their 'Default Buffer Starting Address' to the base address of the SRAM they are connected to.

Remember that the first DMA Controller is configured as 'From Stream to Memory' while the second is configured as 'From Memory to Stream'

The VGA Controller runs at 25MHz!

In Quartus you need to make sure that CLOCK_27 is configured to point at PIN_C16 instead of the usual PIN_D13. If you do not do this you will get a funky output.


Programmability

The following image shows how each frame is represented in hardware. This is useful if you want to do any sort of image processing in hardware (maybe software too). The start of packet signal is asserted for the first pixel in a frame, the end of packet signal is asserted for the last pixel in a frame. The pixels come through the system in a row major order.

All of the components used in this demo have been provided by Altera and have a corresponding software interface which is accessible through the HAL. This application note does not go into it but the included video core pdf has excellent documentation.

References