MMU on FPGA with H5 Phoenix platform

Progress on our FPGA cores.
ijor
Posts: 825
Joined: 30 Nov 2018 20:45

MMU on FPGA with H5 Phoenix platform

Post by ijor »

We have a FPGA running a cycle exact MMU implementation on an H5 dev board:

20240912_142638.jpg
20240923_141958.jpg

The FPGA board itself, as you can see, is a Qmtech board. The adapters were made by @exxos and also based on work by @Icky . Thanks a lot to both!

Testing closure:
20241014_210924.jpg


I implemented an enhancement that you could select a specific wakeup. Very useful for debugging and testing purposes:
20241014_210521.jpg


One type of tests I always do and consider crucial, is to tests programs and configurations that fail in real hardware. An accurate implementation (either FPGA or emulator) should fail these cases as they fail in real hardware. The NOSTALGIC original (not patched) demo works in some wakestates, but fails in others (that's why it was eventually patched):


20241002_131515.jpg

20241002_130830.jpg


PS: Sorry for the pictures quality :(
You do not have the required permissions to view the files attached to this post.
http://github.com/ijor/fx68k 68000 cycle exact FPGA core
FX CAST Cycle Accurate Atari ST core
http://pasti.fxatari.com
User avatar
sporniket
Site sponsor
Site sponsor
Posts: 1164
Joined: 26 Sep 2020 21:12
Location: France

Re: MMU on FPGA

Post by sporniket »

amazing work :)
troed
Posts: 936
Joined: 21 Aug 2017 22:27

Re: MMU on FPGA

Post by troed »

*tears of actual joy*

This is amazing! Many many thanks for this work. How is the clock synchronization with GLUE for the wakestate selection performed?
User avatar
rubber_jonnie
Site Admin
Site Admin
Posts: 14888
Joined: 17 Aug 2017 19:40
Location: Essex

Re: MMU on FPGA

Post by rubber_jonnie »

Great work :)
Collector of many retro things!
800XL and 65XE both with Ultimate1MB,VBXL/XE & PokeyMax, SIDE3, SDrive Max, 2x 1010 cassette, 2x 1050 one with Happy mod, 3x 2600 Jr, 7800 and Lynx II
Approx 20 STs, including a 520 STM, 520 STFMs, 3x Mega ST, MSTE & 2x 32 Mhz boosted STEs
Plus the rest, totalling around 50 machines including a QL, 3x BBC Model B, Electron, Spectrums, ZX81 etc...
tin
Posts: 15
Joined: 26 Feb 2019 17:48

Re: MMU on FPGA

Post by tin »

This is so very awesome! Thank you so much, Ijor et al.
User avatar
alexh
Site sponsor
Site sponsor
Posts: 1335
Joined: 17 Oct 2017 16:51
Location: Oxfordshire

Re: MMU on FPGA

Post by alexh »

Interesting work. Is this a new design? Or based on your work for FX Cast? I understand that making an FPGA of individual chips includes an additional challenge to a core (e.g. collection of chips) with real bidirectional I/O.
Senior Principal ASIC Engineer - SystemVerilog, VHDL
Thalion Webshrine - http://thalion.atari.org
ST,STf,STfm,STe,MegaST,MegaSTe,Falcon060
A500+,A600,A4000/060,CD32,CDTV
User avatar
Cyprian
Posts: 542
Joined: 22 Dec 2017 09:16
Location: Warszawa, Poland

Re: MMU on FPGA

Post by Cyprian »

Great. Many thanks @ijor
ATW800/2 / V4sa / Lynx I / Mega ST 1 / 7800 / Portfolio / Lynx II / Jaguar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
DDD HDD / AT Speed C16 / TF536 / SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
http://260ste.atari.org
ijor
Posts: 825
Joined: 30 Nov 2018 20:45

Re: MMU on FPGA

Post by ijor »

troed wrote: 15 Oct 2024 08:58 How is the clock synchronization with GLUE for the wakestate selection performed?
Well, it is far much easier to implement this inside the FPGA, than with external logic. I can detect the GLUE wakestate alignment by monitoring the DE signal, and then I can adapt my own phase accordingly to the wanted wakestate.
alexh wrote: 15 Oct 2024 09:45 Interesting work. Is this a new design? Or based on your work for FX Cast? I understand that making an FPGA of individual chips includes an additional challenge to a core (e.g. collection of chips) with real bidirectional I/O.
It is based on my old core. But yes, as you are saying, there are additional requirements when you need to interface with multiple "real" chips. I also had to implement the old school Async DRAM interface from scratch, as my cores were designed for the "MiST/MiSTer" hardware that use synchronous DRAM.

Particularly challenging is to adjust the timing to interface with chips that have no published timing specifications, like GLUE and SHIFTER in this case. Without datasheets you have to make some assumptions based on measurements and some common sense. But even with datasheets it can be challenging. I.e, it is quite difficult to meet timing for the worst case 68000 specifications. According to the 68K datasheet the clock to output delay can be up to 70ns. That's more than half cycle at ~8MHz! I'm sure the original chips didn't met worst case timing. They assumed, and probably correctly, that you never actually run the chips at the worst case conditions.

Plus the 68K bus is designed to be asynchronous. The original chips use either async latches or flip flops clocked by the chip select signals (not by the actual clock). As I"m sure you know, it is important to avoid these old school async techniques on modern FPGAs. But then it is not so easy to maintain cycle accuracy when you use a fully synchronous design. But what can I say, it was a lot of fun! :)
http://github.com/ijor/fx68k 68000 cycle exact FPGA core
FX CAST Cycle Accurate Atari ST core
http://pasti.fxatari.com
User avatar
Badwolf
Site sponsor
Site sponsor
Posts: 3043
Joined: 19 Nov 2019 12:09

Re: MMU on FPGA

Post by Badwolf »

Wow! Congratulations!

:o

I admit I had clicked on the topic thinking it was another 'is there such a thing...' post before I saw who'd written it. :lol:

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
User avatar
exxos
Site Admin
Site Admin
Posts: 28344
Joined: 16 Aug 2017 23:19
Location: UK

Re: MMU on FPGA

Post by exxos »

:bravo:

I want to further add that this is a monumental step forward in the Phoenix platform development. As mentioned previously many times, once we can control the chipset within FPGA, we can add to it as much as we want, including increasing memory, increasing the speed and adding in other features that we may see fit in the future. A 32Mhz true bus speed may finally be on the horizon... With of course the option to switch back to the original speed which are cycle accurate with the original Atari chipset to maintain maximum compatibility with legacy software.

Return to “FPGA DEVELOPMENT”

Who is online

Users browsing this forum: ClaudeBot and 6 guests