Preface

In August 2006, I attended the Girvan Workshop for the Cell Broadband Engine, and it’s an experience I’ll never forget. For two solid days, IBM engineers explained the processor’s architecture, tools, and the many software libraries available for building Cell applications. I was stunned, not only by the processor’s extraordinary capabilities, but also by how much there was to learn: spulets and CESOF files, AltiVec and Single Instruction, Multiple Data (SIMD) math, debuggers and simulators. I did my best to comprehend it all, but most of the material flew over my head with a fierce whoosh.

When Sony released the PlayStation 3, I grabbed the first console off the shelf and ran home for a more thorough investigation. It was daunting at first. Then as now, IBM’s Software Development Kit provided a vast number of documents that covered three essential subjects: development tools, software libraries, and the processor itself. The docs were helpful, but there was no overlap or coordination between them. This is a serious problem because any practical Cell developer needs to understand these subjects as an integrated whole.

It took time before the whooshing sound dissipated, but when it did, I genuinely understood how to program the Cell’s PowerPC Processor Unit (PPU) and Synergistic Processor Units (SPUs). It wasn’t that hard, really—just regular C/C++ and a set of communication mechanisms. Yet the blogs and discussion sites disagreed: To them, Cell programming was much too complex for normal developers to understand. However, they hadn’t really given the Cell a chance; they saw the disjointed pieces, but not how they fit together.

This book is my best attempt to reduce the whoosh associated with Cell development. My goal is to tie together the Cell’s tools, architecture, and libraries in a straightforward progression that appeals to the intuition. And I’ve included many code examples throughout each of the main chapters so that you can follow the material in a hands-on fashion. To download these examples, go to www.informit.com/title/9780136008866.

You can’t accomplish anything without coding tools, so the first part of this book deals the Software Development Kit (SDK). Chapter 2 explains how to obtain the SDK, Chapter 3 describes the GCC-based buildchain, and Chapter 4 shows how the ppu-gdb/spu-gdb debuggers work as well as IBM’s Full System Simulator. Chapter 5 covers much of this ground again in presenting the Cell SDK integrated development environment.

After the tools have been covered, Part II describes the Cell’s central processing core: the PPU. Chapter 6 discusses the overall PPU structure and the basic programming libraries available. Chapter 7 covers the PPU’s most important capability: controlling the SPUs in code with the SPE Runtime library. Chapter 8 introduces the AltiVec instructions that it uses to process vectors, and Chapter 9 builds on Chapter 8, covering advanced topics of PPU vector processing.

Part III is the largest and most fascinating of the book’s sections, and describes the SPU in depth. Chapter 10 provides an overall introduction, and Chapter 11 explains the instructions that the SPU uses to process vectors. These instructions are similar to AltiVec’s, but provide many new capabilities. Chapters 12 and 13 describe the communication mechanisms available for PPU-SPU data transfer, including direct memory access (DMA), mailboxes, and signals. Chapter 14 delves into advanced SPU topics, such as overlays, software caching, and SPU isolation. The last chapter in Part III, Chapter 15, explains how to program the SPU in assembly.

Part IV is the first of the parts that focuses on the SDK’s libraries. Chapter 16 covers the vector and matrix libraries, including the Large Matrix library and the BLAS library. Chapter 17 covers the two fast Fourier transform (FFT) libraries made available in the SDK and Chapter 18 describes the Multiprecision library and the Monte Carlo API.

Part V builds on Part IV and shows how the computation libraries provide for graphic processing. Chapter 19 deals with basic 2D graphic development using the Linux frame buffer. Chapter 20 improves upon this, explaining how to build 3D graphics with the new Gallium OpenGL library. Chapter 21 builds upon Chapter 20 by showing how Ogre3D uses OpenGL to build games, and Chapter 22 shows how these games can be accessed and packaged using the COLLADA standard for digital content interchange.

This book is by no means an exhaustive reference on the Cell, but it should give you enough information to make you familiar and comfortable with many of its aspects. From there, you’ll be in a perfect position to conduct further investigations on your own.

A note on typography:

When a line of code is too long to fit on one line of text, it is wrapped to the next line. In this case, the continuation is preceded with a code-continuation arrow Preface. For example

unsigned int numElements = dae->getDatabase()->getElementCount(NULL, "animation", NULL);
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.74.239