Welcome, Guest. Please login or register.

Author Topic: How does the PowerUP-accelerators actually work?  (Read 3096 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline patrikTopic starter

How does the PowerUP-accelerators actually work?
« on: November 11, 2003, 11:48:19 PM »
Hi everyone, I hope that someone can shed some light on this question.

How is the PowerPC-processor on the PowerUP-accelerators controlled?


/Patrik
 

Offline ajk

  • Full Member
  • ***
  • Join Date: Mar 2002
  • Posts: 150
    • Show only replies by ajk
Re: How does the PowerUP-accelerators actually work?
« Reply #1 on: November 11, 2003, 11:58:37 PM »
Look up WarpOS or PowerUP in the net. Basically a separate PPC kernel that allows programs to use the extra processor. Not having the OS run on PPC held a lot of power back in some cases though, OS4 will help there.
 

Offline lempkee

  • Hero Member
  • *****
  • Join Date: Apr 2002
  • Posts: 2860
    • Show only replies by lempkee
    • http://www.amigaguru.com
Re: How does the PowerUP-accelerators actually work?
« Reply #2 on: November 12, 2003, 12:23:46 AM »
erm?=?

it works like this,  you do an ppc instruction (code) and the cpu works...wow..

there is 2 kernels for that , powerup (the first) and warpos (second and the best)

to them who ask such a question...hard to answer as its not a fantastic thing , besides you have alot of contextswitching between the 2 cpus and on a1200 u have contextswitching between the 3 cpus.

anyway to do ppc sw , then you need to do ppc calls, if thats what you wanted to know..

 the ppc wont do any work unless there is a tool or a game that takes advantage of it, ie just like an fpu, needs special commands to work.

also amigaos 3.x is 68k only , and the ppc wont be in use at all unless u install warpos or powerup and then later you need to install ppc datatypes and such...

and as ajk said...this is where os4 and morphos does a better job because its an ppc os.

i wont be suprised if there is a huge speed up when the os\s are finished.

cheers
Whats up with all the hate!
 

Offline downix

  • Hero Member
  • *****
  • Join Date: Jan 2003
  • Posts: 1587
    • Show only replies by downix
    • http://www.applemonthly.com
Re: How does the PowerUP-accelerators actually work?
« Reply #3 on: November 12, 2003, 12:46:01 AM »
I will disagree on WarpUP being better than PowerUP.   I found WarpUP programs slower than PowerUP.
Try blazedmongers new Free Universal Computer kit, available with the GUI toolkit Your Own Universe, the popular IT edition, Extremely Reliable System for embedded work, Enhanced Database development and Wide Area Development system for telecommuting.
 

Offline patrikTopic starter

Re: How does the PowerUP-accelerators actually work?
« Reply #4 on: November 12, 2003, 01:00:17 AM »
@lempkee:

When reading your answer I realise that my question was quite unprecise, aiming just about everywhere ;).

What I am curious about are things like these:

At startup, the 68k-processor first loads its supervisor stack pointer from address 0x00000000, then its program counter from address 0x00000004, and in this case, on an Amiga starts executing the exec kernel.

I guess a PowerPC processor is very eager to do something similar, but what happends in its case - does it have a ROM waiting for it with PowerPC code which initializes it with some appropriate interrupt-vectors etc?

I am also very curious about the details of how the 68k kernel(exec) processor communicates with the PowerPC kernel. Does it write something to a special area in memory and gives the PowerPC processor an interrupt making it read from that memory area or... I am full of questions :).


/Patrik
 

Offline lempkee

  • Hero Member
  • *****
  • Join Date: Apr 2002
  • Posts: 2860
    • Show only replies by lempkee
    • http://www.amigaguru.com
Re: How does the PowerUP-accelerators actually work?
« Reply #5 on: November 12, 2003, 01:23:41 AM »
downix:i agree with you on a few things , like mame ..but that is because of the coder, there is alot of sloppy work around and more will come now that we have faster hw plattforms.

but there is a few things, ever seen 3d render with pup? ...
ever seen new stuff by the same developers ?

the good ones left sadly, and atm there is mostly only bloatware to port...ie like later versions of mame (which is a big bloat atm ;().

anyway i totally agree with you on it beeing faster for a few things, but by far all.


patrik: i will answer you in the morning if no other has posted some answers.

cheers
Whats up with all the hate!
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16882
  • Country: gb
  • Thanked: 6 times
    • Show only replies by Karlos
Re: How does the PowerUP-accelerators actually work?
« Reply #6 on: November 12, 2003, 01:26:35 AM »
@downix

I disagree strongly. I have used PPC on amiga since the BlizzPPC was first available here in the UK.

The only version of warpos that I have ever seen run slower than powerup on my machine was an early powerpc.library implementation that actually ran on powerup itself. I think this was powerpc.library v7.

The earlier versions of the powerup kernel were extremely poor and the warpup kernel (after v7 when it became removed from the ppc.library dependencies) proved considerably faster. It multitasked more smoothly and context switching times were roughly half that for powerup.

Later revisions of the powerup kernel improved performance dramatically, but were in my experience merely 'catching up' with warpup.

I guess in the final analysis it all comes down to the machine configuration and it's academic since both MOS and OS4 will never have to worry about a real 680x0 processor again ;-)
int p; // A
 

Offline patrikTopic starter

Re: How does the PowerUP-accelerators actually work?
« Reply #7 on: November 16, 2003, 04:47:26 PM »
*wink* Anyone else got this straightened out and feels like sharing? ;)


/Patrik
 

Offline lempkee

  • Hero Member
  • *****
  • Join Date: Apr 2002
  • Posts: 2860
    • Show only replies by lempkee
    • http://www.amigaguru.com
Re: How does the PowerUP-accelerators actually work?
« Reply #8 on: November 16, 2003, 04:57:34 PM »
patrik: i didnt make a kernel for it so basically your questions are way too deep for me.

cheers
Whats up with all the hate!
 

Offline patrikTopic starter

Re: How does the PowerUP-accelerators actually work?
« Reply #9 on: November 16, 2003, 05:08:38 PM »
@lempkee:

Damnit lempkee, why didnt you make a kernel for the PowerUp cards?!?? ;))) Erm.. sorry, couldnt help it ;).

Take care!


/Patrik
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12114
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: How does the PowerUP-accelerators actually work?
« Reply #10 on: November 16, 2003, 05:19:04 PM »
Quote
a1200 u have contextswitching between the 3 cpus


Lempkee, what the hell are you talking about???


Anyway, The 68K boots the machine running AmigaOS from the ROM, the PPC processor also boots but it boots a custom OS (PowerUP forexample) from it's own ROM (on the PPC board). The PPC's OS is little more than an executive (like AmigaOS's exec.library), and it just sits there until the 68k gives it a task.

The PPC is then able to load the task an execute it. The 68K and the PPC run at the same time (but share their Memory), and the 68K and the PPC have to communicate using special structures defined by the system you are using.
The PPC is not allowed to access any AmigaOS structures but instead must ask the 68K to do OS things for it. I believe the PPC is allowed to access the Amiga Custom Chips.

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16882
  • Country: gb
  • Thanked: 6 times
    • Show only replies by Karlos
Re: How does the PowerUP-accelerators actually work?
« Reply #11 on: November 16, 2003, 09:03:44 PM »
Quote

bloodline wrote:
The PPC is not allowed to access any AmigaOS structures but instead must ask the 68K to do OS things for it.


Not entirely true. The PPC read access amiga OS data structures fine as long as the basic alignment is limited to 2 byte boundaries. Thats why you have #pragma amiga-align in vbcc ;-)

Writing to OS data structures is fine too, provided they are allocated cache aligned, hence the AlocVec32() functions.

However, just as with 680x0 code, you *should* use the OS functions for dealing with OS structures where possible.

For writing 'good' code under warpos, the best thing is to gather all of your 680x0 OS routines that are called as part of an operation (updating the display, fetching input events from your window etc., waiting for the display sync) into a single 68K function that you can then manually context switch to from the PPC.

I used this approach in some experimental code in vbcc to test the idea and got a double/triple bufffered display with IDCMP input (the event data was copied to a shared area so the handler callbacks can be ppc native) down to one full PPC->68K->PPC context switch per frame.

Still, I am looking forward to forgetting all of these type tricks when OS4 is released :lol:
int p; // A
 

Offline lempkee

  • Hero Member
  • *****
  • Join Date: Apr 2002
  • Posts: 2860
    • Show only replies by lempkee
    • http://www.amigaguru.com
Re: How does the PowerUP-accelerators actually work?
« Reply #12 on: November 16, 2003, 09:09:47 PM »
bloodline: if you look whats been said then u would know what i was talking about :) , as in his question wasnt very "spot on".

context switching is the biggest issue on the classic powerup cards and will allways be as long as we are stuck with an 68k os , sure its gotten better as whas pointed out in earlier threads, but its still a major prob.

(68k cpu does still a major job even if its a ppc app (when running amigs os with wos/pup).

Whats up with all the hate!
 

Offline Kronos

  • Resident blue troll
  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4017
    • Show only replies by Kronos
    • http://www.SteamDraw.de
Re: How does the PowerUP-accelerators actually work?
« Reply #13 on: November 16, 2003, 09:25:04 PM »
You talked about context-switching between 3 CPUs on the A1200.

So there is the 603,and there is the 060 (or 040),that makes 2.

So where is numeber 3 ? You couldn't have meant the 020 on the mobo,
as this isn't active for 1 secound in such a setup.
1. Make an announcment.
2. Wait a while.
3. Check if it can actually be done.
4. Wait for someone else to do it.
5. Start working on it while giving out hillarious progress-reports.
6. Deny that you have ever announced it
7. Blame someone else
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12114
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: How does the PowerUP-accelerators actually work?
« Reply #14 on: November 16, 2003, 10:56:32 PM »
Quote

Karlos wrote:
Quote

bloodline wrote:
The PPC is not allowed to access any AmigaOS structures but instead must ask the 68K to do OS things for it.


Not entirely true. The PPC read access amiga OS data structures fine as long as the basic alignment is limited to 2 byte boundaries. Thats why you have #pragma amiga-align in vbcc ;-)

Writing to OS data structures is fine too, provided they are allocated cache aligned, hence the AlocVec32() functions.

However, just as with 680x0 code, you *should* use the OS functions for dealing with OS structures where possible.

For writing 'good' code under warpos, the best thing is to gather all of your 680x0 OS routines that are called as part of an operation (updating the display, fetching input events from your window etc., waiting for the display sync) into a single 68K function that you can then manually context switch to from the PPC.

I used this approach in some experimental code in vbcc to test the idea and got a double/triple bufffered display with IDCMP input (the event data was copied to a shared area so the handler callbacks can be ppc native) down to one full PPC->68K->PPC context switch per frame.

Still, I am looking forward to forgetting all of these type tricks when OS4 is released :lol:


I must confess that I never used WarpOS, I simply couldn't be bothered with it :-)

I did write a PPC (PowerUP) multithread library for BlitzzBasic though, that alowed you to to complex processing on the PPC Async with your 68k program.. (did anybody ever use it?).