CPLD for VGA?

Topics relating to PALs, CPLDs, FPGAs, and other PLDs used for the support or creation of 65-family processors, both hardware and HDL.
Post Reply
User avatar
cbmeeks
Posts: 1254
Joined: 17 Aug 2005
Location: Soddy-Daisy, TN USA
Contact:

CPLD for VGA?

Post by cbmeeks »

Anyone here ever use a CPLD to generate VGA? I'm wondering how difficult it would be (compared to NTSC and AD724). Maybe just a simple frame buffer with fast SRAM and glue to an '816.

I've seen cheap 8-bit PIC's do it (albeit very low resolutions).

A target resolution I would like would be 320x240 using "fat" 2x2 pixels to give a 640x480@60Hz signal.

Thoughts?
Cat; the other white meat.
lordbubsy
Posts: 207
Joined: 11 Sep 2013
Location: The Netherlands

Re: CPLD for VGA?

Post by lordbubsy »

I think that’s fascinating! You might find this interesting, however, it’s written in German.

Added link:
http://www.ulrichradig.de/home/index.ph ... it_c_graka
Marco
Cray Ze
Posts: 134
Joined: 02 May 2015

Re: CPLD for VGA?

Post by Cray Ze »

In the past I've used both the Xilinx XC95108 the Altera MAX II EPM1270 to generate VGA signals with no problems at all,
these are rather large in CPLD terms, and probably overkill for a simple SRAM backed VGA display.
I wasn't using RAM with any of my CPLD designs, but have seen enough examples of CPLD's driving SRAM to know it's no problem.

As for comparing to AD724, it's all in the design. The AD724 can effortlessly convert VGA to NTSC, but if you instead have to bit-bang
it's the R,G,B inputs with a CPU/MCU, the AD724 becomes a bit of work to drive. The CPLD would be closer to the former case, just sitting
there, effortlessly doing it's job.
LIV2
Posts: 173
Joined: 12 Feb 2014
Location: Sweden

Re: CPLD for VGA?

Post by LIV2 »

Yep it's pretty easy, I'm doing 80x30, 16 colour text mode at 640x480 here viewtopic.php?f=4&t=4994
Mine is text only, but if you got rid of the char rom, connected the shift register directly to the memory you could easily do bitmapped graphics instead. And it actually uses less resources in the CPLD because you don't have to divide by character height & width

Mine fits within either the Altera EPM7064 or the Xilinx XC9500XL though i'm going to switch to something a bit bigger so I can add programmable registers for hardware scrolling etc.
User avatar
cbmeeks
Posts: 1254
Joined: 17 Aug 2005
Location: Soddy-Daisy, TN USA
Contact:

Re: CPLD for VGA?

Post by cbmeeks »

Thanks! That's very helpful.

I'm wondering if the ATF1508 could handle such a task? I imagine it could if all I do is drive VGA from SRAM and maybe a little glue logic.
Cat; the other white meat.
Cray Ze
Posts: 134
Joined: 02 May 2015

Re: CPLD for VGA?

Post by Cray Ze »

cbmeeks wrote:
Thanks! That's very helpful.

I'm wondering if the ATF1508 could handle such a task? I imagine it could if all I do is drive VGA from SRAM and maybe a little glue logic.
Personally, I've only used Xilinx and Altera parts, though a quick look at the datasheet suggests it should be okay.

The ATF1508 is 128 Macrocells, so should be able to accommodate a simple VGA design.
The amount of glue depends on the design you have in mind, the command driven device linked in the second post of this thread uses no glue logic at all.
For most memory mapped display designs however, you'll need some glue, the one exception is when there are enough I/O pins on the CPLD to connect CPU,
SRAM, and VGA-OUT all to different pins, then all the logic can be internal to the CPLD rather than as external glue logic, depending on available CPLD resources of course.

I don't think I like the idea of a timed licence for the Prochip Designer 5.0.1 software though.
http://www.microchip.com/prochiplicensing/
User avatar
cbmeeks
Posts: 1254
Joined: 17 Aug 2005
Location: Soddy-Daisy, TN USA
Contact:

Re: CPLD for VGA?

Post by cbmeeks »

Yeah, those look like very large CPLD's. I mean, you're pretty much in FPGA land with those. :-)

I'm not sure about the license. I just like the ATF1508's because A) they're recommended by several veterans here, B) they're 5V tolerant and C) they come in PLCC-84 packages.

I was thinking of just using the WinCUPL with it but I have dabbled in VHDL with a small FPGA board I have.
Cat; the other white meat.
User avatar
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: CPLD for VGA?

Post by BigDumbDinosaur »

Cray Ze wrote:
I don't think I like the idea of a timed licence for the Prochip Designer 5.0.1 software though.
http://www.microchip.com/prochiplicensing/
There's always WinCUPL, which is free for the downloading.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
valerio63
Posts: 7
Joined: 29 Nov 2017
Location: Riva del Garda (38066 TN) Italy

Re: CPLD for VGA?

Post by valerio63 »

Hello
I posted this simple (but working) VGA VHDL file that I written several years ago, I used it on Altera FPGA EP3C5F256C8 and CPLD MAX II EPM570F256C5.
On the FPGA version the VRAM was included in the FPGA itself and shared with 6502 CPU, in CPLD the VRAM was an external device due to save space to put other logic.

-- Valerio
Attachments
vga.zip
(1.51 KiB) Downloaded 300 times
Post Reply