6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Wed May 15, 2024 2:08 am

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: CPLD for VGA?
PostPosted: Fri Dec 01, 2017 4:10 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1207
Location: Soddy-Daisy, TN USA
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: CPLD for VGA?
PostPosted: Fri Dec 01, 2017 9:17 pm 
Offline

Joined: Wed Sep 11, 2013 8:43 pm
Posts: 207
Location: The Netherlands
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


Top
 Profile  
Reply with quote  
 Post subject: Re: CPLD for VGA?
PostPosted: Sat Dec 02, 2017 12:45 am 
Offline

Joined: Sat May 02, 2015 6:59 pm
Posts: 134
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: CPLD for VGA?
PostPosted: Sat Dec 02, 2017 10:30 pm 
Offline

Joined: Wed Feb 12, 2014 1:39 am
Posts: 172
Location: Sweden
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: CPLD for VGA?
PostPosted: Mon Dec 04, 2017 1:57 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1207
Location: Soddy-Daisy, TN USA
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: CPLD for VGA?
PostPosted: Mon Dec 04, 2017 2:44 pm 
Offline

Joined: Sat May 02, 2015 6:59 pm
Posts: 134
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/


Top
 Profile  
Reply with quote  
 Post subject: Re: CPLD for VGA?
PostPosted: Mon Dec 04, 2017 2:55 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1207
Location: Soddy-Daisy, TN USA
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: CPLD for VGA?
PostPosted: Mon Dec 04, 2017 3:19 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8183
Location: Midwestern USA
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!


Top
 Profile  
Reply with quote  
 Post subject: Re: CPLD for VGA?
PostPosted: Tue Dec 05, 2017 4:05 pm 
Offline

Joined: Wed Nov 29, 2017 10:43 am
Posts: 7
Location: Riva del Garda (38066 TN) Italy
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 260 times
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: