Amiga.org

Amiga computer related discussion => Amiga Hardware Issues and discussion => Topic started by: freqmax on January 06, 2013, 08:22:41 AM

Title: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 06, 2013, 08:22:41 AM
In another thread (http://www.amiga.org/forums/showthread.php?t=63775) the issue that there are too few fast Motorola 68060  (https://en.wikipedia.org/wiki/Motorola_68060) CPUs around came up. But that a solution could be to join a male socket and a FPGA on top of that. Much like the 486- (https://en.wikipedia.org/wiki/Intel_80486_OverDrive) or pentium (https://en.wikipedia.org/wiki/Pentium_OverDrive)  overdrive solutions for the x86.

The MC68060 (http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MC68060) datasheet (http://cache.freescale.com/files/32bit/doc/ref_manual/MC68060UM.pdf) provides the PGA 206 pinout at page 356. And the frequency span is 0 - 75 MHz. Power (p328, p344) requirement is 3.3V +/- 5% @ 2A with 5V compatible I/O. There has not been any QFP variant on the commercial market, ever?

So this is what the FPGA has to be able to work with. Some kind of onboard DC/DC circuit will be needed. The voltages of iVDD, EVDD, PVDD and CVDD is unclear especially in a mixed 040/060 environment. So the question becomes, can a powerfull enough FPGA that implements 060 make do with 6.6 W ? and will the mechanical size be within limits? otherwise circuit board stacking may be needed.

Btw, with some additional PGA-114 (020) and PGA-132 (030) to PGA-206 adapter it could be used as a upgrade option for those CPUs too.

OT Found while searching:
a68k.de - Overclocking Amiga.pdf (http://www.a68k.de/xtechwb/filez/AMIGA/Hacks+Reps/Overclocking_Amiga.pdf)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: danbeaver on January 06, 2013, 09:21:30 AM
I read somewhere (possibly a NatAmi post) that the FPGA would do poorly at attempting an 68060, but works for a simpler design at a higher clock rate. See if you can track that down. Adapting it to pin-for-pin plug into a socket is another matter; Jens does a lot of work in this area and might know, although us talking to him about accelerators is like asking Einstein to show you how he derived E=MC2.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 06, 2013, 09:32:09 AM
Perhaps a boosted 030/040 core pretending to be 68060 might be as good from a software point of view?

It's mainly a compatibility and perfomance issue. It doesn't have to be 060 in its heart.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: danbeaver on January 06, 2013, 09:39:38 AM
I think a 32-bit core (68020) running at 100Mhz is more likely, but then converted to silicon it might go even higher with less heat. Again, Jens would know.

There might be copyright issues by the way.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 06, 2013, 10:55:36 AM
You mean as in ASIC silicon? that would cost at least 40 000 USD, proberbly around 400 000 USD.

The function is not protected as the patents has expired. However perhaps the instruction set opcodes are? but I doubt that to as there exist many other projects in this area without legal problems.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Hattig on January 06, 2013, 11:09:47 AM
Quote from: freqmax;721422
You mean as in ASIC silicon? that would cost at least 40 000 USD, proberbly around 400 000 USD.

The function is not protected as the patents has expired. However perhaps the instruction set opcodes are? but I doubt that to as there exist many other projects in this area without legal problems.


I think he meant having an FPGA on the package. As you say, an ASIC would cost a lot, even if you went for one of the shared-ASIC projects to share the one-off costs with other ASIC designers.

But first, you'd need a design (be it a highly clocked '020 core, or an '060 clone, or the Natami '050/'070 design) that would run acceptably fast on that FPGA, and you'd also need to implement the I/O compatibility with the PGA-206 interface.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 06, 2013, 12:29:55 PM
I suspect the biggest speed boost would come from full pipelining. I would guess the RAM could be fast enough relative to the FPGA for a data cache not to be that important, but an instruction cache might help. There are pipelined FPGA cores, MIPS of course being a prime example.

A RISC core with 680x0 programming model should be fairly easy, starting from for instance a MIPS core, then add a microcode engine. I mean if you know what you're doing. Which I don't, sadly.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Fats on January 06, 2013, 02:20:20 PM
Quote from: freqmax;721403
But that a solution could be to join a male socket and a FPGA on top of that. Much like the 486- (https://en.wikipedia.org/wiki/Intel_80486_OverDrive) or pentium (https://en.wikipedia.org/wiki/Pentium_OverDrive)  overdrive solutions for the x86.


For DIL packages OHO Elektronik (http://oho-elektronik.de/) is already doing that with GODIL. I am not sure if they could be used as a M68000 replacement and how quick it could be. The memory on the board could probably be real fast RAM. The products are sold at trenz electronic (http://shop.trenz-electronic.de/catalog/default.php?cPath=1_48&osCsid=caf1eb812c2e5ecda5a3e948caed7337).

I think somebody should make a similar board but replace the DIL connection with an A1200 trapdoor expansion connection. I would love that!

greets,
Staf.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 06, 2013, 02:50:37 PM
Quote from: Mrs Beanbag;721428
I suspect the biggest speed boost would come from full pipelining. I would guess the RAM could be fast enough relative to the FPGA for a data cache not to be that important,

That is absolutely not the way it works.

Modern RAM is horrifically slow at randomly accessing memory.  So a datacache is tremendously important else the speed will be ridiculously slow.

The RAM manufacturers know this but they "just assume" that everyone is using an intel cpu with 4+MB of cache.

A copyback datacache is absolutely required for reasonable speed when using modern memory.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 06, 2013, 02:55:41 PM
Quote
Motorola 68060 FPGA replacement module (idea)
Its waaaaaaaaaaaaay to hard to make the signals on the pins perfectly match a real 68060.

It is a better idea to just make the best 680x0 that you can make, using whatever pins you need and using whatever technology you can come up with.

I like the idea of an FPGA 68070 accellerator card.

I have been pushing the idea of a 2GB RAM + 680x0 accelerator card.

Having the CPU be in an FPGA means that we could update our CPUs each year as the core gets optimized.  To gain a little speed here and there.  It would r0x my sox!
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 06, 2013, 03:13:40 PM
I forgot about RAM latency, but wouldn't RAM at 1333MHz and CL9 still be able to max out a 100MHz CPU?

Would there be any advantage to using graphics memory in this application? (i.e. GDDR4/5 rather than DDR2/3)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 06, 2013, 03:28:33 PM
Quote from: Mrs Beanbag;721457
I forgot about RAM latency, but wouldn't RAM at 1333MHz and CL9 still be able to max out a 100MHz CPU?


There is absolutely no such thing as 1333Mhz RAM.

When they advertise that they are LYING.

There is absolutely no such thing as 1333Mhz RAM.

When confronted they will just lie about it... or if u find someone honest then they will admit that it is really only 1333 million transactions per second that can be attained only in a limited set of circumstances.

Mhz is an absolute that is always attained all of the time no matter what.

Transactions can only happen 1333 million times per second as along as a big complicated set of rules are followed.  One of the main rules is that all the memory accesses happen in a perfect line one after the other in perfect sequential order.  There are other rules too but they get way to complicated for me to explain here.

When u break that rule, as u often do, then your speed drops like a rock because there is no 1333Mhz RAM.

You also can't write individual bytes on modern RAM.  You have to write a giant block.  I forgot the blocksize on current RAM setups but its either 16 or 32 bytes.

This is why a large copyback cache is extremely important with modern RAM chips.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 06, 2013, 03:37:00 PM
Quote from: ChaosLord;721459
then your speed drops like a rock
Confusing metaphor :crazy: When you drop a rock, it just goes faster and faster!

Ok, well, I'll take your word for it. So even an implementation of a plain 68000 would need some sort of cache in this case.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 06, 2013, 03:46:51 PM
Quote from: ChaosLord;721455
Its waaaaaaaaaaaaay to hard to make the signals on the pins perfectly match a real 68060.


Where is that stated as a requirement?
(it's only needed for A500 and A1200 setups where some software rely on hw specifics)

My original idea was to provide a solution for those that want FPGA Arcade (MikeJ) with add on board and want to make use of a fast 68060 CPU but just can't get one.

@ChaosLord, How can you be absolutely sure there's no 1333 MHz capable RAM ..? ;)
(but signal integrity will be a pain)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 06, 2013, 03:56:24 PM
You know what I don't even care about 1333MHz RAM anymore, you can buy 8Mb chips of 16-bit SRAM:
http://uk.farnell.com/renesas/r1wv6416rbg-5si/sram-64mbit-3v-55ns-48fbga/dp/2068172
I guess that would be fast enough for an off-chip cache for an FPGA 68060 implementation, if not big enough for the main ram itself.

Maybe he will shoot this down for some other reason... but if I throw enough ideas at the wall maybe one of them will stick. Like a rock.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 06, 2013, 04:00:32 PM
Quote from: Mrs Beanbag;721460
Confusing metaphor :crazy: When you drop a rock, it just goes faster and faster!

Then it hits your foot and stops dead.
And you start involuntarily shouting curse words.   :furious: :rant: :razz:

Quote

Ok, well, I'll take your word for it.

Just so u know, FCGAarcade/replay doesn't use modern RAM, for the above mentioned reasons.  Its really a pain to deal with.  They went back 1 iteration to RAM that is easier to deal with.  It is still more modern than the old RAM in our Amigas, but not the new stuff they use in PCs at the local store.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 06, 2013, 04:07:16 PM
Quote from: Mrs Beanbag;721463
You know what I don't even care about 1333MHz RAM anymore, you can buy 8Mb chips of 16-bit SRAM:
http://uk.farnell.com/renesas/r1wv6416rbg-5si/sram-64mbit-3v-55ns-48fbga/dp/2068172
I guess that would be fast enough for an off-chip cache for an FPGA 68060 implementation, if not big enough for the main ram itself.

Maybe he will shoot this down for some other reason... but if I throw enough ideas at the wall maybe one of them will stick. Like a rock.


SRAM is super easy to deal with!
Its sooooo easy to build a card or computer with SRAM.
And its super duper fast!
And it has real Random Access!

But:
Its really expensive
and drinks a lot of electricity

It is really awesome as an L2 Cache.
Or to have a bank of SRAM as your main memory for loading programs that you want to run fast.  But then things can get real complicated.

Definitely can't make a 2GB SRAM card :mickeymouse:
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 06, 2013, 04:12:00 PM
Quote from: Mrs Beanbag;721457
I forgot about RAM latency, but wouldn't RAM at 1333MHz and CL9 still be able to max out a 100MHz CPU?

Would there be any advantage to using graphics memory in this application? (i.e. GDDR4/5 rather than DDR2/3)


A DRAM with the CAS latency (https://en.wikipedia.org/wiki/CAS_latency) would need 9 clock cycles before it would give you the data you requested. Ie at 133 MHz. But you also have to add RAS/CAS delays etc. Otoh you can use those 9 cycles to transfer other data. But in practice it would max out a 100 MHz CPU.

GDDR gives no real benefits in this application.

SRAM has the backside that it eats clock cycles when you least expect it. Better to deal with the real thing. Tough but true ;)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 06, 2013, 04:14:19 PM
Quote from: freqmax;721461

My original idea was to provide a solution for those that want FPGA Arcade (MikeJ) with add on board and want to make use of a fast 68060 CPU but just can't get one.

Ok so u just want whatever is the fastest 680x0 cpu u can get?

Or does it have to be exactly pin compatible to 68060?

I am not sure what you are asking for.


If u r saying u want to make a new card with an FPGA as the CPU then that would be easier.  It would be very kewl.  As the card could dedicate the whole FPGA to the CPU.

The CPU that Jens (not Schoenfeld) and Gunnar were cooking up would not even fit into the FCGAreplay.  It had really a lot of features and was really drinking up the resources.

Quote

@ChaosLord, How can you be absolutely sure there's no 1333 MHz capable RAM ..? ;)

Fastest I ever heard about back when I studied RAM chips was 333Mhz.
On each Mhz they can send out 4 transactions if the planets and stars are aligned correctly.  For a maximum theoretical speed that gets attained every once in a while of 333*4 million memory accesses per second.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 06, 2013, 04:27:22 PM
So in principle, if we were to use SRAM as memory, and FPGA as CPU at 100-ish MHz, would we still need a cache in the CPU core?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 06, 2013, 04:37:48 PM
Quote from: Mrs Beanbag;721472
So in principle, if we were to use SRAM as memory, and FPGA as CPU at 100-ish MHz, would we still need a cache in the CPU core?


With SRAM u either
A: Literally don't need L1 Cache
or
B: It mostly doesn't matter.

When I studied SRAM chips they seemed to go at 100Mhz.  If you get your CPU up to 120Mhz then u would lose a bit of speed.

But maybe they have 120Mhz SRAM nowadays?  (I doubt it but its possible, or maybe its extra expensive.)

Oops I think u still need cache for max speed because think of this:
Your CPU needs to process instructions and read or write results to/from memory.  That is 2 operations that need to happen simultaneously.  So u would still need at least 1 cache, the instruction cache in your previous example.  With an instruction cache it seems like u could achieve maximum speed using SRAM, even without datacache.  Hafta think about it some more tho... there could be tricks.

The kewlness of SRAM is why every Natami CPU card comes with a big bank of SRAM on it.  It was intended to eventually be configured as an L2 cache to feed the 110 Mhz 060 at super maximum speeds.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 06, 2013, 04:37:58 PM
It's certainly possible to replicate any of the 68K CPUs with an FPGA.  The end result would depend on the work put into it, including the level of compatibility desired.  The 68060 would definitely be the most work due to the superscaler and pipelines. The FPU/MMU (and basic opcodes) would be pretty straight forward.  Altera makes a couple of FPGAs with sufficient internal memory that could mimic the cache.  It could all be done, but i dont think there is not enough of a market really to attract any serious developers that can do this type of work.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 06, 2013, 04:42:38 PM
In the FPGA Arcade schematic:
http://www.amiga.org/forums/showthread.php?t=55885&page=54
http://www.fpgaarcade.com/common/fpgaarcade_replay_b01_schematic_a2.pdf

The RAM is specified as "DDRx16-TSOP66" (46V32M16 (http://www.datasheetcatalog.org/datasheet/micron/MT46V128M4TG-75ZL.pdf)) so MEM_DQ(0..15) will transfer 16-bits on positive flank and another on the negative flank. Thus 32-bits for each clock cycle.
(PCB picture (http://www.fpgaarcade.com/common/replay_overview.jpg))

So that type of DDR RAM (https://en.wikipedia.org/wiki/Synchronous_dynamic_random-access_memory#Feature) is only 2nd generation. When the current ones are at least 5th generation.

@ChaosLord, a 68060 pin compatible replacement that is code compatible and as fast as possible. No "extra" cables going places that makes you scratch your head in "not found socket" ways.
(ie not cycle exact)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 06, 2013, 04:52:31 PM
I will admit an instruction cache; it can be simpler because you don't write to it. Also even a plain 68020 has an instruction cache (albeit a small one).

Just trying to think in terms of "maximum impact/minimum effort". I'm thinking essentially 68020, but fully pipelined and fastest possible clock speed.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: cunnpole on January 06, 2013, 04:54:08 PM
Not quite the same, but Mike has suggested a similar approach as a backup to finding more 060s and providing an upgrade path for the Replay.

Quote from: mikej;711135

I am looking at an adapter board which will fit in the pins of the 68060 daughter board and carry either a 680x0 or a much faster Virtex7 class FPGA running a soft CPU..


http://www.amiga.org/forums/showpost.php?p=711135&postcount=1863
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 06, 2013, 04:58:20 PM
A quick look at the 68060 technical data suggest it needs like 16 kB cache RAM. It should be possible to handle within the FPGA "BlockRAM" (as Xilinx call it). So likely no need for extra RAM. Btw, don't forget the cache coherency issues so that disc DMA and CPU don't disagree on what is in the memory..

Actually a 020 core will be smaller (I hope) and thus suffer less internal gate-to-gate latency. So it should perhaps be able to clock fast enough to outperform a 060 @ 75 MHz.

Btw, does it exist any faster than 75 MHz 68060 ..?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 06, 2013, 04:58:22 PM
Quote from: ChaosLord;721467
Fastest I ever heard about back when I studied RAM chips was 333Mhz.

http://en.wikipedia.org/wiki/DDR3_SDRAM#JEDEC_standard_modules
 
It looks like 1066mhz is the fastest standard I/o clock speed & 266mhz for the memory clock speed, but the latency's are huge. This isn't a problem if you can prefetch and burst fill your cache. You get 64bits per transfer per module as well.
 
It doesn't sound like much, but compared to chip ram or the memory in your 90's accelerator. It is pretty quick.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 06, 2013, 04:58:41 PM
Quote from: Mrs Beanbag;721480
I will admit an instruction cache; it can be simpler because you don't write to it. Also even a plain 68020 has an instruction cache (albeit a small one).

Just trying to think in terms of "maximum impact/minimum effort". I'm thinking essentially 68020, but fully pipelined and fastest possible clock speed.


I Think I see what u r going for.

The fancy datacache did get the Natami CPU dezine team stuck for a very long time.

10  It had to be written, rewritten, rerewritten to be optimized, oops now there are a ton of bugz, oh crap this is getting really tedious I think I will take a vacation ok now where did I leave off at... oh yeah gotta fix all these bugz hold on if I rewrite it this other way it will work better when we add the MMU later lather rinse repeat  goto 10 :D
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 06, 2013, 05:03:57 PM
Quote from: freqmax;721483
A quick look at the 68060 technical data suggest it needs like 16 kB cache RAM. It should be possible to handle within the FPGA "BlockRAM" (as Xilinx call it). So likely no need for extra RAM. Btw, don't forgett the cache coherency issues so that disc DMA and CPU don't disagree on what is in the memory..


All 060s, even the ones that say NO MMU, actually DO HAVE an MMU.  Its just a super simple one for marking certain blocks of memory as uncacheable.  So u can pick a block of ram that u use for DMAing things and mark it as uncacheable with the supersimple 060MMU.  So u can mark all of chipram as uncacheable.  Voila!
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 06, 2013, 05:07:00 PM
Quote from: ChaosLord;721485
10  It had to be written, rewritten, rerewritten to be optimized, oops now there are a ton of bugz, oh crap this is getting really tedious I think I will take a vacation ok now where did I leave off at... oh yeah gotta fix all these bugz hold on if I rewrite it this other way it will work better when we add the MMU later lather rinse repeat  goto 10 :D


Solution, don't try everything at once. Release the source, let the crowd improve step by step by many people. Thus no overheated brain ;)

Quote from: psxphill;721484
This isn't a problem if you can prefetch and burst fill your cache.


*drumbeat* .... IF ;)

Software has a tendency to jump all around the place..
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 06, 2013, 05:16:07 PM
Quote from: psxphill;721484
http://en.wikipedia.org/wiki/DDR3_SDRAM#JEDEC_standard_modules
 
It looks like 1066mhz is the fastest standard I/o clock speed & 266mhz for the memory clock speed, but the latency's are huge. This isn't a problem if you can prefetch and burst fill your cache. You get 64bits per transfer per module as well.
 
It doesn't sound like much, but compared to chip ram or the memory in your 90's accelerator. It is pretty quick.


For randomly accessing memory your speed is 266Mhz / 16 = 16.625Mhz which is the same speed as the memory u already have on your Amiga accelerator card.

You only get good speed when writing a bunch of bytes in a straight line.  Even then it is really really hard to achieve over 500 MT/s since your memory controller must designed by a 200th TechMage.

This is why cache inside the CPU is dramatically important.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 06, 2013, 05:42:33 PM
Quote from: ChaosLord;721489
designed by a 200th TechMage.


What do you mean with that? ;)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 06, 2013, 05:45:17 PM
I see the problem with random access now... put simply, you have to read or write a whole block of data whether you want it all or not.

Just looking at the price of FPGAs. Can get a 550MHz Virtex 5 for just under £100, not bad. And it has >200k of block RAM!

Now I only have to learn VHDL...
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 06, 2013, 05:54:52 PM
100 GBP.. seems they have fallen.

But the main pain is the chip package...!
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 06, 2013, 06:02:22 PM
It is this LX one:
http://uk.farnell.com/jsp/displayProduct.jsp?sku=1876187&CMP=e-2072-00001000&gross_price=true
Others in the range seem a lot more expensive.

True I wouldn't want to try soldering one. Maybe you can buy sockets.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 06, 2013, 06:31:11 PM
Quote from: ChaosLord;721489
For randomly accessing memory your speed is 266Mhz / 16 = 16.625Mhz which is the same speed as the memory u already have on your Amiga accelerator card.

I think the latencies are based on the io bus clock, not the memory clock. So it's not 266/16, it's 1066/16. The reasons why the latencies get higher is because of the increasing gap between the two clocks. The computer is using the io bus clock, so it makes sense for it to be based on that.
 
Old ram from the 90's also has page setup times. Fast page mode and static column were equivalent to how memory is accessed now, if you were accessing data in different pages then you had the latency. Because of this the 030/040/060 can burst reads from ram a cache line at a time. http://en.wikipedia.org/wiki/Dynamic_random-access_memory#Fast_page_mode_DRAM_.28FPM_DRAM.29
 
Ram is wider now than it was, so if you were creating a 68k memory controller with DDR3 then you'd keep reading the entire page from the ram all the time there was no other memory access required. You've paid for the entire page to be read, it just needs to be transferred and that bus can run up to 1066mhz. Even if the code does random access memory often, which would make you want to stop caching other data, the page is more likely to still be open compared to old 90's memory as it's bigger (like 256 bytes).
 
http://en.wikipedia.org/wiki/Prefetch_buffer
 
Suggesting that modern ram is the same speed as old ram is wildly missing the point. It's a lot more complex to interface to, but if you could hook up ddr3 to a 68060 then it would run quicker.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 06, 2013, 06:49:18 PM
Quote from: ChaosLord;721489
... designed by a 200th TechMage.

Quote from: freqmax;721492
What do you mean with that? ;)

I think he means 200th level TechMage. You must not have played D&D as a child.

@TCL
I thought the N050 only implemented write-through caches which are much easier to implement than copyback. They have excellent compatibility and the little bit faster modern memory would make up for some of the speed deficit. I agree that at least write-through caches for both instruction and data is needed. Anyone saying otherwise should turn off their accelerator caches and experience 68000 performance all over again ;).
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 06, 2013, 07:10:08 PM
Quote from: Mrs Beanbag;721493

Just looking at the price of FPGAs. Can get a 550MHz Virtex 5 for just under £100, not bad. And it has >200k of block RAM!

Now I only have to learn VHDL...


You can do it!  You are Mrs. Beanbag! ;)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 06, 2013, 07:27:01 PM
Quote from: matthey;721503
I think he means 200th level TechMage.

+1


Quote

@TCL
I thought the N050 only implemented write-through caches which are much easier to implement than copyback.

True.



Quote

 They have excellent compatibility and the little bit faster modern memory would make up for some of the speed deficit. I agree that at least write-through caches for both instruction and data is needed. Anyone saying otherwise should turn off their accelerator caches and experience 68000 performance all over again ;).


Anything written in C really needs copyback caches.  So does everything else for that matter.  Tons of code accesses vars on the stack over and over and over again.  I love my copyback cache. :knuddel:

I used to do lha timing tests on my 25Mhz 030 vs. my 25Mhz 040.  My 040 was always 3x the speed.  3x.  According to the timing charts of the basic instructions it should have been 2x the speed.  I conclude the rest of the performance increase came from the copyback cache.

Back in those days lha was written in asm by a competent coder.  And the copyback cache managed to give a magical 50% performance boost. :cool:
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Iggy on January 06, 2013, 08:44:22 PM
Why not just build an adapter with an X86 processor equipped with very fast
JIT interpretation?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 06, 2013, 08:50:03 PM
Quote from: ChaosLord;721489
For randomly accessing memory your speed is 266Mhz / 16 = 16.625Mhz which is the same speed as the memory u already have on your Amiga accelerator card.

You only get good speed when writing a bunch of bytes in a straight line.  Even then it is really really hard to achieve over 500 MT/s since your memory controller must designed by a 200th TechMage.

This is why cache inside the CPU is dramatically important.


My previous calculation was totally wrong.  As near as I can tell the correct calculation should be:

For randomly accessing memory your speed is 266Mhz / 4 = 66.5Mhz

You only get good speed when reading/writing a bunch of bytes in a straight line.  Even then it is really really hard to achieve over 500 MT/s since your memory controller must be designed by a 200th level TechMage because you cannot simply issue sequential memory requests.  In order to reach the theoretical maximum you must keep 4 memory requests in-flight at all times.

This is why cache inside the CPU is dramatically important.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 06, 2013, 08:51:34 PM
Quote from: ChaosLord;721514
You only get good speed when reading/writing a bunch of bytes in a straight line.

That is exactly what cache bursting is for. It's as true now as it was in the 90's.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 06, 2013, 08:52:37 PM
Why not just build an adapter with an ARM processor equipped with very fast
JIT interpretation?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 06, 2013, 09:06:16 PM
I am curious why there is some idea of a shortage of 68060 chips?  There are tens of thousands of these chips, both 50MHz and 60MHz (MC and XC versions) available from suppliers in China.  These were used in the Northern Telecom call center boards.  There is a thread here about this.  Just pull the chip with the heat sink and put it in your Amiga (or replay) board.

eBay has a slew of these boards, for about 1/2 of what 68060's by themselves are selling for.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 06, 2013, 09:19:21 PM
Quote from: JimDrew;721517
I am curious why there is some idea of a shortage of 68060 chips? There are tens of thousands of these chips, both 50MHz and 60MHz (MC and XC versions) available from suppliers in China.

The shortage is only because we're looking for the rare versions with the bugs fixed & sellers in china are remarking chips to say they are the latest mask (71E41J) when they are not. The real ones can be clocked over 100mhz.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 06, 2013, 09:26:41 PM
Asfair, the shortage is on 060 that are 75 MHz or faster, has MMU/FPU (full version), without chip bugs.

50 and 66 MHz variants are supposedly quite easy to get.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 06, 2013, 10:03:22 PM
Quote from: JimDrew;721517
I am curious why there is some idea of a shortage of 68060 chips?  There are tens of thousands of these chips, both 50MHz and 60MHz (MC and XC versions) available from suppliers in China.  These were used in the Northern Telecom call center boards.  There is a thread here about this.  Just pull the chip with the heat sink and put it in your Amiga (or replay) board.

eBay has a slew of these boards, for about 1/2 of what 68060's by themselves are selling for.


Every once in a while someone starts a thread asking why AmigaKit keeps selling brand new 030 and 020 accelerators when what so many ppl want is an 060 accelerator.  The answer that ppl post in forums is that there are no 060 chips available or that they cost ridiculous amounts of money so therefore no 060 accelerators can be built at a profit.  Or they say that since the cheap 060 chips are "from China" they can't be trusted.  Even though everyone who ever bought any of them was pleased with the results.

There is no shortage of 060s.  But there is a shortage of 060 accelerator cards.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Iggy on January 06, 2013, 10:25:40 PM
Quote from: ChaosLord;721523
Every once in a while someone starts a thread asking why AmigaKit keeps selling brand new 030 and 020 accelerators when what so many ppl want is an 060 accelerator.  The answer that ppl post in forums is that there are no 060 chips available or that they cost ridiculous amounts of money so therefore no 060 accelerators can be built at a profit.  Or they say that since the cheap 060 chips are "from China" they can't be trusted.  Even though everyone who ever bought any of them was pleased with the results.

There is no shortage of 060s.  But there is a shortage of 060 accelerator cards.

And there are plenty of '060s w/o MMUs or FPUs.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Iggy on January 06, 2013, 10:27:08 PM
Quote from: ChaosLord;721516
Why not just build an adapter with an ARM processor equipped with very fast
JIT interpretation?

Because X86 is much faster.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 06, 2013, 10:34:52 PM
Quote from: ChaosLord;721523
Even though everyone who ever bought any of them was pleased with the results.

You might want to ask why mikej decided not to buy any of the remarked chips he was offered, if you think he would have been pleased.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 06, 2013, 10:37:58 PM
Quote from: Iggy;721526
Because X86 is much faster.
+more expensive
+more power hungry
+...

+ THE ENEMY
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 06, 2013, 11:29:57 PM
Quote from: freqmax;721403
In another thread (http://www.amiga.org/forums/showthread.php?t=63775) the issue that there are too few fast Motorola 68060  (https://en.wikipedia.org/wiki/Motorola_68060) CPUs around came up. But that a solution could be to join a male socket and a FPGA on top of that. Much like the 486- (https://en.wikipedia.org/wiki/Intel_80486_OverDrive) or pentium (https://en.wikipedia.org/wiki/Pentium_OverDrive)  overdrive solutions for the x86.

The MC68060 (http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MC68060) datasheet (http://cache.freescale.com/files/32bit/doc/ref_manual/MC68060UM.pdf) provides the PGA 206 pinout at page 356. And the frequency span is 0 - 75 MHz. Power (p328, p344) requirement is 3.3V +/- 5% @ 2A with 5V compatible I/O. There has not been any QFP variant on the commercial market, ever?

So this is what the FPGA has to be able to work with. Some kind of onboard DC/DC circuit will be needed. The voltages of iVDD, EVDD, PVDD and CVDD is unclear especially in a mixed 040/060 environment. So the question becomes, can a powerfull enough FPGA that implements 060 make do with 6.6 W ? and will the mechanical size be within limits? otherwise circuit board stacking may be needed.

Btw, with some additional PGA-114 (020) and PGA-132 (030) to PGA-206 adapter it could be used as a upgrade option for those CPUs too.

OT Found while searching:
a68k.de - Overclocking Amiga.pdf (http://www.a68k.de/xtechwb/filez/AMIGA/Hacks+Reps/Overclocking_Amiga.pdf)

As for power required vs. what the socket can be expected to supply, since this will require a pcb roughly shaped like an 060 chip, consider also including a floppy power connector... we'll likely need dc/dc converters for fpga core voltage and other things, why not for 3.3v as well? this could be a hard drive connecter or whatever to get enough power.

one could consider also trying to include 030 PGA pins as well as 040/060 all on the same module and be careful installing, but there is more chance the 030 pins would interfere with 060/040 socket or 040/060 pins interfering with other components on 030 board near the socket. some adapter.

i's use quickswitches or equivalent to get 5v tolerance on the fpga IO, so it would simply plug into an 040 socket and work, as well as simplify adapter to 030 socket to work there. thus the 060 fpga pcb is fpga + quickswitches + power. While quickswitches might affect timing, we're limited to the fastest 680x0 socket here, and that may not be a problem. but something to consider. If it is a problem on 060 like the overclocked Apollo boards, then put quickswitches on 040 and 030 adapters where they don't cause speed problems for super fast real 060 sockets.

also consider ddr3 memory on the pcb, as modern fpgas have a hardwired controller inside for our "whatever" to hook up to. super-fast main memory, or a cache or something. build up a real accelerator for your accelerator. :) for those that loathe ddr3, cook up something more paletable in there...

This sort of discussion is really fun!
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 06, 2013, 11:33:16 PM
ARM/MIPS/Alpha etc.. is good enough and has an orthogonal programming ISA, low power etc.. compared to x86. Feeding a power parasite from a 3.3V 2A supply is perhaps not optimal.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Iggy on January 06, 2013, 11:51:18 PM
Quote from: Mrs Beanbag;721529
+more expensive
+more power hungry
+...

+ THE ENEMY

"+more expensive" - not by much
"+more power hungry" - again, only slightly
"+ THE ENEMY" - who cares

 THEY ARE MORE POWERFUL
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 07, 2013, 12:19:03 AM
Quote from: Iggy;721512
Why not just build an adapter with an X86 processor equipped with very fast
JIT interpretation?



that will require an fpga for bus translation at some point anyway, in addition to x86 cpu + whatever else that needs to work (memory + maybe fch/pch, etc) why not just use the fpga?

yes, this means for two very different projects. x86 with software emulation, ala Amithlon. that's a PC motherboard + fpga bridge design, and c programming of the emulator. the 680x0 softcore is a simpler pcb design and then you need to be a microprocessor architecture and computer organization (sometimes called hardware/software interface) guy to design the cpu softcore. so those interested, look up coursera and udacity for such topics, or hit up your local university computer/electrical engineering department! (coursera just finished a very cool looking computer architecture course donated by Princeton)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 07, 2013, 12:30:55 AM
the other thing this sort of thing can give us is a pathway to x86 or arm native.

x86 cpu bridged to the cpu socket gives us a classic amiga with x86 cpu. os4.x works on classic+ppc, this gives us a pathway where we already have drivers for the classic hardware, get ported to x86, then refocus to drivers for x86 peripherals.

put an arm core into fpga, or similar to pc design bridging to an arm chip, to have already supported hardware to get the cpu supported and then move on to arm peripheral drivers. i remember reading about some controversy regarding an open arm-compatible softcore a couple years ago, so i believe suvh a thing does exist.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 07, 2013, 04:45:49 AM
P-p-p-p-plase lets get on track here. One needs some onboard DC/DC and a FPGA. Anything else is just a burden that won't benefit the design goal.

The addition of any ASIC CPU will require lot's of scarce I/O on the FPGA, more power, more mess circuit board routing, more debugging, complicated sourcing, larger FPGA which cost more and is harder to source.. and harder to solder, additional RAM, boot ROM, etc. Just because you can do something doesn't mean it's suitable.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 07, 2013, 11:20:50 AM
Quote from: Iggy;721534
THEY ARE MORE POWERFUL
- who cares?

Seriously. If we only cared about raw CPU power, why do we care about Amigas at all? Because they have some charm that other computers don't. x86 has performance, but it has no charm. Ask yourself which you would rather go for dinner with.

Besides, hulking great desktop PCs with beastly CPUs are becoming something of a niche market these days. Most people seem to prefer the convenience of laptops and tablets, and if they want games too they get an Xbox. Only hardcore gamers need the performance of their x86-based PCs.

ARM is taking over, get used to it. x86 is the past of computing, not the future, and ARM will catch up with x86 performance before too long as well. Microsoft went to the effort of making Windows 8 work on ARM for good reason, they know the change is coming.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Faerytale on January 07, 2013, 11:31:32 AM
If CPUpower means nothing. Why are people having cravings for 060?

Better stick to the 030 then :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 07, 2013, 12:53:22 PM
Quote from: Mrs Beanbag;721590
x86 has performance, but it has no charm. Ask yourself which you would rather go for dinner with.


You're right! My OS4 laptop is way more charming than any of my pc laptops or my iBook is. I'm really happy i can go to dinner with that instead of the others...
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 07, 2013, 05:45:49 PM
Actually, I would prefer a super fast 040 over an 060 any day.  The reason?  From a programmer's stand point, the 060 requires several work arounds for the superscaler and branch prediction caches.  When I did the code for the Mac emulation, I ended up turning off half of the 060's features because code would blow up due to the Mac OS and many different Mac apps that were not compatible with a full running 060.  You have to deliberately write your code to be 060 compatible, and since the 060 didn't exist when the Mac OS was written (all of the way through OS8.x), the OS didn't support it.  How many 060 boards did you see for the Mac?  None that I am aware of... they went from the 040 to the PPC.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: spirantho on January 07, 2013, 05:52:27 PM
I think from a Mac emulation point of view, you're absolutely correct. Because the Mac didn't know about 68060s, it was rather incompatible.

However, on the Amiga we are used to the 68060. We have the 68060 library and setpatch which is designed to solve those problems, and does a pretty good job of it to be honest. I very very rarely have compatibility problems because of my 68060 these days.

So in this case I think a 68060 is the better bet. Unless you want to run Fusion. :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 07, 2013, 06:17:44 PM
What does 68060.library and setpatch do?

(and what is Fusion?)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 07, 2013, 06:59:55 PM
Quote from: JimDrew;721616
Actually, I would prefer a super fast 040 over an 060 any day.  The reason?  From a programmer's stand point, the 060 requires several work arounds for the superscaler and branch prediction caches.  When I did the code for the Mac emulation, I ended up turning off half of the 060's features because code would blow up due to the Mac OS and many different Mac apps that were not compatible with a full running 060.  You have to deliberately write your code to be 060 compatible, and since the 060 didn't exist when the Mac OS was written (all of the way through OS8.x), the OS didn't support it.  How many 060 boards did you see for the Mac?  None that I am aware of... they went from the 040 to the PPC.


Can you talk about the things that needed turned off for the Mac? Whoever may end up doing the processor design may find that useful to consider while making design choices for his processor, and what might be good things for configuration settings via setpatch or similar utility. what the problems were and any explanations for them could help make something more compatible all around, while also trying to improve performance as well as the fpga environment allows.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mr_Vanos on January 07, 2013, 08:38:09 PM
This is all an interesting idea. I don't know what the state of available FPGA cores for 68040 are, but a cursory search did turn up a Coldfire core. Might another option be to use a Coldfire FPGA core and modify the microcode of it to get around the incompatibilities. Weren't there just a handful of unimplemented instructions and a couple of instructions that behaved differently?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 07, 2013, 08:48:12 PM
I would just like to clarify that MacOS has problems with the 060 because MacOS is crap.  MacOS is so bad that its creator threw it in the garbage and switched to a totally completely different OS.

On the Amiga, the 68060 is totally compatible with all normal software and causes no problems.

In order to make a program be incompatible to the 060 on the Amiga, one would have try really hard to do it on purpose, or do something that is plain illegal, or be banging the MMU or performing some weird esoteric function that no normal programmer would ever have any need to do.

On the Amiga we have MMU.library so nobody needs to bang the MMU.

I have been writing Amiga software since 1985 and none of my C or asm programs has ever failed on the 060.

Microsoft BASIC fails on the 060 because Microsoft BASIC is a pile of garbage that does wildly illegal things.  M$ BASIC won't even work on 020.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 07, 2013, 08:57:04 PM
Quote from: Mr_Vanos;721638
This is all an interesting idea. I don't know what the state of available FPGA cores for 68040 are, but a cursory search did turn up a Coldfire core. Might another option be to use a Coldfire FPGA core and modify the microcode of it to get around the incompatibilities. Weren't there just a handful of unimplemented instructions and a couple of instructions that behaved differently?
It might be a good starting point. Differences are:

1. No DBcc
2. No bitwise rotation (rol, ror)
3. No bitfield operations
4. Multiply instructions don't set flags. From the Coldfire manual:
CCR[V] is always cleared by MULS/U, unlike the 68K family processors

Coldfire also has a few extra commands (some of which would be quite useful, such as saturate and multiply-accumulate)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 07, 2013, 09:58:54 PM
Quote from: Mrs Beanbag;721644
It might be a good starting point.

If this is the one then I'm not sure that you get the source for it
 
http://www.ip-extreme.com/IP/coldfire_altera_v1.shtml
 
"DELIVERABLES
You only get the source code if you buy the asic version.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 07, 2013, 10:53:57 PM
There's already some hybrid 68020-030-040-060 core in the FPGA Arcade.

No need mess with proprietary cores with requirement for specific FPGAs. Nor any Coldfire incompatibilities.

A practical issue is that due to the through-hole (https://en.wikipedia.org/wiki/Through-hole_technology) nature of the 68060 PGA socket any PCB will be occupied by solder pads from the pins. A solution is to put double row a straight pin 1.27 mm header around the PCB edges. Such that a another PCB can be mounted on top and the space be used for FPGA, DC-DC and EEPROM.

A plain PGA-206 socket will leave approximately 20.3 x 20.3 mm and the XC3S1600E (http://www.xilinx.com/support/documentation/data_sheets/ds312.pdf) -FG320 (http://) used in the FPGA Arcade (http://www.fpgaarcade.com/common/fpgaarcade_replay_b01_schematic_a2.pdf) uses 19 x 19 mm which leaves a margin of 0.66 mm around the edges. Tight! And ofcourse there's then no space for the DC/DC and EEPROM which is essential for operation.

Btw, it seems perhaps x86 motherboard "Socket 3" fits (http://eab.abime.net/showthread.php?t=35432) as socket for 68060.

FG320:
(http://chinaimportexport.wikispaces.com/file/view/Sell_XC3S500E,XC3S500E-5FG320C,XC3S500E-4FTG256C,XC3S500E-5PQG208C,XC3S500E-4PQG208C,XC3S500E-4FT256I_XILINX_Integrated_Circuits_Manufacturer_exporting_direct_from_China.jpg/53575832/Sell_XC3S500E,XC3S500E-5FG320C,XC3S500E-4FTG256C,XC3S500E-5PQG208C,XC3S500E-4PQG208C,XC3S500E-4FT256I_XILINX_Integrated_Circuits_Manufacturer_exporting_direct_from_China.jpg)

PCB stack (illustration):
(http://www.robotroom.com/Robots/Afterthought-Cake/Robot-PCB-cube.jpg)

DC/DC (illustration):
(http://i01.i.aliimg.com/img/pb/385/364/553/553364385_559.jpg)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 07, 2013, 11:13:04 PM
Quote from: freqmax;721680

A practical issue is that due to the through-hole (https://en.wikipedia.org/wiki/Through-hole_technology) nature of the 68060 PGA socket any PCB will be occupied by solder pads from the pins. A solution is to put double row a straight pin 1.27 mm header around the PCB edges. Such that a another PCB can be mounted on top and the space be used for FPGA, DC-DC and EEPROM.


Sounds like that assumes the PCM is limited to a square footprint matching the 040/060 size. We don't necessarily need to maintain that limit. Figure out a good compromise with various existing CPU boards to avoid other components, and this thing can be bigger. Go off to one side for power and DDR3 slot. Imagine something like the Xcaliber memory board that plugged into an 040 socket and you put the 040 chip back on top, only this time the 040 is inside the FPGA, and you can toss out your old 040. (as an example)

http://amiga.resource.cx/exp/xcalibur

While an FPGA alone may fit inside the PGA matrix of an 040/060, power probably doesn't, nor would level shifters to be 5V safe. Unless perhaps there are surface mount pins that mount on the bottom of this thing only and the top side is wide open for components and routing... Not sure if that is practical though.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 07, 2013, 11:27:15 PM
I just want to make sure it will work in as many machines as possible. The more assumptions that are made, the more problems may occur when those assumptions are broken.

A simple level shifter often cited in the Xilinx documentation is a series resistor (current limiter) and a zener diode (voltage limiter) to ground. Then the zener positive end is wired to the FPGA.

But I still think however just as you that some compromise regarding size will have to be made. So layer-1 will contain through hole 18x18 2.54 mm spaced pins and 1.27 mm pin headers on the four edges (less routing mess). Layer-2 will contain 1.27 mm pin headers and be populated with FPGA, level shifters, DC-DC, EEPROM.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 07, 2013, 11:56:50 PM
I stumbled on the FPGA Arcade daughter board (http://faranheit.dyndns.org:8080/FPGA%20Arcade/Pictures/060%20Daughter%20Board.gif) again. One can see that the USB-ports to the left and the capacitor to the right could be in the way for wider than designed width of any 68060 FPGA module.

The A4000 motherboard CPU module A3640 (http://www.amiga-hardware.com/download_photos/a3640_1_big.jpg) seems also to have some mechanical obstacles.

Same for the Blizzard 1230 IV (http://www.amiga-hardware.com/download_photos/blizz1230mk4_9_big.jpg) (* (http://www.amiga.org/forums/showthread.php?t=40809)) 68030 accelerator card for the A1200. Different CPU and socket, but it illustrate the issue that circuit boards with CPU sockets may be so packed that there's very little "extra" space.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Iggy on January 08, 2013, 12:54:28 AM
I've messed around with Coldfire. While it would make a great basis for an AROS system, the differences between C.F. and 68K make it a pain running 68K code.




fire
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 08, 2013, 04:20:09 AM
Quote from: ChaosLord;721642
I would just like to clarify that MacOS has problems with the 060 because MacOS is crap.  MacOS is so bad that its creator threw it in the garbage and switched to a totally completely different OS.

On the Amiga, the 68060 is totally compatible with all normal software and causes no problems.

In order to make a program be incompatible to the 060 on the Amiga, one would have try really hard to do it on purpose, or do something that is plain illegal, or be banging the MMU or performing some weird esoteric function that no normal programmer would ever have any need to do.

On the Amiga we have MMU.library so nobody needs to bang the MMU.

I have been writing Amiga software since 1985 and none of my C or asm programs has ever failed on the 060.

Microsoft BASIC fails on the 060 because Microsoft BASIC is a pile of garbage that does wildly illegal things.  M$ BASIC won't even work on 020.

Well, there are quite a few Amiga programs - including several of my own that all follow 100% legal programming practices (according to common sense and the RKMs) that will not run on an 060 with superscalar and/or branch caching enabled.  I don't recall all of the reasons behind the issues.  I should go look at the mmu.library replacement that we made for EMPLANT and FUSION... I know I commented some things there.  I know that self modifying code is definitely one of the things that causes a problem when one of the cached instructions in the pipeline has been modified (like a branch table).  Yes, I consider self-modifying code 100% legal.  :)  You are suppose to flush the caches (or turn them off) with self modifying code, but when you do that you are then running at sub-030 speeds.

The 060 really only adds dual instruction pipelining and a 4-way cache.  A higher speed (100MHz+) 040 core would probably be better in the long run, especially if it handled floating point without completely stalling the core like the 060 does.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 08, 2013, 05:21:26 AM
Quote from: JimDrew;721748
Well, there are quite a few Amiga programs - including several of my own that all follow 100% legal programming practices (according to common sense and the RKMs) that will not run on an 060 with superscalar and/or branch caching enabled.  

Are these programs all emulators?

Emulators have to do weird exotic things and/or deal with weird exotic things in order to get good performance.  These weird exotic things are things that a regular programmer never deals with.


Quote
I don't recall all of the reasons behind the issues.

I am not entirely clear if your complaints about the 060 are not simply that all the first 060s had bugs in them.  Later on those bugs were ironed out.  Iirc at least one of the bugs only happened when was superscalar mode was active so it could be avoided by turning it off.

I am thinking that if you tried a later revision 060 you might like it.

Quote

  I should go look at the mmu.library replacement that we made for EMPLANT and FUSION... I know I commented some things there.

I remembered u coded Emplant but I didn't know about Fusion.  I never actually used either one.  The only mac emu I ever used was A-Max (I think that is what it was called) way back in prehistoric times.

Quote

  I know that self modifying code is definitely one of the things that causes a problem when one of the cached instructions in the pipeline has been modified (like a branch table).  Yes, I consider self-modifying code 100% legal.  :)  You are suppose to flush the caches (or turn them off) with self modifying code, but when you do that you are then running at sub-030 speeds.

If u only modify your code once, flush the cache and go on then its not such a big deal... but if you have to do it in a loop then speed dies.

Does your Emu scan opcodes and runtime replace all those ILLEGAL instructions that MacOS used for Quickdraw etc. ?

Quote

The 060 really only adds dual instruction pipelining and a 4-way cache.  A higher speed (100MHz+) 040 core would probably be better in the long run, especially if it handled floating point without completely stalling the core like the 060 does.

040 core is slow at math.  060 is fast at math.  040 has no branch prediction too.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 08, 2013, 07:59:40 AM
Builtin 68881 vs 68882 causes the speed difference?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 08, 2013, 08:40:38 AM
Quote from: Mrs Beanbag;721644
It might be a good starting point. [ColdFire] Differences are:

1. No DBcc
2. No bitwise rotation (rol, ror)
3. No bitfield operations
4. Multiply instructions don't set flags. From the Coldfire manual:
CCR[V] is always cleared by MULS/U, unlike the 68K family processors

1-3 on your list are not 68k conflicts but trapping would make them very slow. Here is a list of 68k and ColdFire conflicts that are not fixable by trapping (i.e. ColdFire.library):

1. ColdFire stack is 4 byte aligned (68k 2 byte). MOVE.B/W (SP)+ and -(SP) fail.
2. REMS/REMU encoding is incompatible with DIVSL/DIVUL encoding.
3. ColdFire multiply instructions don't set flags like the 68k.

In addition, practically anything in Supervisor mode will not work.

Quote from: Mrs Beanbag;721644
Coldfire also has a few extra commands (some of which would be quite useful, such as saturate and multiply-accumulate)

MVS, MVZ and BYTEREV should have been in the 68060. SATS is good for DSP/Codec type processing but where is SATU and ABS? The CF MAC processor is powerful but is a bolt on that doesn't fit with the 68k/ColdFire IMO. It's a poor man's SIMD as the CF is low end and cheap, cheap, cheap. Freescale will sell you PPC or now ARM (which they sadly license) if you need some real processing power.

Quote from: JimDrew;721748
Well, there are quite a few Amiga programs - including several of my own that all follow 100% legal programming practices (according to common sense and the RKMs) that will not run on an 060 with superscalar and/or branch caching enabled.  I don't recall all of the reasons behind the issues.  I should go look at the mmu.library replacement that we made for EMPLANT and FUSION... I know I commented some things there.  I know that self modifying code is definitely one of the things that causes a problem when one of the cached instructions in the pipeline has been modified (like a branch table).  Yes, I consider self-modifying code 100% legal.  :)  You are suppose to flush the caches (or turn them off) with self modifying code, but when you do that you are then running at sub-030 speeds.

Self modifying code needs to flush the caches (including branch cache) which negates the advantage of the caches and any speed gains of self modifying code. If you don't like caches, stick to the 68000 until you change your mind :/. Some early 68060.library's may not have flushed all the caches properly, fixed the superscaler bugs in the 68060 properly or may have had bugs in the CPU support code used for trapping. The best ones matured and work fine. Fusion works fine on the 68060 here except for an occasional random crash. The last ShapeShifter was more stable though. That was using the last version of Fusion which I bought in your Fusion/PCx CD bundle. Fusion had some nice features over ShapeShifter like the file transfer and auto screen mode changes from within the Mac but stability is more important. I would still use Fusion if it was more stable and supported more hard drive options which ShapeShifter is better at.

The Natami fpga CPU was going to use writethrough caching with snooping and auto flushing of detected dirty cache lines. This is a good option that allows very large caches with excellent compatibility. It would be possible to auto flush a branch cache in the address range of the dirty lines that are detected by snooping also. With the faster memory and larger caches of today, this should give cache performance close to that of the 68060 with better tolerance for self modifying code.

Quote from: JimDrew;721748
The 060 really only adds dual instruction pipelining and a 4-way cache.  A higher speed (100MHz+) 040 core would probably be better in the long run, especially if it handled floating point without completely stalling the core like the 060 does.

The MC68060UM says:

"The MC68060 allows simultaneous execution of two integer instructions (or an integer and a float instruction) and one branch instruction during each clock."

"The MC68060's FPU operates in parallel with the integer unit. The FPU performs numeric calculations while the integer unit continues integer processing."

The 68060 FPU was a nice improvement over the 68040 FPU. It dropped a few 040 FPU instructions that were very rarely used and added back the FINT and FINTRZ instructions which compilers use commonly. The execution speeds were also improved across the board and more parallel operation is possible. The 040 can do some limited parallel operation also.

The 68060 is a great processor which does a lot of parallel work but it's not easy to make and it's probably not as easy to make in an fpga. A faster clocked more 68040 like CPU makes sense in the fpga. Bigger caches, a branch cache and more parallel operation are needed for maximizing performance though.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 08, 2013, 02:14:28 PM
I never saw in crashing of the Mac OS itself under FUSION, but there were plenty of apps that did not like superscaler and/or branch caches enabled.  However, in all fairness these apps were written for the 020/030, so minimal cache flushing was required for self modifying code, which is quite common for decompression programs, encryption for copy protection, etc.  Some of these issues could be due to buggy superscaler mode in early 060 revs.  I went from the first rev available from Phase 5 to the PPC, so I never tested any newer revs.

I know that floating point math scores were often times faster with the 68040-33MHz X-Calibur board than the Cyberstorm 060-50MHz.

Sadly even a 75MHz 060 is really slow compared to modern Intel processors, so the idea of a dedicated Intel CPU adapter is probably the fastest and least expensive option.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 08, 2013, 03:46:32 PM
actually someone is actively working on an a600 fpga accelerator:

http://www.natami.net/knowledge.php?b=6¬e=32232&x=7

http://www.a1k.org/forum/showthread.php?p=589135#post589135

he may not be very experienced, but he is motivated seems to learn quickly and may require all assistance and support from experienced hardware experts (preferably without sarcastic remarks).

it seems to be a rule that the experienced users dont start such projects for whatever reason, maybe bored with it at work or maybe knowing how much effort it is. on the other hand there are those willing newbies. being stubborn and treated right, like the guy recreating thylacine-usb also on a1k, they actually deliver some results. so maybe just try to support them as much as possible.

what concerns coldfire if there were free open source modifyable cores one might adopt changes granting backwards 68k compatibility. i guess natami team might have such a chance at some point as they ve been provided coldfire dev boards by bbrv at some point.  but there are no open cf cores as far as i see, and its unlikely freescale will reveal its designs, so this isnt an opportunity.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 08, 2013, 04:29:35 PM
The experienced users that have this much hardware/software/firmware knowledge generally do not work for free.  So, with an extremely limited market, there is really no desire to work on something where you won't at least recoup your time investment.

There are quite a few neat Amiga products I would make if I could sell thousands of each of them.  But, there is no chance for that.  The C64 market is MUCH bigger (as I am finding out and making products for it).
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Cosmos on January 08, 2013, 05:13:13 PM
Quote from: JimDrew;721789
The experienced users that have this much hardware/software/firmware knowledge generally do not work for free.  So, with an extremely limited market, there is really no desire to work on something where you won't at least recoup your time investment.

For saving the Amiga, the last Amiga Classics experts must work together for free, in one direction... Together, we are stronger !

I never found someone who understand this evidence...


:(
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 08, 2013, 05:43:19 PM
perhaps if focusing efforts of all involved the (intelectual and work) investments fore each one could be minimized while solutions may be reached easier, as it happens with open source efforts, such as aros. when the common (technical) goal has been reached the actual technic can anyway only be provided by those who are able to handle it. therefore supporting the common goal might be benefitial for all.

on the other hand c64 hardware market except it is bigger is probably more easy to staisfy with simpler solutions.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 08, 2013, 05:53:26 PM
Developers may want make the most comatible solution, others the fastest with most bells and whistles which ofcourse ends up with that you loose the starting point.

Some have different coding styles. Or just use different schematics CAD. It might be more fun to make new than to integrate with existing creations. Some stuff just requires a heavy start like Kickstart+Workbench and thus require a dedicated work like the one undertaken by AROS-m68k.
etc..

There are reasons why efforts diverge.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 08, 2013, 06:30:06 PM
Quote from: wawrzon;721785
actually someone is actively working on an a600 fpga accelerator:

http://www.natami.net/knowledge.php?b=6¬e=32232&x=7

http://www.a1k.org/forum/showthread.php?p=589135#post589135


He has his own site: http://www.majsta.com/

Seems several FPGAs had to give their life to that project due to soldering technique. But he seems on track now.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 08, 2013, 06:33:54 PM
Quote from: JimDrew;721789
The experienced users that have this much hardware/software/firmware knowledge generally do not work for free.  So, with an extremely limited market, there is really no desire to work on something where you won't at least recoup your time investment.


But a few are. That's how we got Minimig, TG68, aoOCS, Suska, Zet, OpenGraphics, etc. Check out opencores.org for a variety of things.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 08, 2013, 06:45:29 PM
Quote from: wawrzon;721785
actually someone is actively working on an a600 fpga accelerator


Indeed, and I've been very excited about that. It's basically what I imagine for this discussion, only with a 68000 plug on the bottom rather than 040/060. It's not exactly shaped like a 68000, it has level shifting to be 5V safe, has power and memory onboard. But very much the same idea. He's working with the TG68, which has had some issues to work out to fit onto a standard 68000 bus. I'd really like to see the Suska 68000 code in there instead, as I think it would more readily fit the standard bus than the TG68. (Though I understand that further work on TG68 core is improving that as well, in addition to enhancing to 020 compatibility)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 08, 2013, 07:06:10 PM
Quote from: freqmax;721792
Developers may want make the most comatible solution, others the fastest with most bells and whistles which ofcourse ends up with that you loose the starting point.

Some have different coding styles. Or just use different schematics CAD. It might be more fun to make new than to integrate with existing creations. Some stuff just requires a heavy start like Kickstart+Workbench and thus require a dedicated work like the one undertaken by AROS-m68k.
etc..

There are reasons why efforts diverge.


all that has to be overcome in an software open source community projest as well. everything an  individual has to understand about it that together we can get further and faster than each on his own. all that costs some drwabacks like making appointments and coordinating the effort to certain extent but the gain is worth the cost usually. otherwise we wouldnt have any industry, hell we would not have a civilisation. it just a basic social thing.

that said im not trying to insist on anything just pointing out stuff to consider. look at natami, where an isolated one man project tends to end after all that effort. nothing has been gained, save for thomas himself. maybe even him considers it wasted time now. if it was open someone else might have followed up..
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 08, 2013, 07:08:27 PM
Quote from: freqmax;721796
He has his own site: http://www.majsta.com/

Seems several FPGAs had to give their life to that project due to soldering technique. But he seems on track now.

i said he may not be experienced but stubborn. thats valuable too. if it was common effort someone else could solder for him.. ;)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 08, 2013, 07:27:38 PM
Quote from: JimDrew;721783
Sadly even a 75MHz 060 is really slow compared to modern Intel processors, so the idea of a dedicated Intel CPU adapter is probably the fastest and least expensive option.

Cheapest? It adds an Intel CPU and whatever minimal supporting chipset is required for that to run to the FPGA and whatever is required to safely connect the FPGA to the 680x0 socket. Maybe you can get a smaller and thus cheaper FPGA for a minimal PC to 680x0 bus bridge compared to putting as high-end a 680x0 softcore as can be put into an FPGA, but I don't think that will offset the price of the PC motherboard. (ie, can an x86 CPU work without a PCH/FCH chip?) Yes, I know there are some ludicrously expensive FPGAs, but I don't expect they'd be chosen for this sort of product. We should be able to fit this sort of thing into something reasonable.

Would the x86 doing nothing more than emulating a 68K be higher performance than the FPGA? That's possible.

Of the big companies I've tried to get NDAs from for various hardware projects, Intel is one of the few that said we were not worth the time to process NDA paperwork. This 68K emulator from a tiny modern PC would probably be equally uninteresting to them. A custom CPU accelerator with an X86 is unlikely with Intel. I want to see if a PCH or FCH chip would connect to a PowerPC PCI-Express slot, like in Sam460... AMD is much easier to get in with, at least for their embedded class stuff, maybe not their high-end.

I suppose you could see if a nano or pico-ITX PC would be small enough and have an appropriate bus to plug into the FPGA bridge. But that means you still have to buy that ????-ITX computer, and I'm not sure if they have a PCI slot/header/something available. It'd be silly to have USB in your CPU socket pathway...

In the FPGA CPU softcore vs x86 emulator debate, my own interest lies on the FPGA softcore side, perhaps partially as I'm just an FPGA fan and am interested in learning how to do that. Doing a bridge between the 680x0 socket and something on a PC motherboard, also inside an FPGA, is probably an easier Verilog/VHDL project compared to a CPU softcore, but doesn't interest me personally as much. So I will tend to favor FPGA softcore regardless of other benefits on the PC motherboard side of the debate, but my preference gets into somewhat subjective preference and interest areas. It just sounds more fun. :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: mongo on January 08, 2013, 07:55:31 PM
Quote from: billt;721798
Indeed, and I've been very excited about that. It's basically what I imagine for this discussion, only with a 68000 plug on the bottom rather than 040/060. It's not exactly shaped like a 68000, it has level shifting to be 5V safe, has power and memory onboard. But very much the same idea. He's working with the TG68, which has had some issues to work out to fit onto a standard 68000 bus. I'd really like to see the Suska 68000 code in there instead, as I think it would more readily fit the standard bus than the TG68. (Though I understand that further work on TG68 core is improving that as well, in addition to enhancing to 020 compatibility)


TobiFlex had the TG68 core running on an A500 about 3 years ago.

http://www.a1k.org/forum/showthread.php?t=20223
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 08, 2013, 08:29:39 PM
I thought everything you needed to interface that x86 pain is in the datasheets? anyway perhaps a x86-microcontroller could do the job. But I still see that solution as flawed.
It also adds another dependency on a chip to source. With a generic HDL source you can just neareast enough powerfull FPGA to do the job. And only have one big chip to deal with.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 08, 2013, 08:52:18 PM
Quote from: freqmax;721806
I thought everything you needed to interface that x86 pain is in the datasheets? anyway perhaps a x86-microcontroller could do the job. But I still see that solution as flawed.
It also adds another dependency on a chip to source. With a generic HDL source you can just neareast enough powerfull FPGA to do the job. And only have one big chip to deal with.



datasheets will talk about pinouts, such as connecting cpu to PCH(north/southbridge), pci-express, pci, etc. it won't talk about how to make a new chip to hook onto the PCH bus. it's been hypothesized that the PCH chips connect via PCI-Express, similar to AMD FCH and southbridges, which is close enough to work on X1000, but isn't trivial either from the rumors I've heard. If it's close enough to PCI-Express, design or buy a controller for that, and work our any oddities yourself. or go pci, which is easier perhaps, but requires a southbridge/PCH/FCH with a pci bus to be involved. the tiniest pc motherboards like pico_itx may or may not have exposed pci or pci-express... I don't know them, and haven't yet gone looking.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 08, 2013, 09:05:02 PM
Maybe someone can find this useful:
http://www.oracle.com/technetwork/systems/opensparc/index.html
Obviously that is a different ISA altogether but such things as pipelining, cache etc are presumably ripe for the picking. I don't know very much about the Sparc ISA.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 09, 2013, 12:15:44 AM
Quote from: billt;721802
Would the x86 doing nothing more than emulating a 68K be higher performance than the FPGA? That's possible.

Yes.  Some glue logic (Mach or some type of small FPGA) and probably a bit of dual ported RAM would make a great 680x0 emulator.  The performance could be quite impressive even with an older x86 CPU.  The x86 CPU would be not much more than a state machine and floating point processor.  This is a project that makes sense to me... and since I have written a 68040 core in x86 assembly, I could probably lend a hand.  :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 09, 2013, 12:40:43 AM
Lot's more chips to source, route, solder, and debug. I prefer just one FPGA and done with it.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 09, 2013, 12:51:51 AM
I guess it depends on how fast you want things to go.  A 75MHz 68060 is around 110 MIPs.  An Intel Pentium Pro was 541 MIPs.  Funny thing is that the Xenon x86 used in the XBox360 is 19,200 MIPs.  If you really want to make things go, try out a Core i7 3960x at 177,730 MIPs.

I think the biggest challenge in this design would be to figure out how slow of an Intel CPU you would need to so you weren't just wasting time waiting on the bus to change.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 09, 2013, 01:12:57 AM
wow?! so where we start. actually we would have to agree on hardware to use. x86 is one option. arm is another, perhaps better because of endianness and because its easier to find contemporary module witha single core cpu. i think the board would have to be assembled of a prefabricated module and a glue bridgeboard.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: mongo on January 09, 2013, 01:18:08 AM
Quote from: freqmax;721827
Lot's more chips to source, route, solder, and debug. I prefer just one FPGA and done with it.


You can get one of Xlinx's Zynq-7000 devices, which is basically an FPGA with a dual core ARM Cortex-A9 all in one chip.

http://www.xilinx.com/products/silicon-devices/soc/zynq-7000/silicon-devices/index.htm
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 09, 2013, 01:20:42 AM
Quote from: billt;721807
datasheets will talk about pinouts, such as connecting cpu to PCH(north/southbridge), pci-express, pci, etc. it won't talk about how to make a new chip to hook onto the PCH bus.

Some of Intel's processor have a much simpler bus.
 
http://www.versalogic.com/support/Downloads/PDF/Intel_Atom_Datasheet.pdf
 
I wouldn't want to solder something like that though.
 
I've tried to find a datasheet for one of the more recent atoms & they do seem to be difficult to find. If Intel want to take on Arm in the mobile phone market then they'll have to make it public at some point though.
 
I think it's unrealistic to do this in an 68060 replacement module, but an A1200 accelerator design would be awesome.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 09, 2013, 01:33:14 AM
i think a tiny industrial module is a better choice than a bga cpu because it provides chipset, ram and doesnt require soldering. it should be singlecore too i guess, emulation doesnt need multiple cpus.

btw here is a corresponding thread on a1k, some people such as ratte, newamigauser, jens schoenfeld (paradroid) considering 68k, fpga and x86 emu accelerator as option:
http://www.a1k.org/forum/showthread.php?t=35374&page=11
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 09, 2013, 01:36:31 AM
Quote from: psxphill;721835

I think it's unrealistic to do this in an 68060 replacement module, but an A1200 accelerator design would be awesome.


or an 030slot board for big box amigas. the glueboard could provide both variants.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 09, 2013, 02:25:36 AM
Quote from: mongo;721833
You can get one of Xlinx's Zynq-7000 devices, which is basically an FPGA with a dual core ARM Cortex-A9 all in one chip.

http://www.xilinx.com/products/silicon-devices/soc/zynq-7000/silicon-devices/index.htm

That might be the Holy Grail!  An integrated FPGA with twin high speed ARM cores would work great @1GHz.  :)  This means just one chip interfaced to a 040/060 PGA socket plug.  I am sure you could keep the entire thing within the form factor of a standard 040/060 chip.

edit - these are way too expensive!  You are still better off with a $50 x86 CPU.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 09, 2013, 02:33:40 AM
Quote from: wawrzon;721837
or an 030slot board for big box amigas. the glueboard could provide both variants.

Big box amiga's will always be a minority, but there should be no reason why they are ignored. I got rid of an A1500 recently because I'd given up on anyone producing anything for it. In the late 90's I was thinking of doing an A1200 to A2000 cpu slot adapter but I never really started. In fact it would probably by just as effective to produce adapters for all the different amiga's to allow an A1200 accelerator to be fitted.
 
You could do an a500 sidecar too.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: mongo on January 09, 2013, 02:48:24 AM
Quote from: JimDrew;721840
edit - these are way too expensive!  You are still better off with a $50 x86 CPU.


The XC7Z010 is $63.75 in single quantities.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Iggy on January 09, 2013, 03:20:45 AM
Quote from: mongo;721843
The XC7Z010 is $63.75 in single quantities.

Are these even in production yet?
There is no speed rating listed for the 10 component.

Other then that, it looks like a neat device.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 09, 2013, 05:03:39 AM
Quote from: mongo;721804
TobiFlex had the TG68 core running on an A500 about 3 years ago.

http://www.a1k.org/forum/showthread.php?t=20223



Someone called Shadowfire did something similaf as well:
http://eab.abime.net/showthread.php?t=52364&highlight=fpga

And yet we cannot buy a widget of our own.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Hattig on January 09, 2013, 09:24:06 AM
Doing these things, posting about them, and then leaving the work done to die without sharing the VHDL and schematics is very frustrating. They have the right to do it, of course, but it's like being shown a slice of delicious cake and then being told you can't have it.

Edit: Ah, Shadowfire put his work in the EAB file repository.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 09, 2013, 10:05:41 AM
@Hattig, Which is why I don't spend time on projects that may go bust without fork ;)

When it comes to soldering there's really no way out. You need a special mechanical socket and FPGA glue because no ARM/x86 premade board is going to have that kind of interface.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline on January 09, 2013, 05:28:38 PM
Quote from: JimDrew;721824
Yes.  Some glue logic (Mach or some type of small FPGA) and probably a bit of dual ported RAM would make a great 680x0 emulator.  The performance could be quite impressive even with an older x86 CPU.  The x86 CPU would be not much more than a state machine and floating point processor.  This is a project that makes sense to me... and since I have written a 68040 core in x86 assembly, I could probably lend a hand.  :)
Hmmm... That's interesting! :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 09, 2013, 05:41:30 PM
And x86 need lot's of peripherals to run.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Iggy on January 09, 2013, 05:45:03 PM
Quote from: JimDrew;721824
Yes.  Some glue logic (Mach or some type of small FPGA) and probably a bit of dual ported RAM would make a great 680x0 emulator.  The performance could be quite impressive even with an older x86 CPU.  The x86 CPU would be not much more than a state machine and floating point processor.  This is a project that makes sense to me... and since I have written a 68040 core in x86 assembly, I could probably lend a hand.  :)

Wow, bloodline's right, you have a crucial piece of the puzzle.
There, of course, would still be a lot of work designing the hardware.
But a super fast '040 sounds ideal.

So which socket do we aim for?
The dip or the square '040/'060 type?

It might be easier to design a processor card, but then we'd be limited to A3000s and A4000.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline on January 09, 2013, 06:06:18 PM
Quote from: Iggy;721882
Wow, bloodline's right, you have a crucial piece of the puzzle.
There, of course, would still be a lot of work designing the hardware.
But a super fast '040 sounds ideal.

So which socket do we aim for?
The dip or the square '040/'060 type?

It might be easier to design a processor card, but then we'd be limited to A3000s and A4000.
Indeed!

Though I personally think that what might be more fun is to have the x86 interface directly with an FPGA large enought to take the MiniMig core, and bring out the Amiga compatible I/O (as the MiniMig does) ;)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 09, 2013, 07:15:36 PM
Quote from: freqmax;721881
And x86 need lot's of peripherals to run.

therefore im hammering on using an available module. prefferably one available in longer therm. anyway its the easiest way to approach.
thats what tobiflex did
thats how ratte tried to approach (http://www.a1k.org/forum/showthread.php?t=6745&highlight=ratte+holzbrett)
thats what shadowfire and otheres had in mind apparently.
this is the easiest way to proceed i guess. none here will be able to develop x86 accelerator from the scratch together with mem controller and all periferials people wish.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 09, 2013, 07:17:48 PM
Quote from: bloodline;721884
Indeed!

Though I personally think that what might be more fun is to have the x86 interface directly with an FPGA large enought to take the MiniMig core, and bring out the Amiga compatible I/O (as the MiniMig does) ;)

sounds even better perhaps, a x86 cpu module for fpgaarcade?? there would be no doubt about interface, and the original amigas might stay what they are, which is what im fine with.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Bobo68 on January 09, 2013, 07:27:39 PM
Quote from: Iggy;721882
It might be easier to design a processor card, but then we'd be limited to A3000s and A4000.

and towerized A1200
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Iggy on January 09, 2013, 07:44:47 PM
Quote from: wawrzon;721889
sounds even better perhaps, a x86 cpu module for fpgaarcade?? there would be no doubt about interface, and the original amigas might stay what they are, which is what im fine with.


Yes, that is a better idea and we don't have to worry about 20 year old equipment.
It also might simplify the design.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Lurch on January 09, 2013, 07:55:25 PM
Quote from: freqmax;721461

@ChaosLord, How can you be absolutely sure there's no 1333 MHz capable RAM ..? ;)
(but signal integrity will be a pain)



DDR = Double Data Rate. So a 1333MHz stick is running at half.. 666.5Mhz. However as it's double data rate RAM it can transfer twice as much data on one I/O bus clock, than the actual IO frequency so in fact it works out at 1333MHz.

So to if I break it down. 1333MHz is the data transfer rate. The I/O clock is 666.5MHz.

However 1333MHz is outdated by today's standards and the fastest DDR3 RAM is DDR3-3000.

3000MHz is acheived by overclocking from the factory. However MHz isn't the entire picture as you have SPD Latency which if far more important.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Bobo68 on January 09, 2013, 08:10:25 PM
Quote from: Lurch;721894
DDR = Double Data Rate. So a 1333MHz stick is running at half.. 666.5Mhz. However as it's double data rate RAM it can transfer twice as much data on one I/O bus clock, than the actual IO frequency so in fact it works out at 1333MHz.

So to if I break it down. 1333MHz is the data transfer rate. The I/O clock is 666.5MHz.


and memory clock is 166 MHz
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: djos on January 09, 2013, 08:36:58 PM
Quote from: freqmax;721881
And x86 need lot's of peripherals to run.

What about AMD's Geode line of x86 SoC's?

http://en.wikipedia.org/wiki/Geode_(processor)

The Geode LX in particular would be perfect imo!

http://en.wikipedia.org/wiki/Geode_(processor)#Geode_LX
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Iggy on January 10, 2013, 01:41:43 AM
Quote from: djos;721901
What about AMD's Geode line of x86 SoC's?

http://en.wikipedia.org/wiki/Geode_(processor)

The Geode LX in particular would be perfect imo!

http://en.wikipedia.org/wiki/Geode_(processor)#Geode_LX


There are more powerful processor (including processors with more then one core which could aid in hardware emulation), but the XP-M based versions of the Geode aren't bad and might be powerful enough.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: djos on January 10, 2013, 01:52:32 AM
Quote from: Iggy;721912
There are more powerful processor (including processors with more then one core which could aid in hardware emulation), but the XP-M based versions of the Geode aren't bad and might be powerful enough.


If it's just a companion to an FPGA and providing FPU support it should be grunty enuf - could always use the Athlon based version NX Series if they fit into the required power envelope?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: mongo on January 10, 2013, 03:12:13 AM
Quote from: wawrzon;721889
sounds even better perhaps, a x86 cpu module for fpgaarcade?? there would be no doubt about interface, and the original amigas might stay what they are, which is what im fine with.


Better to just do a FPGA on a PCI card and put it in a PC.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Iggy on January 10, 2013, 03:28:56 AM
Quote from: djos;721913
If it's just a companion to an FPGA and providing FPU support it should be grunty enuf - could always use the Athlon based version NX Series if they fit into the required power envelope?

AMD has so new really low power processors (I get newsletter e-mails from the embedded system division).
I'll try to post some of the new stuff.

Probably too powerful (and they are APUs that contain an on die GPU).

AMD Embedded G-Series Platform
AMD Embedded R-Series Platform

http://wwwd.amd.com/catalog/salescat.nsf/shop?openform

This part may help:
Fusion Controller Hub (eliminates separate north and southbridges).
Add a low power Athlon or Turion and and FPGA for glue logic.


























9
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 10, 2013, 04:23:23 AM
Can the Geode be directly interfaced via level converters to the 68060 socket?
(it seems the only one self contained so far that it won't cause a serious circuit mess)

Perhaps using part of the memory space as Amiga motherboard space but with some serious "wait states" ..?

It would then work such that some areas would run att full speed (1 GHz?) and others be limited (200 MHz?). It must be possible to mark some areas as "dirty" whenever other custom chips work on them.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 10, 2013, 04:47:09 AM
Quote from: freqmax;721921
Can the Geode be directly interfaced via level converters to the 68060 socket?
(it seems the only one self contained so far that it won't cause a serious circuit mess)


Geode does not have a 68060 bus in its pinout, so no.

I saw a PCI bus for Geode, do an FPGA PCI to 68060 bridge. If Geode's PCI bus is 5V, then you'll need level shifters between FPGA and Geode as well as perhaps between FPGA and 680x0 socket.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Iggy on January 10, 2013, 02:58:03 PM
Quote from: billt;721923
Geode does not have a 68060 bus in its pinout, so no.

I saw a PCI bus for Geode, do an FPGA PCI to 68060 bridge. If Geode's PCI bus is 5V, then you'll need level shifters between FPGA and Geode as well as perhaps between FPGA and 680x0 socket.


I'd rather uses an FPGA for bus translation.
Going trough the PCI bus would be seriously low.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 10, 2013, 03:23:50 PM
Quote from: Iggy;721969
I'd rather uses an FPGA for bus translation.
Going trough the PCI bus would be seriously low.

What I mentioned did use the FPGA for bus translation, PCI bus to 680x0 bus. That's what a bridge does. (Sometimes bridges sit between two of the same bus as well, as in PCI to PCI bridge which helps give more slots total than a single bus can provide)

As someone mentioned the Geode LX, have a look at the datasheet
http://wiki.laptop.org/images/a/a1/Lx_databook.pdf

Page 21 has a diagram showing the pin groupings, basically a schematic symbol. If not PCI, what else would you connect to?

I see that the PCI bus in it is 3.3V signalling, so good there.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Iggy on January 10, 2013, 07:32:01 PM
Quote from: billt;721977
What I mentioned did use the FPGA for bus translation, PCI bus to 680x0 bus. That's what a bridge does. (Sometimes bridges sit between two of the same bus as well, as in PCI to PCI bridge which helps give more slots total than a single bus can provide)

As someone mentioned the Geode LX, have a look at the datasheet
http://wiki.laptop.org/images/a/a1/Lx_databook.pdf

Page 21 has a diagram showing the pin groupings, basically a schematic symbol. If not PCI, what else would you connect to?

I see that the PCI bus in it is 3.3V signalling, so good there.


I know, but the bandwidth of these bridge devices slows done the whole design.
Compare the bandwidth
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 10, 2013, 10:51:54 PM
Seems http://www.majsta.com/ has come slightly further:
Quote
after 2 hours here it is. MC68010 in FPGA so now I m convinced, are you ?


On 4th januari it has trouble booting. On 9th januari the FPGA seems to emulate 68010.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 11, 2013, 12:19:13 AM
Quote from: freqmax;722038
Seems http://www.majsta.com/ has come slightly further:
 
 
On 4th januari it has trouble booting. On 9th januari the FPGA seems to emulate 68010.

I think his biggest achievement is he did his own hardware first. Hooking up a development board to your Amiga and then downloading someone elses cpu core is likely to hit a plateau when you see it work. "Damn now I got to start from scratch and build my own hardware". Ok that board is not ready to be mass produced, but it can be tidied up pretty easy.
 
So yeah, awesome work.. Pity it's for a600 and I don't have one. Can someone give him an A1200 ?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 11, 2013, 12:46:34 AM
so all you need is decelerator board? lets focus on something else.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 11, 2013, 01:07:27 AM
Quote from: wawrzon;722054
so all you need is decelerator board? lets focus on something else.



Every project has to start somewhere. for someone not having an engineering background, i'm happy to see his thing booting at all, even if it's been done by others before cabling to their fpga boards. i don't understand the slowness, perhaps something odd in his bus logic to the outside of the fpga.  we can all reinvent the wheel and perhaps beat him in speed, but he's the first to get what is intended to be a classic accelerator product (not a minimig inside a 3rd party dev board or just an experiment toward the minimig goal) running that i know of, which was exactly the original topic of this thread before shifting to x86 and software emulation. imagine, if a no-nothing got an fpga to do this, then he'll likely get it doing better than this as well, given time.

if i had the time, i'd be reinventing that wheel with a Xilinx Zync chip. should be good for 68k softcore and includes an easy path to arm without additional hardware. not x86, but gives both sides of this thread something, softcore for the likes of me, and fast cpu running software for Jim and friends. and arm can be big-endian, so might save some conversion to improve emulation speed compared to x86. faster than most Geode as well! in 2012 I studied fpga design and computer architechture for master's degree. (been verilog verification engineer and soc integrator for 6 years, silicon layout monkey before than laying out fpga silicon for 8 years) currently going through videos from a more advanced architecture course. fun stuff! But not my main project when i have time for anything at all.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 11, 2013, 01:31:44 AM
Quote from: billt;722058
i'm happy to see his thing booting at all


me too!

Quote

 i don't understand the slowness
 


it must be the bus. has been advised not to take one cycle without going into detail. seems its hard to get honest help. ofr it might be signals on the self made board..

anyway i like his stuborness, as said.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 11, 2013, 01:38:10 AM
Endian is not an issue.  You can swap with the FPGA.  :)

My 68040 core handles everything without needing the endian reversed, but I am sure it would be significantly faster without having to do that.

The only thing I don't do in my code is instruction cycle counting.  That could be done, but I never bothered.  The FPGA could be used to trigger an event to denote the end of the instruction cycle (where a process loop just waited for this to occur).  So, based on the speed of your x86 CPU, you could reliably have cycle exact timing at a speed limited to by your fastest instruction (nop).  I know my Mac emulation has no JIT type of stuff, is 100% assembly, and is frightenly fast on modern PC hardware.  I will have to test it on my Sandy Bridge setup to see how fast of a 040 Mac it is.  :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Hattig on January 11, 2013, 09:59:13 AM
The fact that he has got a 68k core running on an FPGA connected into a standard 68k socket and being seen as a standard 68k processor by the system is a great achievement.

As he says, the core can be clocked faster, and it's likely there are a few tweaks to get the per-clock speed up as well. First steps first.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Iggy on January 11, 2013, 10:09:43 AM
Quote from: JimDrew;722060
Endian is not an issue.  You can swap with the FPGA.  :)

My 68040 core handles everything without needing the endian reversed, but I am sure it would be significantly faster without having to do that.

The only thing I don't do in my code is instruction cycle counting.  That could be done, but I never bothered.  The FPGA could be used to trigger an event to denote the end of the instruction cycle (where a process loop just waited for this to occur).  So, based on the speed of your x86 CPU, you could reliably have cycle exact timing at a speed limited to by your fastest instruction (nop).  I know my Mac emulation has no JIT type of stuff, is 100% assembly, and is frightenly fast on modern PC hardware.  I will have to test it on my Sandy Bridge setup to see how fast of a 040 Mac it is.  :)


Jim, you're an inspiration. The real trick will be moving this to a system that generates the corrects signals at the appropriate pins.
That's how I envision the FPGA being used to connect the X86 to the system.
I even think that additional X86 cores to run alternate OS' simultaneously (Windows, Linux, AROS, etc.)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 11, 2013, 01:45:37 PM
Quote from: JimDrew;722060
My 68040 core handles everything without needing the endian reversed, but I am sure it would be significantly faster without having to do that.

The standard way is to treat memory as a an array of little endian dwords and then:
 
byte: xor the address with 3
word: for aligned xor the address with 2, for unaligned either one or two accesses depending on how it's split and then shift
dword: for aligned do nothing, for unaligned you have to split it up into two aligned accesses and then shift
 
There isn't really an alternative to that & that's as fast as it gets
 
The fpga can't know when to swap as it requires knowledge about what the cpu is trying to do with the data, plus it won't even be asked about data once it's cached. So if you read memory as a dword and then as a byte, it will not work.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 11, 2013, 02:03:52 PM
supposing one does a movem.w (SP)+,D0-D7 for instance... urgh
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 11, 2013, 03:12:32 PM
Quote from: Mrs Beanbag;722087
supposing one does a movem.w (SP)+,D0-D7 for instance... urgh

movem.w is heavy without the endian, you need to look at the bitmask to determine which 68k registers need writing out and then load them from ram into x86 registers before writing them out.
 
You could probably have an aligned and an unaligned version (whether it's aligned to a word boundary is not going to change by writing another word).
 
Doesn't movem.w (SP)+ add 4 to the stack pointer for each write? at least on some processors I'm sure the stack pointer gets 4 byte aligned.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: polyp2000 on January 11, 2013, 03:48:18 PM
I noticed his website has been hacked - i hope this doesnt hinder his progress.

http://www.majsta.com/
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Hattig on January 11, 2013, 04:05:26 PM
Quote from: polyp2000;722095
I noticed his website has been hacked - i hope this doesnt hinder his progress.

http://www.majsta.com/


I just don't understand why someone would do that in this community.

I hope that it was just a random script poking random URLs that found a flaw in the platform he was using for his website.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 11, 2013, 04:07:23 PM
So fücking unecessary to mess up his website, perhaps a scriptkiddie?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 11, 2013, 04:15:26 PM
dunno I did just tweet a link to it so maybe it's my fault :(

some people will just hack anything though just because they can
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 11, 2013, 06:16:28 PM
the site seems to be back online now.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 12, 2013, 05:19:29 AM
I know for fact you can do the byte swap/word swap with the FPGA in real time, but depending on how fast the x86 is it could slow down the operation of the 680x0 emulation.  By the way, the fastest way to swap bytes and words is through a big lookup table.  It's faster than trying to convert it by hand using shifts, ANDs, and XORs.   If you run everything backwards in memory you don't need to do the byte swaps, but the x86 doesn't cache backwards, and anything requiring DMA (like audio) won't work.  It's also interesting to note that there are certain x86 addressing modes that although reduce the size of the code, significantly reduce the throughput of CPU instruction lookup.  I learned quite a bit about the Intel and AMD architectures when I did the port of FUSION to the PC.  It is always faster to ADD an offset twice and branch than it is to use a *2 in a branch instruction.  The *2 stalls the pipeline while calculating the address.  When I created FUSION-PC, I made a histogram of the instructions used during the Mac boot up.  I was surprised that fewer than 10% of all of the available instructions were used when the Mac booted.  I would bet the Amiga boot up is very similar.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 12, 2013, 08:57:32 AM
Is it this software?
WP-en: VMware Fusion (https://en.wikipedia.org/wiki/VMware_Fusion)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 12, 2013, 03:46:12 PM
Quote from: psxphill;722094
Doesn't movem.w (SP)+ add 4 to the stack pointer for each write? at least on some processors I'm sure the stack pointer gets 4 byte aligned.
The programmer's reference manual doesn't say so. It says "the address is incremented by the operand length (2 or 4)".
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Fats on January 13, 2013, 10:12:53 AM
Quote from: JimDrew;722177
I know for fact you can do the byte swap/word swap with the FPGA in real time, but depending on how fast the x86 is it could slow down the operation of the 680x0 emulation.


How do you know if you need to swap or not ? For example a memory copy function that uses 32bit transfers but may be copying strings that may not be byte swapped ?

greets,
Staf.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 13, 2013, 12:01:17 PM
Quote from: Mrs Beanbag;722213
The programmer's reference manual doesn't say so. It says "the address is incremented by the operand length (2 or 4)".

Ok. It's bytes that affect a7 by 2, but everything else by 1.
 
"Indirect addressing with postincrement

Assembler syntax:
Same as indirect addressing, but An will be increased by the size of the operation after the instruction is executed. The only exception is byte operations on A7 - this register must point to an even address, so it will always increment by at least 2. Example:"
 
Quote from: Fats;722286
How do you know if you need to swap or not ? For example a memory copy function that uses 32bit transfers but may be copying strings that may not be byte swapped ?

My only thought would be to access bytes/words & dwords at different address ranges & disable all the caches. You could implement a cache inside the fpga, although it would probably still be slower than the on chip cache because it would be limited to the fsb speed. You'd have to do it to figure out which came out better or worse.
 
Most of the time the 68k code would be doing aligned accesses, so that should show up in the branch prediction. So a test for whether it's aligned and then the xor is likely to not have much impact at all.
 
I know Mike Coates spent a long time optimising his 68k core back in the day, it was used in MAME back in the late 1990's & early 2000's. Obviously some of the optimisations are likely to be deoptimisations on recent cpu's, but the clock speed outweighs the effort required. Even musashi (the C core that MAME now uses) would probably be more than sufficient.
 
Or if someone does an ARM board instead then there is always http://notaz.gp2x.de/cyclone.php
 
My thought on using x86 (or even better x64) is that using a VM on the card could allow a bridge board style PC emulator to run at the same time as the 68k. Crazy idea I guess, but heh these ideas are all crazy.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 13, 2013, 02:27:52 PM
How about this for a crazy idea, an accelerator with an Arm CPU and an FPGA, the FPGA can function as a 68k CPU if set up as such, so it could run like the PPC accelerator boards. BUT you install AROS for ARM ROM chips and use the Arm as the main CPU, and allow the FPGA to be reconfigured by the Arm chip, so then you could develop your 68k core "live", and install updates through software.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 13, 2013, 03:22:37 PM
Quote from: psxphill;722293
Ok. It's bytes that affect a7 by 2, but everything else by 1.

No. The stack is "affected" by the number of bytes pushed or popped from or to it as follows.

68k:
byte = 2 bytes (with 1 byte of padding to maintain word alignment)
word = 2 bytes
longword = 4 bytes

ColdFire:
byte = 4 bytes (with 3 bytes of padding to maintain longword alignment)
word = 4 bytes (with 2 bytes of padding to maintain longword alignment)
longword = 4 bytes

This is one of the main incompatibilities between 68k and CF as I mentioned earlier.
Note that movem.w (sp)+, sign extends as it restores registers and is missing on the CF.

Quote from: Mrs Beanbag;722302
How about this for a crazy idea, an accelerator with an Arm CPU and an FPGA, the FPGA can function as a 68k CPU if set up as such, so it could run like the PPC accelerator boards. BUT you install AROS for ARM ROM chips and use the Arm as the main CPU, and allow the FPGA to be reconfigured by the Arm chip, so then you could develop your 68k core "live", and install updates through software.

That hardware sounds pretty close to what the fpga Arcade is already.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 13, 2013, 03:56:23 PM
68k is quite neat to program for ;)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline on January 13, 2013, 04:08:32 PM
Quote from: Mrs Beanbag;722302
How about this for a crazy idea, an accelerator with an Arm CPU and an FPGA, the FPGA can function as a 68k CPU if set up as such, so it could run like the PPC accelerator boards. BUT you install AROS for ARM ROM chips and use the Arm as the main CPU, and allow the FPGA to be reconfigured by the Arm chip, so then you could develop your 68k core "live", and install updates through software.
+1

Probably the most sensible comment in the whole thread :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 13, 2013, 04:32:20 PM
Quote from: Fats;722286
How do you know if you need to swap or not ? For example a memory copy function that uses 32bit transfers but may be copying strings that may not be byte swapped ?

greets,
Staf.

There are several ways to handle this.  One requires that the FPGA follows the instruction stream, so as instructions are decoded the data bus can be swapped depending on the incoming instruction.  The other way is by having the x86 side (during the decoding) change the bus interface.  As I stated before, this will limit the speed of the emulation to how fast the FPGA can respond, which could be much slower than a fast x86 chip.  So, with a fast x86 chip, it would probably be faster to do the byte swaps manually (through shifts/ORs/ANDs/XORs/etc) or though a lookup table if you have enough memory for that.

As far a copying strings, well the x86 is always backwards Endian from the 68K, so you always have to swap words and long words when fetching/storing data.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 13, 2013, 04:38:25 PM
Quote from: Mrs Beanbag;722302
How about this for a crazy idea, an accelerator with an Arm CPU and an FPGA, the FPGA can function as a 68k CPU if set up as such, so it could run like the PPC accelerator boards. BUT you install AROS for ARM ROM chips and use the Arm as the main CPU, and allow the FPGA to be reconfigured by the Arm chip, so then you could develop your 68k core "live", and install updates through software.


i dont get it, but sounds like another hybrid idea, aros arm system with 68k apps. imho anything like warpos solution is a waste of time. we shouldnt create another split/branch with the need of dedicated binaries, and we shouldnt follow feature creap strategy. lets have simple 68k accel, as simple as it gets, no strange ideas. lets treat 68k as virtual common platform/denominator, then we will maybe have chance to actually achieve something one day.

lets start discussing wierd complicated ideas and we can have fun threadthat will follow in natami footsteps, to nowhere.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 13, 2013, 04:39:27 PM
Quote from: JimDrew;722307
There are several ways to handle this.  One requires that the FPGA follows the instruction stream, so as instructions are decoded the data bus can be swapped depending on the incoming instruction.  The other way is by having the x86 side (during the decoding) change the bus interface.
But then it goes in the cache, and there are any number of things that can go wrong. Such as if you read an address as a longword for some reason, and then go on to process it as part of a string, it will have been byte swapped into the cache. Either you turn the cache off and destroy any advantage of using such a fast CPU, or you have serious difficulties ensuring coherence.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 13, 2013, 04:49:07 PM
Quote from: wawrzon;722309
i dont get it, but sounds like another hybrid idea, aros arm system with 68k apps. imho anything like warpos solution is a waste of time. we shouldnt create another split/branch with the need of dedicated binaries, and we shouldnt follow feature creap strategy. lets have simple 68k accel, as simple as it gets, no strange ideas. lets treat 68k as virtual common platform/denominator, then we will maybe have chance to actually achieve something one day.

lets start discussing wierd complicated ideas and we can have fun threadthat will follow in natami footsteps, to nowhere.
But we already have AROS for Arm. We could make an Arm board for A1200 and install AROS ROMs in it. The expertise exists for that, I believe. We wouldn't need an emulation layer or any fancy bus tricks. Dual CPU PPC accelerators already exist so we have experience from that.

What we DON'T have is a FPGA accelerator, because we don't have a 68k core. One reason why not is it means developing both hardware and software at once, while either on their own is a task in itself, so we get stuck at an impasse. No core? FPGA accelerator=useless. No FPGA accelerator? Core=useless.

Natami/FPGA arcade try to emulate a complete system, which is yet again a massive task that we don't need to do. We only need the 68k, and a convenient platform to develop it on would really make things easier.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 13, 2013, 05:08:40 PM
Quote from: Mrs Beanbag;722311
But we already have AROS for Arm.
sort of. actually hosted. its being worked on native version especially for pi.

Quote
Dual CPU PPC accelerators already exist so we have experience from that.
we, means who? the documantation of ppc boards is closed source owned by dce germany, its outdated and it is not going to be given to us except for multiple ten thousands of euro as it has been revealed. also there is none who would realistically build such a ppc board. jens schoenfeld outright refuses to have anything to do with unreliable ppc architecture as he considers it. such an hybrid board is very complicated and expensive in fabrication, Many layers, bga, and requires special softwware (warpos like) which is even more complicated. besides an approach like that already exists with ultimateppc. lets see what will come out of it.

the hybrid ppc boards were a sick stunt to start with. overpriced, overcomplicated, creating a split in community as they need own binaries, non reliable enough, with os4 its even crippier, when you have an ecpensive 68k cpu onboard surrounded by support chips not even being used. i see no advantage of such design even with an arm in place of ppc. please dont repeat past failures.

as for the rest, we actually have the software in question whether its the 68k emu or 68k fpga core already, or what do you mean. what we need it hardware to interface it to amiga, be it fpga or an asic cpu interface. im not an expert but i think this is much easier to achieve. since it has been now proven multiple times that fpga accelerator basically works. it can be improved on that.

and also if you want just an arm system with hosted 68k emu why not just hack an x86 or an arm board directly into amiga housing. with janusuae you will have semi transparent 68k emulation i guess. if this is what satisfies you, i dont see what might stop you, everything is at hand, no need to develop anything, you can start sawing your case right away. ;)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 13, 2013, 05:29:20 PM
@jimdrew:
i thought there is separate data and instruction bus, that can be handled separately. data will always need to be swapped i guess, where is the problem?

also, what does your 040 emu actually provides? does it support fpu and mmu? i guess it would be quite important and at the same time pretty complicated and expensive to have in a pure fpga. this is another argument in favour of x86. winuae contains cpu + fpu emulation with partial mmu emulation, the complete mmu support being merged in by toni right now.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 13, 2013, 05:37:41 PM
Well I don't want to saw my case up for one thing... I'm not suggesting using PPC just pointing out that dual CPU has been made to work. I've never owned one, though, so I can't say how well it works.

Accelerators have an FPGA on board anyway to handle various bus signals, could just be a case of replacing it with a bigger one, and an interface to allow the firmware to be updated from software. FPGA accelerator basically works but there is a barrier to community development of the core(s). Plus people could create custom cores, which could produce some interesting projects. I'd like to develop my own core but I don't have the means to produce hardware.

Arm chip need not be expensive.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 13, 2013, 05:56:28 PM
Quote from: Mrs Beanbag;722314
Well I don't want to saw my case up for one thing... I'm not suggesting using PPC just pointing out that dual CPU has been made to work. I've never owned one, though, so I can't say how well it works.
i have one. i always refused one but got it beginning of this millenium, and can confirm that its nothing great. the best part is fast scsi controller. i can dispose of ppc, that can only be taken advantage of the specially precompiled code. all the usual (68k) stuff runs as usual on the 68k processor with its usual speed. so its just okay for what it should be.


Quote
Accelerators have an FPGA on board anyway to handle various bus signals, could just be a case of replacing it with a bigger one, and an interface to allow the firmware to be updated from software. FPGA accelerator basically works but there is a barrier to community development of the core(s). Plus people could create custom cores, which could produce some interesting projects. I'd like to develop my own core but I don't have the means to produce hardware.

Arm chip need not be expensive.

im sure its not just as simple as glueing another fpga to an existing design if there was one at disposal to start with. look how much effort has been put into minimig, fpgaarcade or natami hardware. there are several fpga aware people around the scene yet except those little else is available to us. lets do not underestimate the hardware development effort and try to keep it as simple as possible on this side. a hybrid board is under these circuumstanced surely not the best approach, except there is one already in development:
http://ultimateppc.nl/
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 13, 2013, 06:16:58 PM
Quote from: wawrzon;722317
im sure its not just as simple as glueing another fpga to an existing design if there was one at disposal to start with.
Hardware would need a redesign but I'm sure it wouldn't be beyond anybody who has made an accelerator before.

Quote
look how much effort has been put into minimig, fpgaarcade or natami hardware. there are several fpga aware people around the scene yet except those little else is available to us.
But these all try to emulate a complete Amiga system.

With big FPGA+small Arm+Flash ROM (flashable in software) development could be done in the community rather than in isolated groups, that's essentially my "crazy idea" anyway. The hardware could be configured various ways, 68k core in the FPGA, software 68k emulation on the Arm, potentially PPC in the FPGA as well I guess, or anything else you could think of. But could run AROS "out of the box" with nothing in the FPGA but a bus interface.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 13, 2013, 06:55:19 PM
Quote from: Mrs Beanbag;722318
Hardware would need a redesign but I'm sure it wouldn't be beyond anybody who has made an accelerator before.


but who do you know who has made an accelerator board before. to my knowledge there is only one (very professional) person yet in the community. jens schoenfeld of individual computers. and he refuses any complicated design and tries to keep things reasonably down to the earth. he didnt even made any 060 design up till now. let us stay realistic rather than pipe dreaming, especially if neither you nor me can contribute to the hardware development. to demand of others is easy.

Quote

But these all try to emulate a complete Amiga system.

im not sure if that is actually such a big difference. minimig can run with an associated asic 68k processor and with a softcore like tg68 withing fpga arcade and chameleon. so we have well encapuslated non aga chipset core at disposal and we can associate it with what we like to have for a 68k cpu solution. natami board was made much too complicated i think, just because there was so much features thomas or the followers wahted to implement. thinking of an accel we do not need chipset emu at all of course.

Quote

With big FPGA+small Arm+Flash ROM (flashable in software) development could be done in the community rather than in isolated groups, that's essentially my "crazy idea" anyway. The hardware could be configured various ways, 68k core in the FPGA, software 68k emulation on the Arm, potentially PPC in the FPGA as well I guess, or anything else you could think of. But could run AROS "out of the box" with nothing in the FPGA but a bus interface.

but this is completely another subject. the software side can be thone by the comunity anyway. but it is difficult to expect that hardware can be developed like that. therefore i think it is important to keep hardware side simple.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 13, 2013, 07:14:36 PM
Quote from: wawrzon;722320
let us stay realistic rather than pipe dreaming,
You're demanding a lot of me here, I don't know if I can manage it.

Quote
so we have well encapuslated non aga chipset core at disposal
I don't even need that, I have a real AGA Amiga.

I get your point. But we are already on the subject of making custom hardware CPU boards, which is the topic of the thread anyway. And people are suggesting even x86 accelerators.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 13, 2013, 07:36:26 PM
it was me who proposed x86 accel i admit, in order to simplify the design using widely awailable prefabricated components. if you look at jens schoenfeld x-surf, apparently one of the best zorro network cards, its an pc low profile isa card assembled with a simple zoro adapter board and a little logic. jens must have done the simplest and most reasonable thing there was.

also i did not propose to run native code on that accelerator, whatever cpu it would carry, except for 68k emu. everything else would run 68k native without any modifications. at least at the beginning. the rest could stay open. but lets leave this topic to better informed.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 13, 2013, 07:58:59 PM
Quote from: Mrs Beanbag;722311
What we DON'T have is a FPGA accelerator, because we don't have a 68k core. One reason why not is it means developing both hardware and software at once, while either on their own is a task in itself, so we get stuck at an impasse. No core? FPGA accelerator=useless. No FPGA accelerator? Core=useless.

There are already open source 68k cores, the bus interface is going to be specific to the hardware you build. The problem is that nobody wants to make accelerator fpga hardware. The a600 has a prototype one, which is looking promising.
 
If someone did an a1200 one and it could run 68k code at the equivalent of 100mhz then loads of people would buy it.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Plaz on January 13, 2013, 08:04:24 PM
In following the thread, Beanbag's suggestion of a FPGA/ARM combo is intriguing. Reminds me in a way of an Emplant board. I'd picture a proto/dev only board with 040/ARM/FPGA combo for developement of the FPGA. *IF* successful, then a production ARM/FPGA(040) for all kinds of interesting things. Not opposed to x86, but feel that's kind of covered already with AROS and UAE. Not speaking for anyone else, but I wouldn't go to much expense to put an x86 in my classic. BTW, I'm a master at soldering. ;)  Perhaps time to brush off the old asm skills and get an ARM manaul?

Plaz
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 13, 2013, 08:44:22 PM
Quote
but I wouldn't go to much expense to put an x86 in my classic

even if it would make your amiga fastest original amiga ever, faster than x1k and a g5mac?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Plaz on January 13, 2013, 09:54:11 PM
@wawrzon

I'd prefer something more unique for my Amiga even if it wasn't bleeding edge on speed. For years I preferred and enjoyed my 50mhz Ami while other 300mhz, then 400, 500, 667, 733, 800, 933 and 1200mhz systems were made available. Imagine a classic at hundreds of mhz with ARM support.... cool.

Also such work could benefit future advances in things like minimig, fpgarcade and ... ??  And again, I'm not against x86, it's just less interesting for me. I also agree with earlier post that an x86 will probably need more supporting hardware on board than a FPGA.  Isn't "tying" an x86 to an Amiga buss going to require it?

Plaz
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 13, 2013, 10:11:47 PM
Anything that isn't 68k will most probable require some FPGA glue. That means the minimum configuration is FPGA + EEPROM (core boot image). Adding anyting else adds to the BGA soldering hêll.

I say like @psxphill, there already exist TG68, opencore 68k, and FPGA Arcade 68030 softcore hybrid which is essentially a TG68 modded to 68020 modded to 68030.

I think that a CPU core in FPGA is fast enough to saturate the computer bus in Amiga.

So the least amount of hardware mess and using existing software availability is an FPGA + EEPROM with perhaps SRAM for cache.

KISS..
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 13, 2013, 10:52:43 PM
Quote from: freqmax;722335
Anything that isn't 68k will most probable require some FPGA glue.
Even a 68k needs an asynchronous bus interface to run at anything other than the motherboard clock speed. ACA1230 etc use an FPGA for this, as well as for the memory controller (I believe).
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline on January 13, 2013, 11:10:18 PM
Perhaps a better idea, is to make an FPGA bridge, like the zorro to PCI bridges... But perhaps more like a 68k to SPI bridge... That way any CPU with an SPI interface could be bolted on to an Amiga (or Amiga chipset clone), and endieness issues could be dealt with in the protocol/bridge?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 13, 2013, 11:16:42 PM
Any idea on the signal integrity issues for sufficient fast SPI transfer line?

Those that have any idea regarding BGA, ground plane, cross talk, bus capacitance/inductance, power decoupling, multilayer routing.. raise the hand.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 13, 2013, 11:41:47 PM
SPI is too slow, you need something that can handle about 15MBytes per second for basic use and about 30MBytes for ZIII to work.  You can't cut it too close, you need some headroom to make up for any small delays that might occur.

Latency is another issue. If the latencies are too high, no sustained transfer rate is going to help you.  You'll stall the bus and at best have retries and wait states slowing you down.

I've done a TON of research on this same idea in the last few years (and still am, but not as heavily).  One of the reasons I keep putting it off is the fear of rejection by users.  It's not a "real" Amiga, it's just an emulator, etc.  You have to admit, we're an easily offended and fickle group.

The other is getting a fast link between the CPU and the Amiga bus.  Most SOC's have limited IO capability.  GPIO isn't fast enough on any I've seen and local buses are long gone.  PCI-e is on some of them, but that's not a cheap interface.

The other big stumbling block is ZorroIII.  IMHO, forget Z3, it's not worth it for the 4-5 available cards that are easily replaced with faster components on an SOC.  Z3 never worked right anyway, you get at most one busmaster out of the 4 available.

Edit: let me clarify on the Z3 issue.  If you don't allow Z3, you only need to communicate with the system on the lower 16MB, using 24 bit addresses.  This would apply to any Amiga model.  Everything above that could be local to the SOC.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 13, 2013, 11:54:09 PM
i wouldnt mind people not taking solutions as amiga enough. ppc isnt amiga as well. people will complain and then shut up and want have when they see the results. all that runs available and potentially possible 68k codebase but faster is fine whatever the tech behind it.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline on January 14, 2013, 12:09:01 AM
Quote from: Heiroglyph;722349
SPI is too slow, you need something that can handle about 15MBytes per second for basic use and about 30MBytes for ZIII to work.


Really? Haven't had a look yet (will do some sums tomorrow), but off the top of my head the Amiga chipset wouldn't need anything more than about 2meg per second and an SPI can easily hit 3meg per second... Remember that the alien CPU will have it's own ram local to itself, and the CPU is really just going to treat the Amiga chipset like a graphics/sound card, mostly just hitting registers ;)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 14, 2013, 12:26:27 AM
Chipram access can hit over twice that, then there are ZorroII devices.  Rom access can be a little over 9MB, although I'd assume you'd want to put that into fast ram anyway.

I'm thinking AGA Amigas, for ECS you might get away with it since they have a slower, narrower bus.

I haven't seen a reasonably available SPI that was fast enough.  There are faster more exotic ones, but your SOC has to support it too or you're back to bolting that onto your SOC.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 14, 2013, 12:47:27 AM
Chipram = a good solid 14.? MB/sec unless I am misremembering something.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 14, 2013, 01:08:27 AM
I don't think chip can get quite hit 7MBps, although I could be wrong.  It's not easy to get reliable real world info.  Some of the benchmarks seen online are just obviously incorrect.

Fast ram on the motherboard and ZII would still need to be taken into account.  I'm not sure I'd want to give up some of my ZII devices that are unique to Amiga, like the Flyer, etc.

It's possible that I've missed something on SPI though, it might be doable.  I'd love to be proven wrong, SPI is on pretty much every SOC.

And getting a theoretical maximum that just barely cuts it isn't going to really work.  Nothing ever hits theoretical max.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 14, 2013, 01:13:02 AM
Zorro-II (http://www.l8r.net/technical/t-zorro.shtml) equals 75 signals that need to be available at a 14 MHz on A1200. To just transfer this one way will require 74*14 MHz = 1.050 GHz. Something that is a completly different ballgame than a 14 MHz parallell bus. It's more on par with S-ATA drive interface.

So more radio frequency magic and related routing issues. Bus inductance and capacitance will be on the edge, no room for "hopefully works" or "oops traces" etc. This will make developers tire of the project and drive the cost!

Parallel m68k socket to parallel FPGA I/O equals piece of cake frequencies.

Again, KISS.

Btw, The Flyer (http://amiga.resource.cx/exp/flyer) seems to have a neat compression algorithm adaptive Statistical Coding (VTASC) that have noise artifact instead of Jpeg/wavelet blockiness. Anyone figured it out?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 14, 2013, 01:33:26 AM
Yeah, the Flyer source is open ;)

Ok, so SPI...

Typical SOC, Freescale iMX53.  SPI rates 16-60Mbps, or at most 7MBps.  That's theoretical mind you.  You also have a lot of CPU overhead, probably up to around 50% on long transfers (disk IO, etc).

The other thing is that isn't taken into account is overhead of addressing and error checking. The datarate is in raw bits, that doesn't take that into account telling the other side where to put the data or what the data size is.

For long transfers it's not so high a percentage, but for sending a single byte you've got 24bits+ of address, 8 bits of data and some unknown for data size.  I'd say roll the data size (like SIZ0-1 on the CPU) into the unused address bits and have a minimum transfer of 40bits for 8bits of data.

Worst case you've got 40bits to each byte, 5:1 and no error checking.  If that's a common operation, you'd need five times your amiga bus bandwidth to seem normal.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 14, 2013, 01:46:00 AM
bloodline, I'm seriously not targeting you or anything, just putting my thought process out there for debate hoping you or someone else will see a flaw in my logic.

I read back through it and I was afraid you'd take it the wrong way.

I just haven't had the chance to discuss this CPU stuff with anyone, so I'm enjoying bouncing ideas.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 14, 2013, 02:11:18 AM
Quote from: freqmax;722335
Anything that isn't 68k will most probable require some FPGA glue. That means the minimum configuration is FPGA + EEPROM (core boot image). Adding anyting else adds to the BGA soldering hêll.

I say like @psxphill, there already exist TG68, opencore 68k, and FPGA Arcade 68030 softcore hybrid which is essentially a TG68 modded to 68020 modded to 68030.

I think that a CPU core in FPGA is fast enough to saturate the computer bus in Amiga.

So the least amount of hardware mess and using existing software availability is an FPGA + EEPROM with perhaps SRAM for cache.

KISS..


I don't understand the horror of many pins BGAs. have it assembled. no big deal. or get a rework kit to assemble BGAs. (I am gradually building this up myself) But pro Assemblers are probably better.

Indeed, there are a handful of open/free 68k softcores to start with, so that simply is not a problem. Get them on the 040 or 060 bus is a little  work, but quite doable.

For those without resources to get harcware designed, consider KiCad or UpVerter. UpVerter sounds good for this sort of thing, but may need to advance a bit more first. Online tools, cloud data, free for open-source projects... KiCad is GPL (and one of the reasons I want WxWidgets for OS4)... Upverter sounds like it's becoming a good platform for collaborative/group design.

I'd put a microSD slot for the FPGA bitstream, so it's relatively easy to update even if something goes bad, rather than a soldered-on eeprom/flash. Maybe a simple microcontroller to get some config manager like FPGA-arcade to choose 68k softcore or Aros Arm-native or etc. I like the idea of using the internal Arm for that, but not sure how easy that is to do. (I've not done reconfigurable work before, and am not sure what mikej's approach is, or what other minimig boards do or not.

I'd use a Zync or Cyclone/Arria5 soc FPGA with Arm inside. Then Aros peeps can play with Arm, 68k peeps can play with softcore and maybe figure out something interesting for Arm to do, and software emu peeps have a fast cpu to interpret or jit 68k on. And I think that these Arm things inside would do better than adding a Geode or other X86/64 Pc to it all. Also consider than the Arms connect to the FPGA fabric, as I understand, via the Arm AXI system bus, so there is a better pathway to 68k socket than through PCI or PCI-express from a PC chipset.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 14, 2013, 02:19:11 AM
Quote from: Heiroglyph;722349
The other is getting a fast link between the CPU and the Amiga bus.  Most SOC's have limited IO capability.  GPIO isn't fast enough on any I've seen and local buses are long gone.  PCI-e is on some of them, but that's not a cheap interface.


GPIO would be terrible. I've done Arm APB bus over GPIO (as a software C implementation) and it was horribly slow. funtional yes. some things would have been weird such as interrupt latency. But this was for a testbench experiment (inside verilog simulator of a full soc chip) and ended up not used in favor of something else. Doing 68k bus as GPIO would not be any better, and probably worse as APB is not very complicated.

The Arm AXI bus inside the SoC FPGA chips is your local bus.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 14, 2013, 02:26:42 AM
My issue with the FPGA/ARM combo chips is the price.

I've been trying to find a good way to interface the wave of super cheap ARM's that are 800-1200Mhz and loaded with peripherals.

It might take a combo chip, but then we're back to $1000 CPU cards. :(
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 14, 2013, 02:50:28 AM
The more specific the chip is, the harder to source it..
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Plaz on January 14, 2013, 05:44:38 AM
Quote from: wawrzon;722351
i wouldnt mind people not taking solutions as amiga enough. ppc isnt amiga as well. people will complain and then shut up and want have when they see the results. all that runs available and potentially possible 68k codebase but faster is fine whatever the tech behind it.


As much as anything else we're hardware geeks, not just more GUI users. What's under the hood is as interesting or more so than what icon is being clicked. For flat out speed, apps, and support wintel is a great way to go. But if that's all everyone ever wanted there'd be no reason to hang around an Amiga site. If this were a "for profit" project, market research would say some wintel based solution would be the best option. But wait... we already have a wintel option. In reality this project will probably mostly be done for free and loose money. So devs might as well pick what's the most fun then.

Why did Amiga devs back in the day go PPC? Well two basic reasons I see....#1- it was Motorola and #2- it wasn't Intel. With current options, who knows what they might have chosen. Well I guess that's what we're working out now.

Plaz
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Plaz on January 14, 2013, 05:54:57 AM
Quote from: Heiroglyph;722383
My issue with the FPGA/ARM combo chips is the price.


Cheaper if using individual chips? I'm poking around the internet and seeing some FPGA/ARM dev combo boards for around $150-200. FPGA on those probably to small for the 68K core though.

Plaz
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 14, 2013, 06:10:20 AM
Whatever I used, I'd want to keep it CPU agnostic.  No more of this "oops, they don't make those anymore" or "these are WAY cheaper, too bad we can't use them".

I'd like to keep 68020 as the instruction set to avoid fragmentation.  I know some people would be upset that it's not PPC, but honestly there are a LOT of us who never touched a PPC and there are existing GHz+ PPC solutions.

It would be sort of like Java bytecode, the CPU cards just have to know how to execute it, whether its an Intel, Arm, PPC or whatever.

All our existing software would just work and new software could still run on 68030's and 68060's assuming they could handle the workload.

There would be some overhead but when you're jumping from 50MHz to 1.5Ghz and higher, would you even notice?

UAE is incredible, but it's also emulating the whole chipset.  Imagine how fast it could run without that overhead by letting the actual chipset do its thing.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 14, 2013, 06:17:10 AM
Quote from: Mrs Beanbag;722310
But then it goes in the cache, and there are any number of things that can go wrong. Such as if you read an address as a longword for some reason, and then go on to process it as part of a string, it will have been byte swapped into the cache. Either you turn the cache off and destroy any advantage of using such a fast CPU, or you have serious difficulties ensuring coherence.

Huh?  You have to remember there are already 68K emulators for the x86 that do the byte swapping.  I believe I have the fastest non-JIT type ever made.  There are no issues with caches, and there would not be any under any circumstances.  ALL data with a x86 is backwards from the 68K (little Endian vs. Big Endian), so everything dealing with words or longs is swapped and remains that way.  If the FPGA performed the swap instead of doing it in software, I would hope that it would be cached!
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 14, 2013, 06:33:00 AM
Most modern CPU's can byte swap so fast we'd barely notice anyway.  I believe some Arms can deal with bi-endian data (bi, not big).  I don't really think emulation speed is an issue.

AFAIK, we do still need a JIT for ARM, but initially it could be tested with existing CPU emulations.

No offense to Jim and his amazing emulators, but I've always found the Executor CPU emulation to be very interesting.  It's tough to follow since it creates itself, but it could be extended to other CPUs and updated for better optimization with newer x86 CPUs.

There is no shortage of emulations to pick from and I'm sure there are emulator authors that would love to pitch in on the Arm JIT since it's pretty much the #1 platform now.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 14, 2013, 06:57:11 AM
How about this for a low chip count start...

5v tolerant CPLD like Altera MAX 3000A or Lattice ispMACH 4000ZE.

The CPLD would take care of being a basic 68030 style busmaster at bus speed (14MHz on 1200, 25MHz on 3/4000).  It's almost an arbiter.  This is basically like building a Zorro card, not rocket science.

Then use an AVR32 with USB2.0 like a AT32UC3A3.  This is not the CPU, this is the USB interface to the real CPU.  It takes care of as much of the CPU duties as it can, but does not run applications.  It's mainly there to make the Amiga into a smart USB2.0 device.

The AVR would also forward any interrupts needed to the host, the real CPU running our CPU emulation.

Now hook up a PC and work out the communication protocol with easy to use tools.  No embedded device needed.

Anything below 16MB gets routed to the USB device.  Above 16MB is local to the CPU emulation.  You could use hooks similar to the way UAE does to add in RTG and other devices.

So far you've got a very small investment in parts (connectors, PCB, chips, etc) but you can use any CPU you want that has USB 2.0.

Doing it cheap?  Use a rasbperry pi.
Doing it no holds barred?  Leave an i7 PC plugged into the side.

Any combination in the middle could work.  Bigger Arm single board computers like Pandaboards, PC/104 or comExpress boards, custom internal boards powered from your Zorro slot, anything you can run your software on.  Hell, plug it into a video slot instead then use the camera input on many Arm chips to overlay the Amiga video signal onto its own video signal.  Instant flicker fixer and monitor switch.

You've got a small investment in hardware and software, then the hardware can move with you to bigger CPU's and newer software.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline on January 14, 2013, 08:36:07 AM
Quote from: Heiroglyph;722375
bloodline, I'm seriously not targeting you or anything, just putting my thought process out there for debate hoping you or someone else will see a flaw in my logic.

I read back through it and I was afraid you'd take it the wrong way.

I just haven't had the chance to discuss this CPU stuff with anyone, so I'm enjoying bouncing ideas.
I only suggested SPI because it is super simple and cheap to implement, and I've used it in the past for some pretty fast transfers with ARM micro controllers... Also it was developed by Motorola so it might keep a few purists in the scene happy...

If you have a bigger budget then a more sophisticated bus would be better, many micro controllers have built in USB, so that could be an option too?

-edit- I notice that you suggested USB too, in your post. That's certainly a great idea, though USVB has loads of cool features that one would never need for this project like hot plugging etc... Not sure is the latency of USB would be an issue?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ElPolloDiabl on January 14, 2013, 10:08:23 AM
We already have WinUAE that can perform like a 2Ghz Amiga. So...
I would want to see something better than that (more features etc.)
Not to fussy about the price, but keep it under $1000 or I would never buy it.

For running modern software I think dual core 1Ghz cpu is the minimum.

You might want to find out what type of software people want to run on it. What kind of spec do you need to play HD movies? I might like internet radio, not so much HD movies.

It's very interesting, if you finish your final spec soon, I will actually believe you can do it.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 14, 2013, 10:51:36 AM
as for the purists, ive seen a notion that even hardcore os4 fans are now for immediate x86 switch when doable. dunno why the original amiga fans should bother more. those who dont care about speed can keep their 68ks..
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 14, 2013, 11:19:58 AM
Quote from: JimDrew;722399
If the FPGA performed the swap instead of doing it in software, I would hope that it would be cached!

I think we're having trouble understanding what you're suggesting, because you can't just convert a little endian processor to big endian using an FPGA.
 
The following code detects whether it's running on big or little endian.
 
int num = 1;
if(*(char *)&num == 1)
{
printf("\nLittle-Endian\n");
}
else
{
printf("Big-Endian\n");
}
 
The code could be running entirely from the processors code cache on a 386 or later, so you can't snoop the bus for op code fetches.
 
The write to the stack will be cached in the processors data cache on a 386 or later, so between the writing of the 4 byte int to reading it back you have no way of reversing the bytes for when it's read back.
 
The difference between big and little endian is not just a case of swapping bytes. When reading a dword as a word for instance you don't swap bytes, you only swap words.
 
I'd be interested in if you could explain how you'd solve the problem without disabling the code & data caches. You could use a processor without caches, the 286 was the latest but you might as well just emulate that if you have an FPGA.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 14, 2013, 12:09:29 PM
Xilinx is a better option as their ISE has better Linux & BSD support during development than Altera.

USB has a minimum latency of 1 ms which make round trips to be 2 ms. Compare this with a slow A500 bus that has a round trip at 280 ns ie 3570 times faster!
Round trip matters..

As for choice of processor if direct FPGA implementation is not used I think ARM is the better choice as it is more efficient, more suitable to single board solutions unlike x86, can switch endianness etc.

But I still find one FPGA-done the least amount of fuss solution. And the m68k op codes to be way nicer to deal with in contrast to x86 ones.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 14, 2013, 01:56:17 PM
Quote from: freqmax;722430

But I still find one FPGA-done the least amount of fuss solution. And the m68k op codes to be way nicer to deal with in contrast to x86 ones.


+1
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 14, 2013, 02:12:31 PM
then i would divide the approach in two parallel, as there are either suppoers for an asic cpu with fpga glue or pure fpga anyway. fpga may give us simpler purer solution, while arm or x86 will provide raw power. ok?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 14, 2013, 02:40:20 PM
Quote from: bloodline;722412

-edit- I notice that you suggested USB too, in your post. That's certainly a great idea, though USVB has loads of cool features that one would never need for this project like hot plugging etc... Not sure is the latency of USB would be an issue?


I'm not sure on the latency, but 2.0 is lower than 1.0 and available anywhere.  It certainly has enough bandwidth and isn't going away any time soon.

Regardless of what was used, I like the idea of a community standard for modularity.  Once the hardware is worked out for one model it could easily be adapted to another system by the same or other developers most interested in that system.  The 68000 models still need VPA/VPB etc to access 6800 devices, but other than that it's mostly just bus speed, width and a new connector.  Far cheaper than starting from scratch.

There's no point in starting from scratch for each model, otherwise it would never get done for some of them.  Once an Amiga had the adapter, you wouldn't have to scour the world looking for those crazy connectors that Commodore used to make a new CPU upgrade either.
 
We could have reusable CPU modules that users could upgrade easily or carry to their next Amiga or FPGA clone by buying a new adapter.

The other side is that clones could be easier to build and diagnose when you can leave much of the functionality on the CPU card, emulated but usable and replace individual functions with hardware as the project progresses.

A powerful CPU card alone with a power supply and case could even be a Mini-mig type system.

There are sales opportunities all over the idea of a modular CPU card, even if open to being a community project.

There is no point in duplicating someone else's hardware design, the market can't support that competition it so there is still a naturally protected market for someone willing to put in the effort and it significantly lowers the investment.

The benefit to the users is more accessible, cheaper upgrades, better long term investment in CPU hardware and documentation so that when they break in 10 years they can be fixed even though the designer is long gone from the scene.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 14, 2013, 02:54:58 PM
Quote from: freqmax;722430
Xilinx is a better option as their ISE has better Linux & BSD support during development than Altera.

USB has a minimum latency of 1 ms which make round trips to be 2 ms. Compare this with a slow A500 bus that has a round trip at 280 ns ie 3570 times faster!
Round trip matters..

As for choice of processor if direct FPGA implementation is not used I think ARM is the better choice as it is more efficient, more suitable to single board solutions unlike x86, can switch endianness etc.

But I still find one FPGA-done the least amount of fuss solution. And the m68k op codes to be way nicer to deal with in contrast to x86 ones.


Good info on USB.  Someone will come up with a workable solution I'm sure.

As for op codes, I wouldn't expose the native CPU, I think that defeats the purpose.  The only one who would see the native opcodes is the person writing the embedded software for the CPU card.  It's just like an FPGA, the users don't write code in VHDL (bad analogy, but it's all I've got).  End users would just see a super fast 68020/30.

If we expose the native CPU opcodes, we break the market into at least two more fragments making software compatibility a problem.  Even exposing them like Amithlon did is too much IMHO.  Amiga Classic = 68k is much easier on everyone.

Any special functions could be exposed through standardized libraries, for example a video encoding/decoding library that uses the hardware directly.  

Think of it like Amiga drivers.  The user knows he's using WarpSCSI.device but doesn't know or care that it uses a different chip than GVPScsi.device.  Default standard libraries could be written in 68k and used if specialized ones aren't available.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 14, 2013, 03:03:09 PM
By using the PGA-208 68060 socket one can use it on FPGA Arcade and A4000. Models with less demands on bus frequency can then be used via an adapter because the lesser frequency will allow greater signal integrity margins.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 14, 2013, 03:06:14 PM
@Heiroglyph
+1 on all points
+ i think the approach to look from the 68k emulation perspective treating the amiga as expansion card providing interface to the original chipset and the original interfaces, is exactly right, since this is what it in fact is, even if you use your usual 68k accelerator today.
whats important is to provide yet some expansion possibility best not bound to amiga itself as for instance pci. who has fast cpu wants fast rtg as well.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 14, 2013, 03:06:39 PM
Quote from: wawrzon;722436
then i would divide the approach in two parallel, as there are either suppoers for an asic cpu with fpga glue or pure fpga anyway. fpga may give us simpler purer solution, while arm or x86 will provide raw power. ok?


I would propose that we do it in the open and work together.

Getting the bus signals right is not super easy and there's no reason other than greed not to share this between projects regardless of what CPU is on the other end.

I'd like to break the cycle of closed NDA hardware, the community isn't big enough to support that anymore.

I'd even go so far as to propose a license for the shared hardware info.  The attachment between the Amiga and between cards must be open freely and changes fed back to the community.  You can keep your back end firmware/embedded software closed until you stop selling and supporting the hardware, then you must make your design open.  If you use a UAE based JIT, obviously that would still have to follow the GPL guidelines.

That covers commercial development but makes sure that the community gets enough info to interoperate and progress while eventually being able to support/repair your hardware in the future.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 14, 2013, 03:14:58 PM
Quote from: wawrzon;722443
@Heiroglyph
+1 on all points
+ i think the approach to look from the 68k emulation perspective treating the amiga as expansion card providing interface to the original chipset and the original interfaces, is exactly right, since this is what it in fact is, even if you use your usual 68k accelerator today.
whats important is to provide yet some expansion possibility best not bound to amiga itself as for instance pci. who has fast cpu wants fast rtg as well.

Thanks for the + ;)

I totally agree and I've glossed over that.

We've got the source to OpenPCI (at least I've got permission to distribute it and relicense under an open license).

So we could either ship with an OpenPCI library that is compatible with our hardware or just have PCI and other devices show up directly by using existing linux, bsd, etc. drivers on the back end.

It might make sense to have onboard components show up as devices and PCI either show up through OpenPCI or have some special fiesystem folder where native drivers/devices could be added.  That's one of the few places I'd be OK with seeing native code.

Amigans are notoriously bad at writing drivers, taking advantage of native drivers just makes sense.  Otherwise we'll never see them.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 14, 2013, 03:23:49 PM
Quote from: freqmax;722442
By using the PGA-208 68060 socket one can use it on FPGA Arcade and A4000.

I think an A1200 accelerator is worth doing with just an FPGA, some flash and some ram.
 
Making a 68060 socket compatible version might be useful for a minority, but I'm not convinced it's going to be very useful for the FPGA Arcade. It doesn't need a physical 68060 & it has an FPGA waiting for code.
 
An A4000 maybe, although I think a new dedicated accelerator is going to be more useful there. Especially in terms of ram cost and bandwidth.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 14, 2013, 03:34:25 PM
I think if we've got some fast CPU running 68k emulation or otherwise, it would be a shame not to make its raw power available to the user in some way.

I also had the idea a while back also to approach the problem from the opposite end... make an Amiga graphics card (preferably AGA, for me) for PCs. The PC would then only need to emulate the 68k.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 14, 2013, 03:35:37 PM
Quote from: freqmax;722430

USB has a minimum latency of 1 ms which make round trips to be 2 ms. Compare this with a slow A500 bus that has a round trip at 280 ns ie 3570 times faster!
Round trip matters..


Wait, what do you mean by round trip?

The 500 has a 7MHz bus plus signaling overhead, times can't be that low for anything outside the CPU.

Internal to the CPU would be equivalent to inside the JIT.

The only time you'd hit a latency issue is on the initial read or write to the Amiga itself, not on long transfers, also on interrupts and probably not with any bus contention (chip ram access, etc.).  The data might already have been transferred to the Amiga side of the USB and waiting for the bus.

I'm still not 100% sure this wouldn't work, but like many accelerators it might some percentage of the time have wait states only when accessing the Amiga, not when accessing local devices or ram.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 14, 2013, 03:37:25 PM
Quote from: Mrs Beanbag;722450
I also had the idea a while back also to approach the problem from the opposite end... make an Amiga graphics card (preferably AGA, for me) for PCs. The PC would then only need to emulate the 68k.


Inside Out board made with Minimig-AGA, once Yaqube and friends have that finished up.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline on January 14, 2013, 03:45:42 PM
@ 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 :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 14, 2013, 04:06:04 PM
Quote from: Mrs Beanbag;722450
I think if we've got some fast CPU running 68k emulation or otherwise, it would be a shame not to make its raw power available to the user in some way.

as is said i agree with heiroglyph on all points, especially on moldular construction and approach. see that jens schoenfeld is going exactly the same way now, providing unified interfaces for different computers and for different accelerators. perhaps it would even be possible to get him on boat, both adopting his interface standards, as advisor and as future manufacturer.
what concerns exposing the native cpu to the user, it might be done like on amithlon, as an option by a dedicated developer. that is the part of modular approach, we propose, that different concepts might coexist as long as there is enough interest there. btw why not invite bernd (umisef on aw.net) the amithlon coder as advisor too?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 14, 2013, 04:08:03 PM
Quote from: psxphill;722448
I think an A1200 accelerator is worth doing with just an FPGA, some flash and some ram.
 
Making a 68060 socket compatible version might be useful for a minority, but I'm not convinced it's going to be very useful for the FPGA Arcade. It doesn't need a physical 68060 & it has an FPGA waiting for code.


For the A1200 you would then have to spin another PCB => more fuss.

There's a shortage of >75 MHz 68060 CPUs for the FPGA Arcade. And the FPGA on the base board isn't large enough to implement a 68060 properly.

I think A1200 and A3000 users could benefit from a plain mechanical adapter. And A4000 could benefit directly.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 14, 2013, 04:17:30 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,


im a noob, but likely..

here some thought interfacing via pci, seems doable, alas in german:
http://www.a1k.org/forum/showthread.php?t=35374&highlight=turbokarte&page=12
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline on January 14, 2013, 04:52:54 PM
Quote from: Heiroglyph;722462
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.



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 :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 14, 2013, 05:14:20 PM
Quote from: billt;722453
Inside Out board made with Minimig-AGA, once Yaqube and friends have that finished up.
I never heard of Inside Out board, it seems to be a complete Amiga, CPU and all?

Don't really need the CPU on board. Just the graphics + sound.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 14, 2013, 05:15:58 PM
Quote from: Heiroglyph;722383
My issue with the FPGA/ARM combo chips is the price.

I've been trying to find a good way to interface the wave of super cheap ARM's that are 800-1200Mhz and loaded with peripherals.

It might take a combo chip, but then we're back to $1000 CPU cards. :(


Well, I'm just saying what I would do. Considering my available time, I'm not likely to. Anyone that might actually take up this sort of project is free to do things as they see fit. More than one are free to each do things their own way, which may have several different things happen.

My real dream is a 3000/4000 style accelerator card that's just an FPGA, memory and a bunch of connectors, including a Com-Express type 6 connector. Most other connectors would go to that, perhaps through the FPGA first for some muxing. Then that FPGA would be either a softcore 68k or a bridge to a ComExpress module, which could be PowerPC, x86, whatever. But I don't have time to do that either. I'm more likely to spend time on a PowerPC ComExpress module, which iealize as the best way to design OS4 "Amiga" motherboards today if we must stick with PPC. This 68060 direct replacement idea is an interesting diversion for the moment though. :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 14, 2013, 05:17:44 PM
Quote from: Mrs Beanbag;722466
I never heard of Inside Out board, it seems to be a complete Amiga, CPU and all?

Don't really need the CPU on board. Just the graphics + sound.


Someone took the Amiga chipset and put it on an ISA (I think) card for a PC. I don't think it was around for very long, and I don't think there were very many of them.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline on January 14, 2013, 05:18:00 PM
Quote from: Heiroglyph;722464
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.
I fear you want to run before you can walk ;)

If the SPI idea is cheap and simple, and if it works then you advance the design ;)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 14, 2013, 05:23:06 PM
Quote from: freqmax;722458
And the FPGA on the base board isn't large enough to implement a 68060 properly.

Has that been tried? I thought it was more that nobody had implemented the FPU & MMU.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 14, 2013, 05:49:22 PM
Quote from: psxphill;722426
I think we're having trouble understanding what you're suggesting, because you can't just convert a little endian processor to big endian using an FPGA.

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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: utri007 on January 14, 2013, 05:53:50 PM
Could it be possible implement cpu and gpu to FPGA? Something like 68060 and Cirrus Logic GD5446 or S3 Virge? Picasso IV / Cybergraphics 64 3D

This way there would be possible get drivers, without hassle????
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Bobo68 on January 14, 2013, 05:57:41 PM
Quote from: utri007;722473
Could it be possible implement cpu and gpu to FPGA? Something like ... Cirrus Logic GD5446 or S3 Virge?


whether their design is opened?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline on January 14, 2013, 06:01:34 PM
I think Jim Drew is suggesting that the FPGA only swaps the bus when the CPU makes a request larger than a byte.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 14, 2013, 06:03:52 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
I hope you mean move.l #$12345678,D0. But look at Psxphill's example. Supposing you do
move.l (A0),D0
move.b (A0),D1

which byte of (A0) ends up in D1? Given that (A0) is now cached.

Let A0 point to an address that contains $12345678. FPGA swaps it to $78563412. Second line then reads $78 instead of $12!

If this were such a trivial problem to solve, "endianness" wouldn't even be a thing.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 14, 2013, 06:40:04 PM
Here is some interesting data on SPI and USB: http://www.totalphase.com/support/kb/10057/
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 14, 2013, 07:18:03 PM
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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Georg on January 14, 2013, 07:41:04 PM
Emulators can "lay out" the emulated memory in whatever way they like as long as the emulation makes it look "normal" to the emulated machine.

A normal emulator like UAE will use:

emulated address 0: <--> address hostmem + 0
emulated address 1: <--> address hostmem + 1
emulated address 2: <--> address hostmem + 2
emulated address 3: <--> address hostmem + 3
emulated address 4: <--> address hostmem + 4
emulated address 5: <--> address hostmem + 5
emulated address 6: <--> address hostmem + 6
emulated address 7: <--> address hostmem + 7
[..]

But theoretically it can also use:

emulated address 0: <--> address hostmem_end - 0
emulated address 1: <--> address hostmem_end - 1
emulated address 2: <--> address hostmem_end - 2
emulated address 3: <--> address hostmem_end - 3
emulated address 4: <--> address hostmem_end - 4
emulated address 5: <--> address hostmem_end - 5
emulated address 6: <--> address hostmem_end - 6
emulated address 7: <--> address hostmem_end - 7
[..]

or:

emulated address 0: <--> address hostmem + 3
emulated address 1: <--> address hostmem + 2
emulated address 2: <--> address hostmem + 1
emulated address 3: <--> address hostmem + 0
emulated address 4: <--> address hostmem + 7
emulated address 5: <--> address hostmem + 6
emulated address 6: <--> address hostmem + 5
emulated address 7: <--> address hostmem + 4
[..]

Such tricks can help avoiding byte swaps but there are also some disadvantages like when the emulated machine wants to read something from disk which likely ends up using something like fopen/fread of host, which of course use normal memory layout. So after load you will need to fix up loaded stuff to match emulated layout (swap or mem reverse).
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 14, 2013, 07:44:52 PM
Quote from: Mrs Beanbag;722480
I hope you mean move.l #$12345678,D0. But look at Psxphill's example. Supposing you do
move.l (A0),D0
move.b (A0),D1

which byte of (A0) ends up in D1? Given that (A0) is now cached.

Since it is A0 itself that is byte swapped, the correct value for the lower byte will be returned.


Quote from: Mrs Beanbag;722480
Let A0 point to an address that contains $12345678. FPGA swaps it to $78563412. Second line then reads $78 instead of $12!

No, because the BYTE value of $78563412 is $12 - just as it would be with a software only op-code interpreter.

Again, I think the FPGA would end up slowing down the process when you had a fast x86.  I am not sure where the break even point would be - that would depend on how fast you could clock the FPGA.

Endian is really not that big of a deal when doing a 68K emulation.  It's just an extra process.

I guess you guys have to decide if you want 100% compatibility or not.  If you do, you absolutely must have a cycle exact emulation.  There are quite a few programs that require it.  You could also deliberately set emulation thresholds.  For example, you could set the speed/emulation type to be Amiga 500 (68000), Amiga 3000 (16MHz or 25MHz 030), Amiga 4000 (25MHz 68040), etc.  This way you could run those euro demos in Amiga 500 mode that won't work on anything else.  :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 14, 2013, 07:51:12 PM
Quote from: Georg;722489
Emulators can "lay out" the emulated memory in whatever way they like as long as the emulation makes it look "normal" to the emulated machine.

Yep.  My first version of the Pentium emulation for the Amiga used the PC memory map backwards.  This was so no byte swaps were necessary for the opcode emulation.  However, when it came to disk, DMA, screen stuff, etc.  It was a nightmare having to swap everything.  After a lot of testing I went to a forward memory map and that ended up being faster in the long run because of the reduced swapping needed for the video alone.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 14, 2013, 08:06:00 PM
Quote from: JimDrew;722490
Since it is A0 itself that is byte swapped, the correct value for the lower byte will be returned.
What do you mean, A0 is byte swapped? How do you byte swap an address register? What address does it point to, the most significant byte of our longword, or the least significant byte? It can't point to two different addresses.

Quote
No, because the BYTE value of $78563412 is $12 - just as it would be with a software only op-code interpreter.
But the number is not $78563412. The number is $12345678. The byte value of that is $78.
A byte access wouldn't know anything about the other three bytes. The $12 is stored at (A0). The $12345678 is stored at (A0). If you swap it in memory, the address register no longer points at the most significant byte.

If there is a string in memory, such as "abcdefgh" does it get swapped to "dcbahgfe"? But the pointer to the start of the string still points to "a"?

Supposing we have a longword access at 2(a0), then what?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 14, 2013, 08:13:06 PM
Quote from: bloodline;722476
I think Jim Drew is suggesting that the FPGA only swaps the bus when the CPU makes a request larger than a byte.

I missed this post - That is correct.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 14, 2013, 08:14:52 PM
Quote from: Mrs Beanbag;722492
Supposing we have a longword access at 2(a0), then what?

2 is added to the value of A0 and swapped.  This is no different than how we do it with software emulation.  An FPGA can certainly do anything that can be done in software.  Instead of the FPGA handling the entire CPU core, it would be handling the memory bus accesses and off-loading the CPU emulation itself to the primary (x86) CPU.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 14, 2013, 08:16:47 PM
Quote from: JimDrew;722493
I missed this post - That is correct.
But the CPU is not making any request on the bus if the data is in the cache.

Also how would you distinguish between the virtual machine memory, and the memory required for the emulator itself (including its program)? You would not want to swap the emulator's program code around.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 14, 2013, 08:17:56 PM
Quote from: Heiroglyph;722484

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.

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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 14, 2013, 08:18:08 PM
Quote from: JimDrew;722490
you absolutely must have a cycle exact emulation.  There are quite a few programs that require it.


Which applications  require that besides A500 specific demos? it has been up before when Minimig were in the pipe. And there were some serious refutations on the issue.

What buses do SoC support? (ARM etc)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 14, 2013, 08:21:09 PM
Quote from: JimDrew;722494
2 is added to the value of A0 and swapped.  This is no different than how we do it with software emulation.  An FPGA can certainly do anything that can be done in software.  Instead of the FPGA handling the entire CPU core, it would be handling the memory bus accesses and off-loading the CPU emulation itself to the primary (x86) CPU.
But then instead of getting "cdef" as the data, it gets "bahg" interpreted as "ghab" - completely wrong!
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 14, 2013, 08:24:02 PM
Quote from: JimDrew;722490

I guess you guys have to decide if you want 100% compatibility or not.  If you do, you absolutely must have a cycle exact emulation.  There are quite a few programs that require it.  You could also deliberately set emulation thresholds.  For example, you could set the speed/emulation type to be Amiga 500 (68000), Amiga 3000 (16MHz or 25MHz 030), Amiga 4000 (25MHz 68040), etc.  This way you could run those euro demos in Amiga 500 mode that won't work on anything else.  :)

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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Bobo68 on January 14, 2013, 08:27:33 PM
Quote from: Heiroglyph;722484
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.


I've recently seen PLX PCI9054 which converts 060 to PCI bus and don't need CPLD/FPGA...
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 14, 2013, 08:31:18 PM
Quote from: Heiroglyph;722500
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.

im not sure. i remember i proposed incorporating openpci and been opposed on the dev ml.
the rudimentary 68k implementation is mostly by jason mcmullan, it doesnt even work yet, but allows to identify details of the present boards, at least in my mediator.

at the point when it becomes an issue you might join dev ml:
https://www.hepe.com/mailman/listinfo/aros-dev/
 or i will provide you with the mail address.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 14, 2013, 08:32:25 PM
Quote from: Bobo68;722503
I've recently seen PLX PCI9054 which converts 060 to PCI bus and don't need CPLD/FPGA...


ermmm.. what? where?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Bobo68 on January 14, 2013, 08:40:00 PM
Quote from: wawrzon;722505
ermmm.. what? where?


on  ebay  (http://www.ebay.co.uk/itm/PCI9054-AC50PIF-Manu-PLX-Encapsulation-QFP-PCI-Bus-Master-I-O-Accelerator-Chip-/120922027994)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 14, 2013, 08:43:47 PM
What exactly are we trying to connect to what, in any case? I got lost somewhere along the line.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 14, 2013, 08:44:09 PM
@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..
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Bobo68 on January 14, 2013, 08:48:02 PM
Quote from: Heiroglyph;722508
I'm really surprised nobody hooked one up to make a PCI backplane though.


why nobody?
http://www.powerphenix.com/ctpci/english/overview.htm
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph 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).
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph 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 ;)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Bobo68 on January 14, 2013, 08:54:00 PM
Quote from: Heiroglyph;722513
Ok, nobody on Amiga ;)


you'll try ;)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Bobo68 on January 14, 2013, 08:57:03 PM
Quote from: Heiroglyph;722513
Ok, nobody on Amiga ;)


because there is m :) diator on amiga
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 14, 2013, 08:59:47 PM
Quote from: freqmax;722510
@wawrzon, Any application that has failed for you because of accelerators ?
none i remember or would seriously care for.
Quote
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 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Bobo68 on January 14, 2013, 09:00:01 PM
Quote from: Heiroglyph;722517
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.


Show me the  SOC with 68K code
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 14, 2013, 09:03:25 PM
Quote from: Bobo68;722511
why nobody?
http://www.powerphenix.com/ctpci/english/overview.htm

if the designs are open could be used as reference.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 14, 2013, 09:06:46 PM
So what bus does the SoC of reasonable price, package and availability use?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 14, 2013, 09:15:28 PM
Forgive me if this sounds terribly stupid, but surely an Arm chip (for instance) has data and address buses that we could connect to the trapdoor slot via some relatively simple FPGA glue logic, just as we would a 68060?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 14, 2013, 09:19:32 PM
Quote from: Mrs Beanbag;722524
Forgive me if this sounds terribly stupid, but surely an Arm chip (for instance) has data and address buses that we could connect to the trapdoor slot via some relatively simple FPGA glue logic, just as we would a 68060?

You might look for one with an EBI bus. (I htink that's what it's called) forgot about that one until today. I'm not sure what kind of selection there is though, I'm only aware of moderate performance ones between 100MHz and 200MHz which don't thrill me for this task. But I don't know much about the higher-end ARM chips. This is typically used for memory, bu tmay work for this sort of project as well.

I'm not aware of any ARM chips that expose an AHB or APB bus externally for connecting to an FPGA, which would probably be preferable to EBI. The new ARM SoC FPGA chips DO (as I understand) expose the newer AXI system bus internally to the FPGA, which is part of my attraction to them. Cool stuff! Yes, somewhat to terribly expensive just now, but I've only found the Xilinx low and high end ones at Digikey, I haven't found the Altera ones anywhere to compare. Maybe they aren't quite out the door just yet. I'm hopeful that prices will adjust when both companies have them on distributor shelves.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Bobo68 on January 14, 2013, 09:21:44 PM
Quote from: Mrs Beanbag;722524
Forgive me if this sounds terribly stupid, but surely an Arm chip (for instance) has data and address buses that we could connect to the trapdoor slot via some relatively simple FPGA glue logic, just as we would a 68060?


I think the logic won't be so simple as we want.
because 020 and 060 buses so close each other
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 14, 2013, 09:28:27 PM
Quote from: billt;722525
You might look for one with an EBI bus. (I htink that's what it's called) forgot about that one until today. I'm not sure what kind of selection there is though, I'm only aware of moderate performance ones between 100MHz and 200MHz which don't thrill me for this task. But I don't know much about the higher-end ARM chips.


Finding one that has that plus external interrupts with levels is tricky.

It's also not standardized across chips so you're back to vendor lock-in.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 14, 2013, 09:45:19 PM
Interrupts can be handled by letting the Amiga side setting an interrupt register in the FPGA which in turn just signal a general interrupt (like "IRQ" on C64) to the overdrive CPU. The CPU side then reads what interrupt source that triggered the event and act accordingly. The extra performance will negate any delays for this code.

On 8086 etc.. an instruction may take 3 cycles but an IRQ may take 100 cycles just to hint on the amount of wasted cycles that may occur. Not counting Push/Pop instructions.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 14, 2013, 09:49:30 PM
Quote from: freqmax;722529
Interrupts can be handled by letting the Amiga side setting an interrupt register in the FPGA which in turn just signal a general interrupt (like "IRQ" on C64) to the overdrive CPU. The CPU side then reads what interrupt source that triggered the event and act accordingly. The extra performance will negate any delays for this code.

On 8086 etc.. an instruction may take 3 cycles but an IRQ may take 100 cycles just to hint on the amount of wasted cycles that may occur. Not counting Push/Pop instructions.


But if the CPU has no external interrupts, you have to poll for a signal on a GPIO constantly, which can get costly.  Am I missing something?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 14, 2013, 09:56:34 PM
Choose another CPU ;)

On the FPGA you can make any signal you need..
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 14, 2013, 10:04:19 PM
Quote from: freqmax;722533
Choose another CPU ;)

On the FPGA you can make any signal you need..


lol, I know, right?

So many CPU's are being thrown out because of IO problems though.  I'd like to maximize the options rather than being stuck with the single CPU that would ever work.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 14, 2013, 10:05:44 PM
MicroBlaze softcore achieves 1.38 DMips/MHz:
http://www.xilinx.com/tools/microblaze.htm

With 500MHz FPGA, if such core could be matched by a 68k soft core, this would probably beat software emulation on 1GHz Arm.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 14, 2013, 10:10:34 PM
If an FPGA is used in the first place as a soft core CPU. There is no reason whatsoever to use microblaze or other architecture CPU. It would just be a huge performance penalty. How can you even get to this conclusion?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 14, 2013, 10:12:08 PM
I'm not suggesting to use MicroBlaze soft core, I'm citing it as example of performance that can be achieved by a soft core.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 14, 2013, 10:30:16 PM
Quote from: freqmax;722529
Interrupts can be handled by letting the Amiga side setting an interrupt register in the FPGA which in turn just signal a general interrupt (like "IRQ" on C64) to the overdrive CPU. The CPU side then reads what interrupt source that triggered the event and act accordingly. The extra performance will negate any delays for this code.

On 8086 etc.. an instruction may take 3 cycles but an IRQ may take 100 cycles just to hint on the amount of wasted cycles that may occur. Not counting Push/Pop instructions.


This could work. Capture the 68k interrupt pins while triggering an interrupt to the upstream host, host checks what interrupt value was captured, and does whatever it needs to in interpreting the 68k binaries, jumping to the 68k irq handler routine to be interpreted, etc. Took a couple minutes for that to soak in, but I'm on board with it now.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 14, 2013, 10:33:43 PM
Quote from: Mrs Beanbag;722537
I'm not suggesting to use MicroBlaze soft core, I'm citing it as example of performance that can be achieved by a soft core.


That is a good point.

A couple of reasons I'm not jumping at pure FPGA:
Large fast FPGAs get really expensive.
A fast enough core hasn't been done by now, this makes me think it's excessively hard to do.
Very few people are capable of writing something that complex and efficient.  I'm not one of them.
Using an SOC gives a huge amount of devices for free, FPGA just gives a CPU.

I can help with software and smaller projects, so I'm tending to lean that direction.

If I depend on someone else to do the hardest part there's a really good chance it's not going to happen.  If I play to my strengths, I have only myself to blame if it doesn't.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 14, 2013, 10:39:42 PM
I have a friend of a friend who was talking about creating a 68k  softcore for his own project, I should see if I can get involved. I'd  really like to get into this sort of thing.

CPU cores can take  less space of an FPGA than you'd think, from what I can tell. Speed is  more of a problem than space. Then again 68k is a bit more complex than  MIPS et al.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 14, 2013, 11:52:55 PM
Quote from: JimDrew;722490
No, because the BYTE value of $78563412 is $12 - just as it would be with a software only op-code interpreter.

If you're writing to cachable area then write caching means it might not even make it onto the bus before the value gets read back, even if it does make it into ram then the cpu has already cached the value that it wrote so it won't bother to read it again. There is no way you could write a little endian 68000 emulator running on a modern processor and then use an fpga to convert it to big endian.
 
You could convert a 286 processor to big endian, or a 68000 to little endian because it has no caches and reads/writes go straight to the bus. Or you could turn the caches off.
 
I don't believe you've thought it through at all.
 
Quote from: Heiroglyph;722502
That's what I was thinking also. Anything that would break is already broken with existing accelerators.

Or even running on an A3000/A4000/A1200. Most A500/A2000 accelerators had a fall back to the built in 68000, so you could argue that this would be nice for anything for those. But an A3000/A4000/A1200 doesn't even have the chance of running software that required an A500 timing.
 
WHDLOAD already has patches for a lot of those. Or you can find patched versions of some demos.
 
There might be new bugs introduced by running a 68000 at 200mhz that never showed up before, but I'm not sure how much I care about that. If it's an important enough piece of software then someone will write a patch for it.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 14, 2013, 11:54:09 PM
Quote from: Heiroglyph;722539
A couple of reasons I'm not jumping at pure FPGA:
Large fast FPGAs get really expensive.
A fast enough core hasn't been done by now, this makes me think it's excessively hard to do.
Very few people are capable of writing something that complex and efficient.  I'm not one of them.
Using an SOC gives a huge amount of devices for free, FPGA just gives a CPU.

I can help with software and smaller projects, so I'm tending to lean that direction.

If I depend on someone else to do the hardest part there's a really good chance it's not going to happen.  If I play to my strengths, I have only myself to blame if it doesn't.


A large enough FPGA like XC3S1600 as used in FPGA Arcade cost 68 USD at D-key. Currently it can be seen in the FPGA Arcade thread it can beat 68030 @ 20 MHz Amigas using a 16-byte cache (4.46 times A1200). With hope of 28 MHz.
Thread: http://www.amiga.org/forums/printthread.php?t=39806&pp=15&page=57
Sysinfo (https://en.wikipedia.org/wiki/Sysinfo): http://www.yaqube.neostrada.pl/images/SysInfo28-16.gif

So XC3S1600 is more than enough and it has already been done.

The FPGA gives you any device you can imagine that can be expressed as binary gates.

I know VHDL is a bitch but so was assembler, C etc too. It's hard but the reward makes it worthwhile. The power is awesome.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 15, 2013, 12:09:15 AM
Quote from: freqmax;722553
A large enough FPGA like XC3S1600 as used in FPGA Arcade cost 68 USD at D-key. Currently it can be seen in the FPGA Arcade thread it can beat 68030 @ 20 MHz Amigas using a 16-byte cache (4.46 times A1200). With hope of 28 MHz.
Thread: http://www.amiga.org/forums/printthread.php?t=39806&pp=15&page=57
Sysinfo (https://en.wikipedia.org/wiki/Sysinfo): http://www.yaqube.neostrada.pl/images/SysInfo28-16.gif
 
So XC3S1600 is more than enough and it has already been done.

Except you want it to replace the 68060 that can be clocked greater than 75mhz, which is a bit of a stretch from 28mhz.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 15, 2013, 12:15:53 AM
More cache, different FPGA like the Actel ones can make it possible. Another approach is to use more pipelined and parallellized processing.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 15, 2013, 12:16:16 AM
Quote from: freqmax;722553
A large enough FPGA like XC3S1600 as used in FPGA Arcade cost 68 USD at D-key. Currently it can be seen in the FPGA Arcade thread it can beat 68030 @ 20 MHz Amigas using a 16-byte cache (4.46 times A1200). With hope of 28 MHz.
Thread: http://www.amiga.org/forums/printthread.php?t=39806&pp=15&page=57
Sysinfo (https://en.wikipedia.org/wiki/Sysinfo): http://www.yaqube.neostrada.pl/images/SysInfo28-16.gif

So XC3S1600 is more than enough and it has already been done.

The FPGA gives you any device you can imagine that can be expressed as binary gates.

I know VHDL is a bitch but so was assembler, C etc too. It's hard but the reward makes it worthwhile. The power is awesome.
yet they make the daughterboard with an 060 which proves its rather hard to beat it with fpga. with a emu accelerator we might achieve multiple of that speed probably at the fration of cost.

im not against pure fpga. in fact i support it too, but look, minimig is too low end to get much interest, fpgaarcade constantly delayed, natami abandoned, the rest just proof of concept doesnt give much to hold to. we need something radical. we have to be shameless(ly honest to ourselves). and also try to find a way of least resistance (least complicated work we have no ressources to do (fpga)). and this is why i think of x86 or arm as host and amigaboard as slave device on pci or the like is quite revolutionary.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 15, 2013, 12:17:37 AM
Quote from: freqmax;722553
A large enough FPGA like XC3S1600 as used in FPGA Arcade cost 68 USD at D-key. Currently it can be seen in the FPGA Arcade thread it can beat 68030 @ 20 MHz Amigas using a 16-byte cache (4.46 times A1200). With hope of 28 MHz.
Thread: http://www.amiga.org/forums/printthread.php?t=39806&pp=15&page=57
Sysinfo (https://en.wikipedia.org/wiki/Sysinfo): http://www.yaqube.neostrada.pl/images/SysInfo28-16.gif

So XC3S1600 is more than enough and it has already been done.

The FPGA gives you any device you can imagine that can be expressed as binary gates.

I know VHDL is a bitch but so was assembler, C etc too. It's hard but the reward makes it worthwhile. The power is awesome.

I'm not really excited about 4x A1200 speeds. It's still not faster than an off the shelf 680x0 that just needs glue.

I feel that if it's not 10+ times the speed of an 060@50 then it's not a success.  If you can get 20x 060/50 performance then it's time to pat yourself on the back.  UAE can do it while also emulating the whole chipset, so it is possible with the right  CPU.

That type of speed just doesn't seem doable in a reasonably priced FPGA.

Edit: Also, like I said, *I* can't reasonably do it in an FPGA.  I can do a localbus interface and I can do software.  I'm just tired of waiting for "it's not that hard" to happen and following my gut on the quickest path to get there.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 15, 2013, 12:35:03 AM
Here (http://www.amiga.org/forums/showpost.php?p=608422&postcount=90) is another sysinfo screenshot:
(http://www.yaqube.neostrada.pl/images/SysInfo28-256P-256.gif)

The following paths has not been explored:
 * Replacing Xilinx FPGA with Actel (may give 5x right of)
 * Explore larger than 16-byte cache
 * Use larger pipelines
 * More parallelization

The performance target is 68060 @ 75 MHz or better.

If the piggyback option is to be used. Is there any SoC that has a bus that can manage Amiga without FPGA glue? (less mess)
The other option would be something like a CPU+RAM+EEPROM+FPGA on a board.
Any data on this?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 15, 2013, 02:00:45 AM
Quote from: freqmax;722562
Here (http://www.amiga.org/forums/showpost.php?p=608422&postcount=90) is another sysinfo screenshot:
(http://www.yaqube.neostrada.pl/images/SysInfo28-256P-256.gif)

sysinfo is horrendously innacurate, but it's showing that it's about half the speed of a 25mhz 68040 on the dhrystones test. So it needs to be at least 4 times faster.
 
longer pipelines might do it, getting from here to there is a huge jump though.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 15, 2013, 02:54:06 AM
Quote from: freqmax;722553
A large enough FPGA like XC3S1600 as used in FPGA Arcade cost 68 USD at D-key. Currently it can be seen in the FPGA Arcade thread it can beat 68030 @ 20 MHz Amigas using a 16-byte cache (4.46 times A1200). With hope of 28 MHz.


And Spartan3 is old stuff now. Since then they did Spartan6 and now the 7-series stuff, which should e both easier on performance as well as easier on power. I'm not familiar with Altera parts in terms of speed or capacity etc. I have a DE1 buried in storage somewhere for Minimig, hope to get to use it at some point... I also really want to get a Zed board to play with someday. But I of course need a 56 hour day too.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 15, 2013, 02:58:54 AM
Quote from: Heiroglyph;722539
Using an SOC gives a huge amount of devices for free, FPGA just gives a CPU.


Two thoughts in response to this:

1: Look at all them peripherals on opencores. Stick some of them in that same boring FPGA.... OK, now you may need a bigger FPGA, but something to consider. Understand that an FPGA can give you anything you can fit in there and meet timing with...

2: For the ARM SoC FPGAs, can the FPGA area only be a slave, or can it be an AXI master, and use all them ARM peripherals as if they belonged to our 68k softcore? I don't know the answer to that, but it would be interesting to find out.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 15, 2013, 02:58:56 AM
The possibilities hasn't been explored yet. Getting 68000, 68020, OCS, ECS, AGA, Paula, etc to happen in HDL since 2006 is a huge task. That also means not a lot of time has really been spent on the CPU specifically. The "68020" is essentially a TG68 quickfix because there were some worries that AGA required 32-bit CPU and datapath to even work at all.

The 68060 uses lot's of bit juggling, time for the FPGA version to do so to. I guess the only real rule is to make sure the op-codes are acted on as fast as possible.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 15, 2013, 03:02:46 AM
Quote from: Heiroglyph;722527
Finding one that has that plus external interrupts with levels is tricky.

It's also not standardized across chips so you're back to vendor lock-in.


Well, we're not going to find a better 060 already made for us, and we're not going to find an ARM with an 060 bus on it either.

I don't think anyone will find the perfect chip in a standard package from lots of vendors that are all pin compatible for this. You may have to suck it up and live with vendor lock-in of something. That includes straight FPGAs, as changing from one FPGA to another is not a trivial thing. I don't believe Altera has anything to go on a Xilinx board or vice-versa...
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 15, 2013, 03:15:44 AM
Quote from: Heiroglyph;722559
Edit: Also, like I said, *I* can't reasonably do it in an FPGA.  I can do a localbus interface and I can do software.  I'm just tired of waiting for "it's not that hard" to happen and following my gut on the quickest path to get there.

I think doing the PCB of an FPGA (or SoC FOGA) only design would be pretty straight forward. I do not expect the softcore to be trivial. Luckily TG and Yaqube have already been doing wonderful things. This part needs a processor designer, and Motorola surely had quite a team. As do Arm, Intel, AMD etc. Not just a simple student engineer like me, but we do have some good people doing this sort of thing, and at some point it'll open up and more of us can see and play, and if time allows try some more ideas in there. I was surprised at how simple a RISC control unit can be this past fall semester, I really wish our project had been in something useful like VHDL or Verilog instead of the crummy schematic tool LogicWorks...

Look at the instruction set, and start breaking each down into easy steps. (hardwired logic or microcode, I don't have a good handle on microcode way yet) Look for common pieces, such as the first part of every instruction is the fetch part. Then decode. If you know VHDL and are good with digital logic, you should be able to figure it out. I had my aha moment and it's making a lot more sense now, so anybody can... :)

It starts with a counter, up to the maximum number of steps for your instruction analysis. The longest instruction (most steps) determines the maximum this counter increments up to. Shorter instrictions can clear the counter earlier back to 0 (fetch step). Along side that you have your instruction opcode, which is used to address/select registers, select which ALU operation gets to the ALU output, etc.

Then things get more complicated as you bring in pipelines, bypassing (shortcut result of one instruction back to ALU input for use before it actually gets written to its destination register), mux NOPs into pipeline stages if they need to stall/bubble  for a cycle, start doing superscalar (multiple parallel ALUs), caching, branch prediction, etc. And goes on from there.

The fundamental thing isn't hard. Competing with an 060 most likely is hard, but is possible. Will take a while though.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 15, 2013, 04:50:54 AM
If you really plan on using strictly a FPGA to emulate the CPU, I would suggest someone modifying WinUAE to make a histogram of instruction usage.  This would let someone focus on optimizing the 680x0 core by looking at instruction usage which could help determine things like what changes in the cache, pipelines, etc. will benefit the speed.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: mikej on January 15, 2013, 10:37:54 AM
There is quite a bit of work going on understanding the basic architecture of the 68K

http://www.visual6502.org/images/pages/Motorola_68000.html

The micro and nano microcode instructions roms are being read out.
If this works, a table based FPGA will be much smaller and more accurate than the current code - and can be tweaked easier.
A lot of the cloaning complexity of the 68K is a fall out from the way it was efficiently implemented due to die area limitations at the time.
/MikeJ
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 15, 2013, 10:47:27 AM
Isn't 68000 architectually too far from the 68060 in order to gain useful insight into the original 68060 ..?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 15, 2013, 10:58:39 AM
Quote from: freqmax;722621
Isn't 68000 architectually too far from the 68060 in order to gain useful insight into the original 68060 ..?

Probably. However the current cpu emulation is even further away from any architecture that Motorola ever used.
 
I see it more as a way of going on the same journey that Motorola did.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 15, 2013, 11:42:36 AM
Personally I'd be inclined to start with something like a RISC core with 68k-like programming model, and optimise for speed first, then work in a compatibility layer. Starting with 68k compatibility and then trying to work in pipelines etc, seems like the difficult way around.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline on January 15, 2013, 12:40:17 PM
Quote from: mikej;722620
There is quite a bit of work going on understanding the basic architecture of the 68K

http://www.visual6502.org/images/pages/Motorola_68000.html

The micro and nano microcode instructions roms are being read out.
If this works, a table based FPGA will be much smaller and more accurate than the current code - and can be tweaked easier.
A lot of the cloaning complexity of the 68K is a fall out from the way it was efficiently implemented due to die area limitations at the time.
/MikeJ
I've been watching the 68000k and Amiga chips on there for a while... Sadly it's slow progress... But eventually we will have real net lists for these chips! :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline on January 15, 2013, 12:44:10 PM
Quote from: Mrs Beanbag;722624
Personally I'd be inclined to start with something like a RISC core with 68k-like programming model, and optimise for speed first, then work in a compatibility layer. Starting with 68k compatibility and then trying to work in pipelines etc, seems like the difficult way around.
Obviously the most sensible idea... But apparently not popular with the FPGA hobbyist ;)

When I used to play around with making my own virtual machines, I would often start with an 68k alike programming model then strip it back to the core features, it could then be optimised for speed and was simple to add back necessary features for efficient 68k emulation :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 15, 2013, 01:30:50 PM
Quote from: JimDrew;722601
If you really plan on using strictly a FPGA to emulate the CPU, I would suggest someone modifying WinUAE to make a histogram of instruction usage.  This would let someone focus on optimizing the 680x0 core by looking at instruction usage which could help determine things like what changes in the cache, pipelines, etc. will benefit the speed.

Some instructions are used less often but reduce branching (my favorite), are very powerful and/or save code (some operations are easy in hardware but difficult to do in software). Some DSP or SIMD like instructions are used in processor intensive codecs and drivers where they offer huge speedups but are used less in normal code. A simple instruction count only gives a partial picture of what instructions are best.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 15, 2013, 01:50:10 PM
Quote from: matthey;722634
Some instructions are used less often but reduce branching (my favorite)


Yes!  I love those!  I (and Phil) were always pushing these at the Natami CPU Dezine Dept. but Gunnar did not like them or didn't understand so he was totally against adding a new instruction for this purpose. :(
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 15, 2013, 01:53:36 PM
Quote from: mikej;722620

The micro and nano microcode instructions roms are being read out.

If they did this for 68060 it would be very interesting!
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 15, 2013, 02:32:25 PM
Quote from: ChaosLord;722637
Yes!  I love those!  I (and Phil) were always pushing these at the Natami CPU Dezine Dept. but Gunnar did not like them or didn't understand so he was totally against adding a new instruction for this purpose. :(


Gunnar thought he could solve all short branches with predication but it has issues when variable length and cycle instructions are used. I originally thought instructions like ABS would not be useful for this reason but I came to realize predication was not a good idea even before Gunnar. It doesn't work well with the 68k updated address register addressing modes like (An)+ and -(An) either. The original Scc instruction takes the correct approach. It didn't take too much to convince Gunnar that these kinds of instructions were better than predication or conditional moves like x86 CMOV. That's why we added SBcc, SELcc, ABS, POPCNT, etc. to the ISA and which fit and have minimal pipeline overhead (hazards) while reducing short branches. Long branches still need to jump. If we could remove 5-15% of branches (the short ones) and the overhead in the branch cache and history, the 68k would be one of the best processors at branching. Add to that a relatively short pipeline (and mis-predicted branch penalty) and 0 cycle loops and we would have much improved performance, a beautiful CPU to program and even better code density.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 15, 2013, 03:31:15 PM
Quote from: matthey;722639
That's why we added SBcc, SELcc, ABS, POPCNT, etc. to the ISA and which fit and have minimal pipeline overhead (hazards) while reducing short branches. Long branches still need to jump. If we could remove 5-15% of branches (the short ones) and the overhead in the branch cache and history, the 68k would be one of the best processors at branching. Add to that a relatively short pipeline (and mis-predicted branch penalty) and 0 cycle loops and we would have much improved performance, a beautiful CPU to program and even better code density.

Trying to improve the ISA is a time sink which you'll never get payback from. The only benefit is a bit of ego boosting, but that subsides when reality hits.
 
Making the pipeline follow the predicted branch might be hard, but it's doable. Thumb drops a lot of conditional instructions from Arm.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Plaz on January 15, 2013, 09:45:57 PM
Different angle here..... Coldfire is not too far off from 68K instructions. A Coldfire V1 core is available for Altera FPGAs. Would it be a shorter easier journey to start with a Coldfire core and modify it to be more 68K compatible for our purpose?

EDIT: Hold on, I may be reading this Coldfire core information incorrectly. More study required.

EDIT 2: Yes, looks like my first comment was correct....  http://chipdesignmag.com/display.php?articleId=2371

Plaz
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 15, 2013, 09:59:58 PM
You might be able to license the core and use it but you won't be able to modify it, commercial cores are typically encrypted so you can't get at the source code.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 15, 2013, 10:05:18 PM
Quote from: Plaz;722666
Different angle here..... Coldfire is not too far off from 68K instructions. A Coldfire V1 core is available for Altera FPGAs. Would it be a shorter easier journey to start with a Coldfire core and modify it to be more 68K compatible for our purpose?

EDIT: Hold on, I may be reading this Coldfire core information incorrectly. More study required.

EDIT 2: Yes, looks like my first comment was correct....  http://chipdesignmag.com/display.php?articleId=2371


Check the store for this thing at http://www.ip-extreme.com/corestore/

Yes, it is free without cost, but it is also encrypted. You are not going to take this and go make changes to turn it into something else (even ever so slightly) without spending a lot of money.

Still, it is very cool they have something without cost for those that can use exactly what that is.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Fats on January 15, 2013, 10:05:26 PM
Quote from: psxphill;722642
The only benefit is a bit of ego boosting, but that subsides when reality hits.


Maybe it's just called hobby...
Staf.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 15, 2013, 10:07:21 PM
Quote from: mikej;722620
There is quite a bit of work going on understanding the basic architecture of the 68K

http://www.visual6502.org/images/pages/Motorola_68000.html

The micro and nano microcode instructions roms are being read out.
If this works, a table based FPGA will be much smaller and more accurate than the current code - and can be tweaked easier.
A lot of the cloaning complexity of the 68K is a fall out from the way it was efficiently implemented due to die area limitations at the time.
/MikeJ

Well Mike, that will definitely lead you in the direction of a perfect FPGA core emulation.  Table based should be much easier to implement pipelines and the correct size caches.

Motorola was working on a FPGA type chip between the 040 and PPC development with IBM.  Motorola in Phoenix, AZ asked me to visit and I got a chance to work with the microcode blocks for simulating the 68K CPU.  That chip was suppose to be able to become a x86 or 68K (or whatever) by uploading a new core.  It was abandoned because it was simply too slow.  I worked with other microcode projects as well, and I actually called my company Microcode Solutions.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Plaz on January 15, 2013, 10:24:29 PM
Quote from: billt;722671
Check the store for this thing at http://www.ip-extreme.com/corestore/


Um, yeah. That's not going to happen. Darn, thought I had something there.

Plaz
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 15, 2013, 10:37:33 PM
Quote from: Plaz;722674
Um, yeah. That's not going to happen. Darn, thought I had something there.

It's not a bad thought process to go through. If the source for a well designed core was available, it would be a great idea to be looking at that for ideas and to see if it can be mutated to our ideal here. The problem with that idea is that the really great cores are expensive closed source things, particularly if they have a corporate name on them, and the free/open ones are catching up. Though TG68 is at least getting some real attention and becoming far more than the simple 68000 it started out as.

Some other 68k cores to look at:
ao68000 (github is newer than opencores, is wishbone rather than 68000 bus, but is 32bit)
k68 (opencores)
suska

I'm not really familiar with other architecture cores to consider. There's others out there, but I don't know how well they compare to what Yaqube and TG are doing to TG68 now.
Someone started an opencores project for a simple PowerPC core called zCore that I'd like to look at, but they've never actually uploaded anything. There's an older ARM core somewhere, but as it's an older ARM version I'm not sure how advanced it may be.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 15, 2013, 10:59:55 PM
What's the performance like with some of these companies existing general purpose CPU cores on high-end FPGAs?  Each company seems to have one flagship CPU core.

I'd assume that they would be about as fast as could be done.  If you can beat theirs, you need to be working for them!

That should give a reasonable idea of what's even possible.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Plaz on January 15, 2013, 11:12:32 PM
@billt
Is this the ARM project you mentioned? Doesn't look like much aditional worl has been done in a while.

http://opencores.com/project,core_arm

Plaz
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 15, 2013, 11:15:44 PM
Quote from: Plaz;722682
@billt
Is this the ARM project you mentioned? Doesn't look like much aditional worl has been done in a while.

http://opencores.com/project,core_arm

Plaz


Once upon a time there was a maybe more advanced one than that but ARM had it disposed of. :( If you look hard enough you might find it in some shady corner of the netiverse, but that was news over 10 years ago...
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline on January 16, 2013, 12:06:25 AM
Quote from: billt;722684
Once upon a time there was a maybe more advanced one than that but ARM had it disposed of. :( If you look hard enough you might find it in some shady corner of the netiverse, but that was news over 10 years ago...
Here is an implementation of the ARM2 ISA... It's old but would make a great starting point for any CPU project!

http://opencores.org/project,amber
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 16, 2013, 12:27:52 AM
The ARM corporation is extremely aggressive when it comes to ARM implementations in any form. Beware! I think they have some sneaky patents on some 10 or so instructions. This is also a reason I prefere MIPS or perhaps OpenSPARC.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Plaz on January 16, 2013, 01:01:48 AM
I took bloodline's reference as a point of study of how to do another cpu project, not necessarily an ARM.

I haven't messed with VHDL in an uncountable number of years. Someone please point me to a good reference where I can retrain some brain cells on some tools needed here.

Plaz
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 16, 2013, 01:04:14 AM
Quote from: psxphill;722642
Trying to improve the ISA is a time sink which you'll never get payback from. The only benefit is a bit of ego boosting, but that subsides when reality hits.


It's not a time sink if people are working together in parallel which is the way it was suppose to be when I started documenting the new 68k ISA. It's not a time sink if the new ISA attracts interest from outside of the retro crowd. It's not a time sink if the ISA is implemented and found to be a substantial improvement in power, code density, compiler support and ease of programming. You give up very little with the possibility to gain much more. There is a market for retro computing but a bigger market for a processor that can handle today's processing needs quickly with compact code as well as being compatible with old code. That's what ARM and x86 did. They evolved and now they are successful. Building a 68020 compatible CPU comes first, but even then it's smart to plan ahead to make future enhancements easier.

Quote from: psxphill;722642

Making the pipeline follow the predicted branch might be hard, but it's doable. Thumb drops a lot of conditional instructions from Arm.


Yes, but they were using predication (unusual for a CPU) that only offers a small advantage in some specific hardware. The smaller the block of predicated instructions and the simpler the instructions the better. Most original ARM ISA instructions could be conditional which worked ok but was dropped with the Thumbs because it was not good for code density which they were going after. The ARM block predication instruction was for multiple instruction predication but ARM went to OoO processors where it didn't work as well. The conditional instructions proposed in the 68kF ISA should work nicely while being a small simplification improvement over a more generic CMOV like x86. They would work well on a Superscaler CPU with a short pipeline and a cheap branch predictor (or no branch predictor) which the 68k is likely to have. There would still be some optimized code that would not want to use them at times. This includes highly predictable branches that are executed often and very tight loops where a highly predictable branch could be used instead. Note that some instructions like ABS (absolute value) have no drawbacks yet remove a branch that can be difficult to predict and SELcc can remove 2 branches in some cases. I would like to do some testing in an implementation before finalizing the ISA.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline on January 16, 2013, 08:36:47 AM
Quote from: matthey;722695
It's not a time sink if people are working together in parallel which is the way it was suppose to be when I started documenting the new 68k ISA. It's not a time sink if the new ISA attracts interest from outside of the retro crowd. It's not a time sink if the ISA is implemented and found to be a substantial improvement in power, code density, compiler support and ease of programming. You give up very little with the possibility to gain much more. There is a market for retro computing but a bigger market for a processor that can handle today's processing needs quickly with compact code as well as being compatible with old code. That's what ARM and x86 did. They evolved and now they are successful. Building a 68020 compatible CPU comes first, but even then it's smart to plan ahead to make future enhancements easier.



Yes, but they were using predication (unusual for a CPU) that only offers a small advantage in some specific hardware. The smaller the block of predicated instructions and the simpler the instructions the better. Most original ARM ISA instructions could be conditional which worked ok but was dropped with the Thumbs because it was not good for code density which they were going after. The ARM block predication instruction was for multiple instruction predication but ARM went to OoO processors where it didn't work as well. The conditional instructions proposed in the 68kF ISA should work nicely while being a small simplification improvement over a more generic CMOV like x86. They would work well on a Superscaler CPU with a short pipeline and a cheap branch predictor (or no branch predictor) which the 68k is likely to have. There would still be some optimized code that would not want to use them at times. This includes highly predictable branches that are executed often and very tight loops where a highly predictable branch could be used instead. Note that some instructions like ABS (absolute value) have no drawbacks yet remove a branch that can be difficult to predict and SELcc can remove 2 branches in some cases. I would like to do some testing in an implementation before finalizing the ISA.


Sounds interesting, you might want to start a new thread about optimising and evolving the 68k ISA... As any discussion here might get confused with talk about FPGA implementations :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 16, 2013, 09:07:33 AM
Quote from: bloodline;722713
Sounds interesting, you might want to start a new thread about optimising and evolving the 68k ISA... As any discussion here might get confused with talk about FPGA implementations :)


There is this thread on amigacoding.de:

http://www.amigacoding.de/index.php?topic=273.msg635;topicseen#msg635

There is also a lot of good techy discussion on the Natami forum where the ideas started. You can do searches there for about any CPU term and find something interesting.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 16, 2013, 10:31:19 AM
perhaps it would be sensible to start multiple threads on amiga coding de according to dirrerent party of the approach and parts the project can be divided into, like:
1. fpga 68k implementation
2. arm/x86 68k emu
3. pci2amiga interface

the only thing is that the other site has probably not the traffic and attendance one of regular amiga sites has.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 16, 2013, 11:11:15 AM
The fundamental problem with this and other sites is that threaded discussion management is missing. Usenet is the **** ;)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 16, 2013, 11:53:04 AM
just at some point if and when basic decissions are taken, the thread will have to be split anyway, otherwise we will get lost.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Hattig on January 16, 2013, 11:59:02 AM
Maybe "amiga hardware designs" should be a new subforum of the hardware discussion forum.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 16, 2013, 02:42:38 PM
Sorry for throwing yet another diversion into the thread.

I don't think the PCI to Amiga warrants a separate thread unless someone makes tangible progress.

It's probably just an option for cpuXtoAmiga like FPGA 060 replacement is a subset of 680x0 accelerator.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Iggy on January 16, 2013, 03:31:15 PM
Quote from: Hattig;722729
Maybe "amiga hardware designs" should be a new subforum of the hardware discussion forum.

Good idea.
We could have threads for separate ideas there.
The problem is, all three approaches appeal to me.

FPGA (for entire system, CPU, or chipset).
X86 or ARM emulation (of CPU only, an FPGA might be used for the chipset).
OR....A fast, real 68K (LC and EC chips really interest me) - 100 Mhz anyone?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 16, 2013, 04:07:37 PM
Quote from: Plaz;722694
I took bloodline's reference as a point of study of how to do another cpu project, not necessarily an ARM.

I haven't messed with VHDL in an uncountable number of years. Someone please point me to a good reference where I can retrain some brain cells on some tools needed here.

Plaz


My favorite, and I wish he had a Verilog "port" of this one:
http://www.amazon.com/RTL-Hardware-Design-Using-VHDL/dp/0471720925/ref=la_B001ITRMEY_1_3?ie=UTF8&qid=1358352110&sr=1-3

and:
http://www.amazon.com/FPGA-Prototyping-VHDL-Examples-Spartan-3/dp/0470185317/ref=la_B001ITRMEY_1_2?ie=UTF8&qid=1358352110&sr=1-2

http://www.amazon.com/Embedded-SoPC-Design-Processor-Examples/dp/111800888X/ref=la_B001ITRMEY_1_5?ie=UTF8&qid=1358352110&sr=1-5

And verilog "ports" of a couple of these as well:

http://www.amazon.com/FPGA-Prototyping-Verilog-Examples-Spartan-3/dp/0470185325/ref=pd_sim_b_3

http://www.amazon.com/Embedded-Design-Processor-Verilog-Examples/dp/1118011031/ref=pd_sim_b_2

Note that these won't really talk as much about some things one needs to know for an FPGA softcore sort of project, such as number representation and such, particularly floating point stuff. I'm currently checking out this one too (Verilog, but should be easy to understand and use toward VHDL projects too):

http://www.amazon.com/Computer-Arithmetic-Verilog-HDL-Fundamentals/dp/1439811245/ref=sr_1_1?s=books&ie=UTF8&qid=1358352361&sr=1-1&keywords=verilog+arithmetic
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 16, 2013, 04:22:54 PM
Personally I prefer Verilog. But it lack som capabilities, I think it was in regard to level triggering etc. So VHDL is it.

Btw, those links are books , not hw.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 16, 2013, 04:28:02 PM
Quote from: freqmax;722741
Personally I prefer Verilog. But it lack som capabilities, I think it was in regard to level triggering etc. So VHDL is it.

Btw, those links are books , not hw.


I also prefer Verilog, but am now comfortable enough with VHDL to go either way.

He asked for references to retrain his brain since he hadn't used VHDL in so long... So book links seemed appropriate.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 16, 2013, 04:41:08 PM
Quote from: Hattig;722729
Maybe "amiga hardware designs" should be a new subforum of the hardware discussion forum.


remember you will not get people like jens shoenfeld contributung to threads on this site. also the likes of toni wilen might help. if not amiga-coding.de then eab might be better place for brainstorming.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 16, 2013, 04:42:55 PM
If not Amiga coding then what?

What makes EAB better?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 16, 2013, 04:47:41 PM
Quote from: Heiroglyph;722736
Sorry for throwing yet another diversion into the thread.

I don't think the PCI to Amiga warrants a separate thread unless someone makes tangible progress.

It's probably just an option for cpuXtoAmiga like FPGA 060 replacement is a subset of 680x0 accelerator.


pci2amiga, (one could distinguish a4000 030bus, zorro and a1000/500 expansion bus as slave) could be not neccessary with self made fpga board but might be a relief connecting any prefabricated device as master that would usually provide such an interface. having that interface technically working the other part would be to make the cpu of the host device take advantage of the interface. like 68k emulation on x86 to access the amiga chipset via pci.

im just trying to figure out how to modularize the project in order to divide it in a smaller easier doable parts dedicated to particular talents the contributors may have.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Plaz on January 16, 2013, 05:01:36 PM
Quote from: billt;722742
He asked for references to retrain his brain since he hadn't used VHDL in so long... So book links seemed appropriate.


Yes thanks. It's the type info I was after. It's so long ago I'm not sure Verilog was even an option back when I dabbled in VHDL. I'd need to see some verilog too, but figured I'd start in familiar territory.


Edit: Looks like they were born within a couple years of each other, but IEEE standard for VDHL ~1987 and IEEE for Verilog ~1993. My small experience falls around that 87-88 time.

Plaz
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 16, 2013, 05:06:47 PM
Quote from: matthey;722695
It's not a time sink if people are working together in parallel which is the way it was suppose to be when I started documenting the new 68k ISA. It's not a time sink if the new ISA attracts interest from outside of the retro crowd. It's not a time sink if the ISA is implemented and found to be a substantial improvement in power, code density, compiler support and ease of programming. You give up very little with the possibility to gain much more. There is a market for retro computing but a bigger market for a processor that can handle today's processing needs quickly with compact code as well as being compatible with old code.

You're very optimistic.
 
It's difficult to predict the future, but I can't imagine there is anyone outside of the retro community that will ever have any interest in a 680x0 cpu core. There are far too many other SOC/ASIC/FPGA solutions that have already carved up the market. There is no competitive edge against any of the other alternatives and nobody in business will care if they can run 680x0 code.
 
The majority of people want something that can run existing software and use existing compilers, adding instructions will cause market fragmentation if anyone is tempted to ever use them. A product that doesn't ship because the people behind it gets delusions of grandeur is no use to anybody.
 
Chasing rainbows is all well and good, but it's the reason that Natami failed. I'd rather see something ship for once.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 16, 2013, 05:20:51 PM
Quote from: psxphill;722751
I'd rather see something ship for once.


+1
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 16, 2013, 05:42:08 PM
Quote from: psxphill;722751
You're very optimistic.
 
It's difficult to predict the future, but I can't imagine there is anyone outside of the retro community that will ever have any interest in a 680x0 cpu core.


That's good enough for me to waste my time on something. Heck, if I had the free time, I'd make an OS4-able PowerPC laptop just for myself. Yes, time is a problem. :(
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 16, 2013, 06:52:32 PM
Quote from: psxphill;722751
You're very optimistic.


Optimistic? Yes! Waste of time? Maybe. At least I can say I tried even if I'm dreaming a little. Reality is only one visionary person with a wad of cash away 8-).
 
Quote from: psxphill;722751

It's difficult to predict the future, but I can't imagine there is anyone outside of the retro community that will ever have any interest in a 680x0 cpu core. There are far too many other SOC/ASIC/FPGA solutions that have already carved up the market. There is no competitive edge against any of the other alternatives and nobody in business will care if they can run 680x0 code.


No Edge? How about the best ease of use and code density in the industry. There is the FIDO, ColdFire and CPU32 but they were all cut down from the 68k instead of enhanced. ARM with Thumb 2 has moved close to what an enhanced 68k would be and it doesn't have any trouble selling. I think we would be a little more powerful and easier to use while Thumb 2 is a little more power efficient.

Quote from: psxphill;722751

The majority of people want something that can run existing software and use existing compilers, adding instructions will cause market fragmentation if anyone is tempted to ever use them. A product that doesn't ship because the people behind it gets delusions of grandeur is no use to anybody.


You are correct that the 68k is behind in development software. We tried to add instructions that would be easy for existing compilers to support. This includes common instructions on other platforms and ColdFire instructions that could be enabled in the compiler. Also, an optimizing assembler (like Frank Wille's vasm) could do a lot of optimizations without even changing the compiler.

Quote from: psxphill;722751

Chasing rainbows is all well and good, but it's the reason that Natami failed. I'd rather see something ship for once.


I'd like to see more Amiga products ship as well. They should ship with the most usable debugged 68020 core first but an fpga can be modified. The people that want a 68020 only core can stay with that and those who want to try something enhanced could also.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 16, 2013, 07:08:46 PM
Quote from: wawrzon;722745
im just trying to figure out how to modularize the project in order to divide it in a smaller easier doable parts dedicated to particular talents the contributors may have.


FPGA + 68060 socket.. DONE!

Where's the bus? ;)


As for the embedded market. When people used to m68k continue to use it in work projects it may continue to exist. There's quite a lot of people used to it. It's nice to deal with which is one of the big values. And there's a lot of existing control system software.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: AJCopland on January 16, 2013, 07:11:26 PM
Quote from: matthey;722773
Optimistic? Yes! Waste of time? Maybe. At least I can say I tried even if I'm dreaming a little. Reality is only one visionary person with a wad of cash away 8-).


This is the best argument I've heard for anything. If you want to see a particular thing happen then you have to try and make it happen rather than sitting around hoping for it.

I don't know about a 68060 FPGA replacement module. More useful for a lot of A1200 owners, one of the larger active groups of owners it seems, would just be an FPGA based trap door board with whatever core they wanted available from micro-SD card for easy upgrading/swapping.

KickStart(er) get that designed, and get it on KickStarter to see how much you can raise.

I do think however that all of this is a little moot given that MikeJ has his FPGAArcade well under way now :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 16, 2013, 07:20:47 PM
The builtin CPU core in the FPGA Arcade is limited because of logic matrix constraints.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 16, 2013, 07:57:19 PM
Quote from: matthey;722773
ARM with Thumb 2 has moved close to what an enhanced 68k would be and it doesn't have any trouble selling. I think we would be a little more powerful and easier to use while Thumb 2 is a little more power efficient.

You can't dislodge ARM, even Intel will struggle taking them on.
 
Dreaming that you can, when you can't even duplicate what Motorola was doing twenty years ago, is just going to dislodge you from achieving anything.
 
If you look at the history of AROS, you'll see there were similar problems with the AmigOS project that preceded it:
 
"Several small groups' of Amiga users on the internet coordinated their efforts to create an open-source Amiga operating system that was not controlled by a incompetent, restrictive parent company. The most popular of these was the AmigOS project, which gained brief attention in Amiga User International during 1994. However, bitter flame wars on the feasibility of such an OS tore the project apart and the dream of an open-source Amiga OS disappeared.
 
During the fourth quarter of 1995, Aaron Digulla attempted to get the project moving again, by sending an RFC (Request For Comment) to the AmigOS mailing list. He suggested that a minimum specification list should be defined, allowing the creation of a basic open source OS. Once this stage had been completed, the group could decide if multi-processing, resource tracking, and other features missing from the official AmigaOS, could be implemented. After some discussion it was decided that the group should create a portable version of OS3.1. The Amiga Replacement Operating System was born..."
 
 
Only when they stopped arguing about how to do memory protection etc and just focus on OS3.1 compatibility did the project even start to take shape.
 
Natami still has a long way to go & it's going to be expensive. FPGA arcade has avoided a lot of the problems by only adding the bare minimum.
 
Also because mikej isn't trying to create his own computer platform, he doesn't have to try to control what is put into the FPGA. Natami on the other hand needed to lock out anyone from coming along who could write better VHDL.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 16, 2013, 08:02:09 PM
Quote from: wawrzon;722745
pci2amiga, (one could distinguish a4000 030bus, zorro and a1000/500 expansion bus as slave) could be not neccessary with self made fpga board but might be a relief connecting any prefabricated device as master that would usually provide such an interface. having that interface technically working the other part would be to make the cpu of the host device take advantage of the interface. like 68k emulation on x86 to access the amiga chipset via pci.

Sorry, misunderstod first time.

For PCI bridge, you may end up making a different bridge to each of those Amiga targets in order to have it optimized for each. There may be some similarities, but I'm not sure a single thing to fit all of them would be best.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Plaz on January 16, 2013, 10:52:23 PM
Quote from: psxphill;722786
Natami on the other hand needed to lock out anyone from coming along who could write better VHDL.


??? This seems counter intuitive. Bit of a dig a Natami management I presume.

Plaz
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 17, 2013, 12:03:18 AM
Quote from: freqmax;722781
The builtin CPU core in the FPGA Arcade is limited because of logic matrix constraints.

That's with the current core.  If Mike gets the microcode dump done and turns that into a table based core, that will shrink the size and make it very easy to change to higher speed FPGAs, not to mention tweaking the core for big caches, multiple pipelines, etc.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 17, 2013, 12:31:04 AM
Quote from: Plaz;722815
??? This seems counter intuitive. Bit of a dig a Natami management I presume.

I was just highlighting the difference between how the FPGA arcade and Natami projects are being run.
 
It's not a dig and they are both within their rights to do whatever they want and however they want. As soon as I saw the debates about what instructions to add to the N68070, I knew it was doomed.
 
Real Artists Ship.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 17, 2013, 02:19:52 AM
Quote from: psxphill;722751

It's difficult to predict the future, but I can't imagine there is anyone outside of the retro community that will ever have any interest in a 680x0 cpu core.

Your imagination is broken.  Please install Imagination v2.0 and reboot.

Quote

 There are far too many other SOC/ASIC/FPGA solutions that have already carved up the market. There is no competitive edge against any of the other alternatives and nobody in business will care if they can run 680x0 code.

You seem to care a lot about preventing any new 680x0 CPUs being built.

Are you now, or have you been an employee of Intel Inc.?
 


Quote

The majority of people want something that can run existing software and use existing compilers,

Matt's Level 1 design runs existing software and works with existing compilers.


Quote

 adding instructions will cause market fragmentation if anyone is tempted to ever use them. A product that doesn't ship because the people behind it gets delusions of grandeur is no use to anybody.

How is Matt Hey going to prevent MikeJ from shipping the Replay?

I don't think you understand the concept of Reconfigurable Gate Arrays.


Quote

Chasing rainbows is all well and good,

I keep trying to ignore your repeated insults of Matt Hey and anyone else who wants to make a faster Amiga but ....  Could you just please stop with the insults?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 17, 2013, 10:54:14 AM
Instruction fragmentation may occur regardless how it's implemented. Be it ARM-emulation, FPGA or ASIC.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 17, 2013, 12:33:57 PM
Regardless of whether adding new instructions is a good idea or not, we should get one to work without new instructions FIRST, then think about what we can add to it later if it still seems a good idea.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 17, 2013, 12:53:51 PM
Quote from: ChaosLord;722852
You seem to care a lot about preventing any new 680x0 CPUs being built.

You are mistaken, I would love to see a 68060+FPU+MMU emulation for an FPGA.
 
Quote from: ChaosLord;722852
How is Matt Hey going to prevent MikeJ from shipping the Replay?

I never said it would. It's exactly MikeJ's approach that will mean that it will get shipped. Natami has lost a lot of steam because of their approach and hope of it being shipped goes down all the time.
 
Quote from: ChaosLord;722852
I keep trying to ignore your repeated insults of Matt Hey and anyone else who wants to make a faster Amiga but .... Could you just please stop with the insults?

I think you misunderstand what an insult is. Disagreeing with someone is not an insult.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Hattig on January 17, 2013, 01:39:31 PM
First steps first :-)

First - a 68020 compatible implementation.
Then - a highly clocked 68020 compatible implementation with bigger caches
Thereafter - a higher performance (more instructions per clock) version of the above
Subsequently - an FPU and MMU
Eventually - a pipelined superscalar super-68k FPGA implementation that will fit into an FPGA of a future "Super FPGA Arcade" :-D

I think we're at the second of these currently with Yaqube's work. Each step takes time, especially the third and fifth above - the FPU and MMU might arrive earlier.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 17, 2013, 01:47:36 PM
I'll agree. Make it work FIRST. If it ships it's a bonus ;)

The beauty with FPGA is that you can ship first, and code later :P
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 17, 2013, 02:20:02 PM
Quote from: freqmax;722888
Instruction fragmentation may occur regardless how it's implemented. Be it ARM-emulation, FPGA or ASIC.


Not if you don't mess with the instruction set.

If they all look like 680x0's then it's just a different accelerator, like GVP vs. Macrosystems vs. Phase5.

We can get plenty of speed out of hardware made in the last few decades without resorting to specialized software.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 17, 2013, 02:46:25 PM
Adding instructions may cause fragmentation regardless of it's implementation. Reread my post ;)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 17, 2013, 03:17:29 PM
Quote from: freqmax;722907
Adding instructions may cause fragmentation regardless of it's implementation. Reread my post ;)

Sorry if I'm dense, are we agreeing?

I thought you implied that no matter what, fragmentation would happen.

My point was that it wouldn't fragment us unless someone added or removed 680x0 instructions.

I guess I am dense.  I can't take yes for an answer ;)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Plaz on January 17, 2013, 03:18:47 PM
Quote from: Hattig;722898
I think we're at the second of these currently with Yaqube's work.


So our best option so far for FPGA implementation then is to support Yaqube's efforts? Does he want or need help, are there resources he needs to help things along?

Plaz
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline on January 17, 2013, 03:23:30 PM
Quote from: Heiroglyph;722911
Sorry if I'm dense, are we agreeing?

I thought you implied that no matter what, fragmentation would happen.

My point was that it wouldn't fragment us unless someone added or removed 680x0 instructions.

I guess I am dense.  I can't take yes for an answer ;)
Adding/removing instructions isn't going to fragment, added instructions can be ignored (see the 68020) and removed instructions can be trapped (see the 68060)... Fragmentation would occur if instruction behaviour is altered...

Reusing a previously assigned opcode cold cause problems, unless it wasn't commonly used on the Amiga... If it has potential to improve compiler code generation, or speed execution... then I say go for it!! ;)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 17, 2013, 03:30:14 PM
Unexpected behaviour will fragment.

Quote from: Plaz;722912
So our best option so far for FPGA implementation then is to support Yaqube's efforts? Does he want or need help, are there resources he needs to help things along?


The best situation is that he release the HDL-resources. Other than that one could start with TG68 and work from there.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 17, 2013, 03:33:30 PM
Quote from: bloodline;722913
Adding/removing instructions isn't going to fragment, added instructions can be ignored (see the 68020) and removed instructions can be trapped (see the 68060)... Fragmentation would occur if instruction behaviour is altered...

Reusing a previously assigned opcode cold cause problems, unless it wasn't commonly used on the Amiga... If it has potential to improve compiler code generation, or speed execution... then I say go for it!! ;)


I disagree.  If instructions are added, then software will be written that uses them (you'll need a new compiler as well) and every other CPU will not run the software properly.

It's like the Microsoft embrace and extend tactic.  Be compatible, then add just a little change that people want to use.  Pretty soon others are obsolete and incompatible.

Higher speeds are great, but we can't afford more fragmentation.  It's just not worth a few clocks in specific situations when we can use more efficient hardware/firmware.  We're in the age of multi-GHz parts, we can get massive performance increases without resorting to a new instruction set.

If instructions are removed, but you include efficient traps with your hardware, that's fine but awkward for the user.  I absolutely hate dealing with 060 libraries.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 17, 2013, 03:37:13 PM
If people use the added instructions, the code won't work on other accelerators. So everyone has to have the new accelerator to run the new code, which would be sad.

And what if two different developers add two different sets of ISA extensions? Then there is real trouble.

I don't personally think there is much call for new instructions. Maybe common combinations of existing instructions can be optimised specially.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Plaz on January 17, 2013, 04:52:22 PM
Quote from: freqmax;722916
The best situation is that he release the HDL-resources. Other than that one could start with TG68 and work from there.


TG68 source looks like a good starting point, but if Yaqube is well on the way to creating the core needed, then wouldn't it be preferred to support that goal instead of duplicating the effort? Is his project so different in FPGArcade that it wouldn't work well here? I've not followed FPGArcade very closely, will the work be open or closed source?

Plaz
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 17, 2013, 04:56:04 PM
It's hard to work with sources that you don't have ;)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 17, 2013, 05:07:30 PM
Quote from: freqmax;722900
I'll agree. Make it work FIRST. If it ships it's a bonus ;)

The beauty with FPGA is that you can ship first, and code later :P


You gotta do something to prove the FPGA PCB works. No sense in shipping a buggy PCB and leaving the FPGA coders wondering why something doesn't work right... How do we do that? Put something in there and see if it can communicate with the host properly.

PCB things that could come out wrong:
shorts
opens
bad layer stackup choice making signal integrity a mess
bad signal angles can affect signal integrity as well as manufacturability (DFM)
mismatched trace lengths can affect timing

Opens and Shorts should be easy to check with a multimeter and a lot of patience. Ive had to do that before for boards containing 8 sockets for 700+ pin chips. A board like we're discussing here may not be quite that bad.

Timing and Signal Integrity issues are harder to check without running something at real-world speeds. There are expensive simulation tools that can probably a PCB layout as well, but I'm not sure if anyone here has and knows them. (If anyone does, please talk about that, I want to learn!)

While the 060 bus probably isn't the best example of something requiring obsessive-compulsive signal integrity planning, it is at the low end of where you start to care. The general rule of thumb for this starts around 50MHz. Some say they've seen problems as low as 17KHz...

So, how does one prove this PCB before shipping, to ensure it's worth putting hte "real" FPGA coding effort into?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 17, 2013, 05:20:02 PM
I'm thinking on developing at least one FPGA just to try it out. And you can't have the core until you have a PCB nor can you have a working PCB test until you have a core ;)

So one make a PCB. Then generate a core that just toggle bits and does basic bus testing. When that is complete. The next step is to code a 68k core.

Perhaps it's possible to run the 68k bus really slow like 1 MHz just to prove it works.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 17, 2013, 06:03:30 PM
Quote from: Plaz;722935
TG68 source looks like a good starting point, but if Yaqube is well on the way to creating the core needed, then wouldn't it be preferred to support that goal instead of duplicating the effort? Is his project so different in FPGArcade that it wouldn't work well here? I've not followed FPGArcade very closely, will the work be open or closed source?

Plaz


With the CPU being on the same FPGA as the rest of the chips, he doesn't have to exactly duplicate the bus interface either so that's really only one part of the puzzle. (although a big one)

The A600 FPGA accelerator project is working on both bus and core, but for 68000.
http://www.majsta.com/

If the projects are both open then it's a good start.  For example, the A600 FPGA with an 020 core or use the 020 core and bolt on the A600 bus with updates to fit 680x0 bus specs.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 17, 2013, 06:17:38 PM
Quote from: billt;722937
While the 060 bus probably isn't the best example of something requiring obsessive-compulsive signal integrity planning, it is at the low end of where you start to care. The general rule of thumb for this starts around 50MHz. Some say they've seen problems as low as 17KHz...


I agree with everything you've said, but I have a question.

Why do we keep mentioning duplicating the 060 bus?

It's hard to find 060 CPU cards.
Real 060's have to be heavily adapted to fit the Amiga bus.

030 cards are dirt cheap and plentiful.

An 060 is no faster than a synchronous 030 with burst for communicating with the Amiga itself.  Actually they can often be slower since many 060's are async, can't burst, are running in 040 bus mode and have a lot of glue logic.

The 3000/4000 local bus are basically straight 030@25MHz, no glue required and I'd think the 1200 would be very similar but slower.  You can't talk to the Amiga faster than 25MHz, period.

Local devices on the CPU card can communicate any way you want them to.  They don't have to be limited to 030 Amiga speeds, they can be custom or off the shelf high speed buses.

030 just seems like the sweet spot for our needs.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 17, 2013, 06:35:31 PM
Quote from: Heiroglyph;722945
I agree with everything you've said, but I have a question.

Why do we keep mentioning duplicating the 060 bus?

Read the name of this thread's topic.

This started out as a discussion to replace the very difficult to find, legitimate, best mask-set, full-featured and fastest 68060 chips from Motorola/Freescale, to put into 68060 sockets such as the socket found on some Amiga accelerators and on MikeJ's daughtercard for FPGA-Replay system.

Other things, such as the 3000/4000 accelerator slot, 030 socket, 020 socket, 000 socket, etc. have also come up, and could most likley be used via adapter, or do new PCBs directly targetting those and reuse the FPGA softcore stuff there. No reason a TG68 or N050 or whatever can't be plugged into any one of those things, but this topic came from the 68060 issue and desire to have better than whatever it is we already have.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 17, 2013, 06:37:14 PM
Orignal problem: The FPGA Arcade has some 68020 hybrid. But the number of logic cells in the XC3S1600 is finite so any more fancy CPU has to be elsewhere. Now the solution mikej has accomplished is a daughterboard with a 68060 CPU.

However there's a small number of really fast 68060 CPUs and the numbers are declining. But if one use an FPGA instead of the CPU. One can create a replacement. And FPGA factors like type (Actel), blockram, HDL-code optimizations etc can improve the performance.

So the goal was to use it with FPGA Arcade. And A4000, A3000, A1200 etc is a bonus. A 68030 bus is a subset of 68060 so it won't provide 060 systems with a solution.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Plaz on January 17, 2013, 06:49:15 PM
Quote
It's hard to work with sources that you don't have ;)


Shout out to Mr. obvious.

To the point..... has Yaqube ever mentioned opening the source?
For the answer to that, I guess I'll just go ask him myself. (predicting the answer is no)

Second question.... anyone know what detailed documentation is available for 060? Schematic of the internals would be the bomb.  I think I still have my 030 motorola dev books from back in the day. Guess I can start there.

Plaz
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 17, 2013, 06:58:26 PM
Has anyone worked with the MCC-216 hardware?  It uses an Altera Cyclone III in it.  I just received one with the developer package and wondered how this compares to what Mike is building.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 17, 2013, 07:04:27 PM
Quote from: billt;722951
Read the name of this thread's topic.

This started out as a discussion to replace the very difficult to find, legitimate, best mask-set, full-featured and fastest 68060 chips from Motorola/Freescale, to put into 68060 sockets such as the socket found on some Amiga accelerators and on MikeJ's daughtercard for FPGA-Replay system.

I understand the thread topic, but I think it's a flawed idea with a simple fix.  The 060 bus is more trouble than it is worth.  It's not the common denominator, it's an aberration.

Even 040 bus would be a better choice than 060.  Good 040 cards are really common and A3640's are like roaches.

It would be easier to make an 030 bus expansion board for the FPGA Replay and get more use out of the CPU work than just the people who are holding the remaining 060 cards for ransom.

Quote
Other things, such as the 3000/4000 accelerator slot, 030 socket, 020 socket, 000 socket, etc. have also come up, and could most likley be used via adapter, or do new PCBs directly targetting those and reuse the FPGA softcore stuff there. No reason a TG68 or N050 or whatever can't be plugged into any one of those things, but this topic came from the 68060 issue and desire to have better than whatever it is we already have.

If someone wants to pump years of work and thousands of dollars into an easily redesigned FPGA replay addon that a hand full of people own and the already hard to buy 060 cards, that's their time and money.  

It just doesn't make sense to me and I hope it doesn't take resources away from anything actually useful to the community.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 17, 2013, 07:05:03 PM
Quote from: Plaz;722954
Shout out to Mr. obvious.

To the point..... has Yaqube ever mentioned opening the source?
For the answer to that, I guess I'll just go ask him myself. (predicting the answer is no)

Second question.... anyone know what detailed documentation is available for 060? Schematic of the internals would be the bomb.  I think I still have my 030 motorola dev books from back in the day. Guess I can start there.

Plaz


http://www.freescale.com/webapp/sps/site/taxonomy.jsp?code=68K

But understand that, making a replacement, all we really need are the bus spec and the instruction set, and any configuration/information registers in the original chip that a project such as this needs to reproduce. Anything else can be reimagined as we see fit, preferrably for the better.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 17, 2013, 07:17:22 PM
Quote
If someone wants to pump years of work and thousands of dollars into an easily redesigned FPGA replay addon that a hand full of people own and the already hard to buy 060 cards, that's their time and money.


Then let those interested in wasting their own time and money continue as they see fit. If you prefer an 040 or 030 or CPUslot or whatever, then do that or wait for something here to happen and port it down to your socket of choice. If you beat the 060 people, they can port yours up to the 060 bus. Not a big deal.

Also realize that the bus is probably one of the less difficult parts of this sort of thing. As the CPU core is the "hard part", various people could probably be designing different PCBs for diffeent sockets in parallel to the CPU core designer doing his thing. Regardless, any of these PCB people and bus people will probably be waiting on the CPU core people...

Quote
It just doesn't make sense to me and I hope it doesn't take resources away from anything actually useful to the community.


Different people have different opinions about what is and is not useful, is and is not a waste of time/money, etc. I don't agree that it is taking anything away from anything useful to the community. I don't agree that it's a waste of time, and some of us spend money to do things because we enjoy them, not to bring back a profit. No problems...
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 17, 2013, 07:49:46 PM
Other stuff that may be interesting:
https://www.coursera.org/course/hardware
https://www.coursera.org/course/comparch
http://www.udacity.com/overview/Course/cs348/CourseRev/1
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 17, 2013, 07:56:58 PM
Let's focus on the design rather than repeating the basics. Please?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 17, 2013, 08:11:03 PM
Quote from: freqmax;722939
I'm thinking on developing at least one FPGA just to try it out. And you can't have the core until you have a PCB nor can you have a working PCB test until you have a core ;)

So one make a PCB. Then generate a core that just toggle bits and does basic bus testing. When that is complete. The next step is to code a 68k core.

Perhaps it's possible to run the 68k bus really slow like 1 MHz just to prove it works.


Majsta at least got to 2MHz... :)

What PCB program will you use?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline on January 17, 2013, 08:11:59 PM
How about some Amiga Chip Pinouts :)

http://megaburken.net/~patrik/pinout_temp/
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Plaz on January 17, 2013, 08:19:06 PM
Quote from: freqmax;722971
Let's focus on the design rather than repeating the basics. Please?


Agreed, but so far I'm hearing we don't have the basics covered yet. No core, design no go. Even if starting with TG68... must compare were it is to where it needs to go.

Plaz
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 17, 2013, 08:22:30 PM
KiCad (https://en.wikipedia.org/wiki/KiCad)
(free and thus makes sharing easy)

Quote from: Plaz;722977
Agreed, but so far I'm hearing we don't have the basics covered yet. No core, design no go. Even if starting with TG68... must compare were it is to where it needs to go.


I meant basics like that PCB consist of some serious routing issues. It's not like the wall socket. FPGA is not set in stone, is reconfigurable at least every 1/10 second etc..
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 17, 2013, 08:23:59 PM
Quote from: Plaz;722954
Shout out to Mr. obvious.

To the point..... has Yaqube ever mentioned opening the source?
For the answer to that, I guess I'll just go ask him myself. (predicting the answer is no)

I was under the impression they are working on it for/in conjunction with an AGA version of Minimig. Both TG68 and Minimig are GPL...
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 17, 2013, 08:27:09 PM
Quote from: Heiroglyph;722945
I agree with everything you've said, but I have a question.

Why do we keep mentioning duplicating the 060 bus?

It's hard to find 060 CPU cards.
Real 060's have to be heavily adapted to fit the Amiga bus.

030 cards are dirt cheap and plentiful.

An 060 is no faster than a synchronous 030 with burst for communicating with the Amiga itself.  Actually they can often be slower since many 060's are async, can't burst, are running in 040 bus mode and have a lot of glue logic.

The 3000/4000 local bus are basically straight 030@25MHz, no glue required and I'd think the 1200 would be very similar but slower.  You can't talk to the Amiga faster than 25MHz, period.

Local devices on the CPU card can communicate any way you want them to.  They don't have to be limited to 030 Amiga speeds, they can be custom or off the shelf high speed buses.

030 just seems like the sweet spot for our needs.


There's also been talk of something such as this to other sockets, though anything fancy (bus protocol conversion) can go in the FPGA:
http://www.emulation.com/catalog/off-the-shelf_solutions/production-test_adapters/upgrade_motorola/
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 17, 2013, 08:27:57 PM
Quote from: freqmax;722978
KiCad (https://en.wikipedia.org/wiki/KiCad)
(free and thus makes sharing easy)

And that's one of my reasons for wanting WxWidgets on AmigaOS. :)

I think KiCad can import Eagle files. Check out the more recent file at http://upverter.com/amigabill/215b379ff943fc80/FP68060/files/ (very quick & dirty)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: yssing on January 17, 2013, 09:15:41 PM
so something like this to some extent?
http://www.gb97816.homepage.t-online.de/gba_tk02.htm
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 17, 2013, 09:49:13 PM
Quote from: yssing;722990
so something like this to some extent?
http://www.gb97816.homepage.t-online.de/gba_tk02.htm


Sortof-kindof. There are 3 FPGA chips (Xilinx) on the GP accelerator card. Consider that we're putting the CPU on his board inside an FPGA, and that's the basic idea of this thread, yes.

For those that prefer the x86 software emulation, replace the CPU chip on GB's board with a PC motherboard of some sort (however small), and again same idea.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: mikej on January 17, 2013, 10:05:05 PM
Quote from: freqmax;722953
Orignal problem: The FPGA Arcade has some 68020 hybrid. But the number of logic cells in the XC3S1600 is finite so any more fancy CPU has to be elsewhere. Now the solution mikej has accomplished is a daughterboard with a 68060 CPU.


The design aim with Replay is to make a fairly generic main board which has high quality common IO (audio/video etc) and cheap daughterboards for specific stuff - for example a JAMMA interface for arcade cabs. Daughterboards can be simple 2 layer PCBs and the placement and pinout specs are available from me. I also have some prototype daughterboards with 5v level converters on and a patch array where I have wired up some processors for testing. The 68060 board is pretty simple, it would be easy to make one with an FPGA on it instead for CPU development. As a said earlier I started development of a Virtex6 module which plugged into the 68060 socket, but it's much simpler just to make a different daughterboard and wire a bunch of wires to the inter-board connector. Then you can decide what you want to do with them at the other end.


Jim : "Has anyone worked with the MCC-216 "

Several of us have a real problem with this guy - he was on this forum for a while. He is using GPL code and not releasing the source, which is naughty. We will release the code for the Replay system as soon as we start shipping a stable core.
/MikeJ
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 17, 2013, 10:21:43 PM
Quote from: mikej;723000

Several of us have a real problem with this guy - he was on this forum for a while. He is using GPL code and not releasing the source, which is naughty. We will release the code for the Replay system as soon as we start shipping a stable core.
/MikeJ


That's one of the things I really respect about you Mike.  You are giving to the community instead of taking.  I hope you make most of your investment back. (I wish profit, but that's going to be a tough one)

The GBA 060 for example (and any number of dead commercial products) will never do the community any good, nor make him any money, yet the developer keeps it to himself.

We need more like you in the community.

Once I can just order a replay board and receive it, I'm definitely going to get one.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: A6000 on January 17, 2013, 10:37:16 PM
I read here that the 060 bus interface is too complex and that the 030 bus is better,  also the 060 is less compatible with amiga software than the 030 because many instructions were not implemented, so why do we want an 060 replica, why not try to implement an 030+882 that runs as fast as an 060?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 17, 2013, 11:56:41 PM
@A6000, If you get tired of 68060 you can switch to a 68030 in 1/10 second.. (with FPGA)

FPGA Arcade daughterboard with onboard FPGA is of course nice. My thought was that Arcade, A4000, Accelerator cards (A1200) could benefit from this in one go. And A3000 too with an adapter.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: A6000 on January 18, 2013, 12:03:27 AM
Quote from: freqmax;723008
@A6000, If you get tired of 68060 you can switch to a 68030 in 1/10 second.. (with FPGA)


It's not a matter of tiring of an 060, it is the apparent illogical choice of replicating the 060 in the first place.
The Natami team were thinking their processor would run at about 180Mhz which would be reasonably fast enough for most applications.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 18, 2013, 12:26:57 AM
68060 has some performance factors:
# 10 stage pipeline.
# Two cycle integer multiplication unit.
# Branch prediction.
# Dual instruction pipeline.
# Instructions in the address generation unit (AGU) and thereby supply the result two cycles before the ALU.
# Superscalar (asfair)

It's about being able to run the most ,m68k opcodes per second. I guess having "the best" m68k running the computer in itself perhaps is also a factor ;)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 18, 2013, 01:14:34 AM
Quote from: mikej;723000
Jim : "Has anyone worked with the MCC-216 "

Several of us have a real problem with this guy - he was on this forum for a while. He is using GPL code and not releasing the source, which is naughty. We will release the code for the Replay system as soon as we start shipping a stable core.
/MikeJ

Interesting.  I wonder what I have then.  I got a link to a complete dev kit but I have not looked to see what was in it.  It took a month to get it after I paid for it (eBay auction).  He did add the JTAG header and set it up for development work.  I chatted via email with him a few times before I found out about your project.  In fact, I got so frustrated at the delivery time that I started looking at other FPGA developer boards, which is how I found out about your project!

From a hardware standpoint, the MCC-216 is pretty simple - just the Cyclone III, some RAM, and some I/Os.  I am not sure how fast it is or what can be done with it.  I know that most of the projects I have seen for the Altera are all Verilog based, and even though I am a U.S. guy, I have only experience with VHDL so your projects appeals to me - that and you are a heck of a nice guy from everything I have seen so far.  :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 18, 2013, 01:18:21 AM
Quote from: A6000;723006
I read here that the 060 bus interface is too complex and that the 030 bus is better,  also the 060 is less compatible with amiga software than the 030 because many instructions were not implemented, so why do we want an 060 replica, why not try to implement an 030+882 that runs as fast as an 060?

68060 replacement.

Not 68060 replica.

There's a difference.

Yes, my ideal is something that goes into a 68060 socket, is 680x0 compatible (tg68, n050, n070, whatever), and hopefully outperforms real 680x0 from Motorola/Freescale.

Then do adaptors or different PCB designs for other sockets to hold the otherwise identical CPU core, whatever it may be. (Tg68 or n050 or arm or x86 or whatever)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on January 18, 2013, 03:03:06 AM
If you notice, none of the improvements listed above have anything to do with the 060 bus.

I'm just still not seeing the point of not making it immediately compatible with more existing hardware.

Look at an 030 card (especially a3640), then look at an 040 or 060 card.  Most of those chips are glue to hack it onto the Amiga bus.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: RobertB on January 18, 2013, 03:43:44 AM
Quote from: JimDrew;723020
From a hardware standpoint, the MCC-216 is pretty simple - just the Cyclone III, some RAM, and some I/Os.  I am not sure how fast it is or what can be done with it.

Jim, look at

http://postimage.org/image/1t1u1655w/

That is for the first Amiga core of the MCC-216.  The original thread is at

http://www.amiga.org/forums/showthread.php?t=55975&highlight=mcc-216&page=2

So far, at the SCCAN and FCUG meetings we've been running Amiga OS 1.3 with the MCC-216.

And at the last SCCAN meeting, member Matt B. showed his easy-to-use installer for dropping cores and files into the MCC-216.

But that's news for a different thread,
Robert Bernardo
Fresno Commodore User Group
http://videocam.net.au/fcug
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on January 18, 2013, 04:38:26 AM
Thanks Robert, I will check that out.  I know some people are using OS2.04 on this device (well, at least they claim they are!)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: A6000 on January 18, 2013, 07:52:12 AM
Quote from: billt;723021
68060 replacement.

Not 68060 replica.

There's a difference.

Yes, my ideal is something that goes into a 68060 socket, is 680x0 compatible (tg68, n050, n070, whatever), and hopefully outperforms real 680x0 from Motorola/Freescale.

Then do adaptors or different PCB designs for other sockets to hold the otherwise identical CPU core, whatever it may be. (Tg68 or n050 or arm or x86 or whatever)


If someone designs an 030+882 compatible processor that is as fast as an 060 then it is an 060 replacement. if someone designs an 060 compatible processor with an 060 bus interface then it is an 060 replica.

From what I have read it is easier to interface an 030 to the amiga than it is for an 060, there are not many 060 sockets around, better to use an 030 socket, and new boards would be simpler if they used an 030 bus rather than 060 bus.

I understand that you want something to go in an 060 socket, but would'nt it be better to design something that more people could use?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 18, 2013, 09:22:48 AM
That issue is solved with a simple mechanical adapter, as already mentioned. The 060 socket has signals that 030 socket doesn't. So you can go down, but not up.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline on January 18, 2013, 09:38:58 AM
Quote from: freqmax;723047
That issue is solved with a simple mechanical adapter, as already mentioned. The 060 socket has signals that 030 socket doesn't. So you can go down, but not up.


True...
From the datasheets it looks like the 680x0 busses aren't really that different (excepting the larger address size 020 onwards), the extra signals on the later chips just offer more clues the the hardware about cashing and protection :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 18, 2013, 12:00:18 PM
Quote from: A6000;723006
I read here that the 060 bus interface is too complex and that the 030 bus is better, also the 060 is less compatible with amiga software than the 030 because many instructions were not implemented, so why do we want an 060 replica, why not try to implement an 030+882 that runs as fast as an 060?

Motorola removed some of the instructions added to the 020 and some of the FPU instructions to save space, that could be used for making it run quicker.
 
By only supporting the 060 instructions then you've saved space in the FPGA and the time taken to implement them.
 
The compatibility will be the same as a real 68060 & people have had nearly 20 years to come up with patches and workarounds for that.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 18, 2013, 12:47:47 PM
Quote from: freqmax;723015
68060 has some performance factors:
# 10 stage pipeline.
That's rather longer than I expected.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 18, 2013, 12:55:19 PM
Quote from: psxphill;723054
Motorola removed some of the instructions added to the 020 and some of the FPU instructions to save space, that could be used for making it run quicker.
The only 68020 features I ever used are longword multiplies and divides, and scale factors on indexed addressing modes.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 18, 2013, 01:46:08 PM
Quote from: Mrs Beanbag;723057
That's rather longer than I expected.

page 3-1
 
http://cache.freescale.com/files/32bit/doc/ref_manual/MC68060UM.pdf
 
The first 4 stages are for fetching and assigning the instruction to an integer unit. The next 4 stages are the dual integer unit, then the last two stages are completing the instructions.
 
It's quite a simple design.
 
It doesn't evenly distribute instructions between integer pipelines, it only uses the second integer pipeline when the first is running an instruction that can be run at the same time. Whether it can will depend on the instruction as not all can even be run on the second pipeline and the registers involved. If the instruction in the primary pipeline changes a register used in the next instruction then the next instruction also has to be put on the primary pipeline.
 
I don't know if the pipelines will get starved if you're continuously using both integer pipelines for instructions that only take 1 clock cycle to execute. It's not something that you can achieve in real world examples, however as a 32bit value can contain two instructions then it might be possible. There isn't much explained as to how this works though. They do say it's "capable of sustained execution rates of < 1 machine cycle per instruction of the M68000 instruction set". But if it could sustain 2 instructions per machine cycle then I would have thought they would have claimed that.

There is a document (http://cdn.preterhuman.net/texts/underground/phreak/68060Info.txt) that explains the pipelines in more detail, I don't where the pdf is as the pictures are missing in the ascii version. It might be this: http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=289639 but I'm not paying for it :-)
 
The branch executing in zero cycles doesn't seem to be very well documented. I can't tell whether they are over-exaggerating what it does or not. My original thought was that the branch is in the primary pipeline and the secondary pipeline has the target or next instruction (depending on what is predicted). This doesn't actually cause it to execute in 0 cycles when looking at the pipeline as a whole, but when looking at the branch on it's own it does have a 0 cycle overhead.
 
What is odd is that they claim different for predicted correctly taken and predicted correctly not taken
 
"If the BC indicates that the instruction is a branch and that this branch should be predicted as taken,
the IAG pipeline stage is updated with the target address of the branch
instead of the next sequential address. This approach, along with the
instruction folding techniques that the BC uses, allow the 68060 to achieve a
zero-clock latency penalty for correctly predicted taken branches.
If the BC predicts a branch as not-taken, there is no discontinuity
in the instruction prefetch stream. The IFP continues to fetch instructions
sequentially. Eventually, the not-taken branch instruction executes as a
single-clock instruction in the OEP, so correctly predicted not-taken
branches require a single clock to execute. These predicted as not-taken
branches allow a superscalar instruction dispatch, so in many cases, the next
instruction executes simultaneously in the sOEP."
 
So it would imply that the branch doesn't hit the execute stage of the pipeline, but then the document goes on to say it does.
 
"The 68060 performs the actual condition code checking to evaluate the
branch conditions in the EX stage of the OEP. If a branch has been
mispredicted, the 68060 discards the contents of the IFP and the OEPs, and
the 68060 resumes fetching of the instruction stream at the correct location.
To refill the pipeline in this manner, there is a seven-clock penalty for a
mispredicted branch."
 
I guess it comes down to how you interpret this from the first quote:
 
"allow the 68060 to achieve a zero-clock latency penalty for correctly predicted taken branches"
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 18, 2013, 03:53:00 PM
Quote from: Mrs Beanbag;723058
The only 68020 features I ever used are longword multiplies and divides, and scale factors on indexed addressing modes.


And Branches >128 bytes :angel:
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 18, 2013, 04:40:34 PM
68000 can do 16-bit branches, it's 32-bit branches that are 68020+
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 18, 2013, 05:47:01 PM
I presume 16-bit branching is the same as that if a certain flag is set then one can conditionally jump 65536 memory positions?

I have some memory that x86 is limited to 128 position limit on branching? or perhaps it's 6502 ;)
How about ARM?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 18, 2013, 06:32:32 PM
Quote from: psxphill;723054
Motorola removed some of the instructions added to the 020 and some of the FPU instructions to save space, that could be used for making it run quicker.
 
By only supporting the 060 instructions then you've saved space in the FPGA and the time taken to implement them.

For the most part, the 68060 chose good instructions to remove from hardware. One big exception is the integer 32x32=64. This was already used by compilers to turn a divide by a constant into a multiply saving a huge number of cycles.

The .library should go in flash so it's available very early for bootable games.

Quote from: psxphill;723068
page 3-1
 
http://cache.freescale.com/files/32bit/doc/ref_manual/MC68060UM.pdf
 
The first 4 stages are for fetching and assigning the instruction to an integer unit. The next 4 stages are the dual integer unit, then the last two stages are completing the instructions.
 
It's quite a simple design.

I wouldn't say it's simple although it may be compared to some modern processor designs (e.g. x86). There is an instruction buffer in between the pipeline stages that is very costly (muxes) on an fpga. There is also a translation from 16 bit variable length CISC to a fixed length 16 bit RISC in there. I don't think Motorola released the encoding format of their internal fixed length RISC making it difficult to duplicate. There is 6 bytes of data with each 16 bit fixed length RISC word and I don't know if, for example, a MOVEA.W #,A0 immediate is extended when decoding or in the OEP. I believe the instruction becomes pOEP only if there is >6 bytes of data from extension words but what if there is more than 12 bytes of extension word data (up to 18 bytes is possible)? If you think this is all simple, I volunteer you to do the VHDL programming of the replacement 68060 :P.

Quote from: psxphill;723068
It doesn't evenly distribute instructions between integer pipelines, it only uses the second integer pipeline when the first is running an instruction that can be run at the same time. Whether it can will depend on the instruction as not all can even be run on the second pipeline and the registers involved. If the instruction in the primary pipeline changes a register used in the next instruction then the next instruction also has to be put on the primary pipeline.

Also, in some cases the OEPs are locked together to process an instruction together.

Quote from: psxphill;723068
I don't know if the pipelines will get starved if you're continuously using both integer pipelines for instructions that only take 1 clock cycle to execute. It's not something that you can achieve in real world examples, however as a 32bit value can contain two instructions then it might be possible. There isn't much explained as to how this works though. They do say it's "capable of sustained execution rates of < 1 machine cycle per instruction of the M68000 instruction set". But if it could sustain 2 instructions per machine cycle then I would have thought they would have claimed that.

Long instructions (lots of extension words) are more of a problem than 1 cycle instructions for fetch starvation. The 68060 doesn't have a low fetch bottleneck with most 68020 code because it's short (the 020/030 has a serious fetch bottleneck). A 68060 fetch bottleneck can be seen in artificial tests. Gunnar did some continuous work in a mini bench test program he made (on the Natami forum) that used longword immediates continuously which did show a substantial slowdown (1/4-1/3 slowdown as I recall). The 68060 needs longword data to be efficient but can slow down fetching it very often. Most longword immediates are <16 bits and extending data is low overhead even in fpga (ARM uses shift which is high overhead in fpga). This is how MOVEA.W #,An and ADDA.W #,An work already. The same could be done for data registers also, as we found, which would be even more common. Also, adding MVS and MVZ would have helped.

Quote from: psxphill;723068
The branch executing in zero cycles doesn't seem to be very well documented. I can't tell whether they are over-exaggerating what it does or not. My original thought was that the branch is in the primary pipeline and the secondary pipeline has the target or next instruction (depending on what is predicted). This doesn't actually cause it to execute in 0 cycles when looking at the pipeline as a whole, but when looking at the branch on it's own it does have a 0 cycle overhead.
 
What is odd is that they claim different for predicted correctly taken and predicted correctly not taken

Different timing for predicted correctly taken and predicted correctly not taken is normal with a pipelined processor. Branches predicted backward with the branch target in the branch cache are effectively 0 cycles for loops which is awesome as loop unrolling is mostly not needed improving code density. Branches that fall through eat a cycle in the pOEP but a sOEP instruction can execute simultaneously if available (also awesome). Note that the branch unit is a separate unit that can do processing in parallel and that the branch target must be in the branch cache to get the 0 cycle branch taken. That means there is usually some additional overhead the first time executing code. I believe the 68060 does some kind of instruction folding/fusing of the branch with CMP/TST/SUBQ in order to make the 0 cycle branches happen. Very few modern processors have effectively free branches. Jens and Gunnar (Natami) didn't even have all the magic figured out. Joe Circello and the 68060 team had this all figured out back in the 90s and the Motorola marketing guys killed it for PPC. Pencil pusher power!

Quote from: psxphill;723068
So it would imply that the branch doesn't hit the execute stage of the pipeline, but then the document goes on to say it does.

I think the branch instruction does go through the pOEP. The branch unit looks at it very early, makes a prediction and starts speculative execution. The pOEP still has to verify that the prediction is correct at execution time or flush the pipe and continue executing the other branch path.

Quote from: Mrs Beanbag;723058
The only 68020 features I ever used are longword multiplies and divides, and scale factors on indexed addressing modes.

No EXTB.L or TST.W/L An? No misaligned reads or writes? The misaligned reads and writes are a huge saver when not sure of the alignment. Compilers often can't guess the alignment so they bloat up the code and slow down the CPU to align the data before reading or writing.

The 68020+ has some other niceties but they are more advanced.

Quote from: ChaosLord;723082
And Branches >128 bytes :angel:

I think you mean Bcc.L and BSR.L. Branches up to 16 bit were supported on the 68000. The longword branches are big savers but only on fairly large programs. Not too many assembler programmers create programs >65k.

Quote from: freqmax;723088
I presume 16-bit branching is the same as that if a certain flag is set then one can conditionally jump 65536 memory positions?

It's signed so plus or minus ~32k.

Quote from: freqmax;723088
I have some memory that x86 is limited to 128 position limit on branching? or perhaps it's 6502 ;)
How about ARM?

x86 branches are so screwed up with the early segmentation crap that you really have to define which x86 ISA and then don't ask me. The ARM 32 bit ISA is better but still has some limitations as I recall. I believe it only allow 24 bit addressing, too. It's quite old but the 68k was one of the first to have full 32 bit position independent code done right. An assembly programmer doesn't have to worry about the size with a modern optimizing assembler like vasm. It will automatically generate the most efficient encoding (for more than branching as 68020+ allows) including forward and backward branch optimization. The 68020+ enhancements removed a lot of limitations and can be used or optimized transparently which is great. They should have left the double memory indirect modes away though.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 18, 2013, 06:49:42 PM
Quote from: matthey;723091
There is also a translation from 16 bit variable length CISC to a fixed length 16 bit RISC in there. I don't think Motorola released the encoding format of their internal fixed length RISC making it difficult to duplicate.

Is there any evidence to show they remap the opcodes at all? They might just store each opcode +operands within the fixed width fifo.
 
Maybe the early decode just figures out how long each instruction is and whether the next instruction is valid to go in the secondary pipeline.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 18, 2013, 06:51:08 PM
Quote from: matthey;723091
No EXTB.L or TST.W/L An? No misaligned reads or writes?
Ah, you got me. I do use EXTB.L, on occasion. Although I could easily do without.

I can't honestly say if I use TST.L An or not, off the top of my head. Pretty sure I never do TST.W An though, can't think of much use for that.

I'm actually pretty careful not to do misaligned access, it just seems wrong, somehow. Just because you can, doesn't mean you should!
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 18, 2013, 07:29:46 PM
@matthey, Nice insight! ;)

Do you think it's feasable to create something that can get near 50 MHz 68060 in FPGA ?

I was thinking on Intel 80386 ISA in protected mode (kernel and user) regarding branching. As for 8086 and segments.. yuck ;)

Quote from: psxphill;723092
Is there any evidence to show they remap the opcodes at all? They might just store each opcode +operands within the fixed width fifo.


Perhaps another reverse engineering approach is to figure out from other parts what you need to make your duplicate to work.
A 68060 functionally duplicate won't have to be designed the same way. Just interact with software code in way that the original programmer intended.

Quote from: psxphill;723092
Maybe the early decode just figures out how long each instruction is and whether the next instruction is valid to go in the secondary pipeline.


So there is a a kind of selection process such that instructions that doesn't depend on sequent instructions could be done in parallel while the rest is single pipeline?


Btw, Is there any ISA that is neater and more straightforward than m68k? ;)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 18, 2013, 07:32:49 PM
Quote from: psxphill;723092
Is there any evidence to show they remap the opcodes at all? They might just store each opcode +operands within the fixed width fifo.


No, but logically something has to happen to 32 bit instructions to fit in 16 bits. It's possible (even logical) that the 2nd word of a 32 bit instruction becomes part of the 6 bytes of "data" per OEP. I don't know if that is possible for all 32 bit instructions though.

Quote from: Mrs Beanbag;723093

I can't honestly say if I use TST.L An or not, off the top of my head. Pretty sure I never do TST.W An though, can't think of much use for that.


You never do:

   movea.l myptr,a0
   tst.l a0
   beq .nullptr

or

   jsr (-$xxx,a6)
   movea.l d0,a0
   tst.l a0
   beq .nullptr

Of course the latter is better sometimes:

   jsr (-$xxx,a6)
   tst.l d0
   movea.l d0,a0
   beq .nullptr

Some 68k processors could reduce the branch overhead on this one on a piplelined CPU although be careful that the a0 is not an input to an EA calculation right after the branch or the first option was better.

Not many have used TST.W An but be careful. It actually operates on a word and not a longword as many OPA.W instructions do. Vasm and PhxAss were doing an optimization to TST.W which was wrong for many years until recently found and fixed. Most of the time it would not cause a problem but could lead to very rare random crashes.

Quote from: Mrs Beanbag;723093

I'm actually pretty careful not to do misaligned access, it just seems wrong, somehow. Just because you can, doesn't mean you should!


Good. Treat is like credit. Don't use it when you don't need it and don't abuse it when you do need it.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 18, 2013, 08:04:45 PM
I do such things like:

move.l myptr(PC),D0
beq .nullptr
move.l D0,A0

in the 2nd example could always use tst.l D0 anyway.

flags are set for free when moving to an address register. Also note the first line, I always write relocatable code.

In other news, I've been thinking about a RISC instruction set for internal use in a 68k core for some time. I think we can identify a few obvious simplifications:
1. tread An and Dn identically (use extra instructions if different behaviour is required)
2. only MOVE can use as either source or destination operand (load/store architecture)
3. all other instructions register-register, or "quick" short-constant source operands
4. spare "temporary" registers for internal use.
we could map 68k instructions to short sequences of internal instructions, and design those instructions to give the shortest sequences.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 18, 2013, 08:15:51 PM
Quote from: freqmax;723099
So there is a a kind of selection process such that instructions that doesn't depend on sequent instructions could be done in parallel while the rest is single pipeline?

Yeah, you can't execute in parallel if the first instruction modifies a register that the second uses: for example
 
MOVEQ #0,D0
TST.W D0
 
The secondary pipeline can't execute all instructions either. Floating point instructions can only be dispatched from the primary pipeline for instance.
 
From the description it would seem that it checks in the DS stage whether it can be executed in parallel, which implies there is one fifo for both execution units. I'd have thought that would make it tricker than a fifo for each pipeline, but the documentation is what you'd have to go on for a pure clone.
 
The manual is largely vague on the FIFO:
 
"The instruction is pre-decoded for pipeline control information"
 
"The MC68060 variable-length instruction system is internally decoded into a fixed-length representation and channeled into an instruction buffer.


 
There are 96 bytes for the FIFO. Someone claims it's 16 entries of 6 bytes each, but the longest instruction is 10 bytes and there is no way you're going to squeeze an MOVE $10000,$20000 instruction into 6 bytes. It's more likely to be 6 entries of 16 bytes or 4 entries of 24 bytes. I can't find anything that suggests that instructions are split into multiple "micro ops", like Intel does.
 
The 68060 cannot execute out of order and doesn't do anything complex like register renaming that Intel did on the Pentium pro. It really is the simplest design for dual issue that you can possibly do.
 
There is no reason why you have to 100% duplicate the functionality exactly. However if there is documentation available then it might make sense to do it the same as they probably spent a while designing it, so it's probably good.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 18, 2013, 08:28:09 PM
Quote from: freqmax;723099

Do you think it's feasable to create something that can get near 50 MHz 68060 in FPGA?


In an affordable fpga? Yes, but I think some different techniques would be better in an fpga than used on the 68060. It is probably easier to make a non-superscaler (more 68040 like) CPU that is clocked higher at first. It should be possible to achieve 100MHz+ in a sufficiently pipelined 68020+ processor. A Link stack, more code fusing/folding and new instructions could make up for some of the disadvantages of the fpga processor vs the 68060. You will probably not get to 68060@100MHz performance until fpga's get cheaper. A CPU, FPU and MMU in fpga will probably push the logic capacity of affordable fpga's also.

Quote from: freqmax;723099

So there is a a kind of selection process such that instructions that doesn't depend on sequent instructions could be done in parallel while the rest is single pipeline?


The selection process is described in the MC68060UM Section 10 "Instruction Execution Timing".

Quote from: freqmax;723099

Btw, Is there any ISA that is neater and more straightforward than m68k? ;)


Yes. There are simpler ISAs but most are less powerful. Motorola/Freescale have liked the simple clean ISAs favoring RISC since the 68k. The 88k is the 68k RISC replacement before being abandoned for PPC. It's a simple and clean classic RISC but a little weak compared to the 68k. The 96k DSP is an interesting RISC/CISC hybrid borrowing much from the 68k that is quite powerful and fairly clean but more difficult to use. The ColdFire was an attempt to simplify the 68k but in doing so made it inconsistent (more difficult to program but still relatively easy) and less powerful even though some late enhancements brought some of the power back. The MCORE is a 16 bit fixed length (very simple) RISC that was meant to compete with ARM. It competed in power efficiency but it has to be one of the weakest modern 32 bit processors I have ever seen. It looks straight forward to program but looks very tedious. Note that the PPC is not a Motorola/Freescale design. It is not very simple for a RISC (but fairly consistent), not easy to program and is very powerful.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 18, 2013, 08:29:51 PM
I suspect there is no documentation except the usual datasheet ;)

Perhaps someone could interview some of the original engineers?

What's a "Link stack" ..?

Have you looked at the Actel FPGAs?, they are way faster than any competitor last time I checked. Of course they are slightly more expensive.

As for ISA, my thinking were if the ISA of ARM, Transmeta, PDP-11, MIPS, Sparc, DEC Alpha, PA-RISC, etc is easier to deal with. Without sacrificing performance.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 18, 2013, 09:00:57 PM
Quote from: freqmax;723104
What's a "Link stack" ..?

It might be what the later coldfire has, which is an on chip stack which allows the target of an rts instruction to be predicted.
 
As well as writing to the a7 stack, the jsr stores the program counter in the on chip stack. When the rts instruction is fetched it assumes the next instruction is the value off the on chip stack. If when it executes the value is different then it flushes the pipeline.
 
At the moment the rts basically blocks the pipeline until it executes, which is why it's such a slow instruction.
 
It's only a four entry stack though and as I don't think it can support re-fetching lower return values, then it's probably not that great apart from simple subroutines being called from a loop.
 
An 060 MMU in an FPGA isn't going to take a huge amount of space. An FPU on the other hand probably will.
 
In the manual it says it transfers 16 bits for the opcode and 2 x 32 bit operands from the fifo, which is 10 bytes and sounds pretty much like the 68000 instruction set converted to fixed length. So it might be 8 instructions of 12 bytes each, with 2 bytes used for "pipeline control". For whatever this means in the manual: "The instruction is pre-decoded for pipeline control information"
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 18, 2013, 09:24:22 PM
Quote from: Mrs Beanbag;723101
I do such things like:

move.l myptr(PC),D0
beq .nullptr
move.l D0,A0

in the 2nd example could always use tst.l D0 anyway.


68000 style ;). Needs a scratch data register but it's usually available. TST.L An is not needed here but there are some places it's useful.

Quote from: Mrs Beanbag;723101

flags are set for free when moving to an address register. Also note the first line, I always write relocatable code.


Mind swap on the address register :). I let the assembler do the PC relative and the MOVE.L ,An -> MOVEA.L ,An even though I didn't for clarity in my examples.

