Welcome, Guest. Please login or register.

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

Description:

0 Members and 1 Guest are viewing this topic.

Offline Heiroglyph

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show all replies
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #14 on: January 14, 2013, 04:35:25 PM »
Quote from: bloodline;722454
@ Heiroglyph

I'm concerned that USB (any flavour) will have too high a latency to be used for a CPU/Chipset bus, I'm gonna stick with my original idea of an SPI and see if I can make the numbers add up :)

That's cool with me, it would be way simpler if possible.  I've seen the opposite problem with SPI in my thought experiments, low latency but low throughput.

Maybe I'm shooting for to too much memory speed since I'm trying to match the best numbers I've seen.  Lower bandwidth might be acceptable.

The other option I've looked into a lot is being a PCI device.  It cuts out the ability to use really cheap SOCs, but many of the nicer ones (especially Freescale and TI) have PCI or PCI-e.  I don't think either latency or bandwidth would be a problem, even for ZIII, but the hardware cost would go up.
 

Offline Heiroglyph

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show all replies
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #15 on: January 14, 2013, 05:01:35 PM »
Quote from: bloodline;722463
Here is my thinking:

The PAL Amiga 500 has a CPU speed of 7.09Mhz, it only accesses the ram/chipset on every other cycle (effectively reducing the frequency to 3.545Mhz). With a bus width of 16bits, that means the highest data rate for the CPU/Chipset bus would be 6.76Meg per second.

A SPI bus with a frequency of 56.7Mhz can match that data rate, and I've used 80Mhz on an SPI bus with an SD card before, so bandwidth (at least for OCS/ECS) should be totally possible with SPI... Latency I guess will depend on how well the protocol is designed, but should be low :)


But we've also got AGA machines with faster speeds and 32bit width.  All my numbers were based on the worst case A4000.

I figure if we can use it on a 4000, the others are a piece of cake.
 

Offline Heiroglyph

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show all replies
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #16 on: January 14, 2013, 05:54:17 PM »
Quote from: psxphill;722470
Has that been tried? I thought it was more that nobody had implemented the FPU & MMU.


I haven't seen a solution that is faster than a cheap 030 yet.  I've heard rumors of Natami, but haven't seen more than vapor.  Even that's not what I'd call significantly faster for the investment.

I also suspect that it's prohibitively expensive to get a sufficiently fast FPGA and few people are good enough to program it.

To me, using another CPU to emulate the instruction set puts you mostly in the realm of software where there are enough people with the skill to optimize the design.
 

Offline Heiroglyph

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show all replies
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #17 on: January 14, 2013, 06:02:36 PM »
Quote from: JimDrew;722472
Sure you can.  In fact, the FPGA would only swap certain instructions where this is required.

The swap is only required because the byte order is backwards (Endian issue).  So, if you fetch a long word from memory using something like mov.l $12345678,d0 that memory location will appear backwards to an x86 and would have to be swapped.  The swap occurs during the opcode emulation, and using some hardware means to perform the swap (like the bus wired backwards momentarily) would eliminate having to do it in software.

The problem with JIT is that it is not cycle exact, so it breaks a LOT of programs.  This is where the FPGA would come in handy as it could be used to throttle the instruction cycle speed so it is correct for a given desired performance level.


Maybe I'm considering a different path, but with an emulated CPU, you'll still be byte swapping for every local memory (non-Amiga bus) read and write.  

Not taking advantage of inexpensive memory that's local to the real CPU would cut down performance dramatically so I assume you'd want this.

Given the comparatively slow Amiga bus, wouldn't swapping only on the local accesses and letting an FPGA byte swap Amiga accesses introduce unnecessary checks in the code and extra complexity in the FPGA?

It would seem to me that using the same macro, etc. to swap accesses throughout the JIT would keep the code cleaner and be less likely to introduce careless errors.  It just seems like premature optimization.

And I'm not sure cycle exact is really a problem except for badly written software that would already have broken under 020 and 030.
 

Offline Heiroglyph

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show all replies
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #18 on: January 14, 2013, 06:40:04 PM »
Here is some interesting data on SPI and USB: http://www.totalphase.com/support/kb/10057/
 

Offline Heiroglyph

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show all replies
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #19 on: January 14, 2013, 07:08:06 PM »
So if those are too slow, then what about PCI?

PCI is faster than the Amiga bus both in clock and throughput and has the same bus width.  It should just be a matter of timing and translation.

We've recently seen the Prometheus PCI open sourced so there is a ZorroIII to PCI interface that works and only needs 1-2 CPLDs.  It could be even simpler since there aren't multiple PCI devices, it would be a target not a host and you wouldn't need to multiplex the address and data lines.

The DMA problem in the Prometheus design is a moot point since it only happens between multiple PCI cards and I'm not sure that DMA to and from the Amiga side is strictly needed.

What can DMA into addresses above 24bits?  In what cases would our super fast CPU require DMA down to the Amiga side?  It will be waiting on the slow bus regardless.

ZorroIII is very close to the 68k/030 bus we're trying to adapt to, so changes would be minimal and fairly obvious.

As long as the SOC you want supports PCI or PCI-e with an off the shelf bridge chip, that's still a very inexpensive solution with a pretty clear path.
 

Offline Heiroglyph

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show all replies
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #20 on: January 14, 2013, 07:20:23 PM »
Quote from: Mrs Beanbag;722486
PCI(e) could be very good, an adapter that essentially converts the Amiga 1200 chipset into a graphics/sound card, and an accelerator that is essentially a tiny motherboard.

Personally I don't see the motivation for trying to squeeze all the data down a serial interface of any kind, when we have naturally parallel devices at both ends.


The problem there is that the majority of cheap SOCs don't have PCI.

That precludes for example using the SOC that is in the inexpensive devices like the raspberry pi.

