Skip navigation.
Home
The QNX Community Portal

View topic - PPC405 with H/W FPU

PPC405 with H/W FPU

For discussion of realtime and/or embedded programming.

PPC405 with H/W FPU

Postby vadikml » Sun Feb 01, 2009 9:34 am

Hello ,
I'm working on an customized ml410 board with Virtex4 FPGA and an implementation of ppc405 with h/w fpu attached through an apu .
The original procnto-400 doesn't support h/w fpu , I'm trying to run 1 thread that deals with floating point calculations .
I notify the cpu about the presence of the apu and the fpu trough the msr register after i do that i no longer receive fpu unavailable exception but when i try to do simple floating point calculations the system freezes without any errors or exceptions.

ThreadCtl( _NTO_TCTL_IO, 0 );
/* notify ppc about APU & FPU */
x = get_msr();
printf("msr = 0x%x \n",x);
set_msr(get_msr() | PPC_MSR_FP | PPC_MSR_SPE );
x = get_msr();
printf("msr = 0x%x \n",x);

c = 10.5 * 2.2 ;
if (c > 21) printf("over 21\n");
else printf("under 21 \n");

the calculation itself is done without errors but when i try to access the c variable in the if statement the system freezes .
I tried to lock the section with InterruptLock but i doesn't seem to help .

What am i missing here ?
vadikml
New Member
 
Posts: 2
Joined: Sun Feb 01, 2009 9:06 am

RE: PPC405 with H/W FPU

Postby mario » Sun Feb 01, 2009 2:15 pm

Don't know PPC but this seems overly simplified. There must be some register that need to be configure in the APU as well.

A quick use of google pointed me to : http://www.embeddedrelated.com/usenet/e ... 3446-1.php
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

RE: PPC405 with H/W FPU

Postby vadikml » Mon Feb 02, 2009 7:37 am

http://www.embeddedrelated.com/usenet/e ... 3446-1.php -- been there done that read it already .

There must be some register that need to be configure in the APU as well. -- there is and it is configured in the FPGA image creation process .

Again the question is how can I lock the thread (except InterruptLock) do my calculations without any interruptions
vadikml
New Member
 
Posts: 2
Joined: Sun Feb 01, 2009 9:06 am


Return to Realtime and Embedded

Who is online

Users browsing this forum: No registered users and 2 guests