From: chrisdekoh on
Hi Goran,
The FSL_Full Flag is not asserted. Also, the microblaze came out of
reset. I know cos I probed the addr and data bus signals and there is
information on the bus in the modelsim simulator, wrt to when the
microblaze is not out of reset.

anyway, i found something else. This was what I wrote in my
firmware code running on microblaze:

#include "float.h"
#include "mb_interface.h"


typdef unsigned long long uint_64; //64 bits wide
typedef union {
uint_64 long_t;
double double_t;
} Union_double_t;



int main(){
Union_double_t a;
Xuint32 temp;
a= 3.0;

//extract the lower word to put into the peripheral

temp = (Xuint32) a.long_t & 0xffffffff;
microblaze_bwrite_fsl(temp,0);
//extract the upper word to put into the peripheral
temp = ((Xuint32) a.long_t >>32) | 0xffffffff;
microblaze_bwrite_fsl(temp,0);
return 1;
}

the code above does not work. In short, when i try to send a double
precision word onto the FSL bus like the manner described above by
breaking it into the lower word and the upper word, it fails to work.

However, for a single precision word sent in exactly the same way, it
works just fine.

any idea? :)
Chris

From: G�ran Bilski on
Hi,

Easiest way to find out what is happening is to disassemble the program.
Just do a "mb_objdump -S" on the .elf file.

G�ran

<chrisdekoh(a)gmail.com> wrote in message
news:6a6c57ff-bc59-4477-83e3-c85ac0e6664d(a)a9g2000prl.googlegroups.com...
> Hi Goran,
> The FSL_Full Flag is not asserted. Also, the microblaze came out of
> reset. I know cos I probed the addr and data bus signals and there is
> information on the bus in the modelsim simulator, wrt to when the
> microblaze is not out of reset.
>
> anyway, i found something else. This was what I wrote in my
> firmware code running on microblaze:
>
> #include "float.h"
> #include "mb_interface.h"
>
>
> typdef unsigned long long uint_64; //64 bits wide
> typedef union {
> uint_64 long_t;
> double double_t;
> } Union_double_t;
>
>
>
> int main(){
> Union_double_t a;
> Xuint32 temp;
> a= 3.0;
>
> //extract the lower word to put into the peripheral
>
> temp = (Xuint32) a.long_t & 0xffffffff;
> microblaze_bwrite_fsl(temp,0);
> //extract the upper word to put into the peripheral
> temp = ((Xuint32) a.long_t >>32) | 0xffffffff;
> microblaze_bwrite_fsl(temp,0);
> return 1;
> }
>
> the code above does not work. In short, when i try to send a double
> precision word onto the FSL bus like the manner described above by
> breaking it into the lower word and the upper word, it fails to work.
>
> However, for a single precision word sent in exactly the same way, it
> works just fine.
>
> any idea? :)
> Chris
>


 | 
Pages: 1
Prev: CCD Chips
Next: Power Quicc 3 problem HW/SW ??