Jump to content

Photo

it's fun to play on the F. P. G. A.

FPGA emulation vhdl verilog

126 replies to this topic

#1 Newsdee OFFLINE  

Newsdee

    Stargunner

  • 1,067 posts

Posted Wed Mar 1, 2017 7:20 AM

Starting a thread to centralize FPGA discussion; let's see whether it catches on.

At time of writing there are the following major systems built around FPGA and dedicated cores. Capacity of FPGAs is measured in LEs which allows cramming more or less logic inside.

about 9K LE:
- RetroUSB AVS, NES/Famicom only, commercial core
- ZxUno, Spectrum + about 10 cores, open source cores

about 25K LE:
- Analogue NT mini, NES/FC + more with jailbroken firmware, commercial cores
- MiST FPGA, 40+ cores, open source
- Turbo Chameleon 64, open source except c64 core
- FPGA Arcade Replay, open source

(note: some open cores are the same project ported over to different hardware)

Only commerical offerings provide HDMI. The rest has VGA out which can also be configured to run at 15khz RGB (240p). Theae need an upscaler to run on modern LCDs. FPGA Arcade Replay has DVI.

FPGAs are good at solving latency/lag issues of software emulation, and use much less power than CPU solutions. But they are not problem free, many cores are not yet 100% perfect (although some seem to be e.g. Atari800 by foft). Also they retain some constraints of original hardware (e.g. save states are hard or impossible to do)

Edited by Newsdee, Wed Mar 1, 2017 7:22 AM.


#2 godslabrat OFFLINE  

godslabrat

    River Patroller

  • 4,346 posts
  • I took the midnight train going a-ny-where...
  • Location:Oklahoma City

Posted Wed Mar 1, 2017 8:13 AM

I'll be honest: discussion of FPGA vs. pure software emulation bores the crap out of me.  But the thread title is hilarious and I'm still giggling.



#3 veelk55 OFFLINE  

veelk55

    Star Raider

  • 67 posts

Posted Wed Mar 1, 2017 4:01 PM

Discussion of FPGA vs. pure software emulation excites the SHIT outta me :D

 

I have long dreamed for something like this to happen, however, it's still a new and expensive technology for casual gamers.

Besides, most people won't even get the most out of FPGA systems on their HDTVs, because every HDTV I've used has enough lag to discourage me.

As such, HDTVs don't exist to me. I'd only use these systems on computer monitors.

 

I have an AVS NES, and I'm waiting for the Z3K.

The Z3K is expected to output both HD and analogue. I'm really excited about the analogue part.



#4 Keatah OFFLINE  

Keatah

    Quadrunner

  • 18,936 posts

Posted Wed Mar 1, 2017 4:15 PM

