680x0 cores

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, spiny, Greenious, Sorgelig, Moderator Team

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2895
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: FX CAST Atari ST core

Postby Sorgelig » Tue Oct 23, 2018 4:56 am

ijor wrote:
Sorgelig wrote:Is it 68000 or 68010/20/30?


Bare 68000 only. You probably need almost completely separated cores for the other processors, if you want cycle accuracy. There is probably not much in common between the 68030 (or even the 68020 for that matter) and the 68000 at the gate level. The 68010 is very close to the 68000, but I guess there is not as much interest in the 68010.

Yeah, no much interest in exactly 68010, as it's a 68000 with couple new instruction.
Amiga AGA core suffers from not 100% compatible 68020. It's not about cycle accuracy but about instructions implementation.

Besides that, your 68000 cycle accurate core will be helpful for other cores.

fpgaarcade
Atari freak
Atari freak
Posts: 66
Joined: Thu Sep 20, 2007 10:06 pm
Location: Sweden

Re: FX CAST Atari ST core

Postby fpgaarcade » Tue Oct 23, 2018 6:55 am

Sorgelig wrote:
ijor wrote:
Sorgelig wrote:Is it 68000 or 68010/20/30?


Bare 68000 only. You probably need almost completely separated cores for the other processors, if you want cycle accuracy. There is probably not much in common between the 68030 (or even the 68020 for that matter) and the 68000 at the gate level. The 68010 is very close to the 68000, but I guess there is not as much interest in the 68010.

Yeah, no much interest in exactly 68010, as it's a 68000 with couple new instruction.
Amiga AGA core suffers from not 100% compatible 68020. It's not about cycle accuracy but about instructions implementation.

Besides that, your 68000 cycle accurate core will be helpful for other cores.


I've finished adding the missing instructions to my m68k (tg68k) variant. It's still undergoing testing but meetings timing and runs. I'm trying to fix some of the stack frames then I'm done and will switch efforts to the new core. This will go on git shortly.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2895
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: FX CAST Atari ST core

Postby Sorgelig » Tue Oct 23, 2018 7:48 am

fpgaarcade wrote:I've finished adding the missing instructions to my m68k (tg68k) variant. It's still undergoing testing but meetings timing and runs. I'm trying to fix some of the stack frames then I'm done and will switch efforts to the new core. This will go on git shortly.

are you talking about 68020 instructions?

fpgaarcade
Atari freak
Atari freak
Posts: 66
Joined: Thu Sep 20, 2007 10:06 pm
Location: Sweden

Re: FX CAST Atari ST core

Postby fpgaarcade » Tue Oct 23, 2018 8:05 am

Sorgelig wrote:
fpgaarcade wrote:I've finished adding the missing instructions to my m68k (tg68k) variant. It's still undergoing testing but meetings timing and runs. I'm trying to fix some of the stack frames then I'm done and will switch efforts to the new core. This will go on git shortly.

are you talking about 68020 instructions?

yup, cas2, cmp2 all those blighters.

ijor
Hardware Guru
Hardware Guru
Posts: 3590
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: FX CAST Atari ST core

Postby ijor » Tue Oct 23, 2018 8:27 am

fpgaarcade wrote:I've finished adding the missing instructions to my m68k (tg68k) variant.


What's the max speed of tg68K? The ideal combination would be to include two cores, one plain 68000 cycle accurate. And a non cycle accurate faster core. I was (still am) considering the idea for my ST core. You obviously don't need cycle accuracy for "turbo mode", and you pay a performance price on a core for being cycle accurate.

For the MiSTer FPGA (and probably also for your reply board?), including two 68K cores is no big deal.
Fx Cast: Atari St cycle accurate fpga core

fpgaarcade
Atari freak
Atari freak
Posts: 66
Joined: Thu Sep 20, 2007 10:06 pm
Location: Sweden

Re: FX CAST Atari ST core

Postby fpgaarcade » Tue Oct 23, 2018 8:47 am

ijor wrote:
fpgaarcade wrote:I've finished adding the missing instructions to my m68k (tg68k) variant.


What's the max speed of tg68K? The ideal combination would be to include two cores, one plain 68000 cycle accurate. And a non cycle accurate faster core. I was (still am) considering the idea for my ST core. You obviously don't need cycle accuracy for "turbo mode", and you pay a performance price on a core for being cycle accurate.

For the MiSTer FPGA (and probably also for your reply board?), including two 68K cores is no big deal.


So, I've "tidied" up the tg68k a lot, mainly in an attempt to understand it, and renamed it m68k. I've managed to get rid of most of the loops, and unrolled the decode pipeline. I'm in discussions with Sorgelig to use a common CPU repos to avoid the fragmentation and maintenance hell we have at the moment.

It runs at 28MHz in my old spartan3e no problem. I have a wrapper for it I can also move in to the same dir which has separate I and D caches and prefetch. The next step is to make it true 32 bit IO - currently the cache is 32 bit but the CPU core has a 16 bit datapath.

I was also planning to use two CPU cores :)
I'm working on a new clean-room core now I understand what is involved based on some of the RISC-V codebase.
/Mike

fpgaarcade
Atari freak
Atari freak
Posts: 66
Joined: Thu Sep 20, 2007 10:06 pm
Location: Sweden

Re: FX CAST Atari ST core

Postby fpgaarcade » Tue Oct 23, 2018 8:52 am

Igor,
Not sure if you seen but I also have a daughterboard with an 060 attached. I can use this, as well as the 68000 db for verification. I'm also in the process of attaching an 020 with some of the Amiga chips for corner case verification.

