Jump to content
Falken

FPGA vs Real, what is the tradeoff?

Recommended Posts

As for Feature creep i think FPGA is just a modernization feature. And if you can play the odd Weird Al's it's all about the Pentiums,  so what. I mean I think the goal is to do an 8 bit machine and make it fun to use. Retro machines may just be more for a hobby rather than the next new retro gaming console. Could you imagine getting a contract to make a million of these things for Mattel or some toy company and include software and what not for a price point under 100 dollars? A retro computer could do a lot of things so that may not be an easy task to add all bells and whistle so to speak.

Share this post


Link to post
Share on other sites

The tradeoff is that FPGAs are rarely perfect recreations. As often as the 6502 processor and the Commodore 64 have been replicated in FPGA (there are three distinct projects I'm aware of), the emulation is still imperfect. In fact, the software emulation on VICE passes more test cases in the VICE test suite than the Ultimate 64, Turbo Chameleon, or MiSTer C64 cores. 

 

Share this post


Link to post
Share on other sites
On 1/3/2021 at 10:19 PM, StephenHorn said:

I think it's fair to argue that the drawbacks to FPGAs mostly have to do with the "purity" of a project.

But I think another consideration is the constraints of the project. I mean, if you're not going to use real hardware and live within its limitations, why bother pretending to live in a world of real hardware? Increase the clock speed, change the instruction set, add native 4K resolution with 3D graphics... creep those features all the way to a modern X86-64. In fact, why not skip all this hardware nonsense and stick to making a new microconsole-of-the-week or framework-of-the-month? It's all virtual, anyways.

You can't do that so easily when you're working with actual hardware components. And that, too, is part of what makes accomplishing a project like this interesting.

Well, except now the only thing that is actual CPU is the core itself. The VERA fpga fails entirely on that criteria

Share this post


Link to post
Share on other sites
6 hours ago, paulscottrobson said:

Well, except now the only thing that is actual CPU is the core itself. The VERA fpga fails entirely on that criteria

There are multiple examples of real chips being used in the X16. Examples include:

  • The 65C02 CPU
  • Two 65C22 VIAs
  • The YM2151 FM synthesis chip
  • RAM
  • ROM

The X16 would still be a functional computer without the VERA. Furthermore, the VERA does not have unlimited capabilities. Posts from those working on the hardware have indicated that the current design (which integrates video, PSG/PCM audio, and a simple SD interface) almost reaches the limits of what the current FPGA core can do.

  • Like 3

Share this post


Link to post
Share on other sites
9 hours ago, paulscottrobson said:

Well, except now the only thing that is actual CPU is the core itself. The VERA fpga fails entirely on that criteria

I'd suggest you find a viable alternative, but you'd be years too late on that front. A number of video choices were evaluated and rejected, and in the end an FPGA of some sort was the only real option here.

And part of me does lament the integration of the SD interface, as well as the PSG and PCM audio, into the same FPGA, exactly because those decisions run counter to the "purity" goal of the project. However, once the choice was made to go with an FPGA for video, it's easy to see how the scope of that FPGA's responsibilities grew, not only to keep the final cost of the X16p lower, but especially if the long-term plan would be to eventually release an X16e that might be reduced all the way to something like a single FPGA. I'm sure it also helped to keep the design of the X16's motherboard a little simpler.

But as Elektron points out, there are still plenty of components that are good, old-fashioned silicon. The VERA has not become the be-all, end-all of the X16p.

Share this post


Link to post
Share on other sites
4 hours ago, Elektron72 said:

There are multiple examples of real chips being used in the X16. Examples include:

  • The 65C02 CPU
  • Two 65C22 VIAs
  • The YM2151 FM synthesis chip
  • RAM
  • ROM

The X16 would still be a functional computer without the VERA. Furthermore, the VERA does not have unlimited capabilities. Posts from those working on the hardware have indicated that the current design (which integrates video, PSG/PCM audio, and a simple SD interface) almost reaches the limits of what the current FPGA core can do.

And a lot of glue logic.

And I've said it before, but if Commodore engineers had had SD cards available, they would have put a serial shift register on their video chip so it could use the dot clock. It's just a shift register with an eight bit countdown until the clock idles.

I could see insisting on a purist approach using the VIA for MOSI, SEL and SCLK and a serial in, parallel out shift register for MISO ... if the VIA had a native Mode 0 shift register. But it's Mode 3, with the shift and latch in the wrong sequence, making for a kludgy circuit, possibly using another GPIO pin and an extra processing step. Given the awkwardness of the alternative, I prefer the Tramgineered solution.

I do wish they were using the AY3's with the FM chip for sound rather than the PSG's, but you can't have everything you want.

  • Like 2

Share this post


Link to post
Share on other sites

I think an FPGA can be perfectly fine as a replacement for an ASIC in a retro project if done properly.

What is an FPGA?
At it's heart, an FPGA is just a re-programmable ASIC. ASIC vs FPGA is analogous to ROM vs RAM. One comes from the factory a certain way, unchangeable, while the other is malleable. So having an FPGA video chip or I2C bus controller is ostensibly no different than having an ASIC like the NES PPU or the VIC-II tied to your bus. This is quite obvious when you consider something like the FPGA-SID, which has the same form-factor as a real SID, and fits right into the same socket, and does exactly the functionality of the SID, and only the SID.

Hell, one of the reasons the YM2151 has been allowed into the X16 despite violating the "currently produced chip" rule is that there's an FPGA core available to use if real OPMs become impossible to source. i.e.: It's like having an FPGA SID in your C64. You would be able to plug an FPGA-OPM into the YM socket of the X16, tap it with your finger, and say "this right here's the FM synth chip." If you hooked a scope on the pins or the bus or whatever, it would look identical to having a real YM2151 on the bus. Apparently, FM synth is pretty much sample-accurate nowadays in emulation, and doing this emulation in silicon ala FPGA is no different either. So why not?

The "problem" with FPGAs:
It's when you start having a single FPGA that incorporates more and more functionality that it starts to just resemble a "north bridge" chipset as opposed to an ASIC that you can point to and say "that's the graphics chip." VERA pushes the line with this, being that it also does PSG sound, PCM sound, and SPI bus mastering. To me, though, this is an acceptable cost-saving measure. If you strictly adhere to a through-hole form factor + 1:1 chip to function parity, then you're buying 5 or 6 FPGAs and letting a lot of the unused capacity of each one just go to waste.

Now, let's not forget that even ASICs often present lots of merged capabilities. Even the all-mighty SID itself (peace be upon it) is not a pure sound chip. It also does paddle controller decoding. A more extreme case is the POKEY which isn't just a square wave PSG. It has all kinds of GPIO pins and analog->digital input decoders in it. The VIC-II was also responsible for providing the system clock and DRAM refresh. Let's face it - computer manufacturers have ALWAYS done stuff like this to cut costs. It's just that now you can use an FPGA to merge whatever kinds of in-silicon functionality you want into a single chip. Now manufactures just make "generic chips" that can be configured to do whatever system builders want, instead of having to make a production process for each and every ASIC.

The "endgame" with FPGAs:
Why do many retro computing enthusiasts feel aversion to them? Obviously, as the power of an FPGA increases, you can build more and more of your system into a single chip. Eventually, you just have an FPGA on a PCB that's nothing more than a breakout board to route physical connector ports back to pins on the FPGA. At this extreme, you have the same computing experience and programming experience, but now the whole computer just exists inside the little black die at the center of a white board from PCB Way. If you want to fiddle around with the hardware, then too bad - it's all inside that one piece of silicon. At this point, you're only one step away from the entire thing vanishing as it is replaced entirely in software emulation running on a modern PC. So where is the line drawn? When does it cease to be a "real computer?"

Bottom line:
It really has nothing to do with FPGA vs ASIC. Given that it must exist as a physical device, what the question really boils down to (imo) is: how much of the system is in a black box (IC) and how much of it is traces on a PCB between individual chips? Let's not forget that even those simple ASICs and general-purpose ICs are just older-tech ways to reduce the amount of discrete components on the system.

extremes:  [100% discrete components] <-------------> [SoC]

You could make a Commander X16 computer that exists anywhere on this spectrum. It's just a question of how much circuitry disappears into little black rectangles, and how many of those there are. Of course, the pure discrete component X16 would be huge and consume kilowatts of power, break down often, and be susceptible to interference from your toaster, but damnit it would work. (I saw a post on the /r/beneater subreddit where a guy made an NES PPU on breadboards).

  • Like 3

Share this post


Link to post
Share on other sites
6 minutes ago, ZeroByte said:

Now, let's not forget that even ASICs often present lots of merged capabilities.

Wanted to mention the MOS 7360, more commonly known as the TED, which was used in the Commodore 16 and Plus/4. To quote Wikipedia,

Quote

It was a video chip that also contained sound generation hardware, DRAM refresh circuitry, interval timers, and keyboard input handling.

 

  • Like 1

Share this post


Link to post
Share on other sites

I think the only remaining issue I didn't address in my essay above is that there remains the subjective nature of FPGA replacements of real classic ASICs. There are those who will never be satisfied with any replacement because the original is "just better." "It just doesn't sound as good as a real SID" - or in the case of the demo scene wizards: "It doesn't exhibit this particular quirk that we leveraged to do such-and-such" And then there's the more general philosophical perspective that there's something intrinsically beautiful / valuable in running "the real thing" vs a reproduction, and that's not even limited to computer chips. You could go make an exact replica of a '68 Chevy Corvette, but it wouldn't be the same as a well-maintained original that has existed for 52 years.

However, this whole line is irrelevant to me where X16 is concerned. The only "classic" chip on the entire board with any kind of character is the YM2151. Everything else is just a sprocket (VIA, 65c02) and making those disappear into an FPGA wouldn't upset anyone. Thus, as a new invention, VERA doesn't have any kind of legacy to live up to / be measured by. It's a unique, brand new creation, so saying "it's an FPGA so it's cheating" just doesn't hold any water with me.

  • Like 1

Share this post


Link to post
Share on other sites

I think everyone has their own "level of difficulty" as it were for these things. On the one extreme, you have the MONSTER 6502 team who created a 6502 from "discrete" transistors (I know they aren't really discrete, but they did what they could and details are not as important here). Then you have the all in FPGA models.

FPGA can replicate existing chips exactly, though it is hard to accomplish. The more people push the limits of the original tech, the more difficult it becomes to replicate exactly, as they are depending on implementation details that were never part of the documented interface. I am personally not interested in pushing beyond the documented interfaces, and I'm happy to see the documented interfaces work properly without worrying about the implementation details that were never intended to be exploited.

FPGA can also allow one to try their hand at designing something that's never been done before and that wouldn't be practical if one had to create a run of ASICs just to try out ideas.

FPGA can bridge the gap between the two, to create "identical copies" of something in low quantities that would be too expensive otherwise.

I personally am not bothered by decisions to attempt discrete component based computers that harken back to the past. Some feel this way about cars as has been listed here. We love the computers of our formative era.

I am also not bothered by recreating things in FPGA format. Sure, you can't necessarily point at individual chips and tell people what they each do, but one can create a graphical rendering of it and do essentially the same thing. Or create a LEGO version to have a physical representation of the logical bits.

Let's face it, if they'd had access to FPGA back in the day, they'd have used it where appropriate. There is nothing wrong with trying to create a system from discrete components, and there is nothing wrong with trying to make things in BASIC just to see how far that can be pushed. We all have our itches to scratch.

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)
5 hours ago, ZeroByte said:

...
However, this whole line is irrelevant to me where X16 is concerned. The only "classic" chip on the entire board with any kind of character is the YM2151. Everything else is just a sprocket (VIA, 65c02) and making those disappear into an FPGA wouldn't upset anyone. ...

Hold up there, pardner. I can live with all that lovely glue logic being replaced by a surface mount CPLD for the CX16c if it gets the cost reduced ... and if when they do that, they go to a single 1MB surface mount SRAM and the "low RAM" is just 40K of that RAM that the CPLD is smart enough to select for LowRAM and never select as HighRAM, that's fine with me ... I don't expect the cost-reduced version to necessarily have the same RAM expansion abilities as the system reference design ...

... but if it doesn't have a real 65C02 and VIA's, I'm not paying extra for it over the CX16e.

Indeed, ideally the 65C02 would be a through pin socketed CPU so any CPU daughterboard for the CX16p would work in it, but if it's a socketed surface mount 65c02, that would be the next best thing.

Edited by BruceMcF

Share this post


Link to post
Share on other sites

I meant something like if there weren’t production 65c02 chips, an FPGA based chip wouldn’t seem off-putting

Share this post


Link to post
Share on other sites
53 minutes ago, ZeroByte said:

I meant something like if there weren’t production 65c02 chips, an FPGA based chip wouldn’t seem off-putting

I meant that, at least in the system reference design, it would dramatically reduce the appeal of the project to me. It would make it "that looks like it would be interesting if you are interested in that kind of thing."

"The two most common 8bit CPU's from the 8bit era are still available as new stock today, and we are building this system around one of them" is one of the appealing aspects of this project, and I expect it would have the same effect on a number of people.

Indeed, I expect that's part of why they say "A real CPU not emulation" as their fourth dot point in the description of the system on the home page of this site. I'm not saying I know how many people that adds to the potential audience, just that it's likely they included the "real CPU" talking point because it resonated with some people they were talking to.

 

Share this post


Link to post
Share on other sites
9 hours ago, ZeroByte said:

extremes:  [100% discrete components] <-------------> [SoC]

I agree with all your satements.

I want to add, that one can push the lower extreme even lower by creating discrete components with bare hands. I watched several videos about creating resistors, capacitors, diods using the stuff that can be found at home. Of course such components turn out to be very unstable and very unreliable. One doubtly would use them to build any electronics at all. It's just a proof of concept.

What I'm trying to say is that everybody decides where to put own sane extremes. And how far is only limited with personal preferences and with desired challenges.

Share this post


Link to post
Share on other sites
4 hours ago, Cyber said:

... What I'm trying to say is that everybody decides where to put own sane extremes. And how far is only limited with personal preferences and with desired challenges.

Certainly there is no "objectively correct" position in a matter of taste. OTOH, everyone who is interested in this project has a stake in the project appealing to a large enough audience for it to be viable, which can involve catering for multiple different tastes at the same time.

This project certainly seems to be forming a target audience more successfully than, for instance, the C256 Feonix project, even though that project also has it's own type of appeal.

Share this post


Link to post
Share on other sites
20 hours ago, StephenHorn said:

I'd suggest you find a viable alternative, but you'd be years too late on that front. A number of video choices were evaluated and rejected, and in the end an FPGA of some sort was the only real option here.

And part of me does lament the integration of the SD interface, as well as the PSG and PCM audio, into the same FPGA, exactly because those decisions run counter to the "purity" goal of the project. However, once the choice was made to go with an FPGA for video, it's easy to see how the scope of that FPGA's responsibilities grew, not only to keep the final cost of the X16p lower, but especially if the long-term plan would be to eventually release an X16e that might be reduced all the way to something like a single FPGA. I'm sure it also helped to keep the design of the X16's motherboard a little simpler.

But as Elektron points out, there are still plenty of components that are good, old-fashioned silicon. The VERA has not become the be-all, end-all of the X16p.

I know. Problem is Vera is the CX16. Take it away and you have a faster Commodore PET with a better storage device. I don’t have a problem with that. But the authenticity argument is daft.

I doubt it affected the motherboard design much.

Share this post


Link to post
Share on other sites
23 hours ago, Elektron72 said:

There are multiple examples of real chips being used in the X16. Examples include:

  • The 65C02 CPU
  • Two 65C22 VIAs
  • The YM2151 FM synthesis chip
  • RAM
  • ROM

The X16 would still be a functional computer without the VERA. Furthermore, the VERA does not have unlimited capabilities. Posts from those working on the hardware have indicated that the current design (which integrates video, PSG/PCM audio, and a simple SD interface) almost reaches the limits of what the current FPGA core can do.

Without Vera it would be a sped up Kim1. You could do the Ram and Rom save for the cost and PSU.

Share this post


Link to post
Share on other sites
11 hours ago, ZeroByte said:

I meant something like if there weren’t production 65c02 chips, an FPGA based chip wouldn’t seem off-putting

Problem is an Fpga 65c02 could be six times faster.

This matters.

  • Like 1

Share this post


Link to post
Share on other sites
10 hours ago, BruceMcF said:

I meant that, at least in the system reference design, it would dramatically reduce the appeal of the project to me. It would make it "that looks like it would be interesting if you are interested in that kind of thing."

"The two most common 8bit CPU's from the 8bit era are still available as new stock today, and we are building this system around one of them" is one of the appealing aspects of this project, and I expect it would have the same effect on a number of people.

Indeed, I expect that's part of why they say "A real CPU not emulation" as their fourth dot point in the description of the system on the home page of this site. I'm not saying I know how many people that adds to the potential audience, just that it's likely they included the "real CPU" talking point because it resonated with some people they were talking to.

 

What would you think of the BBC micros tube design ? It’s a 6502 machine, very similar in many ways, more so than the 64, and it has a high speed (for the 1980s) parallel connection which allows add on CPUs to use the hardware. So the BBC becomes like a CDC160

Share this post


Link to post
Share on other sites
8 minutes ago, paulscottrobson said:

What would you think of the BBC micros tube design ? It’s a 6502 machine, very similar in many ways, more so than the 64, and it has a high speed (for the 1980s) parallel connection which allows add on CPUs to use the hardware. So the BBC becomes like a CDC160

The BBC Micro was possibly most advanced 6502-based home computer of the early 80s. It's still amazing to me that it was the machine that helped create the ARM architecture (first as a co-processor for the Beeb). To think I barely knew much about this revolutionary computer (aside that it was a British 6502 computer) until about 4-5 years ago.

Share this post


Link to post
Share on other sites
Posted (edited)
1 hour ago, paulscottrobson said:

I know. Problem is Vera is the CX16. Take it away and you have a faster Commodore PET with a better storage device. I don’t have a problem with that. But the authenticity argument is daft.

Though it was pretty normal in the 80s to use custom video display chips, so even that has its own touch of authenticity.

To be clear, although it being the internet some people feel compelled to pretend that preferences are debatable, it's not really an authenticity argument, but rather an authenticity preference.

You say "take away Vera and you have a faster PET with a better storage device" as if that means it's nothing, when that's exactly what some people want.

Edited by BruceMcF

Share this post


Link to post
Share on other sites
56 minutes ago, paulscottrobson said:

What would you think of the BBC micros tube design ? It’s a 6502 machine, very similar in many ways, more so than the 64, and it has a high speed (for the 1980s) parallel connection which allows add on CPUs to use the hardware. So the BBC becomes like a CDC160

As far as parallel connection which allows add on CPUs to use the hardware, that's one thing the CX16 has, though there isn't any hand holding on the bus mastering.

Share this post


Link to post
Share on other sites
28 minutes ago, BruceMcF said:

You say "take away Vera and you have a faster PET with a better storage device" as if that means it's nothing, when that's exactly what some people want.

And to be clear, it's really a VIC-20 with only IEC and no VIC chip.

  • Like 2

Share this post


Link to post
Share on other sites
18 minutes ago, SlithyMatt said:

And to be clear, it's really a VIC-20 with only IEC and no VIC chip.

Better keyboard, lot more RAM and with the YM2151 a heck of a lot better sound than a VIC, but text display over bit banged serial would be a real blast from the past.

  • Like 1

Share this post


Link to post
Share on other sites

The whole "It's just a PET with a VERA" argument is kind of unfair.

The NES is just an Atari VCS with a PPU and APU glued onto it.
The Atari 800 is just an Apple 1 with a video chip glued onto it.
Etc.
Let's face it - from the perspective of anyone who played games or made / watched demos, the things that give the systems their unique character ARE the video and sound chips. They pretty much all had some kind of data ports, etc and peripherals were available or not, had different UIs and whatnot, but they're all essentially a 64K address space driven by a 6502, and having some assortment of peripheral ICs mapped into this space by glue logic on the bus.

  • Like 3

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Please review our Terms of Use