The ultimate gaming rig is looking to be a combination of an all-inclusive FPGA rig (which hasn't been done yet), and an x86 PC to pick up the modern stuff and use software emulators.



#5 keepdreamin ONLINE  

keepdreamin

    Dragonstomper

  • 966 posts

Posted Wed Mar 1, 2017 4:17 PM

did you write that title to the tune of "YMCA"?



#6 Newsdee OFFLINE  

Newsdee

    Stargunner

  • Topic Starter
  • 1,067 posts

Posted Wed Mar 1, 2017 7:28 PM

Maybe Intel will come up with a hybrid between a hybrid PC CPU and FPGA (they bought Altera)... but it will take time.

Cost-wise this board is very attractive, it has 85K LE, USB and 24-bit VGA at $250. That's much better specs than the MiST at a slightly bigger price:
http://www.terasic.c...=English&No=836

There's a lot of extra useless stuff there (for console/retro gaming) but unfortunately putting the same chip on a custom board will be more expensive.

The reason I'm not getting one though is that I'd like to see of other ppl adopt it as well (we'd have to start porting all existing MiST cores to it).

Edited by Newsdee, Wed Mar 1, 2017 7:29 PM.


#7 Keatah OFFLINE  

Keatah

    Quadrunner

  • 18,936 posts

Posted Wed Mar 1, 2017 7:30 PM

Maybe Intel will come up with a hybrid between a hybrid PC CPU and FPGA (they bought Altera)... but it will take time.

 

Been doing it since 2011.



#8 Newsdee OFFLINE  

Newsdee

    Stargunner

  • Topic Starter
  • 1,067 posts

Posted Wed Mar 1, 2017 7:32 PM

Been doing it since 2011.


Yes but not on the mainline PC processors... imagine an i7 with configurable parts, that might be a boon for emulators if they expose GPIO pins to the outside world.

#9 Flojomojo OFFLINE  

Flojomojo

    I say boom boom boom

  • 10,495 posts
  • You say bam bam bam

Posted Wed Mar 1, 2017 7:37 PM

Mass market support of FPGA (meaning I can easily buy another from a real store if mine breaks), at mass market prices (meaning I don't have to sacrifice too hard) is appealing to me.

Until then, it seems like an expensive hobby horse like RC drones and airplanes, or VR gaming -- kinda neat but too hardcore for me at this time.

#10 Keatah OFFLINE  

Keatah

    Quadrunner

  • 18,936 posts

Posted Wed Mar 1, 2017 7:59 PM

Their entry level product is the Atom, and their top of the line is Xeon. Both have FPGA accelerators. Ranging from 60K LE to 1million LE.
 

Millions of netbooks have shipped with Stellarton E600C Atom processors already. The issue here is that the system builders rely on the FPGA to do necessary functions that'd normally be done by a motherboard. So, essentially the FPGA is not really available to the consumer to program and experiment.

 

The Xeon+FPGA (released in 2016) accelerator is highly desired in the data-mining industry and in data centers in general. Especially for SQL operations.

 

But I get what you're saying. Having the FPGA portion be available to be programmed by the end-user, well, it's simply not a priority. And anything the FPGA does is going to have to fight a battle on many fronts.

 

1- It'll be a boring old PC.

2- Any "perfect timing" the FPGA generates is going to get lost in PC quagmire, contaminated, distorted, won't it? Sure..

3- The consumer isn't ready for such performance levels.

4- Programmers simply won't know what to do with such a "hybrid" chip.

 

Matters not that they have 300+ exposed GPIO pins!

 

https://www.nextplat...compute-future/

http://www.embeddedi...hp?article=2143

https://newsroom.int...ased-processor/

https://www.theregis...ntel_xeon_fpga/

http://www.eweek.com...celerators.html

https://www.altera.c...campaign=gen_10



#11 Keatah OFFLINE  

Keatah

    Quadrunner

  • 18,936 posts

Posted Wed Mar 1, 2017 8:06 PM

Mass market support of FPGA (meaning I can easily buy another from a real store if mine breaks), at mass market prices (meaning I don't have to sacrifice too hard) is appealing to me.

Until then, it seems like an expensive hobby horse like RC drones and airplanes, or VR gaming -- kinda neat but too hardcore for me at this time.

 

And that's right mr. floho.. FPGA is rather a niche vertical market. Very very niche. And it is totally invisible in the public consciousness, even among technophiles. At least the ones I hang around with. I don't have a lot of confidence in big box stocking systems that have user-programmable FPGA rigs. Not soon.

 

Gotta remember the public consciousness of today operates on the level of power goes in, video comes out. Back in the day, computers and hobbyists automatically meant some level of intelligence.



#12 7800fan OFFLINE  

7800fan

    Quadrunner

  • 5,342 posts
  • Location:MI

Posted Wed Mar 1, 2017 8:08 PM

Still waiting for a nice console that can play everything in a classic console shell.  One was promised but dried up real fast when a few sharp-eyed users spotted a few inconsistencies with the prototype model.



#13 Keatah OFFLINE  

Keatah

    Quadrunner

  • 18,936 posts

Posted Wed Mar 1, 2017 8:12 PM

There's only one system on the drawing board like you're looking for.



#14 Newsdee OFFLINE  

Newsdee

    Stargunner

  • Topic Starter
  • 1,067 posts

Posted Thu Mar 2, 2017 12:05 AM

Gotta remember the public consciousness of today operates on the level of power goes in, video comes out. Back in the day, computers and hobbyists automatically meant some level of intelligence.


What I find interesting is that many people bemoaned for years latency and incompatibility with CRTs for software emulation, and now that we have a technology where it isn't a problem, the complains become about lack of HDMI.

I'd imagine it's not the same set of people, but it does feel like there's some Negative Nancys around. :D

#15 Flojomojo OFFLINE  

Flojomojo

    I say boom boom boom

  • 10,495 posts
  • You say bam bam bam

Posted Thu Mar 2, 2017 12:17 AM

There's only one system on the drawing board like you're looking for.

Analogue NT Mini can do a lot of it, and it's back in stock again. $450 is more than I want to play, epsecially with the imminent Nintendo Switch sucking up my money and attention, but it's here and now. http://www.analogue.co/pages/nt-mini

#16 phoenixdownita OFFLINE  

phoenixdownita

    River Patroller

  • 2,825 posts

Posted Thu Mar 2, 2017 12:43 AM

My personal stand on the Nt Mini (and its price) is that I realized I can play acceptably (to me) the 8bits system other ways hence I really can't get into it until 16bits core (and a PCE) arrive. Seriously even an FPGA system targeted only at PCE/MD/SNES/NeoGeo(if possible) would be awesome, if that system then had "lesser" 8bits core sure but I wouldn't sweat even if it didn't.

Somehow I've grown unexpectedly tired of the whole 8bit lot. Yes there are interesting/fun games over each platform or at least 2600/7800/CV/NES/SMS/INTV but deep down I know I'm perfectly fine without access to them, the PCE/MD/SNES/NeoGeo instead hold my interest much more .... those platforms have far less warts than the previous ones, more richness of colors, sounds, 2D prowess and more games I'd at least want to try, maybe I'm 8bit-done .... who knows.

So for me those 450US$+ would likely go to a NeoSD, but not right now.

 

EDIT: you can add to the fray of 8bits-done also C64/C16/ZX Spectrum/A8 and most all of the 8bits computers used as consoles. Somehow I don't really feel any interest. Konami games on MSX somewhat maintain some interest for me, but there's perfectly acceptable (to me) ways to enjoy them without the need to be on an FPGA rig except as a "binus". I also don't hold much interest on Amiga/ST/Archimedes (the 16bits computers) games and their FPGA implementation (reason other than price I don't own a MiST yet/ever).

 

Can't say I will not change my mind, it happened in the past so it can happen again. Likely just 8bits-fatigue and in general gaming computers of the last millennium fatigue.



#17 Keatah OFFLINE  

Keatah

    Quadrunner

  • 18,936 posts

Posted Thu Mar 2, 2017 1:31 AM

What I find interesting is that many people bemoaned for years latency and incompatibility with CRTs for software emulation, and now that we have a technology where it isn't a problem, the complains become about lack of HDMI.

I'd imagine it's not the same set of people, but it does feel like there's some Negative Nancys around. :D

 

I touched on that in another post.

http://atariage.com/...65#entry3708471

 

Albeit different features, like effects and blur and artifacting, blooming and scanlines. And the CRT look'n'feel. And analog output.. All of a sudden it means nothing now. Buncha hot-air blowers I guess. Farting and gassing because they can. Maybe their CRTs are getting gassy. Maybe the CRT owners are dying off, along with their toobz.  Or they're moving on from the scene. Or upgrading to a genre of games where CRTs are not desirable.

 

I've been preaching for the past several years now that operating 100% in the digital domain provides a superior experience all-around.

 

I'd never be caught dead with a scanning display, especially not now.



#18 phoenixdownita OFFLINE  

phoenixdownita

    River Patroller

  • 2,825 posts

Posted Thu Mar 2, 2017 1:51 AM

On the topic of SDRAM vs SRAM on an FPGA board.

 

How about the good old M5M5256 SRAM chips at 70ns, each has 32K capacity (they were used in the 7800 SRAM carts as well as in some CDi models (470/490 for sure) as save states atop the Dallas battery backup timer chip socket sandwich thing they had).

8 of them add up to 256KB of SRAM goodness, and that is enough to have MD/SNES/NeoGeo main memory twice over (SNES being the biigest at 128KB).

I can see a lot of 10 for 30US$.

 

Or how about cy62128, 128KB per chip also at 70ns, 2 chips and we have 256KB of SRAM goodness accessible in random order at the byte level at 13Mhz (give or take). You can get 5 of them for 13US$ (assuming they are not counterfeit ...).

 

My point is there's enough cheap SRAM that could be used on this FPGA wishful board (aka Z3K) if SDRAM is too hard to get working with a decent byte level random access and for relatively cheap at that.

 

I am sure there are more modern/cheaper/faster/still-in-production SRAM chips that could be used.

For consoles up to 16bits one of the good thing is that RAM was at a premium so they have very little (the PCE 8K, the SuperGrafx had 32K, MD 64K, SNES 128K, NeoGeo 64K) even if we account for VRAM/SoundRAM  the NeoGeo tops at 256K ish (really 214KB of SRAM), and the rest close by, 4 chip of that cy6128 would give 512KB for future proofing over 4 independent buses if needs be for concurrent access.



#19 Newsdee OFFLINE  

Newsdee

    Stargunner

  • Topic Starter
  • 1,067 posts

Posted Thu Mar 2, 2017 9:19 AM

I don't think RAM type is a major problem; the ZxUno has 512KB of SRAM and they're planning an upgrade to 2MB. It's fine for a lot of 8-bit cores but they are keeping it small. I think one reason for the upgrade is the 512KB chip has become harder to source.

The MiST has more than 40 cores with 32MB of SDRAM. As far as I know only a few arcade cores are difficult to port because of the SRAM (e.g. Bagman), but clever developers managed to port a bunch of other cores anyway.

Ideally though you'd like both. SRAM fk
or fast access and in parallel SDRAM for bigger storage.

One thing that might not be obvious to people is that with two memory banks its easy to run two entire cores independently without performance hit, as long as you have the space in the FPGA for both. Imagine for example multiplayer Gameboy games on the same machine...

Edited by Newsdee, Thu Mar 2, 2017 9:21 AM.


#20 phoenixdownita OFFLINE  

phoenixdownita

    River Patroller

  • 2,825 posts

Posted Thu Mar 2, 2017 11:31 AM

Kevtris commented that it is hard/unnecessary-tricky to exploit/use modern DDRx SDRAM when dealing with byte level random access ... so my suggestion would be to include both kinds as the total BOM price seems not to be impacted all that much by a modicus of SRAM to be used for those subsystems that needs to cross the 10MHz byte level random access barrier and at that only if they require zero wait states.
I honestly don't remember async srams much faster than 50ns (20MHz access) back in the day on the console motherboards but memory is fading so .... I do remember FPM/EDO DRAM modules with 60ns but those were already mostly PC type of rigs.



#21 Keatah OFFLINE  

Keatah

    Quadrunner

  • 18,936 posts

Posted Thu Mar 2, 2017 12:15 PM

Dunno all the specifics all videogame console RAM. But traditionally computers use cache to solve speed issues. Faster access sometimes, slower access other times. It all averages out.

 

But why not just use a larger FPGA?



#22 phoenixdownita OFFLINE  

phoenixdownita

    River Patroller

  • 2,825 posts

Posted Thu Mar 2, 2017 12:18 PM

They go up in cost pretty fast to the point that to just get more RAM (if you don't need the LEs) you're better off adding actual RAM.

Xilinx supports a mode where each 6-LUT can be converted into literally 64bits of memory (not sure about Altera), I believe you can convert ~half the LEs that way but it would be a hell of a waste if you ask me, at least until costs come down a lot.



#23 Newsdee OFFLINE  

Newsdee

    Stargunner

  • Topic Starter
  • 1,067 posts

Posted Thu Mar 2, 2017 4:27 PM

SDRAM and DDR SDRAM are different things ;) I do believe DDR is even trickier to work with. Some boards ship with three types of RAM of various sizes (e.g. 2MB, 64MB, 1GB).

In general it's not recommended to use LEs for RAM storage, as it's very inefficient.

#24 kevtris OFFLINE  

kevtris

    Dragonstomper

  • 516 posts
  • FPGA Whisperer
  • Location:Flyover, USA

Posted Thu Mar 2, 2017 5:34 PM

On the topic of SDRAM vs SRAM on an FPGA board.

 

How about the good old M5M5256 SRAM chips at 70ns, each has 32K capacity (they were used in the 7800 SRAM carts as well as in some CDi models (470/490 for sure) as save states atop the Dallas battery backup timer chip socket sandwich thing they had).

8 of them add up to 256KB of SRAM goodness, and that is enough to have MD/SNES/NeoGeo main memory twice over (SNES being the biigest at 128KB).

I can see a lot of 10 for 30US$.

 

Or how about cy62128, 128KB per chip also at 70ns, 2 chips and we have 256KB of SRAM goodness accessible in random order at the byte level at 13Mhz (give or take). You can get 5 of them for 13US$ (assuming they are not counterfeit ...).

 

My point is there's enough cheap SRAM that could be used on this FPGA wishful board (aka Z3K) if SDRAM is too hard to get working with a decent byte level random access and for relatively cheap at that.

 

I am sure there are more modern/cheaper/faster/still-in-production SRAM chips that could be used.

For consoles up to 16bits one of the good thing is that RAM was at a premium so they have very little (the PCE 8K, the SuperGrafx had 32K, MD 64K, SNES 128K, NeoGeo 64K) even if we account for VRAM/SoundRAM  the NeoGeo tops at 256K ish (really 214KB of SRAM), and the rest close by, 4 chip of that cy6128 would give 512KB for future proofing over 4 independent buses if needs be for concurrent access.

the problem is 32K of SRAM is nothing.  even 256K of SRAM is nothing.  the FPGA has plenty of blockrams on it in this size or better, and can run much faster- 150-200MHz or more.  The problem is bulk storage (i.e. neogeo carts) and sometimes raw speed (tg16).  Many tg16 games won't fit into 8 32K SRAMs.    The problem with SDRAM/DDR is latency.  These systems require random access to the storage medium to run the game, and SDRAM/DDR is designed for burst access.   i.e. you precharge, open the row, and burst out 2 or more words of data really fast.

 

With older videogame stuff that had asynchronous memory, they expect to present an address and read data X nanoseconds later.   Shoehorning this into SDRAM access means the SDRAM has to run through the entire access process for each byte/word the system expects.  i.e.  precharge, open the row, send address, read.   each of those things take a certain number of clocks to perform.   There's also refreshing to worry about.  The refreshing can be spaced out using "hidden refresh" but this also increases the latency as well. 

 

The tg16 wants data at 7.2MHz which is pretty damn fast when it comes to random access on the SDRAM, even when the SDRAM is running at 165MHz.  For PC style emulation this isn't such a huge problem- they can take advantage of bursting and caching to get around a lot of the problems with FPGA style low level hardware emulation.



#25 Newsdee OFFLINE  

Newsdee

    Stargunner

  • Topic Starter
  • 1,067 posts

Posted Thu Mar 2, 2017 6:42 PM

According to its wiki the MiST's SDRAM has a data cycle of 8 Mhz, I guess that's why it can run a PC Engine / TG16 core?
https://github.com/m.../wiki/TG68SDRAM

In other words the cycle time limit is 125ns (1/8M). If the core requires something faster then it wouldn't work.

Edited by Newsdee, Thu Mar 2, 2017 6:43 PM.






Also tagged with one or more of these keywords: FPGA, emulation, vhdl, verilog

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users