Replay1 is EOL now, the DB has been shipped to current users but full focus is on Replay2 now, wherever that takes us. If you have any ideas for board features let me now and I'll ping you the current spec.

replay_060_floppy.jpg


/Mike
You do not have the required permissions to view the files attached to this post.

ijor
Hardware Guru
Hardware Guru
Posts: 3590
Joined: Sat May 29, 2004 7:52 pm
Contact:

680x0 cores

Postby ijor » Tue Oct 23, 2018 9:44 am

This thread is a split from this other thread: viewtopic.php?f=117&t=34555
Fx Cast: Atari St cycle accurate fpga core

ijor
Hardware Guru
Hardware Guru
Posts: 3590
Joined: Sat May 29, 2004 7:52 pm
Contact:

680x0 cores

Postby ijor » Tue Oct 23, 2018 10:25 am

fpgaarcade wrote:It runs at 28MHz in my old spartan3e no problem.


Doesn't seem too much. My own cycle accurate core can reach close to 40MHz, and I didn't try too much optimization because that's much more than what I need for the ST core. I also expect it could get much higher if I would be ready to sacrifice some cycle accuracy

But of course, a 020 core should be slower (lower fmax) than a 16-bits core. Is it possible to remove the 020 functionality and get a bar fast 68000?
Fx Cast: Atari St cycle accurate fpga core

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2895
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: 680x0 cores

Postby Sorgelig » Tue Oct 23, 2018 10:46 am

ijor wrote:But of course, a 020 core should be slower (lower fmax) than a 16-bits core. Is it possible to remove the 020 functionality and get a bar fast 68000?

since m68k is based on tg68k, it uses 16bit bus and overall is 68000 with additional 020 instructions. So, it should be already what you need.

fpgaarcade
Atari freak
Atari freak
Posts: 66
Joined: Thu Sep 20, 2007 10:06 pm
Location: Sweden

Re: 680x0 cores

Postby fpgaarcade » Tue Oct 23, 2018 11:29 am

Sorgelig wrote:
ijor wrote:But of course, a 020 core should be slower (lower fmax) than a 16-bits core. Is it possible to remove the 020 functionality and get a bar fast 68000?

since m68k is based on tg68k, it uses 16bit bus and overall is 68000 with additional 020 instructions. So, it should be already what you need.


Maybe we should do this in a different thread.
It's 28MHz with the combinatorial paths through the cache controller (which has a x4 clock). It executes many instructions in a single cycle.
I haven't tweaked it for a modern FPGA yet, but it should go considerably faster.
I'm aiming for 100MHz with the rewrite.

ijor
Hardware Guru
Hardware Guru
Posts: 3590
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: 680x0 cores

Postby ijor » Tue Oct 23, 2018 12:28 pm

fpgaarcade wrote:I'm aiming for 100MHz with the rewrite.


Sweet :cheers:

Maybe we should do this in a different thread.


We are already. I splitted the thread. But the previous posts retain the title of the original thread.

I haven't tweaked it for a modern FPGA yet, but it should go considerably faster.


Really? I know you work with Xilinx devices. I am more familiar with Intel/Altera stuff and they don't go any faster for the low cost families. Later families are cheaper (for the same density) and consume less power, but they are not any faster and sometimes they are even slightly slower. The Cyclone V family (MiSTer) has a much slower I/O interface (higher delay to and from the main core) than the Cyclone III (MIST). You do might sometimes get a faster compilation because the newer versions of the tools don't support older families.

Of course, the high performance and extremely expensive families go faster on any new generation.
Fx Cast: Atari St cycle accurate fpga core

fpgaarcade
Atari freak
Atari freak
Posts: 66
Joined: Thu Sep 20, 2007 10:06 pm
Location: Sweden

Re: 680x0 cores

Postby fpgaarcade » Tue Oct 23, 2018 1:07 pm

Of course, the high performance and extremely expensive families go faster on any new generation.


I use Altera/Intel a bit as well, but it's mainly Xilinx ultrascale now for ASIC prototyping etc.
The spartan3e is a 4 input lut, the spartan7 is a 6 input and that alone makes a big difference.

I'm also looking at the fast (-2) spartan7 to get decent HDMI speeds out of it, and there is quite a jump between the -1 and -2 speed grades.
/Mike

ex68k
Atari freak
Atari freak
Posts: 55
Joined: Sat Oct 26, 2013 11:13 am

Re: 680x0 cores

Postby ex68k » Fri Oct 26, 2018 7:04 pm

fpgaarcade wrote:I'm also looking at the fast (-2) spartan7 to get decent HDMI speeds out of it, and there is quite a jump between the -1 and -2 speed grades.
/Mike


Just get an Artix, and go DisplayPort ...

ex68k
Atari freak
Atari freak
Posts: 55
Joined: Sat Oct 26, 2013 11:13 am

Re: FX CAST Atari ST core

Postby ex68k » Fri Oct 26, 2018 7:06 pm

fpgaarcade wrote:I've finished adding the missing instructions to my m68k (tg68k) variant. It's still undergoing testing but meetings timing and runs. I'm trying to fix some of the stack frames then I'm done and will switch efforts to the new core. This will go on git shortly.


Intersting! Any Idea, when you will put it up on GIT?

fpgaarcade
Atari freak
Atari freak
Posts: 66
Joined: Thu Sep 20, 2007 10:06 pm
Location: Sweden

Re: 680x0 cores

Postby fpgaarcade » Wed Nov 14, 2018 9:10 pm

This week I hope. I've been running comparisons with the fx68k design when the core is in 68000 mode. There are some minor differences in stackframes I would like to fix, but I think it's good enough.


Return to “MiSTer”

Who is online

Users browsing this forum: No registered users and 9 guests