Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
-- Unknown
CELL chip


Monday I was on the east coast giving a short talk on CELL, games and languages. The talk itself was a little bit of a rant of mine, covering games development and games developers' love of C++. Love hurts. The venue for the talk itself was the CELL Symposium at Georgia Tech, Atlanta. The three players behind the CELL processor (IBM, Sony and Toshiba) were all there sponsoring the sessions. It's all part of the effort to build an ecosystem (such an hip word now) for the CELL processor.


The CELL processor is the heart of Sony's Playstation 3 game console and the processor I code most of my days. It's a little supercomputer on a chip, the whole sales pitch can be found here, sufficient to say that it's extremely fast. Among the reasons why it's this fast are:

Ok, maybe it's not so exciting for you but for us games programmers that want to squeeze the last cycle out of the console have suddenly found the mother lode, we're drowning in them. The only problem is that it's kind of tricky to shift over to program for the segmented memory model the SPU has (remember that each SPU can only address 256KB at a time, it needs to DMA in data from main memory). Especially when you are writing complex high level logic for the game and don't really want to consider the memory implications of the code you're writing, it will only run once per frame and will not be the bottle neck. Basically you just want it to work. Currently we don't have any good solutions for this, you need to roll your own library/framework/toolkit and hope that noone tries to break it.


So if you want to get started to program the CELL yourself? Well, before you do that, try to get a feel for how the processor works. One thing that's great about the processor is that there is a fair amount of documentation available publicly from IBM. The first stop for you should really be the Broadband Handbook. The next should probably be the SPU ISA document and from then you can just pick and choose from the long list at the beginning of the Broadband Handbook. There is also a light introduction to programming the CELL in their CBE Programming Tutorial.

Fun fun fun.

CELL is a really fun processor to program, and it's relatively simple. Yes, it seems like a lot to take in at first, but really, it is fairly simple. Compare it to the more advanced Intel processors. They are really complex processors that tries it outmost to make crappy programs run fast. And they succeed most of the time as well. But it's hard to write a program that runs intentionally fast on the IA32 architecture (have you seen the optimization guidelines from Intel? They are not a walk in the park). The cool thing about CELL though is that you can buy a Playstation3 and code on it yourself since Sony allowed us to install Linux on these machines. They're also along with IBM and Toshiba really trying to build a community for CELL programmers. Time will tell weather or not this processor becomes mass market, but already today it's a big part of the games development since it's in the Playstation 3 console. Soon enough though it could be everywhere, replacing the old Motorola 68k processor which is virtually everywhere. Interesting times indeed.

In closing.

I hope more events like the GA Tech Cell Symposium happen to further the community around the CELL processor. I also learned that Atlanta is really hot this time of year, it was 105F when I landed and I almost melted away. Dehydrated I had a splitting headache the whole day. Hm. Next time, water. Check. Shorts. Check.