Apple A7 is now 64-bit

Discussion in 'CPUs and Overclocking' started by bullzz, Sep 10, 2013.

  1. tipoo

    tipoo Senior member

    Joined:
    Oct 4, 2012
    Messages:
    236
    Likes Received:
    0
    I find myself thinking that 64 bit support will be Apples next support cuttoff point, probably not with iOS8 but maybe 9. Just like when OSX went 64 bit, 32 bit machines were supported for some time, then they decided everything had to be 64 bit and support was dropped.

    Now that GPU, it was listed only as "A7 GPU" in support docs (can't find the link now), while others were called SGX whatever GPUs. I wonder, is this their first in-house part? They were gobbling up GPU engineers. The driver number however seems consistent with SGX.
     
    #101 tipoo, Sep 12, 2013
    Last edited: Sep 12, 2013
  2. Eug

    Eug Lifer

    Joined:
    Mar 11, 2000
    Messages:
    22,027
    Likes Received:
    133
    Yes, that's what I suggested earlier in the thread, at iOS 10.

    The only issue on Mac OS X though is that not all Macs with 64-bit CPUs were supported when this transition cutoff happened.
     
  3. USER8000

    USER8000 Golden Member

    Joined:
    Jun 23, 2012
    Messages:
    1,283
    Likes Received:
    386
    A daft question - is this an Apple designed 64 bit core or the first of the ARM A57 ones??
     
  4. blackened23

    blackened23 Diamond Member

    Joined:
    Jul 26, 2011
    Messages:
    8,556
    Likes Received:
    0
    It is an in house custom CPU/GPU. It is not ARM A57. Their custom designs are quite impressive when looking at iPad benchmarks, actually.
     
  5. USER8000

    USER8000 Golden Member

    Joined:
    Jun 23, 2012
    Messages:
    1,283
    Likes Received:
    386
    Thanks,actually I am quite impressed too they managed to get it out this year.
     
  6. NostaSeronx

    NostaSeronx Golden Member

    Joined:
    Sep 18, 2011
    Messages:
    1,647
    Likes Received:
    48
    G6400 to G6630, it is one these 3 GPUs.
     
  7. Eug

    Eug Lifer

    Joined:
    Mar 11, 2000
    Messages:
    22,027
    Likes Received:
    133
  8. TerryMathews

    TerryMathews Lifer

    Joined:
    Oct 9, 1999
    Messages:
    11,474
    Likes Received:
    0
  9. Ajay

    Ajay Diamond Member

    Joined:
    Jan 8, 2001
    Messages:
    3,259
    Likes Received:
    288
    Yeah, I think this is the first shipping CPU w/ARM v8 architecture - unless I missed something.
     
  10. Eug

    Eug Lifer

    Joined:
    Mar 11, 2000
    Messages:
    22,027
    Likes Received:
    133
  11. Enigmoid

    Enigmoid Platinum Member

    Joined:
    Sep 27, 2012
    Messages:
    2,907
    Likes Received:
    22
    Says I need to log in. Can you copy the relevant material please?
     
  12. Eug

    Eug Lifer

    Joined:
    Mar 11, 2000
    Messages:
    22,027
    Likes Received:
    133
    Oh, sorry about that.

    It's the "64-bit Transition Guide for Cocoa Touch" on their developer site, so lots of pages of recommendations on how to approach your iOS 64-bit code if you're a developer. Note, I'm not actually a developer, but the basic registration is free, so I registered years ago.

    The intro page is below:

    ---

    About 64-Bit Cocoa Touch Apps

    When desktop operating systems transitioned from 32-bit to 64-bit addressing, 64-bit apps were critical to the OS transition. Now, iOS is getting a similar desktop-class architecture. Starting with iOS 7, you can build iOS apps that take advantage of 64-bit processors. An app that supports 64-bit processing almost always gains improved performance when compared with a 32-bit app running on the same device.

    At a Glance

    Among other architecture improvements, a 64-bit ARM processor includes twice as many integer and floating-point registers as earlier processors do. As a result, 64-bit apps can work with more data at once for improved performance. Apps that extensively use 64-bit integer math or custom NEON operations see even larger performance gains. In a 64-bit process, pointers are 64 bits and some integer types, once 32 bits, are now 64 bits. Many data types in system frameworks, especially UIKit and Foundation, have also changed. Generally, 64-bit apps run more quickly and efficiently than their 32-bit equivalents. However, the transition to 64-bit code brings with it increased memory usage. If not managed carefully, the increased memory consumption can be detrimental to an app’s performance.

    Convert Your App to a 64-Bit Binary After Updating It for iOS 7

    Xcode can build your app with both 32-bit and 64-bit binaries included. This combined binary requires a minimum deployment target of iOS 6 or later. The 64-bit binary runs only on iOS 7 or later. If you have an existing app, you should first update your app for iOS 7 and then port it to run on 64-bit processors. By updating it first for iOS 7, you can remove deprecated code paths and use modern practices. If you are creating a new app, target iOS 7 and compile 32-bit and 64-bit versions of your app.

    When iOS is executing on a 64-bit device, iOS includes separate 32-bit and 64-bit versions of the system frameworks. When all apps running on the device are compiled for the 64-bit runtime, iOS never loads the 32-bit versions of those libraries, which means that the system uses less memory and launches apps more quickly. Because all of the built-in apps already support the 64-bit runtime, it is to everyone’s benefit that all apps running on 64-bit devices be compiled for the 64-bit runtime, especially apps that support background processing. Even apps that are not performance sensitive gain from this memory efficiency.

    Convert and Then Test Your App

    The architecture for 64-bit apps on iOS is almost identical to the architecture for OS X apps, making it easy to create a common code base that runs in both operating systems. Converting a Cocoa Touch app to 64-bit follows a similar transition process as the one for Cocoa apps on OS X. Pointers and some common C types change from 32 bits to 64 bits. Code that relies on the NSInteger and CGFloat types needs to be carefully examined.

    Start by building the app for the 64-bit runtime, fixing any warnings that occur as well as searching your code for specific 64-bit issues. For example:

    Make sure all function calls have a proper prototype.
    Avoid truncating 64-bit values by accidentally assigning them to a 32-bit data type.
    Ensure that calculations are performed correctly in the 64-bit version of your app.
    Create data structures whose layouts are identical in the 32-bit and 64-bit versions of your app (such as when you write a data file to iCloud).

    Test your app on a 64-bit iOS device because some changes can be detected only when running on actual hardware. When your app is running, profile its performance and memory usage, improving both as necessary.


    ---

    I find it interesting that they specifically comment about having 64-bit iOS makes it easier to have a common code base between iOS and OS X. Others have mentioned it here of course before, but the fact that they emphasize it somewhat suggests to me that Apple intends to transition quickly, like they did on OS X. At one key transition point, every iPhone and iPad and iPod touch that is not 64-bit will no longer be supported for new versions of iOS, regardless of the rest of its hardware. I could see this happening as early as 2016.
     
    #112 Eug, Sep 13, 2013
    Last edited: Sep 13, 2013
  13. Mopetar

    Mopetar Diamond Member

    Joined:
    Jan 31, 2011
    Messages:
    3,877
    Likes Received:
    170
    Not really a problem. Anything based on the Cortex-A15 like the Tegra 4 or the newer Exynos chips has a 40-bit addressable memory (although individual applications can't use more than ~4GB of RAM) so they have enough headroom for 1TB of RAM, which we're not going to get to anytime soon. There's no real worry or need to rush to using a 64-bit architecture.
     
  14. Exophase

    Exophase Diamond Member

    Joined:
    Apr 19, 2012
    Messages:
    4,440
    Likes Received:
    5
    PAE is an ugly hack and not something you want to rely on if you can help it. I'm not surprised in the least that Apple isn't pursuing it, support will probably never even enter their OS.
     
  15. Eug

    Eug Lifer

    Joined:
    Mar 11, 2000
    Messages:
    22,027
    Likes Received:
    133
    They wanted the ARMv8's cryptography support anyway. If they're going to use that core, why not properly implement 64-bit at the same time?

    I don't see the downside.
     
  16. Cerb

    Cerb Elite Member

    Joined:
    Aug 26, 2000
    Messages:
    17,409
    Likes Received:
    0
    How many large databases are run on mobile ARM CPUs? RAM is not the problem. Virtual address space is the problem. If you need to work with data in one 4GB window, then some other data in another 4GB window, it gets ugly. And, by ugly, I mean that programmers are going to find a file-based method to do what they need to do, instead.

    They're moving to 64-bit now, because they know they'll need it really soon. Windows got lots of hacks that made up 3.5GB of actual RAM workable, but TMK, FreeBSD, nor OS X since, did, and if not, it will show, just like with Linux, after 2GB+. Apple probably would have gone 64-bit sooner, if ARM had a standard for it. Even Apple can't get away with a custom CPU ISA, today. All Apple needs is to plan for a 2GB RAM tablet, and they'll have good reason for a 64-bit OS and apps.
     
    #116 Cerb, Sep 13, 2013
    Last edited: Sep 13, 2013
  17. VengenceIsMine

    Joined:
    Aug 27, 2013
    Messages:
    86
    Likes Received:
    0
    ARM & Apple have a horribly long way to go to make that happen. On this chip side the A designs have nowhere near enough power to run MacOS as well as Intel currently does and if they try this they can kiss goodbye to what professional market they still have. A series chips have good graphics relative to the ARM world but they aren't in remotely in AMD or Nvidia's class at the high power end of the spectrum. Then there is the whole question of completely different UI paradigms (See Windows 8 Metro vs desktop) much less all the underlying OS architecture. Still 4-5 years away at least, if they try it before then, it will be the ugly parts Win 8 & RT all over again.
     
  18. VengenceIsMine

    Joined:
    Aug 27, 2013
    Messages:
    86
    Likes Received:
    0
    Agree, downsides are minor, increased register size will take up really small amounts of DRAM and storage but gaining cryp support and future app development for Ipad when it actually needs 64 bit + idiotic marketing hype in the meantime is worth the small tradeoff in the meantime.
     
    #118 VengenceIsMine, Sep 13, 2013
    Last edited: Sep 13, 2013
  19. Exophase

    Exophase Diamond Member

    Joined:
    Apr 19, 2012
    Messages:
    4,440
    Likes Received:
    5
    Good to see at least one other person understands why going 64-bit now is saving Apple a headache and compromises on the OS side, thanks Cerb..

    We really don't know what kind of performance and perf/W Apple could get if they scaled one of their custom ARM designs higher than Swift currently does. Or if they used a modified or entirely different uarch for this purpose. Just because they've made chips that are suitable for phones and tablets doesn't mean that this is the extent of performance they can achieve.

    ARM really has nothing to do with it either, outside of licensing the architecture, which was already done years ago. The architecture plays little role in performance and there are already ARMv8 cores coming soon that will go well beyond tablet performance - the 3GHz X-Gene processor for instance.

    Let's hope they aren't implementing register files with DRAM :p

    The truth is that a) architectural register count between AArch32 and AArch64 is about the same because AArch32 bank switches a bunch of registers for other modes and AArch64 doesn't and b) in cutting edge OoO CPUs today (Swift probably at least somewhat falls under this category) the real register file will be a lot bigger than the architectural one to facilitate renaming. The (scalar) registers themselves are still 2x larger, though. The other places more space is needed is in supporting the 64-bit operations and 64-bit datapaths themselves, supporting execution resources for some stuff only in AArch64, and supporting separate decoding for both 32-bit and 64-bit modes.
     
    #119 Exophase, Sep 13, 2013
    Last edited: Sep 13, 2013
  20. Ruiner1

    Ruiner1 Member

    Joined:
    Sep 13, 2013
    Messages:
    26
    Likes Received:
    0
    I was wondering if the reason for Apple jumping to armv8 now had anything to do with running out of virtual address space with >1GB RAM devices - depending upon how the memory map is arranged it's quite common to use up a few GB in kernel space.

    Not being an iOS programmer and having no clue where to look, I googled and found a post on stackoverflow about mapping files which says you only get about 700MB, which sounds quite like 700MB user and 300MB for GPU shared memory.

    http://stackoverflow.com/questions/...t-on-the-number-of-memory-mapped-files-in-ios

    It at least seems plausible to me that you might pull the trigger early on 64-bit if you can rather than re-engineer it.
     
  21. iluvdeal

    iluvdeal Golden Member

    Joined:
    Nov 22, 1999
    Messages:
    1,975
    Likes Received:
    0
  22. Nothingness

    Nothingness Golden Member

    Joined:
    Jul 3, 2013
    Messages:
    1,628
    Likes Received:
    84
    When I read that article I started thinking the author probably deserved to be ignored for utter stupidity. Then I read the name: Joel Hruska. Disappointing.
     
  23. carop

    carop Member

    Joined:
    Jul 9, 2012
    Messages:
    90
    Likes Received:
    7
    Joel Hruska should study Operating Systems a bit before writing stupid articles.

    Here is the first lesson from Linus Torvalds on large virtual address spaces:

    http://www.realworldtech.com/forum/?threadid=136199&curpostid=136203
     
  24. Eug

    Eug Lifer

    Joined:
    Mar 11, 2000
    Messages:
    22,027
    Likes Received:
    133
    This guy predicts that A7 is TSMC 28 nm custom ARMv8 1.7 GHz dual-core CPU, quad Rogue G6430 GPU.

    He also points out this article which suggests that the 5S has only 1 GB but LDDR3 RAM. :( But hey, at least it's lead free! ;)

    A6 was B8164B3PM
    A7 is F8164A1PD

    B - LDDR2
    F - LDDR3
    8164 - 1 GB RAM

    It also suggests a non-Samsung manufacturer, based on chip markings from the leaked 5S logic board part, which based on rumours is TSMC.

    He originally thought quad, but then saw the post from this guy who claims he has sources telling him that A7 is dual-core.

    ---

    EDIT:

    Heheh. I inadvertently left this up on my computer and then my wife came to check her email. She tried to read the post and was like, "WTF does all this crap mean?" She couldn't believe it when I said it was about a phone.
     
    #124 Eug, Sep 14, 2013
    Last edited: Sep 14, 2013
  25. Enigmoid

    Enigmoid Platinum Member

    Joined:
    Sep 27, 2012
    Messages:
    2,907
    Likes Received:
    22
    1GB RAM is beyond pathetic at this time.

    Move to 64 bit CPU, put in 1 GB RAM. :rolleyes:

    (And I have suspicions that they might be right as apple didn't specifically say how much RAM the 5S would have, something they would have said if they put in 2GB--"Twice the power, twice the RAM")