Haswell's Wide Execution Engine

Conroe introduced the six execution ports that we've seen used all the way up to Ivy Bridge. Sandy Bridge saw significant changes to the execution engine to enable 256-bit AVX operations but without increasing the back end width. Haswell does a lot here.

Just as before, I put together a few diagrams that highlight the major differences throughout the past three generations for the execution engine.


The reorder buffer is one giant tracking structure for all of the micro-ops that are in various stages of execution. The size of this buffer is directly impacted by the accuracy of the branch predictor as that will determine how many instructions can be kept in flight at a given time.

The reservation station holds micro-ops as they wait for the data they need to begin execution. Both of these structures grow by low double-digit percentages in Haswell.

Simply being able to pick from more instructions to execute in parallel is one thing, we haven't seen an increase in the number of parallel execution ports since Conroe. Haswell changes that.

From Conroe to Ivy Bridge, Intel's Core micro-architecture has supported the execution of up to six micro-ops in parallel. While there are more than six execution units in the system, there are only six ports to stacks of execution units. Three ports are used for memory operations (loads/stores) while three are on math duty. Over the years Intel has added additional types and widths of execution units (e.g. Sandy Bridge added 256-bit AVX operations) but it hasn't strayed from the 6 port architecture.

Haswell finally adds two more execution ports, one for integer math and branches (port 6) and one for store address calculation (port 7). Including both additional compute and memory hardware is a balanced decision on Intel's part.

The extra ALU and port does one of two things: either improve performance for integer heavy code, or allow integer work to continue while FP math occupies ports 0 and 1. Remember that Haswell, like its predecessors, is an SMT design meaning each core will see instructions from up to two threads at the same time. Although a single app is unlikely to mix heavy vector FP and integer code, it's quite possible that two applications running at the same time may produce such varied instructions. Having more integer ALUs is never a bad thing.

Also using port 6 is another unit that can handle x86 branch instructions. Branch heavy code can now enjoy two independent branch units, or if port 0 is occupied with other math the machine can still execute branches on port 6. Haswell moved the original Core branch unit from port 5 over to port 0, the most capable port in the system, so a branch unit on a lightly populated port makes helps ensure there's no performance regression as a result of the change.

Sandy Bridge made ports 2 & 3 equal class citizens, with both capable of being used for load or store address calculation. In the past you could only do loads on port 2 and store addresses on port 3. Sandy Bridge's flexibility did a lot for load heavy code, which is quite common. Haswell's dedicated store address port should help in mixed workloads with lots of loads and stores.

The other major addition to the execution engine is support for Intel's AVX2 instructions, including FMA (Fused Multiply-Add). Ports 0 & 1 now include newly designed 256-bit FMA units. As each FMA operation is effectively two floating point operations, these two units double the peak floating point throughput of Haswell compared to Sandy/Ivy Bridge. A side effect of the FMA units is that you now get two ports worth of FP multiply units, which can be a big boon to legacy FP code.

Fused Multiply-Add operations are incredibly handy in all sorts of media processing and 3D work. Rather than having to independently multiply and add values, being able to execute both in tandem via a single execution port increases the effective execution width of the machine. Note that a single FMA operation takes 5 cycles in Haswell, which is the same latency as a FP multiply from Sandy/Ivy Bridge. In the previous generation a floating point multiply+add took 8 cycles, so there's a good latency improvement here as well as the throughput boost from having two FMA units.

Intel focused a lot on adding more execution horsepower in Haswell without creating a power burden for legacy use cases. All of the new units can be shut off when not in use. Furthermore, Intel went in and ensured that this applied to the older execution units as well: in Haswell if you're not doing work, you're not consuming power.

Prioritizing ILP Feeding the Beast: 2x Cache Bandwidth in Haswell
Comments Locked

245 Comments

