Hello guys,
I am trying to verify some features of ARMv7-M3 in a software simulator platform for ARM. But this simulator only support ARMv7-A ISA.
Is ARMv7-M3 instructions compatible to ARMv7-A, especially thumb instructions?
Thank you very much.
Hi,
according to the Cortex-A5/A7/A8/A9/A17 TRMs, these processors support Thumb encoding after the introduction of Thumb-2 technology, and for all 16-bit and 32-bit Thumb basic instructions.
This means existing ARMv7-A processors support Cortex-M3 ISA because it is the Thumb-2.
However, I don't know whether Cortex-M3 has Non-basic Thumb-2 instructions.
Best regards,
Yasuhiko Koumoto.
The Cortex-M3 doesn't have the DSP or floating point instructions. The ARMv7-A doesn't support all the Cortex-M system things in particular how interrupts are handled or the bit-banding. I believe you should be able to run M3 programs on an ARMv7-A emulator if you don't need to use those system facilities and you should use build flags to exclude the DSP and floating point options.
Also see Free ARM Cortex-M3 Simulation Software?
Hi Kaiyuan,
Another feature of ARMv7-A not present in Cortex-M3 (ARMv7-M) is NEON Advanced SIMD extension. While it is only an optional extension to the architecture, majority of Cortex-A devices implement it. Although you are in the opposite circumstance (simulating Cortex-M3 instructions in ARMv7-A simulator), this difference could be a cause of confusion. Replacing your simulator with one that specifically supports Cortex-M3 is a good idea. You can try those mentioned in the link in daith's reply.
Regards,
Goodwin
You might find this diagram useful.
This shows the different subsets of the Thumb instruction set which are supported by the different members of the Cortex-M family. The smallest subset is support by Cortex-M0 and the largest by Cortex-M4 with FPU extensions. The width of each box shows the size of each instruction - small boxes are 16-bit instructions and large ones are 32-bit.
Hope this helps.
Chris
Dear Kaiyuan,
Cortex-M3 instructions are a subset of arm-v7m instructions. arm-v7m instruction is application level compatiable with arm-v7a. So the following system instrctions are different in cortex-m3: CPS, MRS, MSR.
All other instructions are compatiable with ARM-V7A.