This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cortex M4 vs Cortex A9

Note: This was originally posted on 11th October 2012 at http://forums.arm.com

What are the main difference between these two processors  

  • Note: This was originally posted on 11th October 2012 at http://forums.arm.com

    I want to know processing power , neon simd operation is supported in both cases or not ?

    I also want to know whether I can run the ARM9 code on Cortex-M4 ?

    I also want to know whether I can run the Cortex-A9 code on Cortex-M4 ? If NEON supported on M4 ?
  • Note: This was originally posted on 12th October 2012 at http://forums.arm.com

    Sorry, I mean the assembly code I written for ARM9 , is it work in Cortex-M4 ?
    In other way the all instruction sets of ARM9 will supported on Cortex M4 ?
  • Note: This was originally posted on 12th October 2012 at http://forums.arm.com

    ARM9 has some DSP instruction sets , Is it supported by Cortex M4 ?
    for example SMULBT
    SMULBB
    SMULTT
    SMULTB
    SMULWT
    SMULWB


  • Note: This was originally posted on 12th October 2012 at http://forums.arm.com

    Can you please give some example code or instruction for the ARM to Thumb change ? So I can easily understand
  • Note: This was originally posted on 13th October 2012 at http://forums.arm.com

    As you mentioned Thump as if-then instruction. Can you please give one example instruction for this ?
  • Note: This was originally posted on 15th October 2012 at http://forums.arm.com

    Google is your friend - searching for "Thumb if-then" gives lots of hits ... you don't need me to retype the manual here =)
  • Note: This was originally posted on 12th October 2012 at http://forums.arm.com

    I've you've written in unified assembler syntax then it should "just work", but in reality you may have to change a few things. Them usual area for work is around conditional execution; ARM has conditional instructions, Thumb has if-then instructions. Some Thumb instructions get a restricted register range (but UAL assembler hides most of this).

    Footnote - The main change between an ARM-A core and an ARM-M core are the system modes and threading model. Cortex-M has a very different (easier to understand, more done in hardware) method for handling privileged modes, and interrupts. I'd highly recommend the "Definitive Guide to the Cortex-M3" as a book - most of the content applies equally to the M4.

    HTH,
    Iso
  • Note: This was originally posted on 12th October 2012 at http://forums.arm.com

    Probably not out of the box, but with a little effort.

    Yes, the ARM9s (ARMv5E) and Cortex-M4 (ARMv7-M) have support for these instructions.  But...  hand written assembler for an ARM9 is probably written in the ARM instruction set.  The M4 only supports the Thumb instruction set.  Now, ARM and Thumb are quite similar - so porting it should be relatively straight forward.  Hopefully just a bit of tweaking.
  • Note: This was originally posted on 11th October 2012 at http://forums.arm.com

    Scale?  :P

    Technically, the main difference (from a software perspective) is that Cortex-A9 implements ARMv7-A, while the Cortex-M4 implements ARMv7-M.  But I guess that's not the answer you are looking for.

    Practically, ARMv7-A is intended for devices like smartphones, tablets, etc...  Things that run a full-blown OS.  While ARMv7-M is aimed at microcontrollers, which will probably run baremetal code or possibly a tiny RTOS.
  • Note: This was originally posted on 11th October 2012 at http://forums.arm.com

    None of the Cortex-M series processors support NEON. 

    In terms of running ARM9 or Cortex-A9 code on a Cortex-M4, depends on what you mean.  If you mean at a source level, then C/C++ code should be portable, you'll just have to re-build.  What wouldn;t be portable is system code (e.g. code to handle exceptions or memory management) as these are totally different on the ARM9/Cortex-A9 vs the Cortex-M4.

    Practically running the same binaries is not going to work.  But also, I don't see where it really would be desirable.