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

can't run NEON normally

Note: This was originally posted on 13th April 2010 at http://forums.arm.com

hi all,
       I want to use the latest realview IDE to do some NEON program.My program can build normally,but when I debug,the NEON instructions can't be excuted,and my program is over.I am a new learner of ARM.Who can help me?
       Thank you.
  • Note: This was originally posted on 14th April 2010 at http://forums.arm.com

    Have you enabled the NEON unit?  It is disabled out of reset and hast to be enabled in your start-up code.  Something like:

    ; Enable Access to CP10 and CP11
    ; --------------------------------
    ;  This is done by adjusting the contents of the CP15 Coproccesor Access Control Register (CACR)
    MRC   p15, 0, r1, c1, c0, 2       ; Read CACR into r1
    ORR   r1, r1, #(0xf << 20)        ; Enable full access for p10 & p11
    MCR   p15, 0, r1, c1, c0, 2       ; Write back into CACR
    MOV   r1, #0
    ISB
                           
    ; Enable the VFP
    ; -------------------
    MOV  r0, #0x40000000
    VMSR  FPEXC, r0

            yes,you are right.Be grateful.
  • Note: This was originally posted on 13th April 2010 at http://forums.arm.com

    Have you enabled the NEON unit?  It is disabled out of reset and hast to be enabled in your start-up code.  Something like:

    ; Enable Access to CP10 and CP11
    ; --------------------------------
    ;  This is done by adjusting the contents of the CP15 Coproccesor Access Control Register (CACR)
    MRC   p15, 0, r1, c1, c0, 2        ; Read CACR into r1
    ORR   r1, r1, #(0xf << 20)         ; Enable full access for p10 & p11
    MCR   p15, 0, r1, c1, c0, 2        ; Write back into CACR
    MOV   r1, #0
    ISB
                           
    ; Enable the VFP
    ; -------------------
    MOV  r0, #0x40000000
    VMSR  FPEXC, r0