Oct 09 2007
What is DMA?
One of the things which I encounter in my day job is lots of engineers who do not know what DMA is. DMA is “direct memory access.” It is a way to transfer data from one memory location to another. For most PC and Xbox 360 programmers, DMA is handled by the OS and they do not have to care about it. DMA is fundamentally how bytes of data are moved through the hardware. This means that PCI buses do DMA, USB devices do DMA, hard drives do DMA, etc.
For PS3 (and PS2) programmers, DMA is a critical part of how to get the best performance. With the PS3, one needs to understand how the SPUs work, especially since the Cell architecture is based around it. The PS3 has two types of CPUs: the PPU and the SPU. The PPU is a traditional main CPU. It is a PowerPC chip, but it behaves basically like any CPU in your PC, like a Pentium chip. The SPU is a specialized chip which has limited RAM (256k) and is optimized for processing vector data. It is not made for general game code.