Pipelining: 101

It seems like every time Intel releases a new processor we have to revisit the topic of pipelining to help explain why a 3GHz P4 performs like a 2GHz Athlon 64. With a 55% longer pipeline than Northwood, Prescott forces us to revisit this age old topic once again.

You've heard it countless times before: pipelining is to a CPU as the assembly line is to a car plant. A CPU's pipeline is not a physical pipe that data goes into and appears at the end of, instead it is a collection of "things to do" in order to execute instructions. Every instruction must go through the same steps, and we call these steps stages.

The stages of a pipeline do things like find out what instruction to execute next, find out what two numbers are going to be added together, find out where to store the result, perform the add, etc...

The most basic CPU pipeline can be divided into 5 stages:

1. Instruction Fetch
2. Decode Instructions
3. Fetch Operands
4. Execute
5. Store to Cache

You'll notice that those five stages are very general in their description, at the same time you could make a longer pipeline with more specific stages:

1. Instruction Fetch 1
2. Instruction Fetch 2
3. Decode 1
4. Decode 2
5. Fetch Operands
6. Dispatch
7. Schedule
8. Execute
9. Store to Cache 1
10. Store to Cache 2

Both pipelines have to accomplish the same task: instructions come in, results go out. The difference is that each of the five stages of the first pipeline must do more work than each of the ten stages of the second pipeline.

If all else were the same, you'd want a 5-stage pipeline like the first case, simply because it's easier to fill 5 stages with data than it is to fill 10. And if your pipeline is not constantly full of data, you're losing precious execution power - meaning your CPU isn't running as efficiently as it could.

The only reason you would want the second pipeline is if, by making each stage simpler, you can get the time it takes to complete each stage to be significantly quicker than in the previous design. Your slowest (most complicated) stage determines how quickly you can get data through each stage - keep that in mind.

Let's say that the first pipeline results in each stage taking 1ns to complete and if each stage takes 1 clock cycle to execute, we can build a 1GHz processor (1/1ns = 1GHz) using this pipeline. Now in order to make up for the fact that we have more stages (and thus have more of a difficult time keeping the pipeline full), the second design must have a significantly shorter clock period (the amount of time each stage takes to complete) in order to offer equal/greater performance to the first design. Thankfully, since we're doing less work per clock - we can reduce the clock period significantly. Assuming that we've done our design homework well, let's say we get the clock period down to 0.5ns for the second design.

Design 2 can now scale to 2GHz, twice the clock speed of the original CPU and we will get twice the performance - assuming we can keep the pipeline filled at all times. Reality sets in and it becomes clear that without some fancy footwork, we can't keep that pipeline full all the time - and all of the sudden our 2GHz CPU isn't performing twice as fast as our 1GHz part.

Make sense? Now let's relate this to the topic at hand.

Index 31 Stages: What’s this, Baskin Robbins?
POST A COMMENT

103 Comments

View All Comments

  • Chadder007 - Monday, February 02, 2004 - link

    I can't imagine how HOT that sucker will be when up to 5ghz!!!! 150oC??? LOL
    For the heat issues alone, im thinking about going AMD in my next rig.
    Reply
  • CRAMITPAL - Monday, February 02, 2004 - link

    Ace's Hardware summed it up well: Prescott is a DOG, or to be exact a HOT DOG ! See the picture in the review of the dog warming it's toes next to the Prescott powered PC. Talk about one sad CPU piece of crap...

    Here is the FLAME THROWER reality check:

    "Currently there is no reason to upgrade to Prescott, as the gaming performance is more or less ok, but many applications report pretty poor results. On top of that, the new Intel CPU gets hot very quickly and requires a well ventilated case. The Athlon 64 3200+ is not always the clear winner in games compared to 3.2 GHz Prescott, but the 3400+ will have little trouble beating the 3.4 GHz Prescott in most benchmarks. Prescott will have to scale incredibly quickly to outperform the Athlon 64, because the latter scales excellently with clockspeed, and we definitely prefer Cool'n'Quiet over Hot'n Prescott! "

    As shown this FLAME THROWER don't scale well, especially when it runs 15-20C hotter than an equal speed Northwood. Intel really fugged up this time. Ya gotta love seeing the Satan eat shit and choke! When every hardware review site on the planet, including THG's tells ya Prescott is a piece of crap, then you might as well resign to reality. DENIAL is futile!

    Dell will be selling FLAME THROWING PC Heaters to any gullible sheep foolish enough to buy a Prescott. A fool and his money are soon parted !
    Reply
  • AnonymouseUser - Monday, February 02, 2004 - link

    "Ummmm yea, kinda reminds me of cooking an egg on an Athlon XP"

    Yeah, kinda, except the Prescott can do the same work in about half the time. Sounds like something they should advertise that as a feature...
    Reply
  • Stlr22 - Monday, February 02, 2004 - link

    What happened to CRAM's post???
    Reply
  • INTC - Monday, February 02, 2004 - link

    #43 cliffa3 - http://www.x86-secret.com/articles/cpu/prescott/p4...

    It doesn't look good for P4G8X with either the 2.8/533 or the 800 MHz FSB flavors.
    Reply
  • mkruer - Monday, February 02, 2004 - link

    For those who missed it, X-bit gave a temperature comparison, for the all the chip.
    http://www.xbitlabs.com/articles/cpu/display/presc...

    Processor; Idle, Burn
    Pentium 4 (Prescott) 3.2GHz; 45oC, 61oC
    Pentium 4 (Northwood) 3.2GHz; 30oC, 48oC
    Pentium 4 Extreme Edition 3.2GHz; 32oC, 51oC

    This does not bode well for Intel unless they are going to make water cooling a standard.

    But this Quote sums it up nicely IMHO “I am scared to imagine what happens to Prescott when we close the system case…”

    Reply
  • lmonds - Monday, February 02, 2004 - link

    what??? no talk about heat on this chip? Come on anand this is vital info about prescott. Other sites are reporting temps up around 80c with the stock cooler. I understand that as it gets faster in mhz it will be a better performing chip but what kinda heat are we looking at at 4ghz? No way is a 80c chip going in any of my boxes. If keeping an intel badge on the front of my case means i have to have a delta fan in my box then you can forget about it. Reply
  • Stlr22 - Monday, February 02, 2004 - link

    :D Reply
  • Captante - Monday, February 02, 2004 - link

    Stlr22 ....Re post # 31 Hahahahahahahahahahahahahahahahahahahahahaaha!!!!
    That one had me cracking up for 5 minutes!
    It is good to laugh!!! :-)
    Reply
  • Stlr22 - Monday, February 02, 2004 - link

    Moreless a Prescott.... Reply

Log in

Don't have an account? Sign up now