I'm just not seeing any other available connection that could be viable.
 

Offline Heiroglyph

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show all replies
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #21 on: January 14, 2013, 08:17:49 PM »
It's not bit swapped, the high byte is in a different place but the bits of each byte are still in the same order.

03 E8 vs. E8 03

You do have to be aware of the size of the data though.  Reading/writing a sequence of bytes vs a sequence of words for example.

A sequence of byte data could be 03 E8 03 E8 and would not need swapping, you're reading each in order.

A sequence of word data would still be 03 E8 03 E8 but you need to know to swap based on the intended size so that it correctly reads as E8 03 E8 03.

Loading a register should swap on the read, so A0 would already point to the right location.  Once the data is in a register it's already swapped as needed based on the instruction used to read it.  Transfer between registers wouldn't need a byte swap.
 

Offline Heiroglyph

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show all replies
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #22 on: January 14, 2013, 08:23:39 PM »
Quote from: wawrzon;722497
i would design it though treating amiga like one had mounted pci device on a bus among possible others, being a pci gfx card for instance. of course there is rather no need to have dma between amiga and pci gfx card, its enough to have it between host cpu boad and pci. on the other hand michael boehmer (e3b) has improved prometheus firmware to enable amiga-pci dma but this is closed source due to his agreement with prometheus designers.

on subject of openpci or alternative standards, i would propose to coordinate effort with aros68k maintainers. aros team has considered and rejected openpci as its standard for various reasons (license, free availability, documentation). it provides pci hidd based partly on netbsd so far i know and in parallel a prometheus.library.

I agree, although I'm 99% sure the Prometheus fix only fixed DMA between PCI cards.  The Prometheus isn't a master on both buses.

I thought the PCI hidd was reasonably close to or based on OpenPCI?  I seem to remember seeing headers from openpci in there a long time ago.
 

Offline Heiroglyph

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show all replies
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #23 on: January 14, 2013, 08:26:04 PM »
Quote from: wawrzon;722501
speaking from a user perspective the idea of an accelerator absolutely contradicts anything being cycle exact, am i right? so neither is an a1200 cycle exact to a500 nor an amiga with any accel to the same device as such. i think its self explanatory we have to sacrifice cycle exactness. and as an owner of practically only accelerated amigas id say, this is a very good deal.


That's what I was thinking also.  Anything that would break is already broken with existing accelerators.
 

Offline Heiroglyph

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show all replies
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #24 on: January 14, 2013, 08:42:51 PM »
Quote from: Bobo68;722503
I've recently seen PLX PCI9054 which converts 060 to PCI bus and don't need CPLD/FPGA...

It's not a direct drop in thing, you'd still need a CPLD or FPGA to take over as the CPU.  I'm really surprised nobody hooked one up to make a PCI backplane though.  There wouldn't be busmastering errors with a tested ASIC like this.  You'd still have trouble DMAing in and out of the backplane though.

Since we'd need to also spoof being the CPU, I figure a simple PCI target controller in the same CPLD/FPGA would be cheaper and not a lot of trouble.

Edit: I think those normally go for around $40 in small quantities.
« Last Edit: January 14, 2013, 08:44:57 PM by Heiroglyph »
 

Offline Heiroglyph

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show all replies
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #25 on: January 14, 2013, 08:52:09 PM »
Quote from: freqmax;722510
@wawrzon, Any application that has failed for you because of accelerators ?

For buses in general:
 * Latency
 * Capacity (Mbit/s)
 * Electrical compability
 * Protocoll conversion

So I think PCI is doable but don't forget that translation between PCI and Zorro may introduce bottlenecks. But why introduce any bus at all between the CPU-in-FPGA and the CPU-socket? KISS..


I don't think FPGA alone is up to the task.  I think you'd get a slightly faster 060 at best and it would cost more than it's worth.

My proposal was to connect a current CPU of some kind to the Amiga bus as directly as possible and emulate an 030.

The directly as possible part is the big catch. PCI(-e) pretty much dominates the market these days, there aren't really any other good fast interfaces to new CPUs and not even that on the really cheap nice SOCs, you have to go up a notch to even get PCI(-e).
 

Offline Heiroglyph

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show all replies
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #26 on: January 14, 2013, 08:53:03 PM »
Quote from: Bobo68;722511
why nobody?
http://www.powerphenix.com/ctpci/english/overview.htm


Ok, nobody on Amiga ;)
 

Offline Heiroglyph

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show all replies
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #27 on: January 14, 2013, 08:57:14 PM »
Quote from: Bobo68;722515
you'll try ;)


I'd rather get an SOC as the CPU, then you'd get a PCI bus and all other devices on the chip essentially for free.
 

Offline Heiroglyph

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show all replies
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #28 on: January 14, 2013, 08:59:04 PM »
Quote from: Bobo68;722516
because there is m :) diator on amiga


Don't get me started on their driver business model...I'd almost compete out of pure spite.
 

Offline Heiroglyph

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show all replies
Re: Motorola 68060 FPGA replacement module (idea)
« Reply #29 from previous page: January 14, 2013, 09:07:41 PM »
Quote from: wawrzon;722519
none i remember or would seriously care for.

i think we are talking to almost drop zorro or at least zorro3, and have a direct pci interface next to amiga being interfaced by pci as well. no zorro bottleneck between cpu and pci anymore. i understand the zorro pci interface would be used to interface the remaining amiga hardware or whats left of zorro bus.


I'm just trying to replace the CPU slot connector/bus (the trapdoor or local slot on big box Amigas) with something that works with today's standards so we have the option to connect to something newer than the 060.

It would have no effect on or connect to ZorroII.

It might be smart to ignore or disable ZorroIII to simplify the design at the cost of the few cards that use it.