6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Apr 27, 2024 9:22 pm

All times are UTC




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: Question: CPLD vs FPGA?
PostPosted: Sun Jul 03, 2022 10:35 pm 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 374
Maybe someone can help me out with this - I’ve been working on several 65CXX projects, all running at 5V. I wanted to integrate FPGAs into the projects. Unfortunately, all the ones I would use run at 3.3v. I know I can’t do any soft CPU’s or anything like that. I just want to create some real interfaces to avoid bitbanging with 65C22s.

I got a 5M570ZT100C5N, to start, an Altera MAX V CPLD, and it does 5V. But, what is the difference between programming this, versus programming, say a MAX 10 or Cyclone 10?

How severely limited is this, and was it a bad idea?


Last edited by Jmstein7 on Mon Jul 04, 2022 2:34 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Sun Jul 03, 2022 11:40 pm 
Offline
User avatar

Joined: Sun Nov 07, 2021 4:11 pm
Posts: 101
Location: Toronto, Canada
Howdy! I think you'll love working with the MAX V, especially once you get over the tooling, which is… well, let's say “rough around the edges” (though nowhere nearly as bad as, say, WinCUPL). The differences between all these CPLDs are pretty complex—they each have different features, number of gates, support for various interfaces like SPI, and so forth. At the end of the day, it all boils down to what you need out of it, as you can imagine.

These devices are all pretty powerful, however. To give you an idea, I built a fairly functional VGA interface out of a MAX II, which has roughly half the number of macrocells as your MAX V. It works like a treat, and I have very little experience with either CPLDs or electronics in general. So, I suspect that you could do a lot with that MAX V!

Voltage levels are, indeed, a pain. I ended up redesigning my SBC to use 3.3V, which turned out to be the easiest solution, but I think you can find some CPLDs that are 5V-compatible, though they are probably getting harder and harder to come by. (Do note that the MAX V needs to be powered by a 1.8V supply, even though it supports 3.3V on its I/O pins).

One final thing to consider is that the MAX V is, technically, obsolete (as is the MAX II that I use). They are still easy to find, well supported by Intel's tooling, and relatively cheap because they aren't used for new designs anymore, however. There are plenty of newer options that are more powerful, but, usually, also more expensive.

There are many folks on the forums that are much more experienced than me and have built some amazing things using CPLDs—I encourage you to browse and learn from them. Cheers!


—Marco


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 04, 2022 3:15 am 
Offline

Joined: Sat May 02, 2015 6:59 pm
Posts: 134
Jmstein7 wrote:
But, what is the difference between programming this, versus programming, say a MAX 10 or Cyclone 10?

The simplest answer here is: No difference.

You'll likely be using VHDL or Verilog for your design so all the real complexities will be hidden by the (Quartus II / Prime) tool chain.

You can take the VHDL/Verilog file from your MAX V CPLD design and place it in a MAX 10 or Cyclone 10 design, assign appropriate I/O pins, and upon synthesizing, the design should work just fine on the FPGA.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 04, 2022 5:18 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8144
Location: Midwestern USA
CountChocula wrote:
...I think you can find some CPLDs that are 5V-compatible, though they are probably getting harder and harder to come by.

Microchip's ATF150x line of CPLDs are five-volt compatible and in current production. A number of major distributors, such as Digi-Key and Mouser, stock them.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 04, 2022 7:48 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
Most FPGAs (but not all) need an external EEPROM to hold the bitstream, and most FPGAs (I think) take a few milliseconds to load that bitstream at power-on. I think CPLDs behave much more like a conventional chip, that needs no support circuit and takes no time to start working after power-on.

FPGAs will also, usually, be more expensive, but the main thing going for them is that they are (or can be) a great deal bigger on the inside. If you need the resources, you need the capacity.

Of course considerations like supply voltage, pin count, package style, availability, cost and speed will factor in to your decision too.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 04, 2022 2:05 pm 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 374
I just wonder why so few FPGAs can do 5V.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 04, 2022 2:17 pm 
Offline

Joined: Wed Jun 23, 2021 8:02 am
Posts: 165
Jmstein7 wrote:
I just wonder why so few FPGAs can do 5V.


Probably the same reasons as for any other high density logic device:

1. Smaller geometries have lower breakdown voltages
2. Power dissipation. At a given operating frequency, this increases as the square of the supply voltage.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 04, 2022 6:02 pm 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 374
kernelthread wrote:
Jmstein7 wrote:
I just wonder why so few FPGAs can do 5V.


Probably the same reasons as for any other high density logic device:

1. Smaller geometries have lower breakdown voltages
2. Power dissipation. At a given operating frequency, this increases as the square of the supply voltage.


