Topic
4 replies Latest Post - ‏2011-06-15T11:59:28Z by SystemAdmin
sreejeshs
sreejeshs
2 Posts
ACCEPTED ANSWER

Pinned topic Bus error while transferring 512 bytes

‏2011-06-08T09:41:39Z |
Hi,
I am new to cell programming. I am trying to transfer 512 bytes of data to spe from ppu using DMA.But I am getting bus error. It works fine with 128 bytes, 64 bytes etc.

Please help me.
Updated on 2011-06-15T11:59:28Z at 2011-06-15T11:59:28Z by SystemAdmin
  • jadamcze
    jadamcze
    219 Posts
    ACCEPTED ANSWER

    Re: Bus error while transferring 512 bytes

    ‏2011-06-08T09:58:24Z  in response to sreejeshs
    Probably an alignment error, but hard to say for certain without being able to see the code that's causing the problem.
    • sreejeshs
      sreejeshs
      2 Posts
      ACCEPTED ANSWER

      Re: Bus error while transferring 512 bytes

      ‏2011-06-15T04:47:28Z  in response to jadamcze
      Yea thank you. There was an alignment problem. I have one more doubt regarding this. What should I do if I want to transfer address, which is not aligned of 16bytes?

      For example i want to transfer 500 bytes to SPE using DMA? Should I want want to pad zeros to make it 16 byte aligned?
      • SystemAdmin
        SystemAdmin
        10114 Posts
        ACCEPTED ANSWER

        Re: Bus error while transferring 512 bytes

        ‏2011-06-15T11:59:28Z  in response to sreejeshs
        If you can, align and pad all MFC transfers to at least 16 bytes or even a cache line (128 bytes). It is possible to transfer sub-quadword data that is not 16 byte aligned, but the source and destinations must be equivalently misaligned.
  • SystemAdmin
    SystemAdmin
    10114 Posts
    ACCEPTED ANSWER

    Re: Bus error while transferring 512 bytes

    ‏2011-06-08T12:56:51Z  in response to sreejeshs
    For a guide on debugging DMA errors, see "Chapter 4. Debugging common Direct Memory Access (DMA)errors" in the Cell Broadband Engine Programmers Guides. If you have installed the documentation on your system, this document can be found in /opt/cell/sdk/docs/programming/CBE_Programmers_Guide.pdf.