News for hackers. Stuff that matters.
Re:The iPhone XS and XS Max Review: Unveiling the Silicon Se... by GeekyBear on Friday October 05, 2018 @01:03PM (#18149763)
One factor called out in the article is the number of instructions that can be carried out simultaneously during a single clock cycle.

>Monsoon (A11) and Vortex (A12) are extremely wide machines – with 6 integer execution pipelines among which two are complex units, two load units and store units, two branch ports, and three FP/vector pipelines this gives an estimated 13 execution ports, far wider than Arm’s upcoming Cortex A76 and also wider than Samsung’s M3. In fact, assuming we're not looking at an atypical shared port situation, Apple’s microarchitecture seems to far surpass anything else in terms of width, including desktop CPUs.

https://www.anandtech.com/show/13392/the-iphone-xs-xs-max-re...

Apple first moved to wide CPU designs with the Cyclone CPU core found in the A7 SOC first used in the iPhone 5s.

>With Cyclone Apple is in a completely different league. As far as I can tell, peak issue width of Cyclone is 6 instructions. That’s at least 2x the width of Swift and Krait, and at best more than 3x the width depending on instruction mix. Limitations on co-issuing FP and integer math have also been lifted as you can run up to four integer adds and two FP adds in parallel. You can also perform up to two loads or stores per clock.

https://www.anandtech.com/show/7460/apple-ipad-air-review/2

Re:The iPhone XS and XS Max Review: Unveiling the Silicon Se... by rayiner on Friday October 05, 2018 @01:53PM (#18150185)
That's part of it, but doesn't fully answer the question. Decoding and issuing 6 instructions per cycle ordinarily is extremely costly in terms of power. And it's usually very hard to keep those execution units busy--it's hard to find six independent instructions to issue every clock cycle. How Apple built a 6-wide CPU within that power envelope, and optimized the compiler to actually use that IPC is the really interesting question.

On a Xeon v3 core, SPECint averages below 2 instructions per cycle: https://www.researchgate.net/publication/322745869_A_Workloa.... How does Apple beat Intel on branch integer benchmarks like 403.gcc by a factor of two per clock?

Re:The iPhone XS and XS Max Review: Unveiling the Silicon Se... by Symmetry on Friday October 05, 2018 @02:48PM (#18150702)
Lower maximum clock speeds mean you have more FO4s to play with and potentially makes the fan-out issues in wide designs a bit more manageable. Decode I expect to be pretty easy, as long as your branch predictor is on target the power costs just grow linearly with decode width when all your instructions start at nice 32-bit boundaries.

Mostly I'm curious about how complete the bypass network is on their functional units and if execution is clustered like the POWER8. The width doubling in the A series does remind me of the POWER 7 to 8 transition.

Renaming is also apparently a major constraint on design width in many cases but I'm not so familiar with that.

Re:The iPhone XS and XS Max Review: Unveiling the Silicon Se... by aw1621107 on Friday October 05, 2018 @03:10PM (#18150891)
> more FO4s to play with

What does "FO4" stand for here? Googling it yields "Fallout 4", which definitely isn't right, and I'm not sure what other keywords to tack on to get the right result.

Re:The iPhone XS and XS Max Review: Unveiling the Silicon Se... by Symmetry on Friday October 05, 2018 @03:55PM (#18151191)
Sorry, that a "fan-out of 4" which. Traditionally you look at circuit timings in terms of how long it takes one transistor to switch 4 other transistors of equal size. Wire capacitance is a lot more important these days so it's not necessarily the best metric anymore but it's still used. The fewer FO4s of delay you have in a pipeline stage the faster you can clock a chip. The fewer FO4s in your longest pipeline stage the faster you can clock your chip, though there's also a non-linear dependence on voltage. Because of that non-linearity I'd still expect a lower-clocked chip to have more complex pipeline stages. And you can only increase your speed by slimming down stages so much. The overhead of latches and accounting for clock jitter generally add 4 FO4s beyond the useful logic you accomplish in a pipeline stage.
Re:The iPhone XS and XS Max Review: Unveiling the Silicon Se... by aw1621107 on Friday October 05, 2018 @07:19PM (#18152513)
Excellent explanation! Quick follow-up question: Why FO4 specifically, and not some other number/metric? Was (is?) that a particularly common structure in CPUs?
Re:The iPhone XS and XS Max Review: Unveiling the Silicon Se... by Symmetry on Friday October 05, 2018 @07:42PM (#18152618)
I'm afraid you'll have to ask someone with a much grayer beard than mine to get a good answer to that.
Re:The iPhone XS and XS Max Review: Unveiling the Silicon Se... by Cyph0n on Friday October 05, 2018 @05:37PM (#18151938)
As someone who is familiar with the term, great explanation!
Re:The iPhone XS and XS Max Review: Unveiling the Silicon Se... by mikeyouse on Friday October 05, 2018 @03:27PM (#18151013)
From this rando PDF, it looks like "Fan-out of 4".

> Fan-out of 4 is a process-independent delay metric in CMOS tech.

The wrap-up slide at the very end has a bit of a rundown.

http://people.duke.edu/~bcl15/teachdir/ece590_fall14/Present...

Re:The iPhone XS and XS Max Review: Unveiling the Silicon Se... by amluto on Friday October 05, 2018 @02:13PM (#18150366)
One respect in which I can imagine the x86 ISA being a real problem is in decode bandwidth. To issue 6 x86 instructions per cycle, either the front end needs to decode 6 per cycle, or it needs to cache decoded instructions. And x86 can’t be decoded in parallel without massive complexity because the instructions are variable length, and even determining the length requires mostly decoding the instruction.
Re:The iPhone XS and XS Max Review: Unveiling the Silicon Se... by rayiner on Friday October 05, 2018 @02:22PM (#18150453)
It's true that decoding x86 is harder, but Sandy Bridge+ get most instructions from a uop cache, which delivers 4 fixed-length uops per cycle. You could make that 6 wide, but Intel doesn't because they wouldn't be able to fill that.
Re:The iPhone XS and XS Max Review: Unveiling the Silicon Se... by pcwalton on Friday October 05, 2018 @03:12PM (#18150913)
AArch64 has a larger register file and fewer dependencies in general than x86-64 does. For example, most instructions don't set flags. I don't know for sure, but that might be enough to raise the ILP sufficiently.
Re:The iPhone XS and XS Max Review: Unveiling the Silicon Se... by AceJohnny2 on Friday October 05, 2018 @04:10PM (#18151312)
> and optimized the compiler to actually use that IPC is the really interesting question.

You can check that part at least. Isn't it LLVM?

Re:The iPhone XS and XS Max Review: Unveiling the Silicon Se... by wintercharm on Friday October 05, 2018 @07:14PM (#18152490)
They also have a 192 instruction reorder buffer, and a really well optimized OS.
Re:The iPhone XS and XS Max Review: Unveiling the Silicon Se... by baybal2 on Friday October 05, 2018 @01:39PM (#18150069)
NetBurst... ?
Re:The iPhone XS and XS Max Review: Unveiling the Silicon Se... by stephencanon on Friday October 05, 2018 @01:59PM (#18150248)
NetBurst was 4-wide with (IIRC) two of those ports double-pumped for certain operations, but limited to 4/cycle retire, I think.
Re:The iPhone XS and XS Max Review: Unveiling the Silicon Se... by rayiner on Friday October 05, 2018 @02:17PM (#18150407)
NetBurst (like the P6 architecture before it) was 3-way decode/3-way retire. (Actually, NetBurst could decode just one x86 op per cycle into the trace cache; the trace cache could deliver 3 uops per cycle if there was a cache hit.)