Welcome, Guest. Please login or register.

Author Topic: Motorola 68060 FPGA replacement module (idea)  (Read 52914 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Mrs Beanbag

  • Sr. Member
  • ****
  • Join Date: Sep 2011
  • Posts: 455
    • Show only replies by Mrs Beanbag
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #479 from previous page: January 22, 2013, 06:28:52 PM »
Quote from: psxphill;723488
What you're suggesting will break I/O, which is the major use of TST. You can only perform the read once & you can't do the read until all the registers are correct, or you could be reading from anywhere.
Good point. I was only thinking of tests on registers.
Signature intentionally left blank
 

Offline JimDrew

  • Lifetime Member
  • Full Member
  • ***
  • Join Date: Jun 2012
  • Posts: 241
    • Show only replies by JimDrew
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #480 on: January 22, 2013, 06:59:36 PM »
Quote from: ChaosLord;723449
I think the thing with TST being the #1 instruction in SEGA games is either:

A: All those games were compiled with either SASC or GCC which generates silly wasted TST instructions all the time.

B: The Sega Genesis uses PIO (Polled IO) for some things so it has to constantly TST a certain memory location all the time in a loop.

C: All of the above.

I agree... with the MacOS, TST is not even in the top 10 instructions used.
 

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show only replies by ChaosLord
    • http://totalchaoseng.dbv.pl/news.php
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #481 on: January 23, 2013, 06:32:32 AM »
Quote from: JimDrew;723595
I agree... with the MacOS, TST is not even in the top 10 instructions used.

Awesome.  Thanx for the confirmation. :)
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #482 on: January 31, 2013, 12:52:57 PM »
I've had a bit more of a think about this... Would it make sense to design a RISC CPU for the FPGA with the same condition codes/flags as the 68k (where instructions would set the flags as expected), but limit all the exotic addressing modes to the load/store instructions?

A simple MMU could be added to mark memory block, to assist a JIT... That way we could have an FPGA CPU that could execute code really fast, allow for easy mapping of 68k instructions to the native instructions and move the 68k->native decoding to a software JIT :)

Offline mikej

  • Hero Member
  • *****
  • Join Date: Dec 2005
  • Posts: 822
    • Show only replies by mikej
    • http://www.fpgaarcade.com
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #483 on: January 31, 2013, 06:19:59 PM »
Quote from: bloodline;724790
I've had a bit more of a think about this... Would it make sense to design a RISC CPU for the FPGA with the same condition codes/flags as the 68k (where instructions would set the flags as expected), but limit all the exotic addressing modes to the load/store instructions?

A simple MMU could be added to mark memory block, to assist a JIT... That way we could have an FPGA CPU that could execute code really fast, allow for easy mapping of 68k instructions to the native instructions and move the 68k->native decoding to a software JIT :)


This is quite a neat trick, I've been looking into it for my own 68K core.
The Replay PS2 keyboard/mouse controller uses a picoblaze softcore as it is smaller than the logic used otherwise - and you can to a lot more.

http://www.roman-jones.com/PB8051Microcontroller.htm
Here they are using it as a 8031...
/MikeJ
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #484 on: January 31, 2013, 11:20:33 PM »
Quote from: mikej;724830
This is quite a neat trick, I've been looking into it for my own 68K core.
The Replay PS2 keyboard/mouse controller uses a picoblaze softcore as it is smaller than the logic used otherwise - and you can to a lot more.

http://www.roman-jones.com/PB8051Microcontroller.htm
Here they are using it as a 8031...
/MikeJ
:)

I've actually spent a few days trying to design my own 68K emulator, to work out how to modify the MIPS ISA to make it super efficient at 68k emulation... I used a three jump table design, with first using the first 4bits of the instruction, the next jump table using not the next three bits, but the three bits after them and then finally the upper three bits below the top nibble... At this point I got fed up... There seems to be about 504 unique instructions, but little organisation... I prefer RISC here ;)

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #485 on: February 01, 2013, 09:30:37 AM »
Quote from: mikej;724830
This is quite a neat trick, I've been looking into it for my own 68K core.
The Replay PS2 keyboard/mouse controller uses a picoblaze softcore as it is smaller than the logic used otherwise - and you can to a lot more.

http://www.roman-jones.com/PB8051Microcontroller.htm
Here they are using it as a 8031...
/MikeJ
Thanks for the PicoBlaze hint, that lead me to the microBlase which lead me to the DLX... A sort of stripped back MIPS :)

Offline Heiroglyph

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show only replies by Heiroglyph
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #486 on: February 01, 2013, 02:32:59 PM »
I had considered this as well.  I didn't think of modifying the original CPU quite as heavily as you mention though.  It's a very interesting idea.

That brings me back to the question of just how much performance can you get out of a general purpose FPGA CPU? Is that a sufficient upgrade for the time and money spent?

Edit: By performance, I don't mean MHz or MIPs, actual work done.  RISC vs CISC instructions per second are as meaningless as MHz.
« Last Edit: February 01, 2013, 02:36:19 PM by Heiroglyph »
 