Quote from: Mrs Beanbag;723101

In other news, I've been thinking about a RISC instruction set for internal use in a 68k core for some time. I think we can identify a few obvious simplifications:
1. tread An and Dn identically (use extra instructions if different behaviour is required)


That's nice for simplification but not good for code density. Are you looking at a fixed 16 bit or 32 bit RISC encoding?

Quote from: Mrs Beanbag;723101

2. only MOVE can use as either source or destination operand (load/store architecture)


Ok, but now you have to divide up CISC instructions into multiple RISC instructions. Your instruction stream just grew big time.

Quote from: Mrs Beanbag;723101

3. all other instructions register-register, or "quick" short-constant source operands

4. spare "temporary" registers for internal use.
we could map 68k instructions to short sequences of internal instructions, and design those instructions to give the shortest sequences.


http://en.wikipedia.org/wiki/Microcode

I have heard a rumor that as much as 1/3 of the 68060 is microcode. It's generally slower though. The 68060 bit field instructions are a good example. They can be done in 1-3 cycles (data in cache) on an fgga but they take 2x-3x that long on the 68060.


Quote from: psxphill;723102
Yeah, you can't execute in parallel if the first instruction modifies a register that the second uses: for example
 
MOVEQ #0,D0
TST.W D0


Actually, this may work in parallel. Some very simple instructions are retired early and the longword (only) result made available early. This is not specifically stated but the result is made available early from these types of instructions for change/use stalls and are probably also available early for the other OEP although it's not specifically stated. These early retirement instructions include:

   lea
   move.l #,Rn
   moveq
   clr.l Dn
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 18, 2013, 09:40:31 PM
Quote from: matthey;723118
Mind swap on the address register :).
Oops I meant data register.

Quote
That's nice for simplification but not good for code density. Are you looking at a fixed 16 bit or 32 bit RISC encoding?
Code density doesn't matter here as it would only used internally, external 68k code translated into internal code in some kind of buffer. Fixed length but the number of bits could be anything, it's not actually stored in the RAM so it doesn't even need to be 16 or 32.

Quote
I have heard a rumor that as much as 1/3 of the 68060 is microcode. It's generally slower though. The 68060 bit field instructions are a good example. They can be done in 1-3 cycles (data in cache) on an fgga but they take 2x-3x that long on the 68060.
I would rather optimise for 68000 instructions and provide the rest just for compatibility. How common are the bitfield instructions in real code? I never use them.

Of course see what fits on an FPGA first and maybe we can add more bits in later.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 18, 2013, 10:12:34 PM
Actually a default model could be to provide just a few instructions and have the rest as trapped instructions. That means one has something workable fast. Then one could make the architecture correct. And then add the full instruction set.

If one start with the instructions and then try to impose the correct architecture.. well it could be messy ;)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 18, 2013, 10:19:41 PM
Quote from: freqmax;723130
Actually a default model could be to provide just a few instructions and have the rest as trapped instructions. That means one has something workable fast. Then one could make the architecture correct. And then add the full instruction set.

If one start with the instructions and then try to impose the correct architecture.. well it could be messy ;)


That's a big part of why "they" moved away from hardwired control units in favor of microcoded control units. My own education thus far was about hardwired style, which is very dependent on the instruction set. I was hopin gto take the advanced followup course now, but it wasn't on the schedule. I'm trying to go through the Coursera one now, which is pretty advanced. Not sure if they explain microcoding or if that assumes you already know it. Going to try and find some time to read up on it more regardless.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 18, 2013, 10:21:28 PM
Quote from: freqmax;723104

What's a "Link stack" ..?


psxphill got it although the link stack can be different sizes. It should make RTS 2 cycles instead of 7 cycles on the 68060.

Quote from: freqmax;723104

Have you looked at the Actel FPGAs?, they are way faster than any competitor last time I checked. Of course they are slightly more expensive.


No. I have only heard. I haven't played around with any fpga's although I have looked at some VHDL code for a 68k CPU or 2 :).

Quote from: freqmax;723104

As for ISA, my thinking were if the ISA of ARM, Transmeta, PDP-11, MIPS, Sparc, DEC Alpha, PA-RISC, etc is easier to deal with. Without sacrificing performance.


I don't think that any RISC processors are going to be as easy as the 68k. ARM probably comes the closest and MIPS is also logical and usable in assembler from my limited exposure. They both look way easier than PPC despite PPC having as many instructions as many CISC processors. PPC is as bad about using acronyms as the U.S. military.

The PDP-11 should have been very easy to program, possibly easier than the 68k. The performance would be limited by the encodings but it would be interesting to see someone try to implement a modern version in fpga. The instructions are powerful but would probably require a lot of microcode above a RISC core. It's too bad that students will probably not be able to see how easy to program a processor can be. Even the 68k is all but dead.

Quote from: Mrs Beanbag;723123

I would rather optimise for 68000 instructions and provide the rest just for compatibility. How common are the bitfield instructions in real code? I never use them.


It varies. Most old code doesn't use them much but GCC started using them heavily from about GCC 3.x on, even when the timing for them was slower. It's often faster not to use them on the 68060 because it can do a shift and and in the same cycle. They are often worthwhile on the 68020-68040 and are good for code density and fairly intuitive. They have 32 bit results which is good for 32 bit register forwarding and make efficient use of registers. They are very useful for processing streams of data in memory (with caches) which the register memory architecture of the 68k can do well. The only draw back is a little bit more complexity than the average instruction. If they were fast, they would be used a lot more. Implementing them would help the performance of GCC where trapping them would slow these newer GCC compiled programs to a crawl. You get faster smaller programs with and slower bigger programs without. It's a not so tough choice for me.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 18, 2013, 11:26:40 PM
Quote from: matthey;723118
Actually, this may work in parallel. Some very simple instructions are retired early and the longword (only) result made available early. This is not specifically stated but the result is made available early from these types of instructions for change/use stalls and are probably also available early for the other OEP although it's not specifically stated. These early retirement instructions include:
 
lea
move.l #,Rn
moveq
clr.l Dn

The list is unclear, I'm assuming the first 4 are the primary and the last 2 are secondary.
 
"Certain instructions have been optimized to ensure no change/use stall occurs on
subsequent instructions. The destination register of the following instructions is available
for subsequent instructions:
lea
mov.l&imm,Rn
movq
clr.lDn,
any op(An)+
any op–(An)
as a base register for address calculation with no stall, or as an index register for
address calculation with no stall, if Xi.l*{1,4}. If the index register used is Xi.l*2, Xi.l*8,
or Xi.w, then the previously described 3 cycle stall occurs."

It doesn't have to retire it early, the second pipeline could look in the primary pipeline. Mips has a similar handling for lwl/lwr opcodes, it pulls the register value from the pipeline and stops the register being updated at all. The register doesn't actually get updated until you stop executing lwl/lwr opcodes.
 
This one is also vague:
 
"The MC68060 provides another change/use optimization for a commonly encountered
construct—when an address register is loaded from memory and then used in an operand
address calculation, the OEP experiences a one cycle stall.
 
mov.l,An
"
 
I guess they both enter the pipelines at the same time, the primary goes through ea fetch and then on the next clock the secondary goes through ea fetch. I'm assuming that the ea on the second register is literally ea and not adjusted by an immediate or register. It can't advance the pipelines, it must change the state it's in. The primary pipeline might be translated into a move.l immediate once the value is available, to make the short circuiting common.
 
