Welcome, Guest. Please login or register.

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

Description:

0 Members and 1 Guest are viewing this topic.

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 from previous page: 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.
 

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 #495 on: March 17, 2013, 07:33:23 PM »
Okey so ur 16-bit 68000 core is about triple the size of that PB8051 Microcontroller thingy that MikeJ is using.

But ur core has triple the style points of a PB8051. :)
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 jkonstan

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 243
    • Show only replies by jkonstan
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #496 on: March 17, 2013, 07:33:31 PM »
Frederic,
your 68K core (Verilog) code looks interesting and appears to have taken a fair amount of effort. This is some good work.
How much validation have you done on your 68K Verilog CPU core?
The MC216 is the only place that this core is in use as the 68K core? The older Minimig code ports use the TG68K VHDL 68K core (Minimig DE1/DE2/MIST code ports).
I looked over the J1 Fourth CPU paper as well.  

Quote from: FrenchShark;729538
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 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 #497 on: March 17, 2013, 10:29:59 PM »
Quote from: jkonstan;729555
Frederic,
your 68K core (Verilog) code looks interesting and appears to have taken a fair amount of effort. This is some good work.
How much validation have you done on your 68K Verilog CPU core?
The MC216 is the only place that this core is in use as the 68K core? The older Minimig code ports use the TG68K VHDL 68K core (Minimig DE1/DE2/MIST code ports).
I looked over the J1 Fourth CPU paper as well.


It is not yet in the MCC216 core.
The next Amiga core in the MCC will have the J68 and a new (smaller) ECS core.
The whole Amiga core takes just 8000 LUTs.
I have validated the core with a test assembly code that exercises all opcodes/addressing modes (over 1500 cases). The registers outputs after each instruction was compared with Musashi's registers outputs.
I also ran some test programs that use the fast floating point library from Motorola.
The VUBUG monitor was also tested on it.
Finally, I was able to virtually start the Kickstart 2.0 under Verilator : 10 seconds of Amiga execution takes around 1 hour of simulation on a core i5 430M.

Regards,

Frederic
 

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 #498 on: March 17, 2013, 10:46:09 PM »
Quote from: ChaosLord;729554
Okey so ur 16-bit 68000 core is about triple the size of that PB8051 Microcontroller thingy that MikeJ is using.

But ur core has triple the style points of a PB8051. :)


I was comparing the ways :
- Taking a picoblaze to emulate a 8051
- Taking a J1 to emulate a 68000.
I would not take a J68 just to make a keyboard controller. :-)

Moreover, emulation is not the exact term since the 68000 "emulation" is heavily HW assisted :
- instruction decoder generates microcode address
- specialized micro instructions help evaluating the effective address
- the ALU is 68000 compatible

On the J68, the bus interface is what is taking most of the room (1000+ LUTs).
Big endian is cool but really resource hungry.

Regards,

Frederic
 

Offline freqmaxTopic starter

  • Hero Member
  • *****
  • Join Date: Mar 2006
  • Posts: 2179
    • Show only replies by freqmax
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #499 on: March 17, 2013, 11:05:53 PM »
Why is big endian resource hungry?

(perhaps why Intel x86 is little endian)
 

Offline jkonstan

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 243
    • Show only replies by jkonstan
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #500 on: March 18, 2013, 12:53:18 AM »
Fredric,
In your 68K Verilog code, I did not see code for the 68k interrupt acknowledge cycle (IACK cycle). The Amiga uses the 68K interrupt acknowledge cycle while the Atari ST (68K) uses both 68K Auto vector interrupts & 68K IACK cycle (for 68901MFP).
I may have missed this in your code, or do you need to still add this support in your 68K core?

Quote from: FrenchShark;729572
I was comparing the ways :
- Taking a picoblaze to emulate a 8051
- Taking a J1 to emulate a 68000.
I would not take a J68 just to make a keyboard controller. :-)

