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

  • ados_cz - Tuesday, November 1, 2011 - link

    I have the 4S now and the problem is gone but once my girlfriend comes with her 4, I will make a video and post it to prove you wrong. People have no problems only in areas where signal is really strong. Why would I possibly want to lie?
  • wonderfield - Tuesday, November 1, 2011 - link

    What's of concern here is not whether the issue (signal loss) can be demonstrated but whether the phone is, in Brian's/Anand's words, "usable" with the defect or not. It's certainly possible for the GSM iPhone 4 to be rendered unusable in a low signal strength area with a natural, right-handed grip just as it can be rendered unusable with a death grip. That's not to say the phone will be unusable in most scenarios, however, because in most scenarios the phone should function properly. There are certainly edge cases, and the issue is more significant for those who're left-handed and for those who live/work in very poor coverage areas (where it can become an issue), but, again, that's not the typical use case. It's why I categorize Brian's claim that the GSM 4 is not usable without a case as being disingenuous.

    Realistically, you don't need a "really strong" signal to have not have any problems with the phone, you only need a signal great enough to overcome any attenuation introduced by making contact with the antenna. The extent of the attenuation, as demonstrated in another Anandtech article to which you might refer, is not as significant as portrayed by some media outlets.
  • ados_cz - Tuesday, November 1, 2011 - link

    As far as the need for good signal went I needed to use the case all the time otherwise I would always have to hold the phone in unnatural way. iPhone 4/S is a really beautiful piece of hardware and It was really upseting that I had to use the case and spoil the desing. My close friend living just 15 miles next to me in Perth does not use the case and when he does not care to not to hold the phone in sensitive area, the call drops. It happend to me with him on the phone on few occasions. Few of my friends at uni need to use the case for iPhone 4 as well. The problem was not overstated. Either learn to hold the phone unnaturaly avoiding joining those two critical antenna strips or use a case. I opted for a case. My friend in the London got on well without case, but he learned to hold it by the to when calling. Anyway, I am glad that I have the 4S now and I think my girlfriend does not mind the case on her (former mine) iPhone 4. It so well made piece of hardware and so affordable here in Britain. You are being ripped off in US. Check the deals for iPhones on www.three.co.uk I got mine iPhone 4 for 69 pounds 5 months ago with two years contract for 35 pounds a month (2000 mins any network, 5000 mins mine network, unlimited 3G data with no fairu user policy). I paid 189 pounds for girlfriends (now mine) 4S for 32GB white version just few days ago and she got the same 35 pounds contract.
  • Tetracycloide - Tuesday, November 1, 2011 - link

    "I have hundreds of friends who have iPhone 4's who've never had any issue with signal loss at all."

    Really? Name them. Numbered from one to at least two hundred if you please.

    Overstating the strength of your anecdotal evidence doesn't make you look right it makes you look biased.

    For what it's worth, I think you're a huge tool for, well, being such a huge tool.
  • doobydoo - Wednesday, November 2, 2011 - link

    Don't be ridiculous.

    To label someone a 'tool' for stating that their friends don't have issues with signal loss on a phone, is quite frankly ironic.

    To suggest I would list my friends names in a bid to convince such a low level individual is even more ridiculous than the rest of your comment (which is a lot).

    If you really need hard evidence, I'd point you in the direction of the millions of iPhone customers who gave the iPhone 4 the highest satisfaction ratings of any phone, full stop. Bit hard to imagine that happening if they cant make calls on it, don't you think?

    To claim I'm overstating my quite logical claim doesn't make you look right, it makes you look biased.
  • Tetracycloide - Wednesday, November 2, 2011 - link

    I labeled you a tool because your response to another commenter saying they experienced an issue you and 'your friends' never saw was 'your a liar' or more literally "For what it's worth, I don't believe you anyway." That's where you were a tool, that part right there.

    Your 'hundreds' comment was absurd and you know it. To obtusely pretend I'm actually asking you for a list of names and act like that's absurd (it was obviously rhetorical) is to miss the point which was: you do not actually have 200+ individual examples from 'friends' to draw from. That's absurd.

    Your claim was hardly 'logical' it was an absurdly overblown statistic that, even if it was accurate, would still be anecdotal. As are you're 'millions of iPhone customers' by the way. The phone looses signal if held incorrectly. That is the objective reality, full stop.
  • doobydoo - Friday, December 2, 2011 - link

    How ironic that your justification for calling me a tool, is that I essentially disbelieved someone else, after that's all your comments to me are based on.

    Not only that, but how ridiculous and illogical to say someone is a tool for not believing something. Grow up?

    'Hundreds' is not absurd at all, perhaps it sounds absurd to a social recluse? But I can actually name at least 200 friends of mine who use iPhones. Sorry if having friends is a strange concept to you. How dare you claim that you 'do not believe' my 200+ friends claim - that makes you a tool (it's a definition handed down to me by someone special).

    Even if my claim was anecdotal, so what? Your criticism of my claim wasn't that it was anecdotal, and I never masqueraded it as anything other than what it was?

    The 'MILLIONS' of iPhone customers is not anecdotal at all, by the way - they HAVE factually given the iPhone 4 the best user ratings of any phone of all time. That's reality, fact, pure and simple. They wouldn't do this, if they couldn't make phone calls, don't you agree?

    I own an iPhone 4, and it doesn't LOSE (wtf is 'looses') signal in any meaningful way (as in, it never affects call quality or causes calls to be dropped) if held in any way I want. Unbelievable that you make such claims then try to define them as 'objective' - exactly the criticism you levy at me.
  • gcor - Monday, October 31, 2011 - link

    Reading the specs on a lead acid 12v battery I have, I discovered that the higher the load in amps, the lower the total amp hours the battery will output. For example, the spec's say that a particular model can deliver a max of 1 amp hour over 20 hours, but only .5 amp hour over 12 hours.

    I'm guessing this is also true for the batteries in smartphones and laptops. This assumption seems to be supported when looking at the 3D gaming battery life results in the review, where a 10% increase in power consumption on the 4S, resulted in a 25% drop in battery life.

    I assume this has implications for the "race to sleep" concept, as an increase in amp draw by the device may reduce the battery efficiency enormously, as well as actually using more power.

    Anyway, just a thought to add into the mix when estimating a % speed increase required for a pay off in additional sleep.
  • Pliablemoose - Monday, October 31, 2011 - link

    Your recommendations mirror my own thoughts, picked up 3 iP4's in the last month, 2 ATT models to put on Straight Talk for $499/year each with unlimited talk text and data (yes, I know it's not really unlimited data) for my kids, and a Verizon iP4 for me. I actually replaced a ThunderBolt with an iP4, got tired of the poorly executed radio software and the constant reboots to keep it connected. The ThunderBolt is a heck of a 4G LTE modem, sort of a poor phone, and definitely a brick with the extended battery it needs get me through a day of web surfing and stock trading.

    Saving my upgrade next year for an iP5, and keeping my fingers crossed for at least a 4" screen.
  • ltcommanderdata - Monday, October 31, 2011 - link

    "Furthermore Apple even seems to be ok with combining a process shrink with a new architecture as we saw with the iPhone 3GS. It's generally thought of as a risky practice to migrate to both a new process technology and a new architecture in the same generation, although if you can pull it off the benefits are wonderful."

    I don't believe Apple has actually pushed a new process and architecture simultaneously. Up to now, the iPod Touch was generally the test platform for new processes as a shrink on an existing architecture.

    The full evolution is:

    iPhone 2G/1st gen iPod Touch/iPhone 3G 412MHz ARM11 90nm
    2nd gen iPod Touch 533MHz ARM 11 65nm
    iPhone 3GS 600MHz Cortex A8 65nm
    3rd gen iPod Touch 600MHz Cortex A8 45nm
    iPad 1/iPhone 4/4th gen Touch 1GHz/800MHz Cortex A8 45nm
    iPad 2/iPhone 4S 1Ghz/800MHz Cortex A9 45nm

    It is curious that we haven't seen a shrink of an existing chip as a pilot for a next gen process, either Samsung 32nm or TSMC 28nm, although the iPod Touch not being updated this year didn't leave many options. It would no doubt be too risky to put a new process pilot chip on the iPhone 4S. I believe iFixit did find some different markings on the 2011 iPod Touch, but I haven't heard about any size difference so that makes a large shrink unlikely. Is there any chance the 2011 iPod Touch could be piloting the A4 on a TSMC 40nm process as a means of getting that relationship off the ground? Is there enough commonality in the tools for the 40nm and 28nm processes to make piloting on 40nm a worthwhile interim step?

Log in

Don't have an account? Sign up now