Hot on the heels of the iPad release comes news that Apple has just (very likely) purchased another processor design firm (via EDN). Intrinsity, the chip design company in question, is a designer of RISC-based CPUs and is rumored to have had something to do with the design of Apple’s new A4 processor. The A4 is Apple’s key ingredient for a smooth user experience in the much-hyped iPad.
Those keeping track of Apple’s purchases will remember that, almost exactly 2 years ago to the day, Apple bought California-based CPU designer PA Semiconductors. However, PA Semi specializes in PowerPC-based designs – a platform that Apple abandoned almost 5 years ago now. But Apple’s most recent acquisition is directly applicable to its current needs in the hardware market, and in particular, its forays into the ARM market. In the official iPad video, Apple engineers and executives discuss their need for a custom CPU in order to let them dictate where the ooomph and power will go, and to what purposes the transistors will be biased.
With all these buyouts and different chipsets in question, it’s easy to get confused. So what is the difference between the ARM, the PPC, and the x86, and where does it matter?
The world of CPUs is a dark, deadly, and dangerous place. After all, the CPU is said to be the literal “heart” of the PC – and as such, it’s the single most-heavily engineered component. Billions of dollars and manhours have gone into the design of these various chipsets and they’ve all been researched, optimized, fabricated, and sold in order to make your computer… better.
The biggest difference between these platforms is the design dogma they follow. The x86 is a CISC architecture: Complex Instruction Set Computer. The other two (PPC and ARM) are RISC-based designs: Reduced Instruction Set Computers. What does that mean? Well, to the end user, mostly nothing. But to the CPU designers and developers, it makes a world of a difference.
CISC architectures can have up to thousands of individual commands supported by the processor that can be used in machine code. Each of these assembly commands can range from a single operation to several hundred or more in length. On the other hand, RISC-based CPUs understand only a handful of different instructions, the minimum necessary to get the job done.
However, this in no way means that CISC is more powerful or that RISC is limited. The difference in the amount of supported instructions is easily explained away by two factors: supported modes, and wrapper operations. All the data dealt with in any computer program is stored in the memory. But in order for the CPU to actually use any of it, it needs to place variables in super-fast (but small and limited) memory locations built into the CPU itself, called registers.
Imagine trying to run the following line of code:
z = x + y
Each of the three variables in the above example is located in the memory. But in order to carry out the operation, x and y will need to be copied from the memory to the CPU, the addition instruction carried out, and the result then copied from the CPU to the location of z in the memory.
A CISC-based CPU like the x86 would have a single instruction that – when given the address of X, Y, and Z in the memory – would do just that. But in a RISC-based CPU, the assembly code would have to explicitly spell out the individual steps: first copy x to a register, then copy y to a register, then add them together, and finally copy the result back into the memory.
At first blush, it would seem that CISC is a much better option. After all, one instruction and the entire line of code is done. But it’s not about operations, it’s about time. Sure, a RISC-based program will need to carry out four distinct operations in order to do the same, but that doesn’t mean it’ll take any longer. In fact, RISC CPUs are consistently faster than their CISC counterparts.
If CPUs were day laborers, it would make sense that CISC is more efficient. After all, a single instruction gets the job done. But, thankfully, CPUs aren’t underpaid interns, they’re over-engineered miracles. The simpler design of the RISC CPU allows it to more efficiently optimize and carry out long sequences of code. The way things are broken down into short, simple, and clear instructions lets it carry out multiple operations at the same time (pipelining) and with less effort.
In fact, it’s now a universally accepted truth that RISC is better than CISC! Actually, because of how much more efficient RISC machines are than their CISC counterparts, most CISC CPUs convert their CISC instructions into RISC instructions internally, then run them!
So why are we still using x86? That’s mainly because of business matters. Intel had x86, Intel had money, and CISC won out. Today, with the optimizations and internal RISC conversions that take place, CISC vs RISC isn’t really about the performance any more. It’s about the business, the politics… and the power consumption.
The complexity of the CISC datapath and pipeline mean that it takes more power to get things done. Intel has worked some incredible miracles and accomplished some amazing things to get the power consumption down, ranging from dynamic scaling of the CPU clock to shutting-down parts of the CPU core when they’re not in use. But x86 remains a power hog. Intel’s Atom platform was an attempt at re-engineering the x86 to make it fit for mobile devices, but at the cost of performance.
There’s no reason that RISC can’t be used for the desktop. ARM or no ARM, there’s a plethora of RISC-based CPUs out there that can be easily adapted for desktop use. But the problem isn’t with the hardware: it’s with the software. Programs written for x86 aren’t compatible with anything else, even other CISC CPUs. That has prevented just about the entire world from trying any other platforms, mainly because Windows only supports x86 on the desktop. The last copy of Windows to support different CPU architectures was Windows NT, which shipped with versions for Intel’s x86, MIPS, Alpha, and PowerPC.
For anyone not on the Windows platform though, there’s nothing really binding them to the x86 platform. Apple chose x86 because, with PowerPC out of the running, x86 was the only viable option back in 2005. Keep in mind, just because ARM can run on the desktop, that doesn’t mean that ARM will run on the desktop: optimizations in the CPU world are always a compromise between performance and power consumption. And the current generation of ARM and other RISC-based CPUs is meant for portable equipment.
It would take some work to create a high-performance ARM CPU meant for the desktop, but that doesn’t mean it won’t happen. With Apple’s just-declared purchase of Intrinsity, it’s clear that it’s a possibility. With the tight grip Apple has over its platform and the strong hardware-software bond, it wouldn’t be too difficult to make the switch to yet another platform – after all, they did it 5 years ago and things worked out. But will they? Most likely not, it’s not exactly in their customers best interest and x86 really is a decent platform. But for the myriad of mobile devices that Apple is getting itself into, x86 isn’t the key. So look forward to more ARM goodiness for your iPad and iPhone in the years to come, but your MacBook is safe in Intel’s loving hands.