amiga.org
     
iconAll times are GMT -6. The time now is 08:31 AM. | Welcome to Forum, please register to access all of our features.

» Amiga.org » Amiga computer related discussion » Amiga Hardware Issues and discussion » Coldfire AGAIN

Amiga Hardware Issues and discussion This forum is dedicated to the discussion and resolution of issues related to Classic and Next Generation Amiga hardware. Got a problem with a piece of hardware? Click to speak.

Reply
 
Thread Tools Display Modes
Old 03-27-2008, 05:33 PM   #1
rkauer
Desperately needs a life
Points: 10,960, Level: 69 Points: 10,960, Level: 69 Points: 10,960, Level: 69
Activity: 2% Activity: 2% Activity: 2%
 
rkauer's Avatar
 
Join Date: May 2006
Location: São Leopoldo, RS, Brazil
Posts: 3,263
Send a message via MSN to rkauer
Default Coldfire AGAIN

Yeah, I know this was discussed to the end of the world, but this time I found some feed for the kitty:

Looking inside this PPC emulator, I think:

If someone strip the emulation code down, and construct a table to emulate the calls from a real Amiga to the Coldfire accelerator, can it be used as a real Amiga upgrade?

Critics, please.

BTW: I know the translation process (and catch everything) is slow as hell. But even then a MPC54xx CPU can run circles around a 060@50MHz, maybe the slowdown (in certain instructions) made it comparable to a 040@40MHz (not bad at all!).
__________________
Goodbye people.

I'll pop on from time to time, RL is acting up.
rkauer is offline   Reply With Quote
Old 03-27-2008, 06:51 PM   #2
FrenchShark
Technoid
Points: 7,286, Level: 56 Points: 7,286, Level: 56 Points: 7,286, Level: 56
Activity: 26% Activity: 26% Activity: 26%
 
FrenchShark's Avatar
 
Join Date: Jan 2004
Location: Back to France !
Posts: 174
Default Re: Coldfire AGAIN

Hello rkauer,

I wrote a similar emulator (not completely finished) :
Mine is targeted for CF with internal SRAM.
I run the emulation code from it, for two reasons :
- The code is a self-modifying code (I know it is bad but it is so efficient)
- The SRAM is located at address 0xFFFF8000 (the upper 2 GB cannot be used as memory on Amiga) -> the 1024-entry jump table is done with WORDs (move.w xxx,An does a sign extension :-D)

With all these tricks I can achieve an average of 20 instructions per emulated instructions.

Regards,

Frederic
FrenchShark is offline   Reply With Quote
Old 03-28-2008, 08:53 PM   #3
rkauer
Desperately needs a life
Points: 10,960, Level: 69 Points: 10,960, Level: 69 Points: 10,960, Level: 69
Activity: 2% Activity: 2% Activity: 2%
 
rkauer's Avatar
 
Join Date: May 2006
Location: São Leopoldo, RS, Brazil
Posts: 3,263
Send a message via MSN to rkauer
Default Re: Coldfire AGAIN

Good job!

That's an elegant solution for Coldfire's 68k emulation!

Since it have a RAM controller, it's just a matter of using the upper "RAM" space to manage the table.

Meh/ thinks we are coming to a solution!
__________________
Goodbye people.

I'll pop on from time to time, RL is acting up.
rkauer is offline   Reply With Quote
Old 03-28-2008, 11:35 PM   #4
RWO
Beginner
Points: 4,635, Level: 43 Points: 4,635, Level: 43 Points: 4,635, Level: 43
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2003
Posts: 30
Send a message via ICQ to RWO
Default Re: Coldfire AGAIN

@rkauer

Whats the point?

I mean either you run it native on the Hardware or you emulate it.

If you accept some buggy opcodes (compaired to the m68k serie) you can use ColdFire... if you emulate, ColdFire isent really the smartest choice.

RWO
__________________
Debugging is a state of mind
RWO is offline   Reply With Quote
Old 03-29-2008, 12:10 AM   #5
AmigaHeretic
Cult Member
Points: 8,731, Level: 62 Points: 8,731, Level: 62 Points: 8,731, Level: 62
Activity: 1% Activity: 1% Activity: 1%
 
AmigaHeretic's Avatar
 
Join Date: Oct 2002
Posts: 821
Default Re: Coldfire AGAIN

Quote:
FrenchShark wrote:
Hello rkauer,

I wrote a similar emulator (not completely finished) :
Mine is targeted for CF with internal SRAM.
I run the emulation code from it, for two reasons :
- The code is a self-modifying code (I know it is bad but it is so efficient)
- The SRAM is located at address 0xFFFF8000 (the upper 2 GB cannot be used as memory on Amiga) -> the 1024-entry jump table is done with WORDs (move.w xxx,An does a sign extension :-D)

With all these tricks I can achieve an average of 20 instructions per emulated instructions.

Regards,

Frederic
Sounds very cool. Are you saying you are emulating all 68k though or you are still just talking about emulating the missing op codes?

@rkauer
Quote:
Whats the point?
I don't know much about how all this stuff works, but yeah I could see if you were just going to emulate "all" the 68k codes it seems like it would make more sense to just use a more widely available CPU like a CORE2Duo or something. Seems like it would be 'as' difficult. But I don't know. Hard work either way it seems.
AmigaHeretic is offline   Reply With Quote
Old 03-29-2008, 12:49 AM   #6
biggun
Too much caffeine
Points: 4,400, Level: 42 Points: 4,400, Level: 42 Points: 4,400, Level: 42
Activity: 0% Activity: 0% Activity: 0%
 
biggun's Avatar
 
Join Date: Apr 2006
Location: Germany
Posts: 123
Default Re: Coldfire AGAIN

@rkauer
Quote:
Whats the point?
I don't know much about how all this stuff works, but yeah I could see if you were just going to emulate "all" the 68k codes it seems like it would make more sense to just use a more widely available CPU like a CORE2Duo or something. Seems like it would be 'as' difficult. But I don't know. Hard work either way it seems.[/quote]

Hey, not so quick with your conclusions. :-)

Lets look at all PROS and CONS first!

There is a major advantage that the Coldfire has got.
You can buy the "source" of the Coldfire for an affordable sum. This means that you can "bake" your own Coldfire including AGA/SuperAGA in one Chip.

Continuing from FrenchSharks point:
You can bake a Coldfire including AGA => which is basicly then an AMIGA on a single chip.
You can get Coldfire including AGAChipset to 400/500 Mhz.

If you are into comparing numbers then:
- The resulting SuperAGA blitter can be about 200 times faster than the AMIGA AGA was.
- The CPU is net about 10 times faster than a 68060.
- More than about 100 times faster A1200/020

Even in FrenchSharks "68k emul mode" its still about 10 times faster than an A1200/020.

Nothing to sneeze about.

The key is having it in a the single chip.
Based on this you can create a 500MHz AMIGA of the size and price of a fat USB stick.


biggun is offline   Reply With Quote
Old 03-29-2008, 12:57 AM   #7
rkauer
Desperately needs a life
Points: 10,960, Level: 69 Points: 10,960, Level: 69 Points: 10,960, Level: 69
Activity: 2% Activity: 2% Activity: 2%
 
rkauer's Avatar
 
Join Date: May 2006
Location: São Leopoldo, RS, Brazil
Posts: 3,263
Send a message via MSN to rkauer
Default Re: Coldfire AGAIN

From my knowledge, the goal is emulate only the bad instructions, but even this way, you have to emulate the supervisor mode of the CPU.

So here is the catch: construct a resident-hardware interpreter outside the Amiga memory space (a simple "mini" Spartan or other FPGA can do this) and, with the right code, forward to the CPU only the "good code" untouched. Almost the same approach as a table interpreter.
__________________
Goodbye people.

I'll pop on from time to time, RL is acting up.
rkauer is offline   Reply With Quote
Old 03-29-2008, 01:54 AM   #8
biggun
Too much caffeine
Points: 4,400, Level: 42 Points: 4,400, Level: 42 Points: 4,400, Level: 42
Activity: 0% Activity: 0% Activity: 0%
 
biggun's Avatar
 
Join Date: Apr 2006
Location: Germany
Posts: 123
Default Re: Coldfire AGAIN

Quote:
rkauer wrote:
From my knowledge, the goal is emulate only the bad instructions, but even this way, you have to emulate the supervisor mode of the CPU.

So here is the catch: construct a resident-hardware interpreter outside the Amiga memory space (a simple "mini" Spartan or other FPGA can do this) and, with the right code, forward to the CPU only the "good code" untouched. Almost the same approach as a table interpreter.
I see where you are coming from but I think this is not worth doing.

I'll try to explain why:

For the sake of easy discussion lets quickly compare the net
performance of the Coldfire and 68k.
Every application has of course different needs but lets just use one example for the sake of argument.

Lets say we have a piece of code (a loop) that uses:
4 register operations (ie: cmp, or add.l dx,dy)
2 memory operations (ie: add <ea>,dx)
1 multiplication
2 index adressing modes (ie: move.l 2(a0,d0),d1)
1 branch (taken)

Now look how long (many clocks) a 68000 will need for this:
4 reg x 6
2 mem x 18
1 mul x 40
2 ind x 18
1 bra x 10
------
146 clocks

Now look how long (many clocks) a 68020 will need for this:
4 reg x 2
2 mem x 6
1 mul x 28
2 ind x 9
1 bra x 6
------
72

Now look how long (many clocks) a 68060 will need for this:
4 reg x 1
2 mem x 1
1 mul x 2
2 ind x 1
1 bra x 0
------
10 => 7 clocks

Yes, the 68060 can execute every instruction in one clock (the multiplication takes 2).
The 68060 can do loops for free (taken branch = 0 clocks)
And the 68060 has two instruction units. Allowing it to do two instructions per clock! Depending of your code structure the 10 instructions in the example loop could be folded down to 4.5 clocks in the best base.
For the sake of argument lets say the 68060 needs 7 clocks.


Looking at these numbers will give us a better feeling for the CPUs.

Now comparing the CPU based on their used clock rates:
68000 7.09 MHz = 48K
68020 14.2 Mhz = 196K
68060 50.0 Mhz = 7142K

In other words:
The A1200 (14Mhz 68020) is 4.0 times faster than a 68000
The (50MHz 68060) is 148 times faster than a 68000
The (50MHz 68060) is 36 times faster than a 68020


The above example is a realistic code sequence.
It show us the net CPU performance.


Now the behavior of Coldfire V5 is very much comparable to an 68060 but higher clocked.

In other words (our assumed) Coldfire 500 Mhz AMIGA has the CPU power to be 1480 times faster than a A500 (68000) with fastmem. Yes, thats over one thousand and four hundred times!

This single chip 500 Mhz AMIGA has as well the CPU power
to be 360 times faster than a A1200 (68020) with fastmem. Yes, thats over three hundred times!


Of course this is net CPU power.
Considering cache missed and memory latency the effective gained performance is of course a bit lower.

The point that we are trying to make here is:

If you was running an application on original Amiga then their speed was limited by the GFX subsystem (blitter) and by the CPU power.

As the SuperAGA Blitter is over 100 times faster - there is no GFX speed limit anymore!

The Coldfire is so much faster that even in full emulation mode you have many times the CPU power of the A1200.
Coldfire is net 360 times faster than A1200.
If FrenchSharks Code divides this by 20 its still over 10 times faster than A1200 was.


New applications with "coldfire" clean 68k code will be able to leverage the full performance of the Coldfire.
In other words this single Chip Amiga will then be 10 times faster than the fastest Cyberstorm was.


I don't know about you but for me this is enough!


If you would force me to add something to this chip then I would add a programmable DSP into the chipset.
Something like the AXE of the new e300 Freescale chip.
Such a SuperCopper could be used the decode MP4, MP3, DIVX etc for free.

Then this one Chip Amiga can do all that I need.
biggun is offline   Reply With Quote
Old 03-29-2008, 04:54 AM   #9
alexh
Desperately needs a life
Points: 13,977, Level: 76 Points: 13,977, Level: 76 Points: 13,977, Level: 76
Activity: 2% Activity: 2% Activity: 2%
 
alexh's Avatar
 
Join Date: Apr 2005
Location: Oxford, UK
Posts: 3,638
Send a message via ICQ to alexh Send a message via MSN to alexh Send a message via Yahoo to alexh
Default Re: Coldfire AGAIN

Some of these "so called" technical discussions dont half make me laugh.
alexh is offline   Reply With Quote
Old 03-29-2008, 05:50 AM   #10
biggun
Too much caffeine
Points: 4,400, Level: 42 Points: 4,400, Level: 42 Points: 4,400, Level: 42
Activity: 0% Activity: 0% Activity: 0%
 
biggun's Avatar
 
Join Date: Apr 2006
Location: Germany
Posts: 123
Default Re: Coldfire AGAIN

If someone is serious about doing Coldfire development:

There is a limited number of sponsored (free) Coldfire V4 Development systems available on http://www.powerdeveloper.org/


If you propose a sensible project there is a good chance that you get a free board.

I assume that I'll get my board early next week. :-)


biggun is offline   Reply With Quote
Old 03-29-2008, 06:00 AM   #11
bloodline
Master Sock Abuser
Points: 37,268, Level: 100 Points: 37,268, Level: 100 Points: 37,268, Level: 100
Activity: 11% Activity: 11% Activity: 11%
 
bloodline's Avatar
 
Join Date: Mar 2002
Location: London, UK
Posts: 11,666
Blog Entries: 3
Default Re: Coldfire AGAIN

I really don't get the obsession with the Coldfire! if you want a small core to use for emulating a 68k... either design one yourself, I made a big post about this in a previous thread... or licence an ARM or MIPS, both of which are smaller, better supported and preferable to the hacked up mess of a CPU that the Coldfire is...

In fact I would go as far to say the MIPS is the better choice, since it has more registers than the 68k, which is a really good idea....
__________________
My iPhone Game: Puny Humans -
http://itunes.apple.com/gb/app/puny-...362230281?mt=8
bloodline is offline   Reply With Quote
Old 03-29-2008, 06:13 AM   #12
bloodline
Master Sock Abuser
Points: 37,268, Level: 100 Points: 37,268, Level: 100 Points: 37,268, Level: 100
Activity: 11% Activity: 11% Activity: 11%
 
bloodline's Avatar
 
Join Date: Mar 2002
Location: London, UK
Posts: 11,666
Blog Entries: 3
Default Re: Coldfire AGAIN

Here is a good thread to read:

http://www.embeddedrelated.com/usenet/embedded/show/74090-1.php

Nice little quote:
Quote:
Coldfire looks not so exciting, since it's based on the CISC m68k, though
I gather it's got a cleaned-up instruction set. The AVR32 looks really
cool, like it is designed to be a do-everything architecture... good code
density, DSP capabilities, SIMD capabilities, MMU, Java, wow. It looks
like Atmel is aiming to really shake up the 32-bit embedded market.

> Few these days will care about assembler level code, so choose the best
> uC for the task you have.
>
> Debug support, and tools, will start to matter in many design starts.

Yeah, the thing that's appealing about MIPS and ARM to me is that they are
extremely well-supported by Linux and the GCC toolchain. Also, MIPS is
even cooler cause there are free Verilog implementations to play around
with!
In summery, it would seem the MIPS core is ideal for our task... Verilog cores are free, it's well supported, its design is suited to Register based tasks like emulation... it's small...
__________________
My iPhone Game: Puny Humans -
http://itunes.apple.com/gb/app/puny-...362230281?mt=8
bloodline is offline   Reply With Quote
Old 03-29-2008, 06:31 AM   #13
biggun
Too much caffeine
Points: 4,400, Level: 42 Points: 4,400, Level: 42 Points: 4,400, Level: 42
Activity: 0% Activity: 0% Activity: 0%
 
biggun's Avatar
 
Join Date: Apr 2006
Location: Germany
Posts: 123
Default Re: Coldfire AGAIN

Quote:
bloodline wrote:
I really don't get the obsession with the Coldfire! if you want a small core to use for emulating a 68k... either design one yourself, I made a big post about this in a previous thread... or licence an ARM or MIPS, both of which are smaller, better supported and preferable to the hacked up mess of a CPU that the Coldfire is...

In fact I would go as far to say the MIPS is the better choice, since it has more registers than the 68k, which is a really good idea....
Come on Bloodline,
you could create a higher quality post than this, can't you?


Quote:
hacked up mess of a CPU that the Coldfire
WTF? The Coldfire is a very logic, clean design.


Quote:
Design one yourself
Very thoughtless proposal.
How many people do you know that can design a fully fledged CPU like the Coldfire, and can do this cheaper than then core is at Freescale?


Quote:
MIPS is the better choice
On what experience do you base your claim?
Gave you ever developed for mips?
biggun is offline   Reply With Quote
Old 03-29-2008, 06:40 AM   #14
bloodline
Master Sock Abuser
Points: 37,268, Level: 100 Points: 37,268, Level: 100 Points: 37,268, Level: 100
Activity: 11% Activity: 11% Activity: 11%
 
bloodline's Avatar
 
Join Date: Mar 2002
Location: London, UK
Posts: 11,666
Blog Entries: 3
Default Re: Coldfire AGAIN

Quote:
biggun wrote:
Quote:
bloodline wrote:
I really don't get the obsession with the Coldfire! if you want a small core to use for emulating a 68k... either design one yourself, I made a big post about this in a previous thread... or licence an ARM or MIPS, both of which are smaller, better supported and preferable to the hacked up mess of a CPU that the Coldfire is...

In fact I would go as far to say the MIPS is the better choice, since it has more registers than the 68k, which is a really good idea....
Come on Bloodline,
you could create a higher quality post than this, can't you?
Apparently not... :-(

Quote:

Quote:
hacked up mess of a CPU that the Coldfire
WTF? The Coldfire is a very logic, clean design.
The Coldfire is an interesting design, for sure! But if we are talking about a small efficient CPU core for an ASIC/FPGA that is to be used for Emulating a 68k... then the Coldfire offers us nothing.... Unlike the other cores I suggested.

Quote:

Quote:
Design one yourself
Very thoughtless proposal.
How many people do you know that can design a fully fledged CPU like the Coldfire, and can do this cheaper than then core is at Freescale?
There are websites full of peoples CPU experiments, on FPGAs... If we want a CPU that is specifically for emulating a 68k, then we could probably design a much better one than the coldfire.

Quote:
Quote:
MIPS is the better choice
On what experience do you base your claim?
Only on what I've read... I am a big fan of the MIPS design, I love it's simplicity.

Quote:
Gave you ever developed for mips?
That's true, I have never developed for MIPS... but I wrote a VM (as a DSP plugin engine) that ended up looking very much like a MIPS, which is what led me to read up about the architecture... and I like the design choices made.
__________________
My iPhone Game: Puny Humans -
http://itunes.apple.com/gb/app/puny-...362230281?mt=8
bloodline is offline   Reply With Quote
Old 03-29-2008, 06:58 AM   #15
SamOS39
Technoid
Points: 6,187, Level: 51 Points: 6,187, Level: 51 Points: 6,187, Level: 51
Activity: 6% Activity: 6% Activity: 6%
 
SamOS39's Avatar
 
Join Date: Aug 2005
Posts: 357
Default Re: Coldfire AGAIN

Some one better start stripping down that emulator then .. :-)
__________________
http://myspace.com/thisis_sam
SamOS39 is offline   Reply With Quote
Reply

Bookmarks

Tags
coldfire

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What happened to Coldfire? cycloid General chat about Amiga topics 29 02-06-2009 07:35 AM
Anyone know abt coldfire/Dragon? CRL Amiga Hardware Issues and discussion 5 05-09-2006 11:45 AM
Coldfire CPU project? B00tDisk Amiga Hardware Issues and discussion 3 07-28-2004 02:26 PM
Coldfire IRC Log uncharted General chat about Amiga topics 5 10-05-2003 07:09 PM
Id buy a coldfire Monkey Amiga Hardware Issues and discussion 27 06-11-2003 01:32 PM