Offline JimDrew

  • Lifetime Member
  • Full Member
  • ***
  • Join Date: Jun 2012
  • Posts: 241
    • Show only replies by JimDrew
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #487 on: February 11, 2013, 04:59:46 PM »
Use several BIG lookup tables if you can afford the memory.  I tried several smaller tables, but ended up using a couple of large tables.  I think the emulation (PC) ended up being around 1.25MB in total size because tables were imbedded in the executable (along with the instruction emulation), repeated over and over in most cases, instead of being built in memory.  But, the speed difference is dramatic.  You have to remember, if you can save just 4 cycles, benchmark programs and anything else sitting in loop is going to really benefit from it!

I think Mike's table based microcode lookup is going to the most efficient (and fastest) method of doing the microcode core emulation.
« Last Edit: February 11, 2013, 07:18:28 PM by JimDrew »
 

Offline psxphill

Re: Motorola 68060 FPGA replacement module (idea)
« Reply #488 on: February 11, 2013, 05:15:25 PM »
Quote from: bloodline;724860
I've actually spent a few days trying to design my own 68K emulator, to work out how to modify the MIPS ISA to make it super efficient at 68k emulation...

Going from a general purpose cpu would end up as an inefficient microcode based 68k.
 
It makes sense to dump the original 68000 & 68010 microcode to emulate those processors. Not all of it's done yet though, there is some work hopefully happening soon.
 
I don't know how much of the 68020 and later were microcoded.
 

Offline AJCopland

Re: Motorola 68060 FPGA replacement module (idea)
« Reply #489 on: February 11, 2013, 06:02:35 PM »
Quote from: psxphill;726034
Going from a general purpose cpu would end up as an inefficient microcode based 68k.
 
It makes sense to dump the original 68000 & 68010 microcode to emulate those processors. Not all of it's done yet though, there is some work hopefully happening soon.
 
I don't know how much of the 68020 and later were microcoded.


That isn't the idea thought is it? He mentioned looking at the MIPS as a basis so if I was doing that it would be to take the ALU and other sub-sections and then work out how to feed the 68k through it.

Rather like parts of the Natami/N68k idea was inspired by Paul Metzgen's ALU paper "A High Performance 32-bit ALU for Programmable Logic", it's not meant for 68k but it's a proven and powerful basis to build upon.

Although yes I agree that a microcoded 68k would probably be a bit rubbish. That wasn't at all the impression I got from Bloodlines post.
Be Positive towards the Amiga community!
 

Offline Mrs Beanbag

  • Sr. Member
  • ****
  • Join Date: Sep 2011
  • Posts: 455
    • Show only replies by Mrs Beanbag
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #490 on: February 12, 2013, 11:00:44 AM »
Yes the ALU is a piece you could get from various places ready made. I was pondering the possibility of using the cache management systems out of the OpenSPARC core.

68060 is definitely microcoded to some degree, move , is split into two "standard operations". No doubt fancy addressing modes are split up into even more operations. The RISC cores (x2) seem to be able to handle register-memory operations on their own though.
Signature intentionally left blank
 

Offline Hattig

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 901
    • Show only replies by Hattig
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #491 on: February 12, 2013, 11:27:50 AM »
Quote from: Mrs Beanbag;726087
Yes the ALU is a piece you could get from various places ready made. I was pondering the possibility of using the cache management systems out of the OpenSPARC core.


Don't some FPGAs actually include ALUs as hardware on the chip, as they're a common component of the logic that people implement using an FPGA.

However for the non-ALU part, using features from other fast cores makes a lot of sense, e.g., the cache interface and implementation and so on.
 

Offline FrenchShark

  • Full Member
  • ***
  • Join Date: Jan 2004
  • Posts: 181
    • Show only replies by FrenchShark
    • http://www.arcaderetrogaming.com
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #492 on: March 17, 2013, 03:42:33 PM »
Quote from: mikej;724830
This is quite a neat trick, I've been looking into it for my own 68K core.
The Replay PS2 keyboard/mouse controller uses a picoblaze softcore as it is smaller than the logic used otherwise - and you can to a lot more.

http://www.roman-jones.com/PB8051Microcontroller.htm
Here they are using it as a 8031...
/MikeJ


Hello,

I have done that already with the J68 core :
https://github.com/rkrajnc/minimig-de1/blob/master/minimig-src/j68/j68.v
It is loosely based on the J1 core (hence the name). So the heart of it is a stack-based CPU.
The ALU is a 16-bit ALU, compatible with a 68000 ALU.
It has some special micro-instruction for the effective address computation.
The core must run 2x to 3x faster than the original to reach the same speed.
The advantage is the size : less than 2000 LUTs. Micro-code take 2048 x 20 bits.
With further optimization (cache, prefetch, 32-bit ALU and effectve address ALU), I am sure it can be as fast as a 030/040.
Right now, this softcore can boot a Kickstart 2.04 in my AmiSOC core.

Regards,

Frederic
 

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show only replies by ChaosLord
    • http://totalchaoseng.dbv.pl/news.php
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #493 on: March 17, 2013, 05:18:42 PM »
How many LUTs does it take to make a slice?


Trying to figure out which is smaller.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline FrenchShark

  • Full Member
  • ***
  • Join Date: Jan 2004
  • Posts: 181
    • Show only replies by FrenchShark
    • http://www.arcaderetrogaming.com
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #494 on: March 17, 2013, 06:15:10 PM »
Quote from: ChaosLord;729546
How many LUTs does it take to make a slice?


Trying to figure out which is smaller.


Usually, one slice contains 2 LUTs.