View All Comments

  • Anand Lal Shimpi - Friday, October 5, 2012 - link

    It's the other way around: not talking about Apple using Intel in iPads, but rather Apple ditching Intel in the MacBook Air.

    I do agree with Charlie in that there's a lot of pressure within Apple to move more designs away from Intel and to something home grown. I suspect what we'll see is the introduction of new ARM based form factors that might slowly shift revenue away from the traditional Macs rather than something as simple as dropping an Ax SoC in a MacBook Air.

    Take care,
    Anand
  • A5 - Friday, October 5, 2012 - link

    Yeah. I knew what you were getting at, but I guess it wasn't that obvious for some people :-p.

    Something like an iPad 3 with an Apple-made keyboard case + some changes in iOS would make Intel and notebook OEMs really scared.
  • tipoo - Friday, October 5, 2012 - link

    So pretty much the Surface tablet. The keyboard case looks amazing, can't wait to try one.
  • Kevin G - Friday, October 5, 2012 - link

    Apple is in the unique position that they could go with either platform way. They are capable of moving iOS to x86 or OS X to ARM on seemingly a whim. Their decision would be dictated not by current and chips arriving in the short term (Haswell and the Cortex A15) but rather long term road maps. Apple would be willing ditch their own CPU design if it brought a clear power, performance and process advantage from what they could do themselves. The reason why Apple manufactured an ARM chip themselves is that they couldn't get the power and performance out of SoC's from other companies.

    The message Intel wants to send to Apple is that Haswell (and then Broadwell) can compete in the ultra mobile market. Intel also knows the risk to them if Apple sticks to ARM: Apple is the dominate player in the tablet market and one of the major players in the cell phone market and pretty much the only success in the utlrabook segment. Apple's success is eating away the PC market which is Intel's bread and butter in x86 chip sales. So for the moment Intel is actively promoting Apple's competitors in the ultrabook segment and assist in 10W Ivy Bridge and 10W Haswell tablet designs.

    If Intel can't get anyone to beat Apple, they might as well join them over the long run. This would also explain Intel toying with the idea of becoming a foundry. If Intel doesn't get their x86 chips into the iPad/iPhone, they might as well manufacture the ARM chips that do. Apple is also one of the few companies who would be willing to pay a premium for Intel foundry access (and the extra ARM not x86 premium).

    So there are four scenarios that could play out in the long term: the status quo of x86 for OS X + ARM for iOS, x86 for both OS X + iOS, ARM for both OS X + iOS and ARM built by Intel for OS X + iOS.
  • Peanutsrevenge - Friday, October 5, 2012 - link

    I will LMAO if Apple switch macs back to RISC in the next few years.
    Will be RISC, x86, RISC in the space of a decade.

    Poor Crapple users having to keep swapping their software.

    I laughed 6 ago, and I'll laugh again :D
  • Kevin G - Saturday, October 6, 2012 - link

    But it wouldn't be the same RISC. ARM isn't PowerPC.

    And hey, Apple did go from CISC to RISC to back to CISC again for their Macs.
  • Penti - Saturday, October 6, 2012 - link

    They hardly would want to be in the situation where they have to compete with Intel and Intel's performance again. Also their PC/Mac lineup is just so much smaller then the mobile market they have, why would they create teams of thousands of engineers (which they don't have) to create workstation processors for their mobile workstations and mac pro's? They couldn't really do that with PowerPC design despite having influence on chip architecture, they lost out in the race and just grows more dependent on other external suppliers and those Macs would loose the ability to run Boot camp'd or virtualized Windows. It's not the same x86 as it was in 2006 either.

    A switch would turn Macs into toys rather then creative and engineering tools. It would create an disadvantage with all the tools developed for x86 and if they drop high-end they might as well turn themselves into an mobile computing company and port their development tools to Windows. As it's not like they will replace all the client and server systems in the world or even aspire to.

    I don't have anything against ARM creping into desktops. But they really has no reason to segment their system into ARM or x86. It's much easier to keep the iOS vs OS X divide.

    Haswell will give you ARM or Atom (Z2760) battery life for just some hundred dollars more or so. If they can support the software better those machine will be loaded with software worth thousands of dollar per machine/user any way. Were the weaker machines simply can't run most of that. Casual users can still go with Atom if they want something weaker/cheaper or another ecosystem altogether.
  • Kevin G - Monday, October 8, 2012 - link

    The market is less about performance now as even taking a few steps backward a user has a 'good enough' performance. It is about gaining mobility which is driven by reduction in power consumption.

    Would Apple want to compete with Intel's Xeon's line up? No and well, Apple isn't even trying to stay on the cutting edge there (their Mac Pro's are essentially a 3 year old design with moderate processor speed bumps in 2010 and 2012). If Apple was serious about performance here, they'd have a dual LGA 2011 Xeon as their flagship system. The creative and engineering types have been eager for such a system which Apple has effectively told them to look elsewhere for such a workstation.

    With regards to virtualization, yes it would be a step backward not to be able to run x86 based VM's but ARM has defined their own VM extensions. So while OS X would lose the ability to host x86 based Windows VM's, their ARM hardware could native run OS X with an iOS guest, an Android guest or a Windows RT guest. There is also brute force emulation to get the job done if need be.

    Moving to pure ARM is a valid path for iOS and OS X is a valid path for Apple though it is not their only long term option.
  • Penti - Tuesday, October 9, 2012 - link

    You will not be able to license Windows RT at all as an end-user. Apple has no interest what so ever to support GNU/Linux based ARM-VMs.

    I'm sure they will update the Mac Pro the reason behind it is largely thanks to Intel themselves. That's not their only workstation though, and yes performance is important in the mobile (notebook space), performance per watt is really important too. If they want mobile workstations and engineering type machines they won't go with ARM. As it does mean they would have to compete with Intel. They could buy a firm with an x86 license and outdo Intel if they were really capable of that. ISA doesn't really matter here expect when it comes to tools.
  • baba264 - Friday, October 5, 2012 - link

    "Within 8 years many expect all mainstream computing to move to smartphones, or whatever other ultra portable form factor computing device we're carrying around at that point."

    I don't know if I am in a minority or what, but I really don't see myself giving up my desktop anytime soon. I love my mechanical keyboard my large screen and my computing power. So I have to wander if I'm just an edge case or if analyst are reading too much in the rise of the smartphone.

    Great article otherwise :).

Log in

Don't have an account? Sign up now