Understanding the Microprocessor
Citywide writes "Ars has a very thorough technical piece up entitled Understanding the Microprocessor. It's pitched lower than many Ars articles (all of which are a bit over my head, to be honest), but that's why it's worth checking out: it explains the fundamentals is a very clear and useful way. And as the author notes, this kind of information is really crucial to get a grip on before Hammer arrives."
Maybe this guy should spin this off into a book,
Too late. Charles Petzold has already done it. See CODE. It should be on every geek's bookshelf.
SIMD ~= Array processing. Take this bazillion element array and add 1 to each. MIMD ~= current multiprocessing. x processors running x separate bits of code.
MISD is fairly near useless, since it's basically one great big implicit race condition. It's included in the list for completelness only.
(These two processors in parallel, add 1 to this element and multiply it by 2. So do you get 2 (x+1) or do you get (2x + 1))
"Basically, Hammer (64 bit cpus) = larger addressing space, not nescessarily faster processing."
I suggest you go read the developer docs for the hammer.
Memory addressing has been re-designed, because no-one uses the protection model in x86. etc....
Do you understand me, or the developer docs, probably not.
now read Understanding the Microprocessor and say that the Hammer isn't an improvement.
thank God the internet isn't a human right.
Or, for an even more detailed treatment, try Hennessey and Patterson's _Computer Architecture: A Quantitative Approach_.
I think what you would like, although it's a bit dated, would be Understanding Digital Computers. This book takes starts at the gate level and goes through the layout and operation of a simple 8 bit CPU. I got this book when I was 13. When I went to college and took my digital architecture classes I aced them, and even though that was much more difficult I credit my success to having read this book first instead of diving in naked like most students do/did. It's been forever since I've read it, but I still have it on my bookshelf.
Stupider like a fox! - H.S.
Maybe this guy should spin this off into a book, make a killing selling it to Undergrad CS students lost in space...
Computer Organization and Design: The Hardware/Software Interface is the ultimate intro to microprocessors book. It covers instruction sets and architecture extremely well. As the title suggests, it show how (and why) the instruction set and architecture are tied together. (Most of the discussions revolve around MIPS, but they have stuff on Pentiums and PowerPCs, too.) The meat of the book involves actually designing a pipelined, MIPS-like processor from scratch. Really cool stuff - you can actually implement the final design on an FPGA board pretty easily. The final design is, of course, much much much simpler than an actual processor, but it really gives you a sense of what all the components do and how they function together. Anyways, highly recommended...
Computer Organization and Design: The Hardware/Software Interface from Amazon
Second, the first two instruction types given are arithmetic and load/store. Unfortunately something like half the instructions (or more) in a program are usually arithmetic and branch instructions (conditional jumps in fact.) So those are definitely the things to discuss first, before load/store, if you're going to do it that way. I personally would bring all three types of operation to the front right away and then delve into how they work, but that's a personal decision.
Speaking of branching instructions he describes forward and backward branches. This is silly. There are two kinds of branches, relative (offset) and absolute. You can jump to a location which is +/- however far from your current position, or you can jump to a specific address. Some CPUs only allow one or the other of these. x86 uses both. (A short jump is an 8 bit signed jump, -128/+127 offset from your current location. A near jump is 16 bit. A far jump specifies a segment and offset, because x86 uses a segmented memory model.) So branching forward or backward is only a significant concept (at all - of course the assembler handles this for you) when talking about relative branches.
I thought that this article was going to talk about how it was actually done. Maybe I'm just special (where's my helmet?) but I've got most of this material (in this article) out of previous ars technica articles. The stuff in this comment I'm writing now, on the other hand, is based on a class in x86 assembly, the final for which is on this coming Tuesday. I want to know how the instruction decoder is put together, for example.
If you ignore every other point I've made in this, consider the possibility that it is a big mistake to start talking about heavily pipelined CPUs. It would be best to start with the classic four-stage pipeline (fetch -> decode -> execute -> write) in which an instruction is fetched from memory (via the program counter; In x86 this is coupled with the CS register (code segment) and it is called the instruction pointer (IP or on 32 bit CPUs in 32 bit mode, EIP) and so you load the new instruction from CS:IP. As per my above paragraph a short or near jump updates IP or EIP, a far jump updates CS and [E]IP.
Finally, is it just me or is it amusing that we're supposed to understand this before hammer arrives but every page has a gigantic animated Pentium IV ad? Up yours, ars adsica.
"You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"