Moreover, emulation is not the exact term since the 68000 "emulation" is heavily HW assisted :
- instruction decoder generates microcode address
- specialized micro instructions help evaluating the effective address
- the ALU is 68000 compatible

On the J68, the bus interface is what is taking most of the room (1000+ LUTs).
Big endian is cool but really resource hungry.

Regards,

Frederic
 

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 #501 on: March 18, 2013, 06:42:04 AM »
Quote from: jkonstan;729586
Fredric,
In your 68K Verilog code, I did not see code for the 68k interrupt acknowledge cycle (IACK cycle). The Amiga uses the 68K interrupt acknowledge cycle while the Atari ST (68K) uses both 68K Auto vector interrupts & 68K IACK cycle (for 68901MFP).
I may have missed this in your code, or do you need to still add this support in your 68K core?


Since all the Kickstart ROMs contain 0018 0019 001A 001B 001C 001D 001E 001F at location FFFFF0 - FFFFFF, I am not using interrupt aknowledge cycles, just auto vector.
That's enough for running an Amiga.

Regards,

Frederic
 

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 #502 on: March 18, 2013, 12:10:36 PM »
Do we care so much about the size of the core anyway? If the aim of the game is the fastest 68k CPU, the fastest rated FPGAs tend to be quite big anyway. Unless we're squeezed for space I wouldn't worry about it.
Signature intentionally left blank
 

Offline billt

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 910
    • Show only replies by billt
    • http://www.billtoner.net
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #503 on: March 18, 2013, 02:39:48 PM »
Quote from: Mrs Beanbag;729636
Do we care so much about the size of the core anyway? If the aim of the game is the fastest 68k CPU, the fastest rated FPGAs tend to be quite big anyway. Unless we're squeezed for space I wouldn't worry about it.


For this particular thread topic, probably we do not care as much about core size. But as some potential softcore CPU designs overlap into other project boundaries, there are other reasons to make a very small softcore. Then anyone working on this thread's topic can choose to try that out or not.

Anyway, one big step in our thread is hardware. A PCB with an FPGA on it. That is a big hurdle to any other detail. I've started an open PCB design at upverter, but have not progressed to any meaningful degree. I also have a related project at github, partially for any HDL that may be tried, and partially to hold Eagle design files since upverter did not yet support BGA footprints. (I believe it does now)

Anyone can join in, but don't wait for me to finish anything. My track record for completion is not too great. Never enough time, and I have one project far more important to me than even this one... And of course feel free to do N more independent projects. Hopefully at least one will have something to plug in someday.

http://upverter.com/amigabill/215b379ff943fc80/FP68060/

https://github.com/amigabill/fp68060
Bill T
All Glory to the Hypnotoad!
 

Offline psxphill

Re: Motorola 68060 FPGA replacement module (idea)
« Reply #504 on: March 18, 2013, 03:10:37 PM »
Quote from: FrenchShark;729606
Since all the Kickstart ROMs contain 0018 0019 001A 001B 001C 001D 001E 001F at location FFFFF0 - FFFFFF, I am not using interrupt aknowledge cycles, just auto vector.
That's enough for running an Amiga.

All official kickstarts contain that & only 68000 based Amiga's use it.
 
However it can be changed to allow for WHDLoad quit key support on 68000 by pointing the vector back inside rom and only passing on to the actual vector if the quit key is not pressed (basically what the ACA500 will do ).
 
I don't know whether Datel Action Replay and the rommable hrtmon make use of this functionality also, but I can imagine it would be useful.
 
I think it's worth supporting the cycles if you're doing a pure 68000 core.
 
Quote from: freqmax;729576
Why is big endian resource hungry?
 
(perhaps why Intel x86 is little endian)

Big vs little endian is an arbitrary choice.
 
The name comes from Gulliver's travels.
 
http://en.wikipedia.org/wiki/Lilliput_and_Blefuscu
 
