The Memory Interface

Most SoCs deployed in smartphone designs implement a package-on-package (PoP) stack of DRAM on top of the SoC package. As its name implies, PoP refers to the physical stacking of multiple packages and not layering of raw die. The SoC is typically the lowest level with its memory bus routed to pads on the top of the package. A DRAM package is then stacked on top of the SoC. Avoiding having to route high-speed DRAM lines on the PCB itself not only saves space but it further reduces memory latency.


An example of a PoP stack

The iPhone has always used a PoP configuration for its SoCs and Apple has always been kind enough to silkscreen the part number of the DRAM on the outer package of the SoC. In the past we've seen part numbers from both Samsung and Elpida on Apple SoCs. As both companies can provide similarly spec'd DRAM it makes sense for Apple to source from two suppliers in the event that one is unable to meet demand for a given period.


iPhone 4 mainboard, courtesy iFixit

If we look at iFixit's teardown of the iPhone 4 we see the following DRAM part number: K4X4G643G8-1GC8. Most DRAM vendors do a pretty bad job of providing public data about their part numbers used in chip stacks, so we have to do a little bit of inferring to figure out exactly what Apple used last generation.

The first three characters tell us a bit about the type of DRAM. The K means it's memory, the 4 tells us that it's DRAM and the X tells us that it's mobile DDR (aka LPDDR). The next two characters tell us the density of the DRAM, in this case 4G is translated literally to 4Gbit or 512MB. Characters 6 and 7 are also of importance - they tell us the DRAM organization. Samsung's public documentation only tells us that 16 refers to a 16-bit interface and 32 here would mean a 32-bit interface. Based on that we can safely assume that the 4Gbit DRAM on the A4 is 64-bits wide. In the mobile world a 32-bit interface typically refers to a single channel, which confirms the A4's DRAM interface is two 32-bit channels wide.

The last two characters in the part number, C8, tell us the source clock frequency of the DRAM. Samsung's datasheets tell us that C8 corresponds to a 5ns cycle time with a CAS latency of 3 clocks. Taking the inverse of that gives us 200MHz (frequency = 1 / clock period). Remember, we're talking about double data rate (DDR) SDRAM so data is transferred at both the rising and falling edges of the clock, making the effective data rate 400MHz.

All of this tells us that the iPhone 4's A4 SoC has a 64-bit wide LPDDR1 memory interface with a 400MHz data rate. Multiply all of that out and you get peak theoretical bandwidth of 3.2GB/s. DDR memory interfaces are generally 80% efficient at best so you're looking at a limit of around 2.5GB/s. To put this in perspective, the A4 has as much memory bandwidth as the original AMD Athlon 64 released in 2003.

iPhone 4S mainboard, courtesy iFixit

With the A5 Apple definitely stepped up the memory interface. Once again we turn to iFixit's teardown of the iPhone 4S to lift that oh-so-precious part number: K3PE4E400B-XGC1.

The K once again tells us we're dealing with Samsung memory, while the 3P reveals there are two mobile DDR2 with 4n prefetch (aka LPDDR2-S4) DRAM die on the package. Why not a 4 this time? Technically the 4 refers to a discrete DRAM while the 3 implies a DRAM stack, obviously both are stacked DRAM so I'm not entirely sure why there's a difference here. Each of the next two E4s tell us the density of the two DRAM die. Samsung's public documentation only goes up to E3 which corresponds to a 1Gbit x32 device. Given that we know the A5 has 512MB on-package, E4 likely means 2Gbit x32 (256MB 32-bit). There are two E4 die on package which makes up the 512MB 64-bit DRAM stack.

Once again the final two characters reveal the cycle time of the DRAM: 2.5ns. The inverse of 2.5ns gives us a 400MHz clock frequency, or an 800MHz data rate (source clock frequency is actually 200MHz, but with a 4n prefetch we can transfer at effectively 800MHz). Peak bandwidth to the A5 is roughly double that of the A4: 6.4GB/s. This is as much memory bandwidth as AMD's Athlon 64 platform offered in late 2004, just 7 years later and in a much smaller form factor.

The doubling of memory bandwidth requires a sufficiently large workload to really show it. We see this in Geekbench's memory bandwidth results where the A5 doesn't appear to offer any more bandwidth than the A4 in all but one of the tests:

