Page 1 of 1
CPLD for VGA?
Posted: Fri Dec 01, 2017 4:10 pm
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?
Re: CPLD for VGA?
Posted: Fri Dec 01, 2017 9:17 pm
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
Re: CPLD for VGA?
Posted: Sat Dec 02, 2017 12:45 am
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.
Re: CPLD for VGA?
Posted: Sat Dec 02, 2017 10:30 pm
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.
Re: CPLD for VGA?
Posted: Mon Dec 04, 2017 1:57 pm
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.
Re: CPLD for VGA?
Posted: Mon Dec 04, 2017 2:44 pm
by Cray Ze
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/
Re: CPLD for VGA?
Posted: Mon Dec 04, 2017 2:55 pm
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.
Re: CPLD for VGA?
Posted: Mon Dec 04, 2017 3:19 pm
by BigDumbDinosaur
There's always WinCUPL, which is free for the downloading.
Re: CPLD for VGA?
Posted: Tue Dec 05, 2017 4:05 pm
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