Accessing little endian data on a big endian processor (and vice versa) is an extra overhead. However when emulating a 68000 the overhead is very small because it can't access unaligned data & it just takes a well placed xor of the address lines. 68020 and later plus all x86 processors can do unaligned access, so you have to take those cases into account. I'm not sure there should be any overhead in an FPGA implementation.
 
Quote from: Mrs Beanbag;726087
68060 is definitely microcoded to some degree, move , is split into two "standard operations".

When you split instructions up then they are called micro-ops, but this is unrelated to micro-code. The micro-ops might be executed either using micro-code or they might be hard coded.
« Last Edit: March 18, 2013, 03:28:13 PM by psxphill »
 

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 #505 on: March 19, 2013, 06:45:39 AM »
Quote from: psxphill;729655
All official kickstarts contain that & only 68000 based Amiga's use it.
 
However it can be changed to allow for WHDLoad quit key support on 68000 by pointing the vector back inside rom and only passing on to the actual vector if the quit key is not pressed (basically what the ACA500 will do ).
 
I don't know whether Datel Action Replay and the rommable hrtmon make use of this functionality also, but I can imagine it would be useful.
 
I think it's worth supporting the cycles if you're doing a pure 68000 core.

I do not have anymore room in the microcode ROM.
I can anyway do it differently since I have full access to the design, for example I can map the interrupt vectors at a different address by changing the micro-code.


Quote

Big vs little endian is an arbitrary choice.
 
The name comes from Gulliver's travels.
 
http://en.wikipedia.org/wiki/Lilliput_and_Blefuscu
 
Accessing little endian data on a big endian processor (and vice versa) is an extra overhead. However when emulating a 68000 the overhead is very small because it can't access unaligned data & it just takes a well placed xor of the address lines. 68020 and later plus all x86 processors can do unaligned access, so you have to take those cases into account. I'm not sure there should be any overhead in an FPGA implementation.

big endian is human's natural order. little endian is computer's natural order.
A xor on the address lines is just your view as a programmer. Where are address lines A0 and A1 when you are dealing with a 32-bit data bus ?

Regards,

Frederic
 

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 #506 on: March 19, 2013, 04:05:31 PM »
On another note... I just found a source in China with the Rev 006 MC68060RC50 chips.  They apparently have over 10,000 of them left over from a production run of call center boards.  I have a couple of samples coming.
 

Offline Heiroglyph

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show only replies by Heiroglyph
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #507 on: March 19, 2013, 04:27:45 PM »
Wow, that's enough to supply the community for the rest of time.

Your inbox will overflow in 3, 2...
 

Offline wawrzon

Re: Motorola 68060 FPGA replacement module (idea)
« Reply #508 on: March 19, 2013, 07:19:22 PM »
@jimdrew:
if they are genuine. i suppose damand is there, if you count mikej, yaqube and their fpga arcade customers in.

@billt:
dont see much in there, but if there was, i likely couldnt tell;)

@frenchshark:
interesting, keep us posetd

@heiroglyph:
hows going! some progress?
 

Offline billt

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 910
    • Show only replies by billt
    • http://www.billtoner.net
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #509 on: March 19, 2013, 09:12:27 PM »
Quote from: JimDrew;729738
On another note... I just found a source in China with the Rev 006 MC68060RC50 chips.  They apparently have over 10,000 of them left over from a production run of call center boards.  I have a couple of samples coming.

Let us know what they actually are after some testing. Hopefully they don't give you a couple rare real ones for samples to get you into a big buy of fake ones... If this turns out legit, you could end up being a supplier to a lot of desperate Amiga fans. :)

As this is a highly counterfeited part (the 06 version in particular), don't believe the writing on the package. That's easily changed. See if you can set up a test rig like how mikej checks them, and have the guts of the chip tell you what it actually is. it seems odd that such a large pile of them are sitting around somewhere when people are having such a terrible time getting them.
« Last Edit: March 19, 2013, 09:15:00 PM by billt »
Bill T
All Glory to the Hypnotoad!