March 12, 2007 Introduction to PS3 Cell BE Programming Narate Taerat
March 12, 2007 Cell BE Architecture Picture ref:
March 12, 2007 Cell BE Architecture in PS3 PPEs SPEs
March 12, 2007 PPEs PowerPC Processor Element Main Processor 64 bit Also support Vector/SIMD Run the OS, Manage SPE
March 12, 2007 SPEs Synergistic Processor Element 128-bit RISC, SIMD (vector) processor 256 KB local storage memory Use DMA to transfer data between local storage and main memory
March 12, 2007 Yellow Dog Linux Easiest Linux installation on PS 3 Support to only Cell BE SDK 2.0
March 12, 2007 Fedora Core 6 Support Cell BE SDK 2.1 More difficult to install See instruction at – x2.php?option=com_cont ent&do_pdf=1&id=73www.ps3coderz.com/inde x2.php?option=com_cont ent&do_pdf=1&id=73
March 12, 2007 Cell Programming Main Process run on PPE Threads run on SPEs PPE Centric programming paradigm PPE process SPE thread...
March 12, 2007 PPE programming basic To create a SPE thread speid_t spe_create_thread ( spe_gid_t gid, spe_program_handle_t *spe_program_handle, void *argp, void *envp, unsigned long *mask, int flags) To wait a thread to complete void speid_wait ( speid_t id, int *status, int option)
March 12, 2007 SPE Programming basic To put data to and get data from PPE mfc_get(ls, ea, size, tag, tid, rid) mfc_put(ls, ea, size, tag, tid, rid) void* ls: Local Storage void* ea: Effective Address (of PPE) size_t size: size, in byte, of transfer memory int tag: DMA tag (0-31) int tid, rid: ???
March 12, 2007 Compiling + Linking First compile SPE –spu-gcc spe_src.c -o spe_bin Embed it to a specific variable –embedspu spe_handle_var spu_bin embeded_spe.o Compile PPE and link to SPE –gcc ppe_src.c embeded_spe.o -lspu -o ppe_bin
March 12, 2007 Reference & Sources CBE Programming Tutorial Cell SDK & Linux installation tutorial Resources –
March 12, 2007 Demo