Memory Bandwidth Comparison - Geekbench 2
  Apple iPhone 4 Apple iPhone 4S
Overall Memory Score 593 700
Read Sequential 318.7 MB/s 302.3 MB/s
Write Sequential 704.9 MB/s 809.2 MB/s
Stdlib Allocate 1.55 Mallocs/sec 1.55 Mallocs/sec
Stdlib Write 1.25 GB/s 2.54 GB/s
Stdlib Copy 724.5 MB/s 490.1 MB/s
Overall Stream Score 280 281
Stream Copy 413.5 MB/s 396.4 MB/s
Stream Scale 313.3 MB/s 317.4 MB/s
Stream Add 518.0 MB/s 527.1 MB/s
Stream Triad 363.6 MB/s 373.9 MB/s

Memory bandwidth tests are extremely sensitive to architecture optimizations, particularly for single threaded tests like these so I wouldn't read too much into the cases where you see no gains or a drop.

The increase in raw memory bandwidth makes a lot of sense. Apple doubled the number of CPU cores on the A5, with each one even more bandwidth hungry than the single A4 core. The 4x increase in GPU compute combined with an increase in clock speeds give the A5 another big consumer of bandwidth. Add things like 1080p video capture and the memory bandwidth increase seems justified.

Looking back at the evolution of the iPhone's memory interface gives us an idea of just how quickly this industry has been evolving. Back in 2007 the original iPhone debuted with a 16-bit wide LPDDR-266 memory interface connected to a meager 128MB of DRAM. The 3GS delivered a huge increase in memory bandwidth by doubling the interface width and increasing the data rate to 400MHz. Scaling since then has been even more dramatic:

Memory capacity on the other hand has seen more of a step-function growth:

By using a mobile optimized OS Apple has been able to get around large memory requirements. The growth pattern in memory size partially illustrates the lag between introducing faster hardware and developers building truly demanding applications that require that sort of performance. Apple was able to leave the iPhone 4S at 512MB of RAM because the target for many iOS apps is still the iPhone 3GS generation. Don't be surprised to see a move to 1GB in the next iPhone release (we won't see 768MB due to the dual-channel memory requirement) as the app developer target moves to 512MB.

The A5 Architecture & CPU Performance GPU Performance Using Unreal Engine 3
Comments Locked

199 Comments

View All Comments

  • Formul - Monday, October 31, 2011 - link

    There is about a dozen fairly similar android phones every month. As iPhone gets refreshed just once every year (this time year and a half) and has bigger market than any single android phone out there it makes sense to make the review thorough. I guess Nexus Prime and even Razer will get similar lengthy reviewsa ... as did many other android phones before that (galaxy s2 for example had about the same as this one).

    You are the one biased here. Counting the number of android articles on any gadget blog will seriously outpace the iPhone by far. You should shut up and read what you want, no one is forcing you to read this blog or any particular article on it. I dont read android articles, i dont care about android all that much. Why do you have to troll here if it does not interest you after all?
  • Anand Lal Shimpi - Monday, October 31, 2011 - link

    I believe we did just that for the Galaxy S 2 review:

    http://www.anandtech.com/show/4686/samsung-galaxy-...

    We don't have the RAZR, Galaxy Nexus or S2 Skyrocket, but we typically do a deep dive whenever there's a new platform transition or something truly unique to look at.

    Take care,
    Anand
  • LordSojar - Tuesday, November 1, 2011 - link

    Hmm, touche Anand, I had forgotten about how detailed the S2 review was.

    The RAZR doesn't warrant a particularly detailed review I suppose, but I think the S2 Skyrocket might warrant a detailed antenna review etc considering the transition to LTE along with, what should be a major change to the antenna and should (I think) have QC's MDM9615 or MDM8215 chips in it... which is a big deal considering those could yield not only significant speed gains along with an antenna update, but some major throughput.

    Cheers
  • doobydoo - Tuesday, November 1, 2011 - link

    'Samsung releases a new phone that has overall better features, faster CPU, faster NAND, a different and arguably better (or at least equal) screen'

    I hope you are comparing to the OLD Samsung, in this sentence, rather than comparing to the iPhone 4S.

    The CPU/GPU performance of the iPhone 4S is not comparable to the Galaxy S2, and I would argue the features are very much superior too.

    Which, incidentally, along with the dual-antenna design, Siri, brand new camera, makes the iPhone 4S much more of a step up than the Samsung Galaxy to Samsung Galaxy S2. (The Galaxy S was about the same performance as the iPhone 4. The Galaxy S2 is slower than the iPhone 4S, therefore iPhone 4S is a bigger upgrade).

    And of course, as Anand said, they thoroughly review most phones, and as the other poster says, the Android phones come out way more often so over the same length of time they get at least as much if not more coverage.
  • Tetracycloide - Tuesday, November 1, 2011 - link

    The Galaxy S2 released in May. The 4S released in October. The next Galaxy phone, the generation the 4S is actually going to compete with, is the Galaxy Nexus. What I'm saying is your point would hold more water (or any at all) if Samsung didn't make 2 upgrades in the space of time it took Apple to do 1 so the differential between generations is hardly an apples to apples comparison (pun intended).
  • thunng8 - Tuesday, November 1, 2011 - link

    But the Galaxy Nexus isn't any faster than the S2. The main benefit is the new operating system and higher resolution screen.

    The Nexus is actually a significant step backwards from the S2 in terms of camera (likely from the samples on the prototype) and GPU (definitely since it is using the SGX540) performance
  • doobydoo - Wednesday, November 2, 2011 - link

    Release dates will not stop phone users comparing the iPhone 4S to the Androids released in March 2012, just like they compared all the Androids over the last 17 months to the iPhone 4.

    The iPhone 4S, right now, is competing with the Galaxy S2 directly.

    The Nexus Prime, as the other comment alluded to, is a significant downgrade from the Samsung Galaxy S2. Indeed, it uses the same GPU as used in the much older Samsung Galaxy S (albeit clocked higher).

    The Galaxy S to S2 took approximately a year inbetween generations (June 2010 to May 2011), which is very much in line with the typical Apple release cycle of annually (this year was the exception). Even this year, with the extended timeline between iPhone 4 and 4S, Samsung didn't make 2 upgrades during that time. Your point would hold more water (or any at all) if it had.
  • Tetracycloide - Wednesday, November 2, 2011 - link

    It's obvious you're not making a real comparison between current products but instead of admitting that you pretend it's a non-issue and then strangely fought that issue anyway by suggesting I'm not actually right to call you out on these shenanigans. So thanks for being obtuse about this, it makes it much easier to dismiss your position as that of an irrational fan-boy (at least it does when combined with the condescension in some of the other threads you've commented on here).
  • doobydoo - Friday, December 2, 2011 - link

    'It's obvious you're not making a real comparison between current products'

    Erm, huh?

    That's EXACTLY what I'm doing.

    What YOU'RE doing is asking is to compare a phone which isn't even out yet with a phone which is. You're trying to 'pretend it's a non-issue' that the phone you say the iPhone 4S should be compared with wasn't even out when this discussion started. THAT is the definition of fanboy-ism. It's like the constant like of Android fans 'x WILL be better when it eventually comes out' - and THAT is obtuse.

    So, the only comments which can be dismissed are YOUR fanboy comments about 'x phone released in x months will be better'. Turns out you were wrong anyway, but that's irrelevant - the bottom line is you don't want iPhone to be compared to CURRENT Android phones, but instead compared to FUTURE ones.

    Rational, much?

    As it happens, it's out now, and isn't even much of an improvement on the Samsung Galaxy S2
  • Lucian Armasu - Wednesday, November 2, 2011 - link

    The cameras seem to be about the same, according to Anand. I've actually found the SGS II camera to be a bit better in photo comparisons. Siri? I still think it's more of a gimmick for now. Maybe in 5-10 years it will be actually useful. Once the novelty expires, people will barely even use it in a few months. The same happened with FaceTime which everyone went crazy about at launch, and then they stopped using it completely.

    The CPU of the SGS2 IS faster than iPhone 4S CPU. There's no way Apple managed to get a 50% performance improvement for the same Cortex A9 chip that Samsung is using.

    I think Anand can confirm this. He wasn't very clear in the review. He was only talking about the improvements it gets over the old Cortex A8.

Log in

Don't have an account? Sign up now