Quote from: freqmax;723130
If one start with the instructions and then try to impose the correct architecture.. well it could be messy ;)

With any processor emulation, it's always worth starting small and bringing it up an instruction at a time until you know you're on the right track.
 
[/FONT][/SIZE][/FONT]
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 19, 2013, 12:04:34 AM
Quote from: psxphill;723136
The only thing I can find is this:
 
"If the primary OEP instruction is a simple “move long to register” (MOVE.L,Rx) and the destination register Rx is required as either the sOEP.A or sOEP.B input, the MC68060 bypasses the data as required and the test succeeds."

Which says it's only for move.l, although I guess the others could be translated. It doesn't have to retire it early, the second pipeline could look in the primary pipeline. Mips has a similar handling for lwl/lwr opcodes, it pulls the register value from the pipeline and stops the register being updated at all. The register doesn't actually get updated until you stop executing lwl/lwr opcodes.

There are at least 2 different optimizations here. One is the early instruction retirement and register forwarding. The other is more of a MOVE.L+OP.L optimization which is possible because MOVE.L is only half an operation in a register memory architecture that can do both in 1 operation. The Natami processor was planning to use instruction fusing/folding to handle most of these cases. The non-superscaler v4 ColdFire probably does too:

"Last, ColdFire v4 is smart about collapsing commonly used constructs into a single operation. If two instructions will execute in different stages and have no dependencies, they will execute together in a single cycle. This “instruction folding” is ColdFire’s first move toward superscalar dispatch."  -ColdFire Doubles Performance With v4 by Jim Turley

The M68060UM is less than clear about these optimizations, even if understanding how these types of optimizations commonly work. Editors usually make this stuff worse than what the engineers started with too. I can say I don't fully understand and I have better knowledge than most people and experience with coding the 68060. By looking at code compiled for the 68060, it looks like many compiler programmers didn't understand either. Most 68060 optimized code doesn't do much except replace some trapped instructions, if that.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 19, 2013, 01:16:57 AM
Quote from: billt;723131
That's a big part of why "they" moved away from hardwired control units in favor of microcoded control units. My own education thus far was about hardwired style, which is very dependent on the instruction set. I was hopin gto take the advanced followup course now, but it wasn't on the schedule. I'm trying to go through the Coursera one now, which is pretty advanced. Not sure if they explain microcoding or if that assumes you already know it. Going to try and find some time to read up on it more regardless.

Microcode adds more clock cycles per instruction. Or at minimum latency.
(which will then impede clock increases)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 19, 2013, 03:18:21 AM
Quote from: matthey;723091

I think you mean Bcc.L and BSR.L. Branches up to 16 bit were supported on the 68000. The longword branches are big savers but only on fairly large programs. Not too many assembler programmers create programs >65k.

It's signed so plus or minus ~32k.

I need to make some kind of rule not to write msgs after my beddy bye time :D

Either that or this is what happens when u don't write any asm code for 4 years... ur brainz turn 2 mush.

The thing is I used to spend many many many hours trying to optimize my code to replace all bcc.w with bcc.b so you would think I would remember that.  For some years (back in early 1990s) I was like Phil, all hardcore 030, 256 bytes of L1 instruction cache optimizing and I would code separate routines for 000.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 19, 2013, 03:21:41 AM
Quote from: matthey;723140
By looking at code compiled for the 68060, it looks like many compiler programmers didn't understand either. Most 68060 optimized code doesn't do much except replace some trapped instructions, if that.

Which compilers even have an 060 option?

I can't remember SASC even having such an option.   Or maybe it does and I just don't use it...
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 19, 2013, 04:02:36 AM
Quote from: Mrs Beanbag;723123
How common are the bitfield instructions in real code? I never use them.

Every time I ever wanted to use Bitfield instructions I would consult the timing charts and it was always faster to just do things the RISCy way and not use bitfield instructions.  So I have never used them.  I just use good ol' ANDing and ORing.

Phil published some results of bitfield usage years ago on Natami.net.  It turns out that bitfield instructions are used a surprisingly large amount in certain softwares.  Dungeon Master was one.  And various other games that were ported from other systems.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 19, 2013, 05:32:29 AM
Quote from: matthey;723140
There are at least 2 different optimizations here. One is the early instruction retirement and register forwarding. The other is more of a MOVE.L+OP.L optimization which is possible because MOVE.L is only half an operation in a register memory architecture that can do both in 1 operation.

Passing register results pass between pipelines is a pretty standard concept, what I don't get is if it's going to introduce a one cycle delay when running these two at the same time:
 
mov.l,An
"

Then why wouldn't you just run both operations sequentially on the primary pipeline?

Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: RobertB on January 19, 2013, 05:51:07 AM
Quote from: JimDrew;723031
I know some people are using OS2.04 on this device (well, at least they claim they are!)

Heh, that's what I asked our MCC-216 expert Matt B. the other night... if he could get OS 2.04 working on it.  :)

Truly,
Robert Bernardo
Fresno Commodore User Group
http://videocam.net.au/fcug
Southern California Commodore & Amiga Network
http://www.sccaners.org
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 19, 2013, 10:21:59 AM
Quote from: ChaosLord;723154
Which compilers even have an 060 option?


gcc version 3.3.3 has these options:
-m68000 -m68020 -m68020-40 -m68030 -m68040 -m68881 -mbitfield -mc68000 -mc68020 -mfpa -mnobitfield -mrtd -mshort -msoft-float

But perhaps SAS C has something more specific?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 19, 2013, 10:48:52 AM
Quote from: ChaosLord;723154
Which compilers even have an 060 option?


GCC, vbbc and SAS/C have 060 options. That should cover 90%+ of Amiga compiling.

Quote from: ChaosLord;723154

I can't remember SASC even having such an option.   Or maybe it does and I just don't use it...


Check your SCoptions. It's there or you are using an old version of SAS/C.

Quote from: ChaosLord;723156
Every time I ever wanted to use Bitfield instructions I would consult the timing charts and it was always faster to just do things the RISCy way and not use bitfield instructions.  So I have never used them.  I just use good ol' ANDing and ORing.


If you are looking at the 68060 timings then yes, they are slow compared to the shifting and logic instructions. BFFFO is an exception to keep in mind. It replaces a loop with the last iteration costing 7 cycles on fall through. If there was enough encoding space and a logical place to put them, I would have done a BFPOPCNT/BFCNTO and possibly a BFFind (find a binary sequence in a BF which could also be used as a BFCMP) for 68kF which would also replace loops/branches. These are a little bit more difficult to use by a compiler but good for specialized code like codecs and decompression. BFCHG, BFCLR, BFEXTS, BFEXTU, BFINS, BFSET and BFTST are simpler but very easy for a compiler. They would be a compiler writers dream come true if they were fast.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 19, 2013, 10:49:36 AM
Quote from: freqmax;723170
gcc version 3.3.3 has these options:
-m68000 -m68020 -m68020-40 -m68030 -m68040 -m68881 -mbitfield -mc68000 -mc68020 -mfpa -mnobitfield -mrtd -mshort -msoft-float
 
But perhaps SAS C has something more specific?

I'm pretty sure the latest SAS/C does, but it's not good. I found gcc 2.95 with -mc68000 was faster on the projects I tried.
 
Quote from: matthey;723172
BFCHG, BFCLR, BFEXTS, BFEXTU, BFINS, BFSET and BFTST are simpler but very easy for a compiler. They would be a compiler writers dream come true if they were fast.

Probably, but with so little code using them they wouldn't be my first choice for optimising.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 19, 2013, 10:59:37 AM
Quote from: psxphill;723173
I'm pretty sure the latest SAS/C does,


I would like to know what options SAS-C has ;)

Anyway I checked out gcc v4.2.1 (slightly unsure on version) which has the options:
-m68000  -m68020  -m68020-40   -m68020-60  -m68030
      -m68040 -m68060  -mcpu32  -m5200  -mcfv4e -m68881  -mbitfield
      -mc68000  -mc68020 -mnobitfield  -mrtd  -mshort  -msoft-float
      -mpcrel -malign-int   -mstrict-align   -msep-data  -mno-sep-data
      -mshared-library-id=n  -mid-shared-library  -mno-id-shared-library

-m68060
      This option inhibits the use of 68020 and 68881/68882 instructions
      that have to be emulated by software on the 68060.  Use this option
      if your 68060 does not have code to emulate those instructions.

As the 020, 030, 040 options doesn't mention the omission of any instructions. It seems the 060 is the only m68k CPU to have less instructions than it's predecessors.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 19, 2013, 11:21:26 AM
Quote from: freqmax;723174
As the 020, 030, 040 options doesn't mention the omission of any instructions. It seems the 060 is the only m68k CPU to have less instructions than it's predecessors.

The 040 has less FPU instructions, the 060 is the first to drop integer instructions.
 
"-m68040 Generate output for a 68040. This is the default when the compiler is configured for 68040-based systems. This option inhibits the use of 68881/68882 instructions that have to be emulated by software on the 68040. Use this option if your 68040 does not have code to emulate those instructions."
 
I don't know whether it's less:
 
"-m68020-40
Generate output for a 68040, without using any of the new instructions. This results in code which can run relatively efficiently on either a 68020/68881 or a 68030 or a 68040. The generated code does use the 68881 instructions that are emulated on the 68040.
-m68020-60Generate output for a 68060, without using any of the new instructions. This results in code which can run relatively efficiently on either a 68020/68881 or a 68030 or a 68040. The generated code does use the 68881 instructions that are emulated on the 68060. "
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 19, 2013, 11:27:27 AM
Quote from: freqmax;723174

As the 020, 030, 040 options doesn't mention the omission of any instructions. It seems the 060 is the only m68k CPU to have less instructions than it's predecessors.


If you are talking about integer instructions then yes. The 68040 FPU did remove from hardware most 68881/68882 instructions (which compilers were using and became very slow if used). Most of them are not used often and the 68040 FPU is enough faster than the 68881/68882 for common operations that no slow down will be noticed. The 68060 removed a few more seldom used 68040 FPU instructions but added back the commonly used FINT and FINTRZ. This was a smart move to correct a big mistake in removing them from the 68040 FPU.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: mongo on January 19, 2013, 03:35:05 PM
Quote from: psxphill;723175
The 040 has less FPU instructions, the 060 is the first to drop integer instructions.


The 030 dropped CALLM and RTM that were present in the 020.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 19, 2013, 05:06:18 PM
Why were these instructions dropped?

And would be more efficient performance wise to implement a 020, 030, or 040 and then horrendously overclock it?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 19, 2013, 06:16:01 PM
Quote from: freqmax;723203
Why were these instructions [CALLM & RTM] dropped?
More to the point, why were they ever included in the first place?

Personally I'd suggest a minimalist implementation (68000 + some 020 features) and see how fast we can get it, before adding anything else.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 19, 2013, 06:32:04 PM
Quote from: freqmax;723203
Why were these instructions dropped?
 
And would be more efficient performance wise to implement a 020, 030, or 040 and then horrendously overclock it?

Nobody used the instructions and they required support from the 68851 MMU. It made no sense to bloat the 68030 and it's MMU with them.
 
It depends on how you measure efficiency, but you'll hit the upper clock speed quickly.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 19, 2013, 06:58:36 PM
Quote from: freqmax;723203
Why were these instructions dropped?

CALLM and RTM were for calling subroutines (probably from the OS) but MacOS and Atari were trapping A-line instructions to supervisor mode OS calls. Traps are slow so the Amiga uses regular JSR (Jump to subroutine) instruction for OS calls and the OS is mostly in user mode (as libraries) like everything else. Supervisor violations do still trap to the OS on the Amiga. Having all of the OS in supervisor provides a little more security though. The 68020 was used for big Unix boxes and similar back then (before they dropped 68k for RISC) and CALLM was probably to cater to that market although I doubt they ever used it because of the additional overhead.

Oxypatcher, Cyberpatcher and Remus do not even bother patching CALLM/RTM because they are unused on the Amiga except for a very few programs that supposedly use them to detect a 68020 and count on this to trap if not a 68020. This is a poor assumption and so rare that it can be patched if necessary.

Quote from: freqmax;723203
And would be more efficient performance wise to implement a 020, 030, or 040 and then horrendously overclock it?

It doesn't really matter as the fpga implementation would be different than the real chip. The 68020+ ISA is practically the same between all of them except for the FPU and MMU. You certainly wouldn't want the limitations of the earlier 68020/68030 unless a cycle exact CPU was needed.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on January 19, 2013, 09:21:17 PM
talking, talking, talking... i see heiroglyph has backed off here, so maybe he is up to something. ;P
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on January 19, 2013, 11:44:25 PM
Regarding instruction set (ISA) I was thinking in general why they changed it. Because the end result is a slight confusion.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 20, 2013, 12:01:49 AM
Quote from: freqmax;723245
Regarding instruction set (ISA) I was thinking in general why they changed it. Because the end result is a slight confusion.


Which ISA change:

1) 68000-68020 (major change)

2) 68020->68030 removal of CALLM/RTM (very minor change)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline on January 20, 2013, 12:35:53 AM
I have been reading matthey's 68kF2 ISA proposal, and it reminded me how complex the 68k instruction encoding is, :)

I have included a link here for others to learn about Instruction encoding (in this case, nice simple MIPS):
http://www.cs.umd.edu/class/spring2003/cmsc311/Notes/Overall/instruction.html
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 20, 2013, 02:57:06 AM
Quote from: bloodline;723248
I have been reading matthey's 68kF2 ISA proposal, and it reminded me how complex the 68k instruction encoding is, :)

Complex? Take a look at a decoder for x86 :P. Yea, the 68k does need more logic in the decoder but the improved code density allows more instructions to be piped into the processor. Most RISC instructions use a consistent 32 bit fixed length encoding which is great for decoding. The 68k needs several separate decoding tables (lacking a better name) for different encoding areas. Some encoding holes are even divided into a separate table of instructions. This part of the 68k could have been a little better but it's not too much of a problem. The 68k does compress a lot of data with sign extended values which works very well and can be improved on. The overall slowdown from the decoder is minimal on the 68k and can be made up for with powerful instructions and addressing modes which it has and can be improved on. ARM with Thumb 2 works well because of the code density plus powerful instructions for RISC. This was a good tradeoff even though they now have a little more complex decoder. MIPS and PPC have also experimented with code compression (MIPS16E and CodePack respectively) but it never caught on or fit as well for them:

http://www.embedded.com/electronics-blogs/significant-bits/4024933/Code-compression-under-the-microscope
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Plaz on January 20, 2013, 05:42:24 AM
FYI - if referencing the TG68 VDHL code you'll need this link to the latest version 1.08.
http://tinyurl.com/LatestTG68
The "download" button on the project page has older version 1.0

Plaz
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline on January 20, 2013, 10:03:23 AM
Quote from: matthey;723256
Complex? Take a look at a decoder for x86 :P. Yea, the 68k does need more logic in the decoder but the improved code density allows more instructions to be piped into the processor. Most RISC instructions use a consistent 32 bit fixed length encoding which is great for decoding. The 68k needs several separate decoding tables (lacking a better name) for different encoding areas. Some encoding holes are even divided into a separate table of instructions. This part of the 68k could have been a little better but it's not too much of a problem. The 68k does compress a lot of data with sign extended values which works very well and can be improved on. The overall slowdown from the decoder is minimal on the 68k and can be made up for with powerful instructions and addressing modes which it has and can be improved on. ARM with Thumb 2 works well because of the code density plus powerful instructions for RISC. This was a good tradeoff even though they now have a little more complex decoder. MIPS and PPC have also experimented with code compression (MIPS16E and CodePack respectively) but it never caught on or fit as well for them:

http://www.embedded.com/electronics-blogs/significant-bits/4024933/Code-compression-under-the-microscope
I rather like Mrs Beanbag's idea of a nice simple RISC core tailored to executing instructions that have been decoded from 68k instructions, it could simplify the decode stage maybe :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 20, 2013, 12:07:49 PM
Quote from: bloodline;723285
I rather like Mrs Beanbag's idea of a nice simple RISC core tailored to executing instructions that have been decoded from 68k instructions, it could simplify the decode stage maybe :)

How could it simplify the decode stage? All it does is split one decode stage into two.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 20, 2013, 05:33:25 PM
Quote from: bloodline;723285
I rather like Mrs Beanbag's idea of a nice simple RISC core tailored to executing instructions that have been decoded from 68k instructions, it could simplify the decode stage maybe :)


psxphill has a point. Decoding and re-encoding into a completely different format adds complexity (the 68060 RISC is likely simpler and based on the CISC encoding). The 68k has EAs which are too long to be encoded into 16 bit RISC and some CISC instructions would have to decode into multiple RISC instructions which increases the data to be dealt with. RISC has a lot of simple instructions to handle while CISC has fewer complex instructions to handle. The extra logic in a CISC decoder is more than made up for by the reduced logic for caches and memories. This even applies to the worst case x86 decoders. There is a potential problem of a slowdown with poorly encoded CISC due to lack of parallel decoding. The instruction length needs to be simple to determine for parallel operations. The x86 has historically had a longer pipeline because this is not possible (and to increase processing power at the expense of good branch performance). The 68k is significantly better although the outer displacement of double memory indirect 68020+ addressing modes hurts decoding significantly as well as increasing the max instruction length (we don't even know how the 68060 deals with these very long encodings). There is not much advantage to them if the EA has to be calculated 2x which also makes execution more complex. I suggested trapping the double memory indirect modes with an outer displacement in the 68kF ISA. We need to see if the decoder is still the bottleneck after that. I'm guessing that it won't be in fpga because of the slow execution of 32 bit multiply and shift in the ALU.

The N68040 fpga pipeline looks like this:
1) Instruction Fetch
2) Decoder *
3) Register Fetch
4) EA Calculation *
5) DCache-Read
6) ALU Execution *
7) Write-Back

With 3 potential bottlenecks in fpga:
B1) Decoder (identifying the instruction length, to be able to fetch the next instruction)
B2) EA Calculation
B3) ALU Execution
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 20, 2013, 05:54:51 PM
Quote from: freqmax;723245
Regarding instruction set (ISA) I was thinking in general why they changed it. Because the end result is a slight confusion.


where was that? I seem to have missed it.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 20, 2013, 05:58:09 PM
Right, simplifying the decoding stage wasn't the idea so much. But if you can split a problem into two parts, it is usually easier to solve. I'm trying to make the developer's job easier really.

The advantages are that each part can be developed, tested and optimised separately, and indeed the RISC core could conceivably be useful on its own (and an assembler could be modified to compile 68k asm to run on it). It would be easier to add new instructions, much in the same way that microcode does, but the "microcode" in this case is more readily understandable, being 68k-like itself.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 20, 2013, 06:13:39 PM
Quote from: matthey;723339
(we don't even know how the 68060 deals with these very long encodings).

What do you mean? AFAIK the longest instruction is 10 bytes and that is what gets transferred from the FIFO in the decode stage.
 
Quote from: Mrs Beanbag;723343
Right, simplifying the decoding stage wasn't the idea so much. But if you can split a problem into two parts, it is usually easier to solve. I'm trying to make the developer's job easier really.

I think you'd either have to put up with it being slower, or making the rest of it much more complex to compensate. It's a juggling act.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 20, 2013, 06:34:12 PM
Quote from: Mrs Beanbag;723343
The advantages are that each part can be developed, tested and optimised separately, and indeed the RISC core could conceivably be useful on its own (and an assembler could be modified to compile 68k asm to run on it). It would be easier to add new instructions, much in the same way that microcode does, but the "microcode" in this case is more readily understandable, being 68k-like itself.

Hmm. Why not just use JIT in UAE then? The 68k code does make a nice compressed cross platform intermediate language (it's much better than Android or Java byte code). If the time is taken to optimize the RISC JIT emulation, then it will probably perform almost as well as native RISC code that is not optimized. Optimizing compilers for RISC were supposed to give it the advantage but that failed. I remember reading 15 years ago how the PPC processors of the future would have compilers to add all necessary cache hints, align all data, schedule all instructions properly and optimize most branches. Funny thing is, a PPC assembly language programmer can still beat PPC compiled code in most cases. The not so funny thing is, most computer scientists and engineers stay with this same failed philosophy :(.

Quote from: psxphill;723345
What do you mean? AFAIK the longest instruction is 10 bytes and that is what gets transferred from the FIFO in the decode stage.

   move.l ([xxx.L,a0],xxx.L),([xxx.L,a1],xxx.L])  ;move.l , 2x double memory indirect

1 word for move.l
2x1 word for full extension word
2x2 words for inner longword displacement
2x2 words for outer longword displacement
----
11 words total = 22 bytes

The 68kF ISA would do away with the outer displacement option which reduces the maximum instruction length to 7 words or 14 bytes. Do you see any mistakes?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 20, 2013, 06:41:21 PM
I don't think so... the Dn,Dn instructions are fairly trivial to translate, ,Dn and Dn, instructions need to wrap an instruction with a load and/or a store, I don't think that would be hard. I think it would be simple to get something to work (minus the nastier addressing modes mentioned above), maybe difficult to properly master to get the most out of it. It's perhaps a bit like Arm + Thumb, which seems to work well enough.

I'm thinking of using 32 bit instruction words, which encode either a single move/lea operation, or a pair of register-only operations that can run in parallel. I call this "explicit superscalar". To give you an idea of how that might work, for example an "exg D0,D1" operation can be synthesised as

move.l D0,D1 ; move.l D1,D0

So kind of like VLIW but not "very long". Finding operations to pair would be the job of the instruction translator, that part might be tricky but the RISC core itself would be simple.

One could also do other tricks, like if you have

add D0,D1
move D1,D2

usually this would have to take (at least) two cycles, but one could use a right-hand side instruction that simply writes the result of the left instruction elsewhere, like this:

add D0,D1; write D2

The other thing that occurs to me is you could translate the code into the cache upon reading, so that it would function as a JIT.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 20, 2013, 06:54:15 PM
Quote from: matthey;723348
Hmm. Why not just use JIT in UAE then? The 68k code does make a nice compressed cross platform intermediate language
I guess that's not too far from my idea, now I think about it, but with a CPU core specifically designed to emulate 68k. Sort of a hardware emulator, I guess.

I don't like such things as out-of-order execution, I can't see how it can save you very much compared to optimising the code properly, at least for the massive amount of extra logic required. My favourite CPU is still the UltraSparc T1.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 20, 2013, 06:57:40 PM
Quote from: matthey;723348
Do you see any mistakes?

Whats the encoding for the move.l with that addressing mode? I can't see anything that matches that in the 68020 user manual.
 
Quote from: Mrs Beanbag;723353
I guess that's not too far from my idea, now I think about it, but with a CPU core specifically designed to emulate 68k. Sort of a hardware emulator, I guess.

If a 1 cycle 68060 instruction translates to 2 of your instructions, then you'd have to clock at double the speed to achieve the same throughput. So each of those would have to be a 1:1 mapping or you've already failed.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 20, 2013, 07:59:23 PM
Quote from: psxphill;723354
If a 1 cycle 68060 instruction translates to 2 of your instructions, then you'd have to clock at double the speed to achieve the same throughput. So each of those would have to be a 1:1 mapping or you've already failed.
I've got the instruction execution timings in front of me here. Instructions with indirect addressing modes or immediate data can take longer than 1 cycle on 68060. Move (An),(An) for instance takes two cycles. All the Register-Register instructions take 1 cycle. These could be mapped 1:1, or better. So the answer is it probably depends on the program. But it might be possible to process some combinations of two 32 bit instructions simultaneously as well. (Add some degree of implicit superscalar operation, probably move ,Dn with ALU Dn,Dn operations, with some pipeline trickery.) Also how well the cache performs will have a lot to do with it.

If I don't beat a 68060 clock for clock on my first attempt, I won't be too disheartened, anyway. If I can beat a 68040 it would be a nice start.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 20, 2013, 10:49:59 PM
Quote from: psxphill;723354
Whats the encoding for the move.l with that addressing mode? I can't see anything that matches that in the 68020 user manual.


   move.l ([$12345678,a0],$12345678),([$12345678,a1],$12345678)

The hexadecimal encoding for above is:

23b0 0173 1234 5678 1234 5678 0173 1234 5678 1234 5678

We can see the flaw of the 68k here. Both of the full extension format words would be better at the start followed by their data like this:

23b0 xxxx xxxx 1234 5678 1234 5678 1234 5678 1234 5678

As is, we may have to examine up to 16 bytes to determine the instruction length. If we remove the outer displacement, the max instruction length would be:

23b0 xxxx 1234 5678 xxxx 1234 5678

We need to examine 10 bytes to find the instruction length now. The maximum instruction length would become 14 bytes which is fewer than the x86 15 byte maximum instruction length ;).
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 20, 2013, 11:32:34 PM
Quote from: matthey;723370
move.l ([$12345678,a0],$12345678),([$12345678,a1],$12345678)
 
The hexadecimal encoding for above is:
 
23b0 0173 1234 5678 1234 5678 0173 1234 5678 1234 5678
 

Hmm, for me that disassembles as:
 
001000: 23B0 0173 1234 5678 0173 1234 5678                  move.l  ([$12345678,A0],$1234), ($78,A1,D5.w*8)
00100E: 1234 5678                                           move.b  ($78,A4,D5.w*8), D1
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 21, 2013, 12:20:02 AM
Quote from: psxphill;723376
Hmm, for me that disassembles as:
 
001000: 23B0 0173 1234 5678 0173 1234 5678                  move.l  ([$12345678,A0],$1234), ($78,A1,D5.w*8)
00100E: 1234 5678                                           move.b  ($78,A4,D5.w*8), D1

It's not uncommon to see bugs in assemblers, disassemblers and debuggers using these advanced and seldom used addressing modes. I used vasm typing in:

Code: [Select]
  MC68060

   move.l ([$12345678,a0],$12345678),([$12345678,a1],$12345678)
   rts

I assembled it from test.asm to test. It disassembled just as I typed it with my modified version of ADis from here:

http://www.heywheel.com/matthey/Amiga/ADis.lha

Disassembling with:

ADis -m6 -a test

The old version of ADis would have had problems. IRA 2.04 fails to disassemble the destination correctly. D68k v2.0.8 is very close but oddly gets the address register in the destination wrong.

BDebug from the Barfly package gets it right. CPR from SAS/C gets it right (although doesn't display the $ for hex numbers on instructions).

I thought you might have been using D68k at first but apparently not. What disassembler did you use?

Edit:
I also found this excellent article about decoding the x86 to RISC:

http://abinstein.blogspot.com/2007/05/decoding-x86-from-p6-to-core-2-and.html

If x86 can do it, we can do it better and easier without a longer pipeline hurting branch performance ;).
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 21, 2013, 05:54:12 AM
For those saying that Altera is the better fpga for this task, what exactly makes it better, and what are you comparing it to on the Xilinx side?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: mikej on January 21, 2013, 09:47:01 AM
Quote from: billt;723394
For those saying that Altera is the better fpga for this task, what exactly makes it better, and what are you comparing it to on the Xilinx side?


Altera and Xilinx devices made on the same process are roughly the same in terms of delay and logic size. The IP available, hardmacs and IO capabilities do differentiate them for some applications. For what we are doing here there is not much in it, it's down to logic area per $.
Even in the Spartan3 I believe I can get the software CPU to 100MHz+.

/MikeJ
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 21, 2013, 10:32:49 AM
Quote from: matthey;723378
It's not uncommon to see bugs in assemblers, disassemblers and debuggers using these advanced and seldom used addressing modes. I used vasm typing in:
 
Code: [Select]
  MC68060
 
   move.l ([$12345678,a0],$12345678),([$12345678,a1],$12345678)
   rts

I assembled it from test.asm to test. It disassembled just as I typed it with my modified version of ADis from here:
 
http://www.heywheel.com/matthey/Amiga/ADis.lha
 
Disassembling with:
 
ADis -m6 -a test
 
The old version of ADis would have had problems. IRA 2.04 fails to disassemble the destination correctly. D68k v2.0.8 is very close but oddly gets the address register in the destination wrong.
 
BDebug from the Barfly package gets it right. CPR from SAS/C gets it right (although doesn't display the $ for hex numbers on instructions).
 
I thought you might have been using D68k at first but apparently not. What disassembler did you use?

I used mame (arcade game emulator), typed the hex into memory and then disassembled and executed it. It's not just the disassembler, the emulation consumed the same number of bytes. So that needs looking at, can you post the exe you assembled?
 
There is mention in the manual about some instructions being split over two pipelines, it might do that by splitting it into two FIFO entries. With the result of the ea fetch from the primary pipeline getting forwarded to the secondary pipeline so it can get stored.
 
Have you tried running this encoding on a real 68060?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: mrgreedy98 on January 21, 2013, 12:11:48 PM
I did not read all the comments but would using a fcpga/clpd in conjunction with a coldfire cpu and a paralell bus off from the fcpga/clpd not do the job ?

The coldfire chipset does not have all the cpu instructions of the 68k it could be emulated just those instructions in the fcpga/clpd and off load known/ simular instructions to the cold fire nativly.
there is the issue with the fpu 64 vrs 40 i think, address lengths and some of the data format entry and adressing modes not to mention the purged instructions.

The modern cold fire chipsets have 75-90% of the original 68k chipset instructions any way last time I looked.

freescale are pushing the arm archeture and have semi dumped coldfire also of note the Altera Cyclone-III FPGA's have a coldfire core engine simplifying clpd design half the work is already done you just need to apply for liscence to use it and it is free?

some one with some skills could jump on this if they so desired an fcpga engine could be done.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 21, 2013, 01:15:28 PM
Bare in mind that these complex, base displacement addressing modes do not exist on 68000, only from 68020 onwards.

@mrgreedy98: as has been pointed out already, ColdFire core can be licensed and used, but it cannot be modified because it is encrypted (and no doubt obfuscated as well, I know Xilinx obfuscate their cores before encrypting them). Without modification, ColdFire is not much use, sadly. I have investigated this. The differences might be subtle but that doesn't make them easy to work around.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline on January 21, 2013, 01:33:23 PM
Quick question, sorry if it has already been asked/answered... Has anyone profiled Amiga programmes in general to find out common case? What instructions are really popular? ;)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 21, 2013, 01:56:55 PM
There is this information from the Megadrive:
http://emu-docs.org/CPU%2068k/68kstat.txt (http://emu-docs.org/CPU%2068k/68kstat.txt)

although it might be more instructive to see which are the most common addressing modes for these instructions, too.
For instance, rate of "add Dx,Dy" vs "add (Ax),Dy" and "add Dx,(Ay)".
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline on January 21, 2013, 02:50:59 PM
Quote from: Mrs Beanbag;723423
There is this information from the Megadrive:
http://emu-docs.org/CPU%2068k/68kstat.txt (http://emu-docs.org/CPU%2068k/68kstat.txt)

although it might be more instructive to see which are the most common addressing modes for these instructions, too.
For instance, rate of "add Dx,Dy" vs "add (Ax),Dy" and "add Dx,(Ay)".
Brilliant!! I kinda figured the branch, move and compare instructions would be the more popular :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 21, 2013, 03:19:35 PM
Quote from: psxphill;723410
I used mame (arcade game emulator), typed the hex into memory and then disassembled and executed it. It's not just the disassembler, the emulation consumed the same number of bytes. So that needs looking at, can you post the exe you assembled?

http://www.heywheel.com/matthey/Amiga/test68020

Are you involved with developing or testing mame?

Quote from: psxphill;723410
There is mention in the manual about some instructions being split over two pipelines, it might do that by splitting it into two FIFO entries. With the result of the ea fetch from the primary pipeline getting forwarded to the secondary pipeline so it can get stored.

Right. The OEPs are locked together and each OEP performs 1/2 of the ea for a move ,. This is the only 68k instruction that allows 2 EAs by the way.

Quote from: psxphill;723410

Have you tried running this encoding on a real 68060?

It's not safe as it writes memory but I have never had a problem with double memory indirect modes before. Some compiler versions of GCC and SAS/C will use them. ThoR's 68060.library uses them because they save saving and reloading a register on the stack for short functions. They do need to be at least trapped in an fpga 68020+ CPU or compatibility will not be good.

Quote from: bloodline;723432
Brilliant!! I kinda figured the branch, move and compare instructions would be the more popular :)

I hope MOVE is a popular instruction as it takes almost 1/4 (actually 3/16 but who's counting) of the 68k encoding space :).
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 21, 2013, 03:22:59 PM
So keeping the pipeline relatively short is probably a more effective strategy than making sure all instructions are single cycle. We can afford a few 2-cycle instructions if we can shorten the pipeline by at least one stage, I reckon.

Also I have been thinking of a way to make the instruction translation do branch predication in the case a conditional branch skips only a few instructions.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 21, 2013, 03:58:23 PM
Actually something just occurred to me. If the most common instruction is "tst", it should be possible to know whether a branch will be taken or not some time in advance. Because "tst" only looks at a single register, the contents of that register must have been determined some time before. So you could look ahead in the instruction queue for a "tst/bcc", and inform the branch predictor well in advance. "tst" instruction then takes effectively NO cycles.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 21, 2013, 03:59:26 PM
Quote from: matthey;723433
http://www.heywheel.com/matthey/Amiga/test68020 (http://www.heywheel.com/matthey/Amiga/test68020)
 
Are you involved with developing or testing mame?

Developing mainly, although I've not had much to do with the 680x0 side.
 
Quote from: matthey;723433
Right. The OEPs are locked together and each OEP performs 1/2 of the ea for a move ,.

The OEPS are always locked together, the manual hints at how move , works:
 
"pOEP-until-last Many of the non-standard instructions represent a combination of
multiple “standard” operations. As an example, consider the
memory-to-memory MOVE instruction. This instruction is decomposed
into two standard operations: first, a standard read cycle followed by a
standard write cycle. This class allows a standard single-cycle
instruction to be dispatched from the sOEP during the last cycle of its
pOEP execution."
 
It seems to say that two entries are written to the FIFO and the second entry in the FIFO sits waiting until the primary is about to finish before despatching to the secondary. Although I'd have thought it would despatch earlier so it could calculate the EA.
 
Quote from: Mrs Beanbag;723435
Actually something just occurred to me. If the most common instruction is "tst", it should be possible to know whether a branch will be taken or not some time in advance. Because "tst" only looks at a single register, the contents of that register must have been determined some time before. So you could look ahead in the instruction queue for a "tst/bcc", and inform the branch predictor well in advance. "tst" instruction then takes effectively NO cycles.

Apart from the cycles it takes to look ahead in the instruction stream every time you hit a tst instruction, and it will get complex to even follow the code as you would have to follow branches as well. Basically to avoid the cycles when a branch happens, you'll end up going through the same overhead as running the code after every tst instruction (tst isn't the only instruction that affects branches).
 
It also won't help a branch directly after a branch because it will already have started progressing through the pipeline.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 21, 2013, 04:50:21 PM
Quote from: matthey;723433
Right. The OEPs are locked together and each OEP performs 1/2 of the ea for a move ,. This is the only 68k instruction that allows 2 EAs by the way.
Not strictly true. Can also do "cmp (Ax)+,(Ay)+"

addx, subx, abcd and sbcd can use predecrement for both operands.

All of these are two cycle instructions.

Quote from: psxphill;723436
Apart from the cycles it takes to look ahead in  the instruction stream every time you hit a tst instruction, and it will  get complex to even follow the code as you would have to follow  branches as well. Basically to avoid the cycles when a branch happens,  you'll end up going through the same overhead as running the code after  every tst instruction (tst isn't the only instruction that affects  branches).
Instructions are read into a buffer ahead of time, so can detect a tst/bcc when it is first read in. I wouldn't bother following branches, to be able to predict only the next branch would still help. Yes it would only work if the branch follows a tst, but if the profiles from the Megadrive are anything to go by, that is the most common case. Basic RISC principle, "make the common case fast"!
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 21, 2013, 05:33:03 PM
Quote from: Mrs Beanbag;723434
Also I have been thinking of a way to make the instruction translation do branch predication in the case a conditional branch skips only a few instructions.

Be careful with the predication on the 68k. It might be possible to get it to work as 1 conditional instruction sometimes. It doesn't work well with multiple instructuctions, multicycle instructions or addressing modes that update the base register like (An)+ and -(An). The data to be predicated ends up having to be examined for suitability. IMO, this would only be worthwhile with very common code. Image handling this:

Code: [Select]
  beq skip
   movem.l d0-d7/a0-a6,-(sp)
skip:
   move.l d0,-(sp)

The N68k fpga CPU is supposedly conditional 3 op internally making predication easier. There were enough problems on the 68k that we decided adding SBcc and SELcc were easier. Even this takes some logic but the 68k already has Scc which is handled much the same way.

Quote from: Mrs Beanbag;723435
Actually something just occurred to me. If the most common instruction is "tst", it should be possible to know whether a branch will be taken or not some time in advance. Because "tst" only looks at a single register, the contents of that register must have been determined some time before. So you could look ahead in the instruction queue for a "tst/bcc", and inform the branch predictor well in advance. "tst" instruction then takes effectively NO cycles.

The 68000 (16 bit) code in a console is going to be very different from 68060 optimized code for a dynamic OS today. I very much doubt TST is going to be number 1 any more. I expect MOVE to be #1. MOVE sets the condition codes so a TST should not be needed too often with optimized code. Folding a TST, CMP, or SUB/SUBQ with a branch is something the 68060 does to help achieve 0 cycle branch prediction although I don't know which specifically it does. TST has a higher likely hood of testing a register that has not been modified for a time than MOVE which sets the cc. Many processors do try to determine the branch rather than predict it. The PPC is especially good at this. It also provides several cc's that can be selectively set and branched on later. Most PPC processors have a fairly short pipeline too so branching on a condition set 3 or 4 instructions ago or testing and immediately branching on an instructions that hasn't changed recently may be enough to determine the branch without prediction. It probably helps, especially if the compilers can generate good code, but it obviously hasn't helped PPC destroy x86 like was predicted 20 years ago ;).

Quote from: Mrs Beanbag;723441
Not strictly true. Can also do "cmp (Ax)+,(Ay)+"

addx, subx, abcd and sbcd can use predecrement for both operands.

All of these are two cycle instructions.

Yes, they are more complex on the 68060 but no they don't use 2 EAs. They are special cases that do not calculate even 1 EA. The plus of (An)+ is added after the EA is used and is not part of the calculation.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord on January 21, 2013, 06:17:16 PM
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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 21, 2013, 07:38:03 PM
Quote from: Mrs Beanbag;723441
Instructions are read into a buffer ahead of time, so can detect a tst/bcc when it is first read in. I wouldn't bother following branches, to be able to predict only the next branch would still help. Yes it would only work if the branch follows a tst, but if the profiles from the Megadrive are anything to go by, that is the most common case. Basic RISC principle, "make the common case fast"!

The basic risc principle is keep instructions simple so that you can use the spare space for large register sets and caches.
 
It wouldn't help at all when the branch follows the test, because you're going to have to flush all the following instructions from the pipeline. If you're going to remove the pipeline completely or a significant number of stages then you'll have a huge number of instructions taking multiple cycles and the overhead of incorrectly predicted branches is going to be so insignificant that it won't be worth doing.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 21, 2013, 07:53:28 PM
Quote from: psxphill;723460
It wouldn't help at all when the branch follows the test, because you're going to have to flush all the following instructions from the pipeline. If you're going to remove the pipeline completely or a significant number of stages then you'll have a huge number of instructions taking multiple cycles and the overhead of incorrectly predicted branches is going to be so insignificant that it won't be worth doing.
The following instructions wouldn't be in the pipeline yet, at the point you make the prediction, that's the whole point, to avoid having to flush the pipeline when you get to the branch.

I honestly don't know what you mean here. When you say "when the branch follows the test", when would the branch ever not follow the test? There wouldn't be much point doing a test and then not having a conditional branch after it.

I wonder if you understood my idea properly, so I'll try explaining it again. The instruction stream is read into a FIFO (which I believe is a fairly normal thing to do) and as soon as a test followed by a branch is read in, it can do the test immediately (which is a very simple operation) and predict the branch based on that. So as long as the register doesn't change by the time the branch instruction comes out of the other end of the FIFO the branch will have been predicted correctly.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on January 21, 2013, 08:30:08 PM
Quote from: Mrs Beanbag;723463
The following instructions wouldn't be in the pipeline yet, at the point you make the prediction, that's the whole point, to avoid having to flush the pipeline when you get to the branch.


What exactly happens when you have to flush? I imagine it being a mux at the opcode register at each stage of the pipeline, and if that stage gets flushed then flip the mux to bring in a nop rather than the opcode from the previous stage on the next clock edge. Then as this now-a-NOP propogates down the pipeline, whatever other things are on other stage control regs such as register file addresses, ALU input selects, bypass opportunities, etc. just get ignored. I don't think the flush really needs to be particularly time consuming. yea, those NOPs need to propogate out, but that's really more an observation of new instructions propogating in, and that's going to happen either way.

Or are there better ways of doing this?

Quote
I wonder if you understood my idea properly, so I'll try explaining it again. The instruction stream is read into a FIFO (which I believe is a fairly normal thing to do) and as soon as a test followed by a branch is read in, it can do the test immediately (which is a very simple operation) and predict the branch based on that. So as long as the register doesn't change by the time the branch instruction comes out of the other end of the FIFO the branch will have been predicted correctly.


The test may not always be able to be done immediately. Might it not depend on the writeback of an instruction ahead of it but still in the pipeline and not yet finished? You may not yet have the right thing there to test just yet. Such as decrementing a loop counter might be right ahead of the test for 0...
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on January 21, 2013, 08:48:14 PM
Quote from: billt;723471
The test may not always be able to be done immediately. Might it not depend on the writeback of an instruction ahead of it but still in the pipeline and not yet finished? You may not yet have the right thing there to test just yet. Such as decrementing a loop counter might be right ahead of the test for 0...
Yes it would be a prediction, the prediction isn't always necessarily right, but as long as it's right more than 50% of the time it will help.

In the case of a loop, even if the decrement is right before the branch, the prediction will be right up until the very last iteration.

It would also be possible, in many cases, for a coder or compiler to optimise for it by re-ordering the instructions.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: matthey on January 21, 2013, 10:10:56 PM
Quote from: Mrs Beanbag;723472
Yes it would be a prediction, the prediction isn't always necessarily right, but as long as it's right more than 50% of the time it will help.


Not necessarily. The default BTFN (backward taken forward not taken) logic is ~65% correct and doesn't slow down loops with miss predictions. The 68060 2 bit saturation prediction is good for ~90% prediction accuracy. The x86 can have branch prediction up to 95% accurate and can even predict patterns, but the logic needed is large and the prediction is a little slower which is bad for tight loops (some have other optimizations for tight loops).
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on January 21, 2013, 11:21:14 PM
Quote from: Mrs Beanbag;723463
and as soon as a test followed by a branch is read in, it can do the test immediately (which is a very simple operation) and predict the branch based on that. So as long as the register doesn't change by the time the branch instruction comes out of the other end of the FIFO the branch will have been predicted correctly.

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. You can't change the order of memory accesses, you'll have to wait until any instructions that access memory have been run.
 
You also can't run the EA Fetch for an instruction after a branch in the pipeline, until you've resolved whether it's going to branch or not. I am assuming the 68060 pipeline length enforces that, I haven't checked it out too carefully.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag on 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord 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. :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline 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 :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: mikej 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
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline 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 ;)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: bloodline 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 :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: AJCopland 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Hattig 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: FrenchShark 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
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: FrenchShark 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: ChaosLord 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. :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: jkonstan 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
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: FrenchShark 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
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: FrenchShark 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
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: freqmax on March 17, 2013, 11:05:53 PM
Why is big endian resource hungry?

(perhaps why Intel x86 is little endian)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: jkonstan 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
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: FrenchShark 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
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Mrs Beanbag 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt 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
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill 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 (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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: FrenchShark 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 (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
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph 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...
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon 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?
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt 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.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: psxphill on March 19, 2013, 11:30:55 PM
Quote from: FrenchShark;729721
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 ?

Little endian is no more natural for a computer as big endian. The only difference in hardware is how you calculate the strobes and shifts. 32 bit values on a 32 bit bus are the same whether it's big endian or little endian, it's only when you access bytes or words that anything changes.
 
xor'ing addresses with 3 for bytes and 2 for words just affects how the host CPU generates the strobes and shifts, as most CPUs use byte addresses for everything.
 
In hardware then you will always have to calculate the strobes and shifts from the low bits of the byte addresses and whether you calculate them for big endian or little endian makes no difference in terms of complexity. If you're doing anything extra for big endian then you're doing it wrong.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Karlos on March 19, 2013, 11:47:25 PM
Quote from: psxphill;729774
Little endian is no more natural for a computer as big endian. The only difference in hardware is how you calculate the strobes and shifts. 32 bit values on a 32 bit bus are the same whether it's big endian or little endian, it's only when you access bytes or words that anything changes.


I dunno, when you stop to think about it, most big-endian processors that support different size operations on register operands tend to do so as if they were little endian. For example, .b and .w operations on 68000 registers always affect the least significant byte and and 16-bit words respectively. Similarly the PowerPC performs byte and halfword operations on the least significant portion of the register. However, when it comes to memory operands (where supported), suddenly it's a different matter.

Conversely, little-endian processors like x86 tend to be consistent in that accessing a byte at a particular address modifies the least significant byte of any wider type considered to exist at that same address, as if that address were just another register.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: FrenchShark on March 20, 2013, 06:38:32 AM
Quote from: psxphill;729774
Little endian is no more natural for a computer as big endian. The only difference in hardware is how you calculate the strobes and shifts. 32 bit values on a 32 bit bus are the same whether it's big endian or little endian, it's only when you access bytes or words that anything changes.
 
xor'ing addresses with 3 for bytes and 2 for words just affects how the host CPU generates the strobes and shifts, as most CPUs use byte addresses for everything.
 
In hardware then you will always have to calculate the strobes and shifts from the low bits of the byte addresses and whether you calculate them for big endian or little endian makes no difference in terms of complexity. If you're doing anything extra for big endian then you're doing it wrong.

OK, let's take an example : ADDI.L #$12345678,D0 on a 68000 CPU (16-bit bus).
You need to completely load immediate value $12345678 from memory before you can actually add it to D0.
This won't happen on a little endian CPU because you have the data in the correct order for the carry propagation.

Voila,

Frederic
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: Heiroglyph on March 20, 2013, 02:25:11 PM
There are cases to be made for either one, that's why both exist.

Earlier Someone brought up voltage tolerance and also fitting 040 boards (or I read it on one of Bill's sites)

Aren't all CPU cards taking advantage of the 060's 5v tolerance?  Since you'll need 5v tolerance anyway and many 060 boards use the 040 bus protocol option, making it fit 040 boards seems like a no-brainer.  With RAM on the FPGA board 3640's could actually be useful.

Also, if there is a stash of thousands of 060's out there (probably 10x more CPU's than users left), why not make a new CPU card with modern components and just go overkill on the FPGA used?

Then you can tinker with the soft core to your hearts content and still get some use out of your dev board.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: smerf on March 20, 2013, 03:03:33 PM
Quote from: billt;721600
You're right! My OS4 laptop is way more charming than any of my pc laptops or my iBook is. I'm really happy i can go to dinner with that instead of the others...


Hi,

What speed is your laptop, and who makes it?  (stupid question probably Apple)

smerf
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: smerf on March 20, 2013, 03:06:49 PM
Quote from: Karlos;729777
I dunno, when you stop to think about it, most big-endian processors that support different size operations on register operands tend to do so as if they were little endian. For example, .b and .w operations on 68000 registers always affect the least significant byte and and 16-bit words respectively. Similarly the PowerPC performs byte and halfword operations on the least significant portion of the register. However, when it comes to memory operands (where supported), suddenly it's a different matter.

Conversely, little-endian processors like x86 tend to be consistent in that accessing a byte at a particular address modifies the least significant byte of any wider type considered to exist at that same address, as if that address were just another register.


Hi,

@Karlos,

and when my dog bytes me, I scream besides that I say my dog just bit me, but it is ok we were just playing a game.

smerf
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on March 20, 2013, 08:42:31 PM
Quote from: billt;729755
it seems odd that such a large pile of them are sitting around somewhere when people are having such a terrible time getting them.

Ummm... I don't see that they are even remotely rare.  I found 15 different sources with varying amounts located in Malaysia, Taiwan, and mainland China.

As long as the part works, I would not care if they were knock-offs... but they would definitely have to pass a test rig setup and function well beyond the 50MHz rating.  I was told that these are all genuine parts, with the one supplier a bit desperate to unload all of them.  By the way, the going rate for all of the suppliers I found is about $50 per CPU.  I am not sure how that compares to the normal pricing.  I just so happened to ask one of my part suppliers in China for the latest micro pricing, and the 68060 appeared on the list.  I was kind of shocked to see that, so then I sent an inquiry to a bunch of chip wholesalers about the 68060.  There are a lot of them out their folks!
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: yakumo9275 on March 20, 2013, 08:54:39 PM
the 060s are not hard to find, they are just not the last mask revision that everyone wants.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: billt on March 20, 2013, 09:25:57 PM
Quote from: smerf;729825
Hi,

What speed is your laptop, and who makes it?  (stupid question probably Apple)

smerf

Dell Latitude e6530 i7-3720QM @ 2.60 GHz + 8GB ram and Nvidia NVS-5200M graphics is my own. It's for school (master degree in electrical/computer engineering stuff), as well as my personal cad station for Eagle, Kicad, Xilinx, Altera, etc. for projects like this topic. I'd be interested in AROS in a VM or in a Wubi-alike install on this thing too, but haven' thad time to investigate yet.

Lenovo Thinkpad T530 i5-3320M @ 2.60GHz + 8GB RAM + NVS5400M graphics is my work-supplied one. ASIC EDA terminal into the cloud.

iBook 14inch G4 @ 1.42GHz + 1.5GB ram is not really used, I'm hoping for MOS support at some point. Needs new backlight or LCD panel. The LCD is displaying the picture, but it's completely dark so I can't actually see it. Works great on an external monitor.

And, finally, my most charming of all, the OS4 laptop is, well, unfortunately, nothing more than a bit of sarcasm at the time of my post there. :( Should the mythical netbook or anything bigger/faster ever materialize, I'll buy one.

Anyway, back to topic...
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: wawrzon on March 20, 2013, 10:35:56 PM
Quote from: JimDrew;729856
I was told that these are all genuine parts, with the one supplier a bit desperate to unload all of them.  By the way, the going rate for all of the suppliers I found is about $50 per CPU.
i think this is about the price i paid for a rev 6 here in germany few years ago. might be mistaken though. anyway sounds reasonable.
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: mikej on March 20, 2013, 11:10:14 PM
Quote from: JimDrew;729856
Ummm... I don't see that they are even remotely rare.  I found 15 different sources with varying amounts located in Malaysia, Taiwan, and mainland China.

As long as the part works, I would not care if they were knock-offs... but they would definitely have to pass a test rig setup and function well beyond the 50MHz rating.  I was told that these are all genuine parts, with the one supplier a bit desperate to unload all of them.  By the way, the going rate for all of the suppliers I found is about $50 per CPU.  I am not sure how that compares to the normal pricing.  I just so happened to ask one of my part suppliers in China for the latest micro pricing, and the 68060 appeared on the list.  I was kind of shocked to see that, so then I sent an inquiry to a bunch of chip wholesalers about the 68060.  There are a lot of them out their folks!


Jim, they may be the batch I rejected and sent back to them ;)
The going rate appears to be about 45-55 USD.
Once you factor in test cost and yield we may be looking at double that.

I'll be back in Shenzhen around Easter and I'm on a sourcing mission....
/Mike
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: JimDrew on March 21, 2013, 05:03:39 PM
LOL!  Ok, Mike I will look into this a bit more.  If you like, I can give you the contacts to the companies that are in China.... Malaysia and Taiwan are probably a bit out of your way.

How goes the arcade boards?  Anything for developers yet?  :)
Title: Re: Motorola 68060 FPGA replacement module (idea)
Post by: mikej on March 21, 2013, 09:16:55 PM
I've got a couple of contacts, more are always welcome... I got one of my guys there to do a bit of digging. There are people who recycle (buy used kit in bulk) and sell 68Ks and other interesting parts. We have failed to get any of the correct mask yet, but I live in hope.

I'll actually be in Taiwan in April and Malaysia in the summer.

They are finishing off the boards now, waiting for the packaging to be printed and delivered.

Slight feature creep on the core, because I have completely rewritten all the SPI protocol, I am now having to rewrite the floppy and hard disk interfaces. Almost done.

I am still quite chuffed with the ability to upload and verify ROM files to internally/external memory now, specified in a .ini file which is quite nice.
[ROMLOAD]
name = mike\kick.rom
addr = 0xE00000
size = 0x4000

etc

/Mike