I have to admit, even the ones that do 5V seem to do so using logic level converters, while natively running at 3.3v.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 04, 2022 6:30 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1076
Location: Albuquerque NM USA
Since W65C02 and W65C816 work at 3.3V, the easiest approach using MAX CPLD is operating everything at 3.3V. MAX5/10 CPLD have so much resources that 6522 and 6551 functions can easily emulate inside. You don't need ROM, either, since MAX has internal flash sufficiently large to boot and copy more software from SD. So basically you just need W65Cxxx, MAX, RAM, and SD card.

FPGA has everything so you can get rid of W65Cxxx and RAM and do everything with FPGA + SD card.

Bill


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 04, 2022 7:16 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
> FPGA has everything so you can get rid of W65Cxxx and RAM and do everything with FPGA + SD card.

Although that's true, or can be, not everyone wants to create such a design, so it's not the answer it might seem to be. Probably this thread isn't the place to get into those questions of project preferences - we're covered it before, I'm sure.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 04, 2022 7:54 pm 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 374
BigEd wrote:
> FPGA has everything so you can get rid of W65Cxxx and RAM and do everything with FPGA + SD card.

Although that's true, or can be, not everyone wants to create such a design, so it's not the answer it might seem to be. Probably this thread isn't the place to get into those questions of project preferences - we're covered it before, I'm sure.

Exactly right - that’s a different project altogether :-)

Right now, I’m still working with my 65C265s.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 06, 2022 10:58 pm 
Offline
User avatar

Joined: Sat Jul 24, 2021 1:37 pm
Posts: 282
You could take a look at the Altera Flex EPF10k which is a 5V-native FPGA. It is not actively produced anymore but there are a number of these on eBay. The EPF10k10 is PLCC-84 which makes it easy to use, it contains 10k gates, 576 logic elements. Not sure how that compares to the 128 macrocells of the ATF1508, I'm guessing 4-5 times more space? Higher capacities come in QFP packages. It needs a configuration EEPROM called the EPC2, which you can find in PLCC-20. The IDE is Quartus 9.0 which is pretty old

I haven't played with mine yet, but we talk about this family and the tooling needed in this thread viewtopic.php?f=10&t=6975

Here is the datasheet https://nl.mouser.com/datasheet/2/612/d ... 299404.pdf

_________________
BB816 Computer YouTube series


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 08, 2022 1:40 am 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 745
Location: Germany
BigEd wrote:
Most FPGAs (but not all) need an external EEPROM to hold the bitstream, and most FPGAs (I think) take a few milliseconds to load that bitstream at power-on. I think CPLDs behave much more like a conventional chip, that needs no support circuit and takes no time to start working after power-on.

I thought most if not all modern FPGAs just have the flash built-in and allow you to hook up an external flash if you feel like it. hmm, maybe that's less common than i assumed.
and the power up time of a few milliseconds is not really an issue if your use something like a DS1813, which pulls the System's reset line low for ~150ms anyways.
if you don't have one you can have the FPGA take control of the reset line, and put a pull down resistor on it. so during power up the FPGA's pins are in High-Z mode so the pull down will constantly reset the CPU, after the FPGA is booted up it can then pull the reset line high and allow the CPU to run.

but yea, due to CPLD's directly storing their configuration directly where they need it, they pretty much have no boot-up time at all.
BigEd wrote:
FPGAs will also, usually, be more expensive, but the main thing going for them is that they are (or can be) a great deal bigger on the inside. If you need the resources, you need the capacity.

Of course considerations like supply voltage, pin count, package style, availability, cost and speed will factor in to your decision too.

That's why i like the MachXO2 HC series. it comes in hand solderable package (TQFP), has roughly the same amount of IO as an ATF150x CPLD, and costs around the same as well (~10-15 USD), but of course it has a much much larger logic capacity.
downside is just the fact that they run at 3.3V, so you have to design your entire system around that, or only use the FPGA as an IO device (a VGA Card, Blitter, Co-Processor with a >100MHz Custom CPU, DMA Controller, etc) and connect it via level shifters to your System.

a much larger downside is that due to the current chip shortage it's pretty difficult to find any low cost and hobbyist friendly FPGAs from Lattice, Intel, or Xilinx that are still in stock and without inflated prices.
so CPLDs are almost the only options right now.


Top
 Profile  
Reply with quote  
PostPosted: Sat Jul 16, 2022 9:45 pm 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 990
Location: near Heidelberg, Germany
I usually use Xilinx xc95...xl CPLDs. They need 3.3V supply voltage but inputs are 5V tolerant, which comes in real handy.

_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 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: