Friday, March 13, 2009

[Tutorial] PS3 VRAM Swap

all from here (:
* PlayStation3
* * YDL v.6.1 or higher
* GameOS 2.52 or higher


Configuring ps3vram as swap

The kernel used in YDL v.6.1 has ps3vram enabled by default. This is a way of using excess framebuffer memory as a fast drive. You may want to use this excess memory for swap.

Download and run our script to use vram as swap on the PS3.

1. Open a terminal window.
2. Switch to user root:


su -

3. Enter the root password once prompted.
4. Change to the /etc/init.d directory:

PHP Code:
cd /etc/init.d

5. Create the script by typing:

PHP Code:
gedit ps3-vram-swap

and enter the following and save and quit gedit...

PHP Code:
#! /bin/bash
#
# ps3-vram-swap Use vram for swap
#
# chkconfig: 345 99 99
# description: makes and enables vram swap on the PS3 platform
#

# Source function library.
. /etc/init.d/functions

#Check if we are a PS3
if `grep -q PS3 /proc/cpuinfo `; then
ISPS3
=true
fi

###Check if swap is already made


# See how we were called.
case "$1" in
start
)
if ${
ISPS3}; then
mkswap
/dev/mtdblock0
swapon
-p1 /dev/mtdblock0
else
echo
"This is only for PS3's and you do not appear to be running on a PS3"
fi
;;
stop)
swapoff /dev/mtdblock0
;;
status)
if `
grep -q /dev/mtdblock0 /proc/swaps`; then
echo "vram swap is running"
else
echo
"vram swap is stopped"
fi
;;
*)
echo $
"Usage: $0 {start|stop|status}"
exit 1
esac

exit 0

6. Enter:

PHP Code:
chmod 755 ps3-vram-swap

7. Type:
PHP Code:
chkconfig --add ps3-vram-swap
chkconfig ps3
-vram-swap on
service ps3
-vram-swap start
8. Click the X in the top right-hand corner of the terminal to close the window.

Confirm that ps3vram is being used as Swap

1. From the command line, type:

PHP Code:
swapon -s

2. You should see output similar to the following:

PHP Code:
Filename Type Size Used Priority
/dev/ps3da3 partition 522104 145856 -1
/dev/mtdblock0 partition 241656 239624 1

Wednesday, March 11, 2009

PS3 Hardware: Explained Part II

Frame-rate stability:
Frame rates vary for a number of reasons. It actually factors in considerably in the visual department because smoother and stable frame rates look better while playing a game. While 30 FPS is well-playable, 60 FPS at the same visual quality will just make the game feel much better.

The reason why I mention this here is that PC games typically showcase relatively unstable frame rates compared to consoles. Unless your PC is far beyond the recommended requirements of a game, you will probably notice that most games frequently drop to around 10-15fps in certain parts, and going up to 30fps or more during others. I’m not completely blaming this on developers since they have a lot of different hardware to worry about, but it is something that degrades the overall pleasure of playing a game.

Controllers:
Mouse and Keyboard vs Playstation 3 controller. When it comes to RTS and FPS games, then Playstation 3 is owned along with every other console. Playing these types of games on the highest multiplayer tiers will always yield better players on the mouse + keyboard combo. That being said, the controls can still work on the Playstation 3, and players can get relatively good.

For many other game types, a PC keyboard and mouse suffer almost like a console controller does with RTS and FPS. You’d probably want a PC gamepad or joystick to play flight sims, fighting games, racing games, sports games, and probably more. The problem with a PC is that these things aren’t standard and not every developer will care to put in rumble features or motion sensing features even if they are out for certain PC gamepads on the market. The number of buttons supported on a decently programmed PC game does scale accordingly though to whatever the user has. PCs are lagging behind in the pressure sensitivity department and I don’t even think DirectX supports detecting pressure on button presses unless they’ve actually updated it since DirectX8(fyi, DirectX9 still used the DirectInput8 API).

OMG Look at Crysis!!!:
Yeah, this game got its own mini-section due to how much it has annoys me on these forums. It is always being compared to the abilities of the next generation consoles processing abilities as it if is some unattainable goal for consoles.

Guess what is responsible for those graphics? I’ve already said it and you probably already know it if you’ve read and understood everything I wrote so far – top end graphics cards. Can the RSX beat it alone? I might lie to you and say “yeah it can do that” and fail to mention the RSX would likely be running at 5 frames per second if it did - as would any comparable PC graphics card would too. But I’d rather try to be a bit more honest than what nVidia would tell you. In order for the Playstation 3 to match or surpass those visuals, extreme optimization would have to be in place to take advantage of the RSX particular setup in hardware and it would have to take advantage of the RSX’s fat bus to the Cell processor and XDR RAM. Of course, at some point in the future when GeForce 8950GTX-SLIs come out, you could probably run Crysis at ridiculously high 16xAA, 16xAF, FP32 HDR and what have you settings, but those are j polish related visuals and the base look of the game will remain the same.

Short story is that you won’t be disappointed with the Playstation 3’s visuals. It will be quickly outdone by PC graphics cards in terms of the nitty gritty technical settings like AA, HDR, AF, and shader model version whatever. Don’t let that discourage you because artists and improved optimization techniques on the Cell + RSX will make the Playstation 3 visuals pick up where PC developers wouldn’t be spending time to write for specific graphics cards or architectures.

The Final Verdict?
While PCs GPUs are evolving and pushing the visuals beyond consoles due to new graphics card hardware being released yearly, the rest of the PC world is relatively static and offer much slower improvement when it comes to gaming. When multi-core CPUs hit the shelves for desktop PCs, there could be an increase in performance for games and more tasks could be offloaded to the CPU, but no more than what Xbox360 has or will show us with its 3 cores.

All of the next generation consoles already possess more games processing power than PCs with their improved SIMD units on the CPU side of things. Unfortunately, developers aren’t taking the best advantage of this extra power in most cases as writing computational code for games is more difficult than the logical approach of checking for specific cases for results of game interaction. Playstation 3 aims to change this pattern drastically and provide a method of simulating events that occur in games and less scripting of physics, animation, and other interaction.

PCs gaming or PS3 gaming doesn’t really have a clear technical winner. PC’s constantly evolve so they will always be better for graphics over time when you always have the top end graphics card. The Playstation 3 will offer more flexible computational power that can be applied to more accurate physics, sound, or other computational related tasks than a PC. PS3 cannot catch up graphically which seems to be the most important or obvious difference between games. But PCs will not catch up in physics processing and other computational simulations unless the physics card catches on and is integrated well.
*** POST UPDATE ***
"Spokesperson/Developer said the PS3 can/can’t do this!!!"
There have been so many references to people saying things about the next generation consoles that it’s worth having a section for them. There are a number of reasons why that person said what they said. They are either not well informed, speaking in a very limited context that has little likelihood, or speaking in a context which doesn’t hold much validity and is based on analysis which is taken out of context. Here are a few of the popular ones and analysis on why they are either wrong, right, or both depending on the context:

John Carmack:
Yeah, you knew I was going to bring him up. John Carmack was generally the mastermind behind the stunning visuals on the PC series Doom and Quake since the start of both series. He has invented a few computer graphics related techniques to bring these visuals to the table. It is also very important to note that his games generally push visual limits and not much else especially if you look at the game play quality of his latest games compared to their visual quality.

On G4TV:
He basically stated on G4TV that Sony made the “less optimal decision” with the peak performance of the PS3 related to the Cell processor. First thing to note is that he never said that the PS3 is weaker. He actually generally agrees that more can come out of the Playstation 3.

One of the worst things he says in this interview that should wave a huge red flag in front of your face is that he says you put most of the work in the 2 threads on the PPE. If you really know the Cell processor, then what he outlined is just one approach to solving problems and may not be the most efficient or optimal solution.

The other thing he seemed to have issues with was the SPEs having to run separate programs that need to be in small nuggets. For him and many developers, it may be an arduous process that they are not used to, but on the Cell, it should be the natural solution. Nuggets of code isn’t even entirely uncommon when one looks at library modules that are loaded at run time with programs on the PC(.dll files in Windows, .so files in Linux). SPEs are a nice fit to load external libraries (middleware), and even within a single project, modular code libraries can be well separated on individual or groups of SPEs. The general point is that nuggets aren’t all bad. If the solution to the problem doesn’t fit the paradigm well, then dividing equally sized and small nuggets may be hard to do. Otherwise, it shouldn’t have a huge impact on development time and could actually speed it up.

The last major thing he said is that Sony is forcing developers to sweat blood to take advantage of the Cell. This is kind of far from the truth. Developers do not have to take absolute advantage of what the Cell offers if it isn’t necessary for what they intend on delivering with their game.* On a basic level, one 3.2GHz general purpose core along with a the RSX graphics chip should serve games well coming straight from a PC with a comparable graphics card and a relatively average demand on CPU resources. This does “waste” 7 SPEs but if a game really doesn’t need it, or can’t find an easy to implement feature or function to put on it, then it should be left alone. Any game that aims to show something technically superior from the Cell CPU should be looking at the Cell in depth, and know its ins and outs pretty well. That forced labor is really just a piece of hardware that Sony is giving to them and a feeling of obligation to use them. It’s only forced if they are necessary to use to get the performance developers want. That is a big “if” but everyone has to measure up if the solution’s benefits are worth paying the price to achieve them. Jon Carmack probably doesn’t see it as being worth it.

The “less optimal decision” that Carmack referred to early in the interview is his assessment on what he believes developers will actually be able do on the Cell – not what they can do in terms of absolutes. He is primarily basing this off of the PC game development world which he is used to. There is truth to his statements as I don’t foresee any PC game developer being able to develop for the PS3 and get any kind of superior usage of its processing power. I do believe there are console developers that will make the machine

*It’s actually somewhat hypocritical for John Carmack to be angry or displeased with Sony at all for setting such a high bar with complex and powerful hardware. John Carmack himself actually has received some displeasure from other developers since if he sets a bar at a certain level, suddenly gamers are expecting all games to look on the level of his or better. The situation is similar in that they aren’t actually forced to do anything, but they feel obligated to if they want to rise up to a certain level.

At QuakeCon:
QuakeCon’s keynote speech is generally given by John Carmack. It is a speech where he gives his general view on where the industry has been going, and where it will likely go in the future. He looks at the gaming industry from many angles and mentions problems that occur in many projects as they are either unique to the industry or exist in the developer world in general.

The next generation consoles got some mention in his keynote speech in 2005 and a few more comments in 2006. He actually does recognize the Playststion 3 to be the more powerful hardware, but not by a considerable enough margin to outweigh the difficultly of programming for it and the effort needed.

In a lot of his recent QuakeCon 2006 keynote speech, he talked about the gains of certain algorithms and techniques in games. He is critical of some of them and sees that a lot of them might require a lot of effort for minimal gains. For the most part he is moving away from doing things like that as the cost of development goes up. This is also probably what factors pretty heavily into his preference of the Xbox360 platform and not an overall power issue assuming infinite time and money. That isn’t to say development for the Playstation 3 is ridiculously harder either.

Anyways, I think its best that any fan boy without a solid background of understanding of John Carmack and the game development world shouldn’t use what John Carmack says in pure words. He always speaks from a perspective – just like this article is doing right now.

Microsoft:
There are a number of Microsoft executives who have made statements about the Playstation 3’s hardware. Here are the major relevant ones:

General Overall Comparison Report Handed to IGN:
IGN: E3 2005: Microsoft's Xbox 360 vs. Sony's PlayStation 3

This is the first result if you type in “Xbox360 vs PS3” or the other way around in Google – and it’s extremely scary in its inaccuracies. The article is basically a direct replica of information IGN received from Microsoft that compares the two consoles. If you read the article, pay close attention to how much of the Cell’s hardware they are ignoring(SPEs). Pay attention to how they push general purpose processing power yet they stress their VMX-128 processing(which is not general purpose). Look at how they add up non-sensible bandwidth numbers that don’t make sense if you’re looking at a system diagram for the Xbox360. They also make huge speculation on what the RSX is actually capable of, when even more than a year later, it is still unknown. This article is important because it is actually the root of a lot of later press statements Microsoft has made about PS3 and outlines their basic strategy/premise against Playstation 3 from a technical perspective.

The grand analytical conclusion of this article was that in some areas the PS3 outdoes the Xbox360, but in other areas the Xbox360 outdoes the Playstation 3 – which is true. But their expert opinion is that all of the areas that the Xbox360 outdoes the Playstation 3, are the more important ones for gaming which makes the Xbox360 have “provably more performance than PS3.” I think those PR guys at Microsoft failed discrete math and all pre-requisite courses leading to it, because they really suck at proofs. I wish IGN had a technical staff that knew some of what they were talking about. Or else they wouldn’t have published it probably. If you hate me for writing this, you can read that article and believe every word written there freely to make yourself happy.

Matt Lee:
Interview with Microsoft's Matt Lee, Xbox 360 developer top gun: Page 1

In this interview, Matt Lee attempts to present a more technical look into the PS3 compared to Xbox360. He is definitely on the development side to things so I assume he holds enough completely knowledge of computer hardware and what hardware means to software. He’s written DopeWars, worked on an MMO for PC called Mythica, and straight from there moved to the Game Technology Group in Microsoft where he now advises other developers on how to write efficient code for Xbox360.

Matt was asked at some point during the interview to explain the Xbox360 architecture. I have already familiarized you with the Xbox360 architecture but you should compare it to his. In this section he made note about AltiVec(VMX-128) instruction set because he was asked to explain it. Matt answered and mentioned some of the additions to the VMX-128 instruction set which were either specific to Direct3D. He also said that the best way to multithread a game has not been decided yet.

When asked about if the Xbox360 hardware had anything to help accelerate physics, Matt pointed out the VMX-128 instruction first, then fell back to the symmetrical cores, 6 hardware threads to spread out the code, unified memory architecture, and even goes further to say the GPU could be used to accelerate physics because it is a math monster and architected reasonably well to handle general purpose calculations.

After saying this about his hardware, he had more to say about the PS3 when asked about it:

When asked about the Cell architecture he specifically says the Cell isn’t designed for gaming as much as Sony would have us believe and immediately focuses on the SPEs. He attacks it for not having branch prediction – which is true, but when you look at the stream/SIMD/vector processing paradigm, branches are rare. Whenever it can’t be avoided, the SPEs have minimal hardware to allow software hints to avoid the penalties of doing so. It seems to me that IBM/Sony/Toshiba went out on a limb to make sure the SPEs did what they needed while avoiding things that cause performance hits.

He also says that the SPEs are poorly suited to run most game code – wait a second, define “most game code” for us Matt. On the screen, general-purpose code takes up the most volume and even takes up the most space in memory. But in execution time, most game code isn’t general purpose and branch heavy.

Additionally, the 8 operational cores of the Cell, with 2 threads on one core provides for more thread space for parallelizing games. But I guess he forgot to give Playstation 3 the same consideration after mentioning the space to spread code across 3 cores.

He then says(in typical MS fashion) a line similar to “it can only do this” and points out that the SPEs are only good for serialized streaming math code that digital signal processors typically do. He may be right in what it is good for, but he is wrong if he thinks it is the only thing they are good for. Use your own judgment on what the SPEs are good for by understanding what they do, and understanding the things developers have processors do to solve them.

His next attack goes at the memory architecture (local store) of the SPEs and he says the lack of automatic cache coherency (traditional cache behavior) seems as if it would cause a lot of overhead to work with, having to copy results to system memory through DMA transactions. The problem with this statement is that he is restricting the operational nature of the SPEs to writing results of computations to system memory. This is far from the truth as it isn’t by any means a necessary action SPEs have to take and is less than optimal in many situations as all 7 SPEs and PPEs would be sharing 25.6GB/s bandwidth. An approach that works far better is using the most out of the element to element communication bandwidth on the EIB, and only accessing system memory when necessary. SPEs are also likely to output data to other input/output devices such as the graphics card, sound hardware, or to other elements to use in a typical game scenario. Writing out to system memory for communication and processing game data is merely the easiest approach in developer’s eyes as it changes the information passing approach to information sharing which is automatic. The fact of the matter is that the SPE local storage has the speed of a traditional cache, but requires manual control. This makes it harder to use, but allows the execution speed to be deterministic and constant and could possibly even exceed the efficiency of a traditional cache if it used that way purely. Assuming there is no need for this level of control, developers can fall back to letting compiler or middleware tools handle the SPE local storage for them.

Matt then moves focus to the PPE and says that the Cell lacks the VMX-128 enhancements. That is true, but why does he isolate that part of the Cell and ignore over 40% of the Cell’s die space? Considering the SPE instruction set is dedicated to vector processing, and is considered a superset of the functionality provided in VMX, the SPEs could be called a VMX enhancement too. It just breaks compatibility and goes down it’s own path for accomplishing the goals. The difference is like apples and oranges - except there are 7 SPEs, and 3 VMX-128 enhanced units.

He also quickly mentions that the single PPE in the Cell has half of the cache size, but fails to mention that Xbox360 is splitting this cache with 3 cores that do not have explicit control over the cache coherency. If the Xbox360 cores were actually running independent threads working on independent data, the behavior of the cache would be very unstable and each core would need to take an piece of the pie – dividing the cache size by 3. The Cell’s PPE is the only consumer of it L2 cache unless access is granted through the PPE’s execution. Additionally, each SPE has its own cache speed memory. I’m failing to see how on chip memory is actually a limitation for the Cell, but not for the XBox360. I guess the Xbox360 advantage needs to be qualified as 512kb of extra automatic cache. Whatever that means next to the extra 1280kb of total on-chip memory in the Cell is up to the developer’s ability to put it to good use.

He also says that all of the “work” has to be crammed onto the PPE in addition to the base PS3 functionality that will be available anywhere. The only “work” that has to crammed on the PPE is the work developers feel is better suited to run there rather than the SPEs. Rendering commands by far don’t have to come from the PPE as any core inside the Cell has equal access to other elements inside the Cell and out. Sending rendering commands is equivalent to any communication with the FlexIO bus. Additionally, he doesn’t know where the system level functionality were the console is placed, and the last official indication of this is that an SPE is used for that purpose.

Matt moves on and states that porting will be difficult (which is true – conversion from SIMD to general purpose and reverse and reconsidering how to use the bandwidth efficiently on both platforms). He says this in a manner which strongly implies that general purpose processing is what is needed and is more easily relocated inside the Xenon. I find it rather difficult to even concoct a reasonable scenario where relocating code between cores(keeping same thread pairings) provides any significant performance difference. Granted in the Cell, code may not be easily movable between an SPE and PPE, does it actually matter?

One of the ugliest pieces of information Matt shares is related to the RSX. He was very direct in mentioning that the audience that actually cared about the 512MBs of shared memory was the developers, and it is important to note that this is the only audience that would care for this since it is as a matter of developer ease, and not performance gains. What he said that was completely wrong was the “you'll never see a PS3 title with more than 256MB of textures at any given time, due to the split graphics and system memory banks” comment. Perhaps he was thinking of the PC world where the bandwidth between system RAM and CPU and video RAM and GPU is in the single digit GB/s order of magnitude. Thus textures in system memory will make a game drag if they are accessed frame by frame. Unlike a PC, the Cell and RSX are able to communicate with 35GB/s bandwidth, and the Cell has 25.6GB/s bandwidth to its XDR RAM. This translates to 25.6GB/s bandwidth between the RSX and system memory. More importantly, this extra bandwidth is coming from a separate bus than video memory meaning that developers might actually want to do this intentionally to increase total bandwidth to the RSX. Rest assured, Matt and Microsoft’s insight is that developers will never want to have split memory banks because it’s just that much easier to share bandwidth and not have to consider the difference. I firmly believe in the causes of developer ease, but I also believe that when making a console to appeal to gamers through performance, hardware comes first.

He finishes up his technical breakdown with his overall belief on the performance difference and calls it a “wash” due to theoretical peak performance numbers that Microsoft ran in the past. I think he is referring to that information in the previously mentioned IGN article which is rather skewed. When you compare theoretical peak processing performances, the Xbox360 is actually twice outdone in floating point operations and many other mathematical operations. I think he means to say that practical performance might be a wash if he anticipates developers will not take advantage of the Playstation 3’s power.

Of course, Matt does make sure he states that Microsoft’s development tools a years ahead of the competition. This scale is in terms of ease of use as power in a development tool is hard to quantify and isn’t ultimately responsible for the quality of the code that comes out. Technically C# is 20 years ahead of C++ and 30 years ahead of C, but that doesn’t prevent C/C++ from doing all of the same things and possibly even more that their successors.

Random Developers:
Magnus Högdahl on IGN:
"The PS3 will have a content size advantage with Blu-ray and a CPU advantage for titles that are able to utilize a lot of the SPUs. The Xbox360 has a slight GPU advantage and its general purpose triple-core CPU is relatively easy to utilize compared to SPUs. I expect that it will be near impossible to tell Xbox360 and PS3 screenshots apart."

He’s a designer, not a programmer for one. And he’s working on a multiplatform title which pretty much already means the game is not considering how it will push either platform to the max unless making it better for either console, is as easy as flipping a switch. The difference he mentions is something that indicates he has barely even scratched the surface of understanding either console.

Software for PS3:
What is all of the hardware inside the Playstation 3 worth if no one writes software to use it? To the gaming consumer - absolutely nothing. Any of the standard key features of the Playstation 3, including the hard drive, motion sensing controller, blu-ray, network, and more, you can expect developers to use for games where it is clearly beneficial. Otherwise Sony will be using it in the base functionality of the console which may extend to game features (keyboard + mouse abstraction). However, in the case of USB, the devices that can be attached are broad. Across the network, the devices the Playstation 3 communicates with, are endless. Don’t expect games to use non-standard controllers or control features through USB except for something that may be well establish like Eye Toy. Don’t expect Playstation 3 to talk to your laptop running a Windows(Samba) share unless Sony writes software to do it. Some features may still go unused in games dependent on how developers see things fit. Whether or not features are taken advantage of depends on the ease of implementation, standardization of the hardware involved, and how much of a difference it will actually make in the end to consumers.

However, with all of this considered, “homebrew” is an entirely open field. Anything people might want to do with the console, will likely be done by a group of developers that also want to accomplish the same task on the Playstation 3. The word homebrew is less appropriate for Playstation 3 considering the Linux OS meant to be an open programming playground for Playstation 3 users and developers. You might not get everything you wanted that Sony hasn’t done for you, but it will go an extra mile to do useful things Sony may have missed or has no intention of doing due to legal issues.

Conclusion:
You don’t have to know that all this crap is in the Playstation 3 or what it means before you choose to buy it, or buy another console, or buy none at all. Gaming hardware is meant to play games. Being more powerful doesn’t directly result in games that are more fun. Developers have to harness the power and that seems to be a challenge with the Playstaiton 3. Rest assured though, the games industry is growing and budgets are rising to the level of putting the extra work to reap in larger benefits. Some companies may not be up par in skill for developing games for the Playstation 3 or are unwilling to undergo the risk when they do not know how many consumers will be exposed to their game. Playstation 3 is powerful hardware – the most powerful to date with broad functional capabilities too.

Background Topics / Index:
These are some of the common concepts which I may or may not have explained in the text. It isn’t somewhat in logical order groups unless I decide to sort it better or differently.

SIMD – Single Instruction Multiple Data. This allows a single instruction fetch to operate on multiple pieces of data. It’s kind of like accommodating multiple people on the same ferry ride instead of taking them individually on smaller boats.

Other similar/related types of processing are:
SISD – single instruction single data
MISD – multiple instruction single data
MIMD – multiple instruction multiple data

Vector processor/processing – Type of processing that involves arrays(vectors) of data needing the same operation applied to each element. Vector processors are most definitely SIMD processors.

Another related topic to vector processing is stream processing. This topic is very similar to the principles that apply to SIMD architectures.

MMX/SSE/3DNow! technologies were also all introduced to add better SIMD processing ability on general purpose CPUs. MMX didn’t do the best job of this as it shared floating point registers with Intel’s Pentium chips and thus made SIMD processing and scalar floating point operations unable to occur at the same time.

Scalar processor – Basically a SISD processor. They will execute instructions one at a time, with single pieces of data.

Superscalar processor –Basically a SIMD processor. It is able to handle multiple pieces of data for a single instruction.

DSP – Digital signal processing. Generally used in the process of taking an analog signal (sound/video), converting it to a digital form, processing it by applying some filter or transformation, outputting the results (in digital format to some internal part), and finally converting it to an analog signal again. The chain doesn’t have to be implemented like this and only one part of it actually represents the processing element.

GPU – Graphics processing unit. Generally performs the rendering of 3D worlds and images in a 3D game. At the very basic level, you pass it geometry that defines surfaces, textures to apply to those surfaces, and pass lighting parameters where it goes through numerous matrix multiplies and algorithms to generate an appropriate view that has depth cue effects. This is a vastly simplified explanation of the 3D graphics pipeline and graphics cards general do far more for games today. The obvious additions to the 3D pipeline are vertex shaders which apply per-vertex operations on vertices, and pixel shaders which perform per-pixel operations on pixels after they have been rasterized.

GPU hardware vastly outperforms traditional CPUs at this task, but it can be alleviated of this task to the CPU and the graphics card would be reduced to only moving memory(frame buffer) to the analog or digital outputs to the screen it is displayed on. This would make for an unbelievably slow game though. When graphics cards first came out, they were not very programmable. They had configurable pipelines depending on application needs, and you generally passed geometry as they simply rendered the scene according to those parameters. Vertex and pixel shaders are bringing more control back to the programmers rather than just configuring.

CPU – Central processing unit. This is the “software” programmable aspect of computers. Everything the CPU does is explicitly spelled out on some level of software. A game executes off of the CPU but will likely assign tasks to other processing units such as the GPU.

ALU – Arithmetic and Logic Unit. These units perform arithmetic(add, subtract, multiply, divide, etc) and logic(and, or, not, nand, xor, etc) operations on registers. CPUs and GPUs both have many ALUs that are used in many parts of the pipeline.

Latency – Access time. It is basically the time it takes for a message to start to arrive at its destination. You can think of it like the speed of sound. Latency would be the time it takes for the sound to travel to your listener and start to be heard, not the time it takes for you to complete your message. High latency is worse than low latency. On determinant of latency is the bus the data is traveling on – i.e. light travels slow in diamonds but faster in water. Another determinant for latency is the speed at which the request can be fulfilled – i.e. RAM has the actually find the memory bank to get the data from or write the data to. This is called CAS latency and is a far more in-depth concept that I just found out about while doing more research for this post. You can think of CAS latency as the time it takes the operator on the phone to find what listing you requested.

Bandwidth – Speed of transmission. It is basically the amount of data that can be sent and received continuously between two participants communicating. You can symbolize it as being the rate at which the speaker can talk and the listener can comprehend the speech. In the case of bandwidth, the limiter is the slower of the two participants. In other words, if the listener can only comprehend 100 words per minute, it doesn’t matter if the speaker can speak at 200 words per minute as 100 words will be dropped. In the case of computers, the speaker would be capped since the listener would be dropping data that needs to be received.

Deterministic – The property of being able to be predicted or determined.

Cache(ing) – a memory bank set up to improve access time(latency) from a slower part of memory. It is faster due to its architecture, and also likely due to its physical proximity to the unit that needs access to it.

CPU caches are used to avoid high latency access to RAM which is usually in hundreds of cycles as opposed to single digits to 20 cycles. Traditionally, CPU caches are hardware controlled which means it is “automatic” from a software perspective.

You also hear the term “cache” in other contexts such as hard drive caching. This is relative to an optical media format, and is primarily done to improve the bandwidth limitation from the optical media and not a latency issue – since latency to both devices is extremely high anyways. Caching also occurs with web browsers storing content offline and checking to see if they have updated since they last requested the resource.

Pipelining – Most all processors made for over a decade have a pipeline or pipelines. It is pretty much an assembly line of processing instructions, where a single instruction has to go through various stages for completion. It might not seem obvious that a simple instruction like addition would have stages, but it does have some.

These stages represent one clock cycle as instructions spend only one cycle in each stage and are completed to move onto the next. A 7 stage pipeline would mean that the longest instruction takes 7 cycles to complete from the moment of entry to the moment it exits the pipeline. In order to not waste this natural design, pipelining allows multiple instructions to be in the pipeline simultaneously. Thus an addition instruction between two operands can be in the pipeline at stage 3, subtraction in stage 2 with two operations, and a load instruction in the pipeline at stage 1. Doing this also means that an instruction decoder has to be placed at each stage in the pipeline to know what it needs to accomplish for that piece of the puzzle.

Deep pipeline – a deep pipeline is one with many stages. The Pentium 4 has around 20 stages in its pipeline. A deep pipeline presents issues which need to be addressed by other techniques.

Hyper-threading – Duplicating hardware pipelines to allow for two pipelines to execute code simultaneously. The benefit of this is primarily to allow processing of two independent threads simultaneously. It also provides the benefit if a pipeline is stalled due to a high latency memory access which could potentially take hundreds of cycles. It allows the other pipeline to run if it isn’t dependent on the other.

ILP – Instruction level parallelism. Generally this is a topic of scalar processors. It basically is a property of instructions that are independent of each other and can be executed concurrently. Additionally, if one considers this property a little deeper, you can see how it also means the instructions can be executed in any order.

Out-of-order execution – This is a CPU feature which would allow instructions to be executed out of the order that it is issued by the code as the hardware sees fit. The reason for this is also to avoid pipeline stalling. Basically, if an instruction will have a latency hit at all (cache or RAM access), it might be able to execute certain instructions before the completion of a slower task.

Out-of-order execution uses hardware to analyze ILP. It also has an instruction window at the end of the pipeline to re-order the instructions at the end if necessary.

In-order execution – Opposite of out-of-order execution. Basically, CPUs that have to issue instructions in order because they lack the hardware to execute them out of order and reorder them appropriately. This is generally considered inferior, but saves die space and power dissipation due to less hardware, allowing for higher clock speeds and greater efficiency.

Word size – a WORD in computing is the natural unit size that the particular architecture can handle. On a 32-bit processor, the WORD size is typically 32-bits and operations performed in memory are fastest when aligned in 32-bits segments. Instructions are 32-bits in size as to take only 1 cycle to fetch the instruction.

Word name variations come in DWORD (double word), or QWORD(quad word) – and hopefully you can figure out their relative sizes from their names. Today, WORD most commonly represents 32-bits even if the architecture may not be 32-bit.

VLIW – Very long instruction word. Binary opcodes are what tells hardware what to do. Along with those opcodes are labels for what registers to perform the operations on, or literals (data is actually in the instruction) to perform the operation on. Altogether, the opcode and parameter information make up an instruction. The size of an opcode is determined by the number of possible instructions the hardware can perform, and the size of the parameters is dependent on the number of registers possible to perform the operations on, or the size of the data that might be encoded into the instruction itself.

Typically, a 32-bit processor uses 32-bit instructions. This means that one instruction will be processed at a time as the whole 32 bits comes in at once and handles execution in a linear fashion. On a 64-bit or higher processor, a bigger instruction(64-bits wide) can be fetched in one cycle, but if the instruction set can fit in only 32-bits, this extra space can be used to fetch and decode two instructions at once to be executed in parallel down two separate pipelines.

VLIW is an approach that is based on ILP and is determined at compile time. Unlike superscalar CPUs, the VLIW approach contains separate instructions for each execution unit/pipeline instead of one operation to perform on many pieces of data, using multiple execution units to accomplish the same task in parallel.

Branch prediction – In a pipelined architecture one of the issues is branching. How does the CPU know which instructions will follow? In the case of a branch statement, the direction lies in the result of the conditional logic which is elsewhere in the pipeline and the results of which may not be known yet. If the pipeline is deep, then a higher number of cycles would be wasted by flushing the pipeline due to the wrong set of instructions being loaded.

Branch prediction hardware can be very simple or complex. One of the simplest techniques is a branch history. I forget the exact statistic, but in general branch results are usually the same as they were before. This is evidence if you’ve ever coded and done for loops with code that looks like this:
Code:
for(int i = 0; i < 100; i++)
{
//do something
}
It might not be evident that there is conditional logic every iteration in a loop, but it is there in the form of checking if i is less than 100, and that check will be true 100 times, and false only once.

Loop unrolling – The processor of flattening out repeated code. On a high level it is the difference between telling someone to hand over 100 apples to you one at a time making it 100 iterations of “handing over.” Or you could tell them to hand you 100 apples, 5 at a time going over only 25 iterations of handing over. In code it might look like:

Code:
//normal loop
for(int i = 0; i < 100; i++)
array[i] = array[i] + 1;

//unrolled loop (to a degree)
for(int i = 0; i < 100; i+= 5)
{
array[i] = array[i] + 1;
array[i + 1] = array[i + 1] + 1;
array[i + 2] = array[i + 2] + 1;
array[i + 3] = array[i + 3] + 1;
array[i + 4] = array[i + 4] + 1;
}
Both loops accomplish the same thing but one takes larger strides, iterating less times, hitting the branch check ‘i < 100’ fewer times.

On a scalar processor this is a benefit due to less branching needing to be done, but it requires use of extra registers. This is why the SPEs have such a large register file of 128 registers at 126-bits wide.

Motherboard – houses all components of a computer based system. A CPU will connect to it, RAM will be connected to it, and video card will be connected to it with attached video memory. It is important that a motherboard’s support exceed or match the components that are put on it, otherwise the components will be stepped down to what the motherboard supports (in the cases where it is still compatible). For example, if you have fast DDR RAM, but your motherboard doesn’t support it, connecting DDR RAM will not give you higher bandwidth. If your motherboard doesn’t support hyper-threading/multi-core CPUs, your bios and operating system will never see it and thus never use it unless it is utilized by hardware mechanisms.

Northbridge – part of a motherboard that houses the fast components of a computer system. Typically this is the RAM and graphics chip. There is a relatively large amount of bandwidth required from these components.

Southbridge – part of a motherboard that houses the slower components of a computer system. Typically these are I/O devices like optical drives, hard drives, USB, network devices, and other permanent storage devices.

Queue – first in first out (FIFO) data structure. Basically it is the traditional concept of a line where the order of exiting is the same order they came into the line. Queues are typically modified from this strict traditional sense to accommodate for priority. A priority queue, would be something like a hospital line, where fatally injured patients are moved to the front of the line to be processed first while others with non-fatal injuries can wait and still be healed.

Read vs Write Priority – On a computer system with memory bandwidth limitations, if the bandwidth for reading and writing are not equal, the read speeds will typically be greater than the write. The reason for this is that write operations do not need to have occurred until it is actually accessed at a later point in time which isn’t always immediate. Write operations can wait in a queue to be processed when the bandwidth is available instead of immediately. On the contrary, reading means that the data is needed *now* in an operation or the system might have to wait for it causing a pipeline stall.

Order of Magnitude – Used to describe a scale of comparison. The scales are separated by an exponent, typically 10. For example, numbers between 1 and 10, are in the same magnitude of 10^1 (10 to the first power). Numbers between 10 and 100 are in the magnitude of 10^2. To be separated by orders of magnitude is the direct difference between the exponent of the scale of the two numbers. For example, 5 and 500 are two orders of magnitude away since 5 is magnitude 1 (10^1), and 500 is of magnitude 3 (10^3). 3 minus 1 is 2 -> two orders of magnitude separation. Order of magnitude differences in performance are huge in the world of computing.

In the computer science world, the common base for the logarithms is 2, not 10. So if you hear this term being used, it generally refers to the base of 10 unless you are talking about computing. In this post, the base I am referring to is 2, since this is the world of computing.

Order of magnitude may also be used to referred to different common scales depending on application. For example, seconds is a magnitude lower than minutes. Minutes is a magnitude lower than hours, and so on so forth on the scale of time. Same thing can be said for distance when you jump from inches, to feet, to miles; jump from centimeters, to decimeters, to meters, to decameters, to kilometers. The important thing to know is that order of magnitude is almost always specific to the context it is used in.

Dot product – A mathematical operation between two vectors that results in a scalar value (plain number). If this value is 0, the vectors are perpendicular, otherwise the larger the result of this operation, the more “parallel” the two vectors are – there is a maximum value of the result depending on the magnitude of the two vectors.

The calculation of a dot product can be done in two ways. A represents a vector, B represents another vector, and ~ represents the dot product operation. Both A and B have x, y, and z components are referenced using A(x, y, or z) and B(x, y, or z). Theta is the angle between the vectors A and B. Standard order of operations apply(multiply before adding). |A| represents the length (also called magnitude) of the vector A relative to the origin (0, 0, 0).

A~B = |A| * |B| * cos( theta )
Or
A ~ B = A(x) * B(x) + A(y) * B(y) + A(z) * B(z)

The prior way to find the dot product is not fast considering there is a trigonometric function, and calculating the magnitude of a vector involves other costly operations on computers that I won’t get into. The main purpose of this is to see that a dot product is nothing but a series of multiplies, and then addition between the results. This operation lends itself well to SIMD architectures.

Dot products come up often in 3D game programming. One application of the dot product is to generate vertex normals(vertex referring to a triangle surface and not 3D position). Normals are generally perpendicular vectors to the surface and are needed to apply realistic lighting models to surfaces. Surface normals can be used in other creative ways to accomplish other 3D effects too.

Game loop – The “loop” constitutes one frame of animation/action/calculations that a game performs to simulate a real time experience. The speed of this loop represents the frames per second the game is running at. It is pretty much the same as how a movie is displayed – each frame is displayed individually and shown to you to deliver the effect of motion. Similarly, each frame updates game objects and re-renders them in new positions according the new input, AI routines, or physics reactions. Traditional steps that need to be accomplished in a game loop are (loosely in order):

1. Get user input.
2. Update player avatar (who the player is controlling).
3. Update the game’s objects.
4. Check for collisions, apply physics, and react appropriately.
5. Render all of the objects in their new positions.

That is of course, a stripped down game loop. Sound could be initiated anywhere from steps 1-4 depending on what happens. Steps 3 and 4 are very interrelated, and even step 2 could be sucked into it. By no means is this order strict and often parts of the loop are going on throughout the loop as soon as possible (to ensure fastest completion).

Vertex – in the 3D graphics world, a vertex simply represents a single 3D point in space – x, y, and z. 3 vertices make up a triangle. 4 vertices make up a square (or two triangles). 3D worlds are made up of a large set of vertices to define primitives(basic 3D constructs) that are used to display objects on the screen.

Frame buffer – the memory that contains the pixel information of what can, or is going to be displayed on screen. A frame buffer is the result of rasterizing 3D information (converting to pixels). Pixel shaders operate on frame buffers.

Pixel shader – a program that is executed on the GPU that processes pixel information after the 3D world has been rasterized. A pixel shader could be responsible for post processing effects such as making the whole screen red by simply modifying all pixels to have more red than they started out with. They could put rain effects on the screen by adding pixel groups that simulate rain. They can blur parts of an image for focus effects. The primary thing to remember is that it occurs late in the 3d graphics pipeline and works on a frame buffer and outputs a modified frame buffer.

Vertex shader – a program that is executed on the GPU that processes vertex information. A vertex shader is a prime candidate for cloth simulation by modifying the vertex position of each point on the cloth surface. It can also be used to simulate water surfaces

Anti-aliasing – common abbreviated as “AA.” This is the process of getting rid of jagged edges and other artifacts that occur in a 3D image. The two approaches to accomplishing this are multi-sample anti-aliasing(MSAA), and full scene anti-aliasing(FSAA).

MSAA takes the frame buffer, and samples it a number of times, progressively producing a less anti-aliased picture. The number of times the image is sampled is represented by the multiplier in front of MSAA. In other words, 4xMSAA samples the screen 4 times – thus has to be read, processed, and dumped to memory 4 times before it is done.

FSAA is rendering the frame buffer at a much larger size than the resolution that will be displayed and then image is then down-sampled once to the display resolution. The multiplier in front of FSAA represents the size of the over-sample. In other words, 4xFSAA will render an image 4 times the size of the actual resolution. This means the frame buffer size will take 4 times the memory required than the actual end display surface.

VMX-128 – This is the SIMD processing unit and instruction set name for the PowerPC core. It was named AltiVec by Motorola who invented it. Due to trademark issues IBM has renamed it VMX-128.

ICT – Image Constraint Token – for HD-DVD and Blu-Ray, if content providers wish to turn this token on in their media, it will only enable playback through approved HDCP signals. If at any point, the signal goes through an unapproved medium, the image quality will be down-sampled to 540p.

References:
This is by no means a formal list or all inclusive. Over time it is hard for me to remember if I read something in an article, encyclopedia, journal, or learned it in the classroom. I’m actually positive I have many sources not listed here that I read, but I only added these because I either remember actually using something from it, or it was a good article that shared similar information with another that I did use. Thankfully this isn’t a dissertation or anything so no one’s going to fry me for plagiarism.

SIMD architectures: Page 1 - SIMD Architecture article.

Main Page - Wikipedia, the free encyclopedia - Wikipedia used to gain a general understanding of “what things are” for many of the topics. For absolutely specific information on the hardware, I generally followed its references to other articles.

http://www.blachford.info/computer/Cell/Cell0_v2.html - Very good old article giving an in-depth look at the Cell processor. Some of the specifics in this article might be invalid for the PS3’s Cell configuration.

http://www.ati.com/developer/eg05-xe...gett-final.pdf - PDF warning, Light XBox360 GPU coverage. Offers mostly architectural overview.

Just like being there: Papers from the Fall Processor Forum 2005: Application-customized CPU design - Most technically detailed article I found on the Xbox360 CPU hardware.

http://www.hotchips.org/archives/hc1.../HC17.S8T4.pdf - a good PDF with system level diagrams of Xbox360 hardware.

Inside the Xbox 360, Part II: the Xenon CPU: Page 1 - Arstechnica article covering the Xbox360 CPU.

Details of ATI's Xbox 360 GPU unveiled - The Tech Report - Page 1 – good article covering the Xbox360 GPU.

GamePC - Custom Build Computers, High Performance PC, Custom Computer, Custom Desktop PC – article with some nice coverage on XDR RAM.

AnandTech: Microsoft's Xbox 360, Sony's PS3 - A Hardware Discussion – Pretty good AnandTech article covering an overall comparison between the Playstation 3 and Xbox360. It is one of those “we’ll make them equal” type comparisons though.

AnandTech: Hardware Behind the Consoles - Part I: Microsoft's Xbox – good AnandTech article covering the hardware between PS2 and Xbox last generation.

Cell Broadband Engine Architecture and its first implementation - technically detailed IBM resource for the first implementation of the Cell processor. Includes some very good detail on what kind of performance you can get from the Cell, and in what situations.

Introducing the IBM/Sony/Toshiba Cell Processor — Part I: the SIMD processing units: Page 1 - pretty good Arstechnica article on the Cell processor – part I.

Introducing the IBM/Sony/Toshiba Cell Processor -- Part II: The Cell Architecture: Page 1 - pretty good Arstechnica article on the Cell processor – part II.

Real World Technologies - ISSCC 2005: The CELL Microprocessor – Real World Technologies article on the Cell processor.

AnandTech: Understanding the Cell Microprocessor – Good Anandtech article on the Cell processor.

IBM JRD 49-4/5 | Introduction to the Cell multiprocessor - Great IBM article giving a good introduction to the Cell.

The Cell project at IBM Research - good site covering the Cell project and various aspects and design goals of it.

Cell BE Handbook v1.0 (May 2006) – I used this mostly to just read up on some of the instructions on the SPEs and insight to some of the problems and applications of SIMD.

Power.org - Cell Developer Corner - Cell Developer Corner. This site has presentations that can pretty much teach you all about the Cell and more detail than what I covered here. It’s a very good resource that developer (especially team leads and software architects) for the Playstation 3 should know as they are working on a project.
*** POST UPDATE ***
Vertex shader – a program that is executed on the GPU that processes vertex information. A vertex shader is a prime candidate for cloth simulation by modifying the vertex position of each point on the cloth surface. It can also be used to simulate water surfaces

Anti-aliasing – common abbreviated as “AA.” This is the process of getting rid of jagged edges and other artifacts that occur in a 3D image. The two approaches to accomplishing this are multi-sample anti-aliasing(MSAA), and full scene anti-aliasing(FSAA).

MSAA takes the frame buffer, and samples it a number of times, progressively producing a less anti-aliased picture. The number of times the image is sampled is represented by the multiplier in front of MSAA. In other words, 4xMSAA samples the screen 4 times – thus has to be read, processed, and dumped to memory 4 times before it is done.

FSAA is rendering the frame buffer at a much larger size than the resolution that will be displayed and then image is then down-sampled once to the display resolution. The multiplier in front of FSAA represents the size of the over-sample. In other words, 4xFSAA will render an image 4 times the size of the actual resolution. This means the frame buffer size will take 4 times the memory required than the actual end display surface.

VMX-128 – This is the SIMD processing unit and instruction set name for the PowerPC core. It was named AltiVec by Motorola who invented it. Due to trademark issues IBM has renamed it VMX-128.

ICT – Image Constraint Token – for HD-DVD and Blu-Ray, if content providers wish to turn this token on in their media, it will only enable playback through approved HDCP signals. If at any point, the signal goes through an unapproved medium, the image quality will be down-sampled to 540p.

Playstation 3 and Xbox360 – Comparing and Contrasting

Playstation 3 and Xbox360 – Comparing and Contrasting:
Before I compare and contrast with the Xbox360 hardware, here are some quick facts about the Xbox360 hardware:
Xbox360 Quick Hardware Summary:
The Xbox360 has a tri-symmetrical core CPU. Each one of the cores is based on the POWER architecture like the PPE inside the Cell, and is clocked at 3.2GHz. Each core has 32kb L1 instruction and 32kb LI data cache, and all share a 1MB L2 cache. Each chip also sports an enhanced version of the VMX-128 instruction set and execution units. This enhanced version expands the register file from 32 128-bit registers, to a pair of 128 128-bit registers – with one execution unit per core. Each of these cores can also dual-issue instruction and handles two hardware threads, bringing the Xbox360 hardware thread support total to 6. The CPU and GPU share 512MB of GDDR3 RAM. Xbox360’s GPU, codenamed “Xenos,” is designed by ATI and sports 48 shader pipelines using a unified shader architecture. The Xbox360 GPU also has 10MB of eDRAM for the frame buffer and over 200GB/s of bandwidth between this eDRAM and a simple logic chip to perform a limited set of operations such as anti-aliasing and z-buffering.

The system sports a DVD9 optical media drive from which games are loaded, a controller with rumble features, and 100mbps Ethernet.

Head To Head:
General Architecture Differences:
One thing I think is important when looking at a computer system’s architecture is a visual diagram. In the world of computing, physical distance between parts of a computer system generally correspond with the speed (latency wise) of their communication. Also a diagram shows the flow of memory, outlining where bottlenecks might exist for certain components to access large data from specific remote areas of memory.

Here are two diagrams of the major components on the Xbox360 motherboard:






Here are two diagrams of the Xenon CPU:





Comparably it is harder to find verbose diagrams of PS3 hardware but here is one I found on AnandTech:


This diagram has a likely discrepancy relating southbridge (I/O) being connected through the RSX. It is likely the southbridge will connect to the Cell directly via Flex I/O given the large bandwidth available through the interface and the GPU not being a recipient of I/O.



There are plenty of other Cell diagrams on the internet and here are two of them:





Bandwidth Assessment:
I recall an article IGN released shortly after or during E3 2005 comparing Playstation 3 and Xbox360. Microsoft analyzed their total system bandwidth in the Xbox360 and came up with a bandwidth figure around 5 times that of the Playstation 3. One of the big reasons for this total number being higher is the 256GB/s bandwidth between the daughter die and parent die in the Xenos(graphics chip). I will explain the use of the eDRAM memory later, but it is important to know that the logic performed between those two components with 256GB/s bandwidth hardly constitutes a major system component. Additionally, Microsoft added up two bandwidths figured that were in series (thus they were sharing the same bandwidth) that shouldn’t have been added. Context like that matters a lot, because bandwidth between any two elements is only as fast as the slowest memory bus in-between. The only bandwidth figures that make sense to add together are those on separate and parallel buses to the end destination(s).

The biggest ugly (and this really is a big one) in the Xbox360 diagram should be the location of the CPU relative to the main system memory. It has to be accessed through the GPU’s memory controller and shares the same 128 bit bus to GDDR3. The Xbox360 GPU’s 22.4GB/s bandwidth to the system’s unified memory, but this bandwidth is split between the GPU’s needs and the CPU’s. This means that if the Xenon(Xbox360 CPU) was using its full 21.6GB/s bandwidth to system memory, there would be 800MB/s left for the GPU. If the GPU was using its full bandwidth to this memory, none would be left for the Xenon. Additionally, the south bridge(I/O devices) are connected through the GPU also, and all of these devices are actually destined to go to the CPU unless sound for the Xbox360 is done on the Xenos. The impact of this is considerably less since I/O devices probably won’t exceed more than a few hundred MB/s during a game, and isn’t shared by GPUs 22.4GB/s access to main memory. This bandwidth is still going through the same bus that the CPU uses to access RAM and depletes off of the 21.6GB/s communication with RAM and the Xenos.

Looking at the diagram of the Playstation 3, you can see that the RSX has a dedicated 22.4 GB/s to its video memory, and the Cell has a dedicated 25.6GB/s to its main memory. Additionally, if you wanted to find the bandwidth the RSX could use from the Cell’s main memory, it go through the 35GB/s link between the Cell and itself, and then go through the Cell processor’s FlexIO controller, on the EIB, to the Cells memory controller which is the gatekeeper to RAM. The slowest link in the line is the bandwidth the XDR memory controller which is 25.6GB/s. If the RSX uses this bandwidth it is being shared with the Cell. In general, the major components in the Playstation 3 have their own memory to work with which provides maximum bandwidth to the respective pools of memory that each component will be using.

In terms of peak performance, if both the GPU and CPU for both consoles were pushing the maximum bandwidths from their respective memory banks simultaneously and full time, the total for Xbox360 would be 22.4GB/s, and the total for the Playstation 3 would be 48GB/s. Considering the situation where half of the time the CPU uses bandwidth, and another half the GPU uses the bandwidth, the Xbox360 has a straight 22.4GB/s for each the CPU and GPU. The Playstation 3, in this situation, has 25.6GB/s for the CPU, and 22.4GB/s from GDDR3 + 25.6GB/s from XDR simultaneously (since it’s not being shared). I’m not fully qualified to answer which of the two situations is a more accurate representation of bandwidth usage in games, but either way comes out with Playstation 3 on top with general bandwidth.

Still Xbox360 has eDRAM hold up the battle in terms of bandwidth next to the Playstation 3. In a traditional GPU setup, frame buffer operations occur using bandwidth to main video memory. This has a dramatic impact on the GPU’s performance as a few of those operations consume large amounts of bandwidth. Because the eDRAM and logic to perform these operations reside on a bus separate from GDDR3 in the Xbox360, these operations are considered “free” as they do not incur a penalty to the 22.4GB/s bandwidth limit to the system’s memory. How much bandwidth does this eDRAM take off? That question hasn’t been answered in good detail to actually calculate how much bandwidth is lifted off of the main GDDR3 memory bus compared to how much is used for the other bandwidth consumer of GPU memory – texturing and texture filtering.

Xbox360 “Xenon” compared to Playstation 3’s “Cell” – the CPUs:
Inter-core communication speed:
One mystery with the Xbox360 (at least in my view) exists with the inter-core communication on the Xenos CPU between its cores. IBM clearly documents the Cell’s inter-core communication mechanism physically and how it is implemented in hardware and software. This bandwidth needs to be extremely high if separate cores need to communicate and share data effectively. The EIB on the Cell is documented at a peak performance of 204GB/s with an observed rate at 197GB/s. The major factor that affects this rate is the direction, source, and destination of data flow between the SPE and PPEs on the Cell. I tried to find out the equivalent piece of hardware inside the Xenon CPU and haven’t found a direct answer. Looking at the second architectural diagram of the Xenon, it seems that the fastest method the cores can use to talk to each other is through the L2 cache and main system memory. Granted, the Xenon only has 3 cores that shouldn’t be pushing large bandwidth between them. The issue is that game modules are usually highly dependent and will need to talk to each other frequently.

The problem in looking for a single bandwidth number is the fact that the multicore design of the Xenon is much more like the traditional PC multicore design. This means there is still one executable that is the game code, and threads are all part of the same executable and have access to the same variables and state through system memory. The Xenon cores don’t really “talk” to each other, but rather share information. Essentially, this means the speed of communication between cores is that of the L2 cache, or in the case of a cache-miss it is as fast as access is to main memory. This nature of operation in the Xenon and many desktop multicore CPUs is probably what causes developers to believe that variables on the Cell need to be written to system memory instead of “passed” to another execution element directly.

The setup in the Cell is undeniably more difficult to accomplish multithreading, but if it is accomplished it can do so in a way that makes a smaller impact on the bandwidth needed from system memory.

Enhanced VMX-128 instruction set:
Undoubtedly, this feature is touted anytime Microsoft is asked to address the power of their hardware. So let’s take a look at what it means:

The VMX-128 instruction set is a superset of the standard VMX instructions provided on the base PowerPC architecture. It also is an improvement of the hardware and expands the 32 128bit registers to 128 128-bit registers. Each one of the cores in the Xenon has two register files that share the same execution resources.

Measuring up one Xenon core against the PPE in the Cell, arrives are a spanking against the Cell. The Cell’s PPE has a smaller instruction set, only 32 registers, and only one PPE – but there’s a bit more inside the Cell than just that. The other 7 cores in the Cell are fully blown SIMD units that also take on a super set of the VMX instruction set. Because it is different and not compatible, it isn’t considered a superset, but in terms of functionality, it is. In that respect, Each SPE has 128 128-bit registers and an execution unit for that register file.

Bringing it together, the 3 enhanced VMX-128 vector units should be compared to the SPEs in the Cell – not the single weaker vector unit on the Cell’s PPE only. Doing so is an imbalanced comparison and makes little sense.

The dot product instruction is also usually brought up when VMX-128 is mentioned. A dot product can be calculated by multiplying corresponding elements across vectors, and taking all of those products and adding them together to get one scalar result. Such an instruction fits in naturally SIMD hardware that supports a multiply-add instruction in conjunction with vector permute. Without labeling the instruction dot product, if both functions are rolled up in a single instruction, that instruction is a dot product equivalent. Such a function exists in the SPE instruction set and thus executes in a single cycle.

There may be other functional differences between both instruction sets, but likely they offer similar functionality in the end that won’t drastically sway SIMD performance in favor of one over the other. The only thing to say is that the Cell does carry more SIMD computing horsepower than the Xenon. That much isn’t subjective. A possible black horse in the race for the Xbox360 is the MEMEXPORT feature of the Xenos. GPU’s carry a wide array or SIMD and MIMD execution units and the Xbox360 has a nice feature to easily export that processing to work for the CPU.

Symmetrical Cores?:
Symmetrical cores means identical cores. The appeal to this setup is for developers. It represents no actual horsepower advantage over asymmetric cores since code running on any of the cores, will run exactly the same as it would run if it were on another core. Relocating code to different cores has absolutely no performance gain or loss unless it means something with respect to how the 3 cores talk to each other. It should be noted though, that thread relocation does matter between the cores, as a thread might not co-exist well with another thread that is trying to use the same hardware that isn’t duplicated on the core. In that case, the thread would be better located on a core that has that execution resource free or less used. The only case of this I can think of where contention could take place is access to the VMX-128 execution unit since there is only one of them per core. This contention is minimized by the Xenon having two register files per core so the entire set of registers don’t have to switch context along with thread changes. Most other hardware is duplicated on the cores in the 360 to allow for two threads to co-exist with no contention.

The Cell chip has asymmetrical cores, which means they are not all identical. The SPEs are all symmetrical with each other and the code that runs on an SPE could be relocated to any other SPE in the Cell easily. While the execution speed local to the SPEs are the same, there are performance issues related to the bandwidth on the EIB depending on the communication end points of the data the SPE is reading from and writing out to. Developers should look at where their SPE code is executing to ensure optimal bandwidth is being observed on the EIB, but once they find an optimal location to execute the code on, they can just put it there through a configuration change. If a task was running on the PPE or the PPE’s VMX unit, then it would have to be recompiled with C, and probably rewritten if hardware specific instructions are in the code before it moves to an SPE, and the same applies if SPE code is moving back to the PPE. Good design and architecture should immediately let developers know what should run on the PPE and what should run on the SPEs, eliminating the frequency of rewriting code due to migrating code between the PPE and SPEs.

Neither setup is necessarily better in terms of performance until developers actually take significant advantage of it and see the actual performance that it offers. Until then, right now symmetrical cores is simply easier to program for, especially when desktop PCs are going in that direction.

Is general purpose needed?:
Another one of Microsoft’s claims for the Xbox360’s superiority in gaming is the general purpose processing advantage since they have 3 general purpose cores instead of 1.

To say “most of the code is general purpose” probably refers to code size, not execution time. First, it should be clarified that “general purpose code” is only a label for the garden variety instructions that may be given to hardware. On the hardware end, this code fits into various classifications such as arithmetic, load/store, SIMD, floating point, and more. General purpose applications are programs made up of general purpose code. In different use cases, the application might do an arithmetic heavy operation relying on a vector unit in the processor, and in another use case the application might make heavy use of memory operations hitting on the bandwidth of the CPU and RAM. Good examples of this are MS Word, a web browser, or an entire operating system. With MS Word there is a lot of string processing which involves some arithmetic, comparison, a lot of branching, and memory operations. When you click import or export and save to various file formats, it is an I/O heavy operation. Applications like these tend to not execute the same code over an over, and have many different functions that can occur on relatively a small set of data depending on what the user does. Ultimately, there is a large amount of code written to handle the small set of data and most of it never gets executed unless the user explicitly tells the application to do something.

Games are not general purpose programs. Any basic game programming book will introduce you to the concept of a game loop. This loop contains all of the functionality a game performs each frame. This loop handles all of the events that can occur in the game. An important principle in a game loop is to avoid branches when unnecessary as it slows down execution and makes the code on screen long and generally inefficient. The paradigm for a game isn’t to build explicit cases for everything that can happen, but to program the nature and laws of various things, and let the game objects handle themselves in that logic. Due to limited resources, completely natural and accurate laws aren’t possible, but it is an end that is being worked towards.

A good example of this is the Cohen-Sutherland line clipping algorithm. Instead of writing lengthy and complicated branches to check the 9 regions a point lies in and the 72 different conditions a line could render in, the algorithm performs 4 simpler checks, and computes a region code which can be easily be used to minimize the work of checking all of the different cases.

This automatic and repetitive processing has to occur for many game objects which represents a massive amount of data, with a relatively small code size. This is opposite of the general purpose paradigm, which typically has a small set of data (word document or html) and performs many various functions on it representing a large code size. Games processing has a large data size, but much smaller code size. Game objects also tend to be very parallel in nature as game objects are typically independent until they interact (collision) – which means they generally can be processed well on parallele architectures if they are well thought out.

What this general purpose power does grant Xbox360 over Playstation 3 is the ability to run general purpose applications faster. If the Xbox360 had a web browser(official or not), the design for such an application would work better on a general purpose CPU. Running multiple general purpose applications is where the most benefit from a multicore general purpose CPU is held. Games can take advantage of the parallelism too, but if the parallel tasks aren’t general purpose in nature, the benefits may not be as large.

AI routines that navigate through large game trees are probably another area where general purpose processing power might be better utilized since this code tends to be more branch laden and variable depending on the task the AI is actually trying to accomplish. Writing code for that on a general purpose CPU is a straight forward task and would execute very well across the board. Generating these game trees, which is also time consuming, may still lend itself to a SIMD architecture as it involves computations based on game state and the Cell offers more parallel units to possibly speed up the task down more independent branches.

XDR vs GDDR3 – System Memory Latency:
XDR stands for eXtreme Data Rate while GDDR3 stands for Graphics Double Data Rate version 3. XDR RAM is a new next generation RAM technology from those old folks called RAMBUS who brought out that extremely high bandwidth RDRAM back during the onset of Pentium 4 processors. DDR was released soon after and offered comparable bandwidth at a much lower cost. RDRAM also had increased latency, higher cost, and a few other drawbacks which ultimately led to it being dropped very quickly by Intel back when it was released. Anyways, take note that DDR RAM is not exactly the same as GDDR RAM.

Anyways, it is hard to make a good assessment on what the exact nature of the performance difference between these two RAM architectures are, but from what I gathered, GDDR3 is primarily meant to serve GPUs which means bandwidth is the goal of the architecture, at the cost of increased latency. For GPUs this is acceptable since large streaming chunks of data are being worked on instead of many random accesses. In the case of CPU main memory, when more general purpose tasks are being performed compared to a GPU, latency has increased importance on memory access times because data will be accessed at random more frequently than a GPU would.

That being said, the Xbox360’s CPUs bandwidth to RAM tops out at 21.6GB/s while the Cell processor still has more bandwidth to its RAM at 25.6GB/s. XDR RAM also does this without incurring high latency, and I’m almost positive its latency is lower than GDDR3 which is considered to actually have high latency. Games are not going to be performing a lot of general purpose tasks so the latency advantage for the Playstation 3 might not be that large, but the CPU will be performing more random accesses to memory regardless. The Xbox360’s CPU latency may be made worse than the already inherent GDDR3 latency issues due to being separated by the GPU.

RSX vs Xenos:
General Architecture:
Unified shaders is a new direction in architecture that ATI and nVidia are both likely to incorporate into their next generation GPUs. In the past, GPUs have used a fixed function pipeline architecture that separated the hardware that vertex shading programs and pixel shader programs executed on. This was statically determined through statistical usage data gathered from games on the market. Generally the number of vertex shader pipelines have been fixed at 8-12 and PC game developers have never seemed unhappy about it since they typically reach the pixel shader bottleneck first. The RSX’s pipeline setup follows in that tradition and offers 8 vertex pipelines and dedicates 24 to pixel shading.

Looking at the RSX’s performance alone is more than likely measurable on the scale of PC cards, and right now the favorite is nVidia’s 7800GTX. Doing so is more like a ballpark estimate and the RSX’s performance is actually likely significantly different from this card in the PC market. One way that the RSX is different than the 7800GTX is that the last reported clock speed of the RSX was supposed to be 550MHz which is faster than the 7800GTX’s core clock speed of 430MHz. The bus that connects the Cell (and XDR RAM) to the RSX is also a significant difference from a 7800GTX in a typical PC setup. This bus has significantly greater bandwidth than a typical PC GPU has and could allow the Cell and main memory to play a bigger role in graphics.

The Xenos is considerably harder to draw a comparison to any popular PC card available on the market today due to its use of unified shaders. The reason for the move is because the most significant increase in performance of graphics cards is not in the clock speed, but rather the number of parallel operations that can occur in one clock cycle. In examining GPU hardware for vertex and pixel shading pipelines, there is also some duplicated hardware that manufacturers could easily consolidate into a unified processing unit or pipeline. Unified shaders offer consolidated hardware units that GPU manufacturers can put more of on a single GPU die. Unified shaders also may offer better utilization of resources due to the dynamic scheduling of pipeline work.

Other complications in analyzing the unified shader architecture occur when looking at the grouping of the Xenos pipelines. I have found two conflicting sources of information where one says they are assigned work in groups of 16 per frame rendering, and another suggests that all of them are dynamically scheduled to do the same thing each cycle. This implementation detail would indicate strongly the level of flexibility and utilization

How much horsepower do the 48 pipelines of the Xenos shape up to the RSX’s 24 pixel and 8 vertex shaders? Such an analysis would require an in-depth look at what exactly each pipeline for each card is able to do in one cycle of operation, multiplied by their respective clock speeds, and typical loads that games will place on them. Additionally extensive information would have to be known on the exact dynamic scheduling model for each pipeline, and any supporting hardware that may be necessary to keep a unified shader architecture competitive performance-wise with the RSX’s fixed function pipeline. To be frank, I don’t know that much information and won’t for a while. Maybe a revision a year from now will just roll up observed results.

Although this statement got the most back lash in the previous revision, I’ll repeat something similar again because I still think it holds truth. Unified shaders were not used in nVidia’s or ATI’s top end graphics cards this generation. It doesn’t say that unified shaders are not the path for the future for both manufacturers, but it does suggest that now(2005-2006) unified shaders may not be up to par with the horsepower that can be put on a fixed function pipelined architecture. Whether or not the Xenos is actually up to par with the future GPUs that may have unified shaders will not be known until they are released and many more programmers start to actually use them and see what areas need improvement to make the architecture more refined for actual use.

Xenos’ eDRAM:
On the Xbox360’s GPU, there are 10MB of eDRAM which provides an assortment “free” frame buffer effects such as anti-aliasing, alpha blending, and z-buffering. This daughter die is connected to the parent die with 32gb/s bandwidth, and has 256GB/s bandwidth between the eDRAM and the logic to perform the aforementioned operations. These operations are considered “free” with respect to system bandwidth since they are performed by hardware and memory that isn’t shared by the rest of the GPU or CPU.

The exact nature of the AA advantage is limited to certain resolutions and pixel depths. Effects that may increase frame buffer size are FSAA, HDR, alpha blending, and z-buffering. Depending on the combination of these effects, the frame buffer size may exceed the 10MB capacity of eDRAM and force developers to come up with a tile rendering solution if they want to use the eDRAM perform those tasks. If a tiling method is used, a performance hit is still present but I am unaware of the exact nature of what this hit actually is. The MEMEXPORT feature is lost in this scenario however.

Xenos’ MEMEXPORT:
This feature is pretty simple. In a typical shader program (pixel and vertex) the output destination is usually static and automatically gets handled by whatever hardware is next in the pipeline. MEMEXPORT allows shader programs to fetch anywhere from memory and output anywhere to system memory on the Xbox360. This opens quite a number of doors as the GPU can easily process vertex buffers or other pixel data, output to memory, and use it again for input for further processing allowing for multipass rendering techniques to be implemented easily. Given the Xbox360’s unified memory, this feature also exposes uses to allow GPU’s execution power(SIMD and MIMD) to do tasks for the Xbox360 CPU. This feature’s major bonus to the graphics of the Xbox360 come from its ability to flexibly handle graphics data.

The Cell Advantage:
The Cell will not, and should not be performing all rendering operations like the E3 2005 demos displayed n a few demos. It should prove as very interesting that the Cell does perform well enough at those types of operations since rendering on a CPU offers more flexibility(not easily harnessed) than vertex and pixel shader programs. It is extremely unlikely and unreasonable to think that the Cell would be processing most of the graphical workload in games, but it is capable and reasonable to carry out tasks where it may be needed.

Generally, any CPU can take on some of the workload of a GPU, but general purpose CPUs have limited hardware that is actually beneficial at carrying out such tasks. Specifically, I’m referring to what the SPEs are able to accomplish versus the VMX-128 units. This is what puts the Cell more in reason to perform this type of task than any other CPU out there.

Other Peripherals:
Hard Disc Drive:
In the case of the Xbox360, a 20GB hard drive is included in the premium version, and it is an upgradeable feature in the core version. Playstation 3 offers a 20GB hard drive on its lower end version and a 60GB hard drive on its premium version. Advantages of a hard drive are generally well known to anyone who has a PC and has ever played a game for it. Both systems having a hard drive considered, there is nothing much to speak of except for the fact that you can get a bigger hard drive for the Playstation 3 if you are a person looking to store and playback larger amounts of media. It is likely both Microsoft and Sony will provide upgrades in the future.

The hard drive being included in all Playstation 3s does point to an increased likelihood of developers taking advantage of the feature for that console.

Optical Media Drive:
You know it was going to come up – Blue Ray vs DVD9. This isn’t really a fair versus. Blue-ray is superior to DVD9 in almost every respect. The only disadvantage Playstation 3 has in this respect is data read speed. The 2x BD read speed is considerably slower than the 12x DVD read speed. The difference is between 72mbps vs ~130mbps, which in terms of common data rates known in the computer world are 8.6MB/s and 15.4MB/s. Should PS3 fans worry about their load times? I don’t think so as this is still higher than Playstation 2’s read speed, and since the hard drive is standard on Playstation 3, this will be large motivation for developers to use hard drive caching methods as a standard feature to avoid load times wherever they may be present.

The clear advantage of blu-ray is capacity and the possibility of playing the next generation standard for HD movie content. Blu-ray has a good outlook at becoming the next generation standard for movies as Hollywood has strong support for Blu-Ray. If it the format happens to succeed on this front, then a bonus functionality features is evident on the Playstation 3 console. Otherwise, the use of blu-ray in the Playstation 3 is limited to blu-ray capacity.

Capacity for games is where the bigger debate still exists between blu-ray and DVD9 with respect to the console war. Will blu-ray be needed for this next generation? I can’t say it will be needed by any genre except any games that will decide to include HD FMV sequences. But that speculation is under the current way things are looking now. In a few years, or 5 years, that could easily change and the space for blu-ray media may turn out to be very useful for certain game genres or implementations. Right now, you can’t make too strong of an argument for blu-ray being needed for the capacity of games other than convenience of what can be included on a single disc. Some developers may take advantage of the extra space for features or purposes not central to game play or visual quality.

Controllers:
Both consoles now sport pretty much the exact same button layout. All “who copied who”s aside, Playstation 3’s controller has motion sensing for better primary control in some game types, and a very reasonable possibility to improve secondary control in almost any genre(i.e. tilting head to look around corners in an FPS, controlling cameras, etc). Xbox360 has rumble feedback which was much enjoyed last generation, and PS3 fans will miss if it doesn’t come back (which it likely wont). Another significant difference is the pressure sensitivity of the face buttons. Playstation 2 had this, and Playstation 3 is most definitely going to include the same (it’s impossible to find out if it really is there or not). Xbox360, surprisingly, doesn’t do this even though the original Xbox controller did. Functionally, the major difference is merely that PS3’s controller has motion sensing.

The degree of motion sensing available on the Playstation 3 controller will not likely leave things impossible to accomplish without it, but will provide an extra degree of control if any games have clear candidates to offload to it.

Xbox360’s supports 4 RF(radio frequency) wireless controllers. Playstation 3 supports up to 7 wireless Bluetooth devices – note the keyword “device” as it means Sony isn’t limiting it to only controllers. Bluetooth notably has a shorter battery life due to its increased bandwidth capability although this issue is mitigated by using a built-in rechargeable battery that charges through a USB cable attached to the Playstation 3. Looking at the player number support, Playstation 3 has jumped to the lead over all other consoles this generation out of the box. Will you do 7 player multiplayer? Probably not if you are playing split screen. 4 players is a comfortable maximum for that mode of multiplayer, but for games where the screen is shared and all players are on the same screen, 7 players is definitely feasible. It actually is entirely possible that even though 7 Bluetooth devices are supported, that Sony may limit the number of controllers to 4 and reserve the other 3 for other device types such as a headset, keyboard, or mouse simultaneously while 4 controllers are being used.

Bluetooth:
In reference to the last section – Playstation 3’s Bluetooth support is labeled with the word device as to be clear that it is not limited to controllers. This means that the Playstation 3 could utilize other Bluetooth devices on the market such as mice and keyboards. Bluetooth is basically aiming to be the wireless USB for computer equipment since RF devices are typically propriety end to end. Any peripheral Sony wants to add to the Playstation 3 in the future has complete freedom to be wireless and use Bluetooth so long as it is able to operate at the bandwidth allowed through Bluetooth 2.0 which is 3mbps.

Developer Tools:
It isn’t a mystery which one of the two consoles is easier to develop for. In case you live under a rock, the easier platform to develop for is the Xbox360. Easier development means a lot of things which are mostly positive. I haven’t used Microsoft’s Xbox360 development tools, but I have used a number of their development tools for the PC and it is Microsoft’s second largest business function aside from their operating system at this point. They are very nice and easy to work with.

Primarily, easier development allows companies to push games out of the door faster at an acceptable quality or high quality. With Microsoft’s tools and API’s developers are less likely to spend time not understanding what is going on in the Xbox360 hardware that is causing performance bottlenecks. They are also going to spend less time figuring out how to accomplish certain tasks because the APIs expose the functionality in a very clean and simple to understand manner. There are many technical related hardships that come up during development that Microsoft is alleviating from developers.

What these Xbox360 development tools allows for is development of games in less time or cost(or a balance of the two) than games developed for the Playstation 3.

The Final Verdict?:
The Playstation 3 really does have a considerable hardware lead when it comes to games processing power. Despite Microsoft’s claims of the Xbox360 having more bandwidth, the evaluation brings in play numbers that make no sense to add up in the context of the “system” and throws in numbers which also shouldn’t be added together due to the buses being connected in series. Vector/SIMD/stream processing is very relevant and needed in games programming to achieve a lot of high end calculations that occur in games today.

Consider why a number of PC games in the past year or two have been tapping into the GPU hardware to get it to accomplish a few things. Consider why research has supported that GPUs are much faster than CPUs at performing many tasks that people though desktop CPUs dominated in. Consider why Ageia is proposing a new major piece of hardware on PCs to aid in processing physics in games. The answer is clear that a certain type of processing is needed, and it is not found in traditional desktop CPUs with general purpose processing power. Desktop CPUs are also not heading in a direction to ever compensate for these deficiencies either. If this post isn’t enough to convince you, you can go out and do research on the various topics yourself.

Microsoft has nice tools to help developers get the most out of Xbox360, which is a noble and needed effort for developing better games. But in the end, Xbox360 has a lower absolute performance roof than the Playstatation 3, and over time the lead will show more significantly. I don’t think I can convince anyone but myself of how large this gap may be, so just hold your breath until you see it for yourself. Taste in games is purely subjective though, so Playstation 3 will not necessarily have “better” games, but they will be eventually be technically superior.

There is no real final verdict as far as who will come out on top in this war. Despite which hardware may be marginally or clearly superior, the victor is only decided by whoever sells more hardware and supports subjectively better games. In this article, I’m only trying to look at the computing power and functional abilities of the two machines.

Playstation 3 and PC – Comparing and Contrasting:
Unlike consoles PCs are not static and evolve over time – or rather, the components of a PC evolve over time. In the case of a PC, CPUs, GPUs are the fastest evolving parts of it that are the most relevant to games processing. The downside to a PC is that is not purely a gaming platform and the CPUs are more general purpose in nature to handle code coming from an operating system running many applications at once. It has to perform integer math, floating point math, memory loading and storing, and branching all at an acceptable level of performance such that no area noticeably slows down processing. The other downside to PCs is that motherboards do not advance as rapidly and they represent some significant bottlenecks for PC games today. Here is a quick rundown of what is inside of a PC as it relates to game processing.

PC Architecture Summary:
PC Motherboard – AGP/PCI-E:
Motherboards specifications dictate some of the baseline limits of performances you may be able to get out of a PC. A motherboard is what the CPU, GPU, RAM, and other peripherals are connected to on a PC. Because this is where you connect these components, it sets the rate at which these parts can talk to the CPU or any other component if it does so directly. If a motherboard uses AGP 4x, an AGP 8x graphics card will be limited to communicating with the CPU at 4x speed. When building or purchasing a PC, considerations need to be made to not bottleneck the capabilities of each component. Similar, because of the common standard structure and design of motherboards, advances in PC components can only go as fast as what motherboards will support.

Also, typically on a PC, devices talk to each other through signals and transfers that go through the CPU. The CPU forwards or retransmits information to whatever the destination device is. Heavy bandwidth, or bandwidth that needs considerable processing before transmission, will have an impact on CPU performance.

PC Motherboard – RAM:
PCs today typically use DDR ram at varying clock speeds. The fastest variant of DDR RAM is DDR400 which runs at around 4GB/s in single channel mode, and 8.5GB/s in dual channel mode. DDR offers very low latency access to RAM which is important for desktop CPUs.

PC Graphics Cards:
Graphics cards are probably the single most important factor in determining the visual performance of games on the PC platform. PC games are typically the first to show the latest and greatest rendering methods and techniques. PC game developers typically push these features early to show off their game’s quality that is enabled by the hardware nVidia or ATI releases.

PC graphics cards also typically come with on-board memory so the GPU doesn’t have to gather resources through a slower AGP or PCI-E bus. PC graphics cards typically offer very high bandwidth to video ram since the video card manufacturer is completely in charge of building the link between the video ram and the actual GPU. Very high end GPUs will offer the highest bandwidth to video memory.

Head to Head:
Bandwidth Assessment:
If there was a diagram showing PC motherboards compared to the bandwidth diagram of the Playstation 3, you might be shocked to see some of the narrow bandwidths provided in PCs. Not that this is a primary concern for some games, because you’d also notice that the bandwidth on top end graphics cards today are already well beyond the bandwidth that the RSX and Xenos have to video memory. A top end GeForce or Radeon card has around 50GB/s bandwidth between the GPU and its video ram, while the RSX only has 22.4 GB/s (maybe up to 48GB/s if it uses the extra bandwidth it can get). This factors in greatly with the texture detail and levels of filtering displayed on PC games as compared to those in console games. On a PC, higher quality textures and expensive texture filters are used liberally to take advantage of this added bandwidth. Many games enable these features for relatively easy improvements in visual quality according to the end user’s graphics card capabilities.

Given the situation that all textures and frame buffer operations mostly stay in video memory, PCs operate visually superior to that of consoles given the higher end graphics cards. However, given the faster communication between console CPUs and GPUs, consoles are generally in a better position to pick up the slack in processing, and possibly bandwidth. On the Playstation 3, the FlexIO bus offers some processing power to be tapped into from the Cell for vertex and possibly even texture filtering. Additionally, because XDR RAM is connected to the Cell, the RSX can use this bus as added bandwidth for various operations that are feasible. In the best case scenario, simply using XDR RAM to handle half of the video memory bandwidth consumption, would possibly double the bandwidth of the RSX to 48GB/s. However, the situation is likely not as ideal as an added bus given that the flow of memory goes through two memory controllers, and is shared bandwidth with the Cell processor.

Bandwidth in the areas of sound processing, networking, hard drive, and other I/O related devices are very low and typically aren’t bandwidth limited generally on either front.

CPU performance:
CPUs on PCs are general purpose. They are able to handle a wide variety of operations on an acceptable level so long as an application doesn’t demand an obscene amount of a computing resource it doesn’t provide a lot of. The mainstream CPUs are all x86 based and are scalar processors – meaning they execute one operation at a time (on a single pipeline per core) on one piece of data. General purpose CPUs have gotten extremely fast at executing instructions, but this improvement has not matched by the rate of which data can be given to it. Due to this, a large part of die space on a CPU is taken up by hardware aimed to hide memory access times. This added hardware dissipates a lot of heat and lowers the overall efficiency of the CPU to keep it running fast. This hardware is needed in the general purpose computing domain since random accesses to memory and many different types of operations are frequent due to application switching, and even a single application that has many random variables and functions. This general purpose computing speed is not needed as much for games and the extra hardware and heat generated would not be desirable for games.

Intel/AMD are the primary manufacturers of desktop CPUs today and all have huge amounts of die space allocated to general purpose computing and hiding latency. However, to not be completely outdone by the world of SIMD processing, MMX, 3DNow!, and SSE technologies were added to these general purpose CPUs to improve their 3D gaming and multimedia functions. These SIMD instruction sets and hardware are still behind the single VMX instruction set and hardware included in the Cell’s PPE, and even further behind the SPE and VMX-128 instruction sets as they only have 16 registers as opposed to 32 or 128. SSE only recently supported operations that operate between elements in the same vector register with SSE3, although 3DNow! had this functionality from the start. MMX and 3DNow! also share registers with the x86 floating point registers which means they cannot execute simultaneously with x86 floating point code(x87). Since then, this may have been changed to allow for easy context switching, or offering exclusive registers to avoid the switch between scalar and vector floating point operations.

SSE, MMX, 3DNow! don’t even begin to scratch the power offered on a single SPE on the Cell. Not to mention the Cell has 7 of them in addition to the VMX-128 instruction set. For games processing, Intel/AMD CPUs are vastly outdone, and they will not be catching up this generation or the next. Buying newer and newer CPUs will not increase PC gaming performance drastically, and they won’t be catching up to the Cell for a long time.

Graphics performance:
In purely assessing the graphics cards compared the RSX, the RSX likely doesn’t weigh in along side of the heaviest hitter today. Functionally, the RSX is probably closest to an nVidia 7800GTX, but with added horsepower.

As I said before in the bandwidth assessment, graphics cards have extremely high bandwidth between video RAM and the graphics rendering pipelines that make up the GPU. The bandwidth and processing capability in graphics chips increases quickly as new cards are released on the market, which is about a few versions per year, and a new generation adding more functional advantages about every two years. Consoles are quickly outdone in the eyes of PC game developers in the graphics department. When you see the latest top-end PC game, remember that it’s running on the latest top-end graphics card, and in some cases, these games are targeting cards that aren’t going to run well until the next generation of graphics cards is released or an absurdly high level of horsepower is needed from the existing architecture of graphics cards..

The “Cell factor” added into graphics processing should also be considered in boosting the visuals of Playstation 3’s graphics when compared to PC games. Unlike a desktop CPU, the Cell is actually equipped to process some of the tasks that are performed on a graphics card, and there is enough bandwidth between the Cell and RSX so they both can work closer together to render graphics than a PC would use the two together. The most obvious benefit from the Cell is using it to do hardware transform and lighting (T&L), and other basic or complex vertex operations that a vertex shader might usually perform. Upon entering the geometry to the GPU, a developer would disable these rendering steps since they have been performed already and it goes through these stages on GPU’s rendering pipeline quicker, giving it more time to accomplish something more complex or something in another stage like pixel shading, or anti-aliasing. There is actually feasible bandwidth for pixel shader operations to be done on the Cell before it is handed back to the RSX to do nothing but move it to the frame buffer and send the output signal to the display.

How much processing can be done on the Cell to make up for the PC graphics card advantage? I can’t answer that well since GPU specs and statistics are usually documented in results with little introspection as to what hardware does what, and how quickly it is doing it. Additionally CPUs are able to handle data flow far more flexibly than a GPU can thus offering performance advantages that take deep analysis to conver to numbers. If anyone knows a bit more about this, it would be a good area to get into deeper discussion with. I am pretty confident that the Playstation 3 with the Cell + RSX working together can look on par with many PC games that will be released in 2007. Although beyond that, even the highest developer efforts will eventually be outdone on a technical level.