Make the Most of IBM’s Breakthrough Cell Processor in Any Gaming, Graphics, or Scientific Application
IBM’s Cell processor delivers truly stunning computational power: enough to satisfy even the most demanding gamers and graphics developers. That’s why Sony chose the Cell to drive its breakthrough PlayStation 3 and why Cell processors are at the heart of today’s most powerful supercomputers. But many developers have struggled to create high-performance Cell applications: the practical, coherent information they need simply hasn’t existed.
Programming the Cell Processor solves that problem once and for all. Whether you’re a game developer, graphics programmer, or engineer, Matthew Scarpino shows you how to create applications that leverage all the Cell’s extraordinary power. Scarpino covers everything from the Cell’s advanced architecture to its powerful tools and libraries, presenting realistic code examples that help you gain an increasingly deep and intuitive understanding of Cell development.
Scarpino illuminates each of the Cell’s most important technical innovations, introduces the commands needed to access its power, and walks you through the entire development process, including compiling, linking, debugging, and simulating code. He also offers start-to-finish case studies for three especially important Cell applications: games, graphics, and scientific computing. The Cell platform offers unprecedented potential, and this book will help you make the most of it.
Foreword xv
Preface xvii
Chapter 1: Introducing the Cell Processor 1
Part I: The Software Development Tools 13
Chapter 2: The Cell Software Development Kit (SDK) 15
Chapter 3: Building Applications for the Cell Processor 35
Chapter 4: Debugging and Simulating Applications 53
Chapter 5: The Cell SDK Integrated Development Environment 83
Part II: The PowerPC Processor Element (PPE) 97
Chapter 6: Introducing the PowerPC Processor Unit (PPU) 99
Chapter 7: The SPE Runtime Management Library (libspe) 125
Chapter 8: SIMD Programming on the PPU, Part 1: Vector Libraries and Functions 153
Chapter 9: SIMD Programming on the PPU, Part 2: Methods and Algorithms 195
Part III: The Synergistic Processor Element (SPE) 217
Chapter 10: Introducing the Synergistic Processor Unit (SPU) 219
Chapter 11: SIMD Programming on the SPU 239
Chapter 12: SPU Communication, Part 1: Direct Memory Access (DMA) 285
Chapter 13: SPU Communication, Part 2: Events, Signals, and Mailboxes 317
Chapter 14: Advanced SPU Topics: Overlays, Software Caching, and SPU Isolation 345
Chapter 15: SPU Assembly Language 367
Part IV: Mathematics and Computation 409
Chapter 16: Vectors and Matrices 411
Chapter 17: The Fast Fourier Transform (FFT) 439
Chapter 18: Multiprecision Processing and Monte Carlo Methods 463
Part V: Graphics and Games 489
Chapter 19: Programming the Frame Buffer: Linux and the PlayStation 3 491
Chapter 20: OpenGL on the Cell: Gallium and Mesa 503
Chapter 21: Building Games with Ogre3D 529
Chapter 22: Packaging Graphics with COLLADA 559
Epilogue 581
Part VI: Appendices 583
Appendix A: Understanding ELF Files 585
Appendix B: Updating the PS3 Add-On Packages and Installing a New Linux Kernel 609
Appendix C: The Accelerated Library Framework (ALF) 617
Appendix D: SPU Instruction Set Reference 649
Appendix E: A Brief Introduction to Tcl 661
Index 669
"synopsis" may belong to another edition of this title.
Matthew Scarpino lives in the San Francisco Bay area and develops software to interface embedded devices. He holds a masters in electrical engineering and has spent more than a decade in software development. His experience encompasses computing clusters, digital signal processors, microcontrollers, and field programmable gate arrays, but he loves programming the Cell processor most of all.
Foreword
Foreword
The Cell Broadband Engine Architecture (Cell/B.E.) defines a new processor structure that extends the 64-bit Power Architecture technology and incorporates unique features that support critical real-time response of highly parallel, computationally intensive code. The first implementation of the architecture has resulted in a single device of heterogeneous processors mixed with simultaneous multithreading and special computational "accelerator" cores for more performance and efficiency gains. The processor comprises a vector Power Processor Element (PPE) with two levels of cache and eight independent Synergistic Processor Elements (SPEs), each with its own multilevel storage organization. In addition to processor-level parallelism, each processing element has Single Instruction Multiple Data (SIMD) units that can process from 4 words up to 16 characters per processing cycle, and globally consistent Direct Memory Access (DMA) engines that provide a rich set of DMA commands for seamless communication between all Cell/B.E. processing elements. The dual thread, 64-bit PPE controls and runs the operating system, manages system resources, and coordinates work sent to the SPEs, while the SPEs are dedicated only to the compute thread and its data.
Although the Cell/B.E. processor was initially intended for application in game consoles and media-rich consumer-electronics devices, a much broader use of the architecture is starting to emerge to handle streaming workloads found in today's applications across such industry segments as health care, life sciences, petroleum exploration, financial services, digital media, electronics, government, and education. To fully harness the power of Cell/B.E., developers need to use different programming models and to write multithreaded code that ensures the SPEs are well utilized and work is equally off-loaded across the SPEs.
This book is the first commercially published book written for those who want to program the Cell/B.E. It provides comprehensive learning material for developing multithreaded code that allows an application structured for parallelism to execute much more efficiently on those SPE accelerators. It starts with the IBM Software Development Kit (SDK) for Multicore Acceleration Version 3.0, which consists of run-time tools (such as the Linux kernel), development tools, GNU toolchain, software libraries and frameworks, performance tools, a system simulator, sample source codes and benchmarks—all of which fully support the capabilities of the Cell/B.E. The book discusses the device's architecture, including the PPE vector processing unit, SPE SIMD capabilities, and DMA communication mechanisms. The book also details SPU programming and exploitation of SPU storage by software module overlay and software managed cache. It includes an in-depth section on libraries, ranging from the basic vector and matrix libraries to BLAS, MASS, FFT, and Monte Carlo libraries.
Multicore processing is the future trend of the computing industry. Cell/B.E. offers a general-purpose, programmable multicore processor available to developers through high level programming languages such C/C++ and Fortran. However, in order to fully leverage the processor parallel capabilities, the application needs to be properly designed in both code and data. This book describes the processor in enough details and contains many practical code examples to get you off the ground to write your first Cell/B.E. application. Such experience should give you a competitive edge when working with other multicore systems, or as a foundation to work on Cell/B.E. homogeneous and/or hybrid clusters that are being deployed to support a wide range of high performance computing workloads.
Duc J. Vianney, Ph. D.
Technical Solution Architect1
Education Lead—Cell/QUASAR Ecosystem & Solutions Enablement
IBM Systems & Technology Group, Industry Systems Division
1What is the IBM definition of "Technical Solution Architect"? "This role assumes overall technical responsibility for the success of solution construction, implementation, and system integration in a technology, industry, or business specialty. They deliver new and complex high quality solutions to clients in response to varying business requirements. They utilize in-depth knowledge of leading-edge products and technology in conjunction with industry and business skills to influence clients."
© Copyright Pearson Education. All rights reserved.
"About this title" may belong to another edition of this title.
(No Available Copies)
Search Books: Create a WantCan't find the book you're looking for? We'll keep searching for you. If one of our booksellers adds it to AbeBooks, we'll let you know!
Create a Want