ARM Fundamentals: Introduction to understanding ARM processors

本文介绍ARM处理器的命名规则及重要特性,通过解析处理器家族、架构版本和处理器名称,帮助读者更好地理解ARM架构。重点讲解了处理器的命名方式、架构版本与处理器功能之间的关系,并介绍了最新处理器的特点及如何利用这些特性提高软件性能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Finding one's way through references to ARM processors is not always obvious. This article is the first of a series on ARM fundamentals that will introduce various topics to help you get more familiar with the ARM architecture. It aims at helping you to better understand ARM processors, starting with explaining how they are named, and then showing how knowing your processor matters by introducing a few of their recent features.

 

If you are curious about what is in your pretty electronic device or are a developer willing to understand how to start getting the best out of your processor, you may find some useful information here. The second part of the article may be technically a bit more challenging than the first, but don't worry! The few code samples are only concrete examples used to illustrate the explanations. The specific details are not necessary to understand the global picture.

     

The first step is to understand how ARM processors are referenced: it certainly sounds nice, but what is this "dual Cortex-A9, based on ARMv7" in your super-phone?   

 

Processor families and architecture versions.


The important thing to recognise is the difference between a processor's family name and the instruction set architecture (ISA) version it implements.

    • There are many variants of ARM processors, with different capabilities, and implementing different features. But all of them implement a version of the 'ARM architecture' (ARM ISA), that describes the interface and properties (instruction set, behaviour, etc.) that ARM processors must support. It has been refined over time with successive architecture versions, referred to with the ARMv{n} scheme. (Note the "v".)

 

    • ARM processor families group multiple processors, and were named chronologically, starting with ARM1 (1985) up to ARM11 (2002). The naming scheme then changed with the Cortex family introduced in 2005, in which processors are named following the scheme Cortex-{letter}{number}.
             
      Each new family introduced new processors, with an improved design, better performance, and new features.

 

So a "dual Cortex-A9, based on ARMv7" is a processor with two Cortex-A9 cores and implementing the 7th version of the ARM architecture. The technically correct naming for this processor is a Cortex-A9 MPCore processor (based on ARMv7), comprising two Cortex-A9 cores.


Note that the processor family is sometimes misleadingly substituted with the actual processor's name. You may for example find a reference to an "ARMv6 ARM11 processor". There are actually no "ARM11" processors, but rather ARM1136, ARM1156, or ARM1176 processors, so the "ARM11 processor" refers to "a" processor of the ARM11 family.
     
Suffixes

 

Before the Cortex family, from ARM1 up to ARM11, processors were named after their family with suffixes to specify each processor's specificities.      

Here are a few examples of suffixes. The details are a bit technical, but you can find more information here [1].

Letters indicate specific features of the processor. For example:

 

'F' indicates that the processor has a VFP floating point unit.

 

'T' or 'T2' means that the processor is able to use the Thumb or Thumb2 instruction encoding.

 

Digits detail hardware characteristics of the processor.

 

-  For example, for an ARM946 processor, the '4' indicates a cache and memory protection unit and the '6' a tightly coupled SRAM interface.


Note that these suffixes are often omitted if they are not relevant to the context, or implied for newer processor that always implement the related features. You will for example not find the 'T' suffix for Cortex processors: they all handle Thumb!

     

Letter suffixes are also sometimes appended to the architecture name to show that one or a few specific extensions are available. You may for example see references to ARMv4T to refer to the ARM architecture version 4 with the Thumb extension.
   
               

FamilyArchitecture versions implementedExample of processors
ARM1ARMv1ARM1
ARM2ARMv2ARM2
 ARMv2aARM250
ARM3ARMv2aARM3
ARM6ARMv3ARM60, ARM600, ARM610
ARM7ARMv3ARM700, ARM710, ARM710a
 ARMv4TARM7TDMI, ARM710T, ARM720T
.........
Cortex-AARMv7-ACortex-A5, Cortex-A8, Cortex-A9
Cortex-RARMv7-RCortex-R4
Cortex-MARMv6-MCortex-M0, Cortex-M1
 ARMv7-MCortex-M3
 ARMv7-MECortex-M4

                        Examples of ARM families, architectures, and processors.


As you can see in this table and in the diagram below, a family is not restricted to implement only one architecture version: two different processors from the same family can implement different architecture versions.
     
You may also have noticed here the '-A', '-R', and '-M' suffixes used both with architectures and processor names. These do not indicate an extension but rather an architecture profile.
     
Profiles

 

The latest Cortex family includes a wider range of processors than earlier families. These processors are suitable for very different kinds of application, and three profiles were therefore introduced to distinguish what targets they are adapted to:

    • The 'A' Application profile features powerful processors found in high-end products like smartphones, tablets, or netbooks. This includes the famous Cortex-A8 and Cortex-A9 (in your super phone) processors.

 

    • The 'R' Real-time profile processors can be found for example in control units for automotive systems or hard disk drive controllers. They come with specific features suited to real-time environment constraints. R profile processors have for example a tightly coupled memory,local to the processor, that allows for fast-responding code and data. They also all have hardware support for integer division, that would        otherwise require software emulation.

 

    • The 'M' Micro-controller profile processors are smaller and used in numerous embedded systems like human interface devices, automotive control systems, power management systems, and others.


The following diagram gives a few examples of ARM processors and an idea of relative performance between processors.

     

Note that it clearly does not detail all processors, nor does it intend to reflect the exact performance comparisons between processors. You can find more about these processors by searching the ARM website.


               
In our previous example, the dual Cortex-A9 processor is thus a two core processor from the Cortex family in the application profile. This is currently amongst the highest performing processors you will find in a phone.
     
The next step after understanding your processor's name is to start figuring out how it works and how to efficiently use it.

 

Know your target processor: introducing a few features of recent ARM processors.

 

Knowing the features offered by your target processor and how it works is an important step to designing high-performance software: its best if the software does not exploit the hardware capabilities.

 

This section will highlight this by introducing a few features allowing high performance in recent ARM processorss.
       
Compiler and assembly language.
Each new architecture version can be considered as refining the previous  one. New features like extensions or instructions are added and  enable new capabilities for the software. New architecture versions are  backward compatible, except for a few rare cases of instructions (eg. deprecated instructions; see the ARM Architecture Reference Manual).

 

Your compiler should know how to optimize the generated code for a specific target. So using these features can be as easy as specifying what target you are compiling for.


If you are compiling natively you may want to check hat your compiler is correctly configured. If you are cross-compiling you will need to pass various options to let it know about your target processor. Refer to your compiler documentation to learn more about the available options:

    $ arm-none-linux-gnueabi-gcc --target-help
    The following options are target specific:
    -mabi=  Specify an ABI
    -march=  Specify the name of the target architecture
    -mcpu=  Specify the name of the target CPU
    Known ARM CPUs (for use with the -mcpu= and -mtune= options):
    cortex-m0, cortex-m1, cortex-m3, cortex-m4, cortex-r4f, cortex-r4,
    cortex-a9, cortex-a8, cortex-a5, arm1156t2-s, mpcore, ...
    [...]

 

If you are writing assembly you will need to refer to the ARM Architecture Reference Manual (ARM ARM) to see what instructions are available for your target achitecture.

 

Here is the entry from the ARM ARM for the 'CLZ' (Count Leading Zeros) nstruction:


We can see it is available for architecture versions ARMv5T and higher. If 'CLZ' is unavailable or unused the code needed to perform the same operation could look like this:

 

movs    scratch, input              @ Preserve the input.
moveq  result, #32                @ If the input is null return 32.
movne  result, #0                 @ Else setup the result to 0.
beq    .done                       @ If the input is null we are done.
.CountLeadingZerosInInput:
lsls    scratch, scratch, #1        @ Shift left by one bit and set the condition flags.

addcc  result, result, #1          @ Increment the result if the bit shifted away was a zero.
bcc    .CountLeadingZerosInInput   @ If we are not done, jump back to check for the next bit.
.done:

 

A single 'CLZ' instruction is much more efficient!


This is just one of many other instructions and features that were introduced by the latest architecture versions to allow for faster and denser code, including:

New instructions, for example for...

- saturating arithmetic

- integer SIMD instructions

- bitfield manipulation

- register shifted operand variants of a few arithmetic instructions

New extensions like...

- the VFP floating point unit

- the NEON SIMD engine

 

Extensions: an example with the VFP unit. 
     

Various extensions are available that can greatly improve the performance of specific tasks. For example most high-end ARM (including Cortex-A8 and Cortex-A9) processors will have a VFP floating point unit, that provides hardware support for IEEE-754 floating point operations.

Generated code for floating point operations.

 

Hardware support can bring massive improvement over emulated software support. Here is a comparison of the code generated for the floating-point multiplication operation in the C code below, compiled with and without VFP enabled [2]:
     

    double vmul(double a,  double b) { return a * b; }

 

With VFP disabled, floating point support is emulated with software.


Sample of the output of [3]:

    $ arm-none-linux-gnueabi-gcc -O1 -g vmul.c -o vmul
    $ arm-none-linux-gnueabi-objdump -S vmul 

 

  double vmul(double a,  double b) {
    [...]
    bl __aeabi_dmul    @ Call the library function aebi_dmul.
    [...]
  }
 
 
  [...]
 

  __aeabi_dmul:        @ Library function handling 64bits
                       ieee-754 floating-point multiplication.
    push  {r4, r5, r6, lr}
    mov ip, #255  ; 0xff
    orr ip, ip, #1792 ; 0x700
    ands  r4, ip, r1, lsr #20
    andsne  r5, ip, r3, lsr #20

    [145 instructions omitted]

    mov r0, #0
    pop {r4, r5, r6, pc}
    orr r1, r1, #2130706432 ; 0x7f000000
    orr r1, r1, #16252928 ; 0xf80000
    pop {r4, r5, r6, pc}

     

The previous __aeabi_dmul assembly code is Copyright © 2009 Free Software Foundation, Inc.


With VFP enabled, efficient instructions are available.
Sample of the output of:

    $ arm-none-linux-gnueabi-gcc -O1 -g -c vmul.c -mfpu=vfp -mfloat-abi=hard
    $ arm-none-linux-gnueabi-objdump -S vmul.o

 

    double vmul(double a,  double b) {
    vmul.f64 d0,  d0,  d1  @ d0 = d0 * d1
    [...]

 

More timing information: the Technical Reference Manual (TRM)


The Technical Reference Manual for your processor will give you more details about instructions timing. Here is the entry of the Cortex-A9 FPU TRM for the vdiv instruction:


 

 

You can refer to the actual document for detailed definitions; what it tells us is that the result of the vmul.f64 d7, d6, d7 will be ready after 6 cycles.

     

A standard simple arithmetic instruction will execute in one cycle. Although the software algorithm emulating the multiplication may not execute its 150 or so instructions for every input, the VFP code will obviously be much faster.

 

More performance for media applications: the NEON advanced SIMD engine.
 

Recent Cortex-A profile processors can feature the NEON SIMD engine, that can be used to speed up media applications.

     

The idea behind SIMD (Single Instruction Multiple Data) is to perform operations on multiple inputs in parallel rather than sequentially. This is especially useful in video or audio applications, which process large amounts of data.

     

An example: alpha blending


Consider for example an alpha blending operation which the background is opaque and the overlaid image has an alpha equals to 0.5. The result image is given by:

               

alpha_out = 1
 RGB_out = RGB_scr1 * 0.5 + RGB_scr2 * 0.5

 


 

Each result pixel only depends on two input pixels. There is no need to know about surrounding pixels to compute the result, and thus the operations can be performed in parallel.


Supposing that our alpha and rgb values are encoded as 8bit integers, the following architecture can be used to perform parallel operations:

 


 

NEON uses a specific set of instructions that allow for operations ranging from simple integer or floating-point arithmetic operations to more complex permutation and memory operations suited to media codecs.

     

Suppose that the green values for 16 successive pixels of our two input images are loaded in the 128-bit wide NEON registers q1 and q2. Instead of operating on each pixel separately, the following NEON instruction is enough to compute the 16 green result values at the same time:

 

    vhadd.U8 q0, q1, q2    @ Half each 8-bit value in q1 and q2
                       and add channels together.


Other convenient instructions will help loading from or storing to memory with interleaving or deinterleaving. Without such SIMD instructions, the code would have to perform these halving and adding operations separately for each pair of 8-bit values.


For more information on how to efficiently use NEON you can refer to this series of articles.


There is much more to know about ARM hardware and software. Although the features shown here are only a sample of what ARM processors can offer, ARM processors should hopefully not sound like a complete mystery any more. You can explore these subjects and find more information on this blog or on the ARM website. You can also look out for the next articles on ARM fundamentals, where I will focus on more specific topics.

_______________________________________________________________________________

   

1 - Some details on the older ARM processors naming convention:

Letter suffixes:

- DMI : Debug, enhanced Multiplier, embedded Ice

- E : DSP-like Extensions

- F : VFP (Vector Floating Point)

- J : Jazelle

- S : Synthesizable

- T or T2 : Thumb or Thumb2

- Z : TrustZone extension

 

Digits suffixes: ('x' refers to the family)

- ARMx1z : Cache and MMU

- ARMx2z : Cache, MMU, with "Process ID" support

- ARMx3z, ARMx5z, ARMx7z : Cache, MMU, with physical address tagging

- ARMx4z : Cache and MPU (protection unit, no virtual memory)

- ARMx6z : Write buffer but no caches

 

2 - Details and notes:

The code was compiled with arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2010q1-202) 4.4.1

This code and its following disassembly is only used as a reproducible example. We focus here only on the code generated for the multiplication operation. There would be much to say about the vfp abi used in the two cases.

 

3 - Compilation tweak:

You will need to declare an additional empty main function to compile the previous code with this command.

void main() {}

Here we compile an executable to get the disassembly of the __aeabi_dmul routine in the objdump.

 

Alexandre, Graduate Engineer, ARM, dug during his studies from high level programming languages to hardware design, before settling for low level optimization, working mostly on Just-In-Time compilers. He is especially interested in the interface between hardware and software, and how to make the most out of his hardworking boards.

【基于QT的调色板】是一个使用Qt框架开发的色彩选择工具,类似于Windows操作系统中常见的颜色选取器。Qt是一个跨平台的应用程序开发框架,广泛应用于桌面、移动和嵌入式设备,支持C++和QML语言。这个调色板功能提供了横竖两种渐变模式,用户可以方便地选取所需的颜色值。 在Qt中,调色板(QPalette)是一个关键的类,用于管理应用程序的视觉样式。QPalette包含了一系列的颜色角色,如背景色、前景色、文本色、高亮色等,这些颜色可以根据用户的系统设置或应用程序的需求进行定制。通过自定义QPalette,开发者可以创建具有独特视觉风格的应用程序。 该调色板功能可能使用了QColorDialog,这是一个标准的Qt对话框,允许用户选择颜色。QColorDialog提供了一种简单的方式来获取用户的颜色选择,通常包括一个调色板界面,用户可以通过滑动或点击来选择RGB、HSV或其他色彩模型中的颜色。 横渐变取色可能通过QGradient实现,QGradient允许开发者创建线性或径向的色彩渐变。线性渐变(QLinearGradient)沿直线从一个点到另一个点过渡颜色,而径向渐变(QRadialGradient)则以圆心为中心向外扩散颜色。在调色板中,用户可能可以通过滑动条或鼠标拖动来改变渐变的位置,从而选取不同位置的颜色。 竖渐变取色则可能是通过调整QGradient的方向来实现的,将原本水平的渐变方向改为垂直。这种设计可以提供另一种方式来探索颜色空间,使得选取颜色更为直观和便捷。 在【colorpanelhsb】这个文件名中,我们可以推测这是与HSB(色相、饱和度、亮度)色彩模型相关的代码或资源。HSB模型是另一种常见且直观的颜色表示方式,与RGB或CMYK模型不同,它以人的感知为基础,更容易理解。在这个调色板中,用户可能可以通过调整H、S、B三个参数来选取所需的颜色。 基于QT的调色板是一个利用Qt框架和其提供的色彩管理工具,如QPalette、QColorDialog、QGradient等,构建的交互式颜色选择组件。它不仅提供了横竖渐变的色彩选取方式,还可能支持HSB色彩模型,使得用户在开发图形用户界面时能更加灵活和精准地控制色彩。
标题基于Spring Boot的二手物品交易网站系统研究AI更换标题第1章引言阐述基于Spring Boot开发二手物品交易网站的研究背景、意义、现状及本文方法与创新点。1.1研究背景与意义介绍二手物品交易的市场需求和Spring Boot技术的适用性。1.2国内外研究现状概述当前二手物品交易网站的发展现状和趋势。1.3论文方法与创新点说明本文采用的研究方法和在系统设计中的创新之处。第2章相关理论与技术介绍开发二手物品交易网站所涉及的相关理论和关键技术。2.1Spring Boot框架解释Spring Boot的核心概念和主要特性。2.2数据库技术讨论适用的数据库技术及其在系统中的角色。2.3前端技术阐述与后端配合的前端技术及其在系统中的应用。第3章系统需求分析详细分析二手物品交易网站系统的功能需求和性能需求。3.1功能需求列举系统应实现的主要功能模块。3.2性能需求明确系统应满足的性能指标和安全性要求。第4章系统设计与实现具体描述基于Spring Boot的二手物品交易网站系统的设计和实现过程。4.1系统架构设计给出系统的整体架构设计和各模块间的交互方式。4.2数据库设计详细阐述数据库的结构设计和数据操作流程。4.3界面设计与实现介绍系统的界面设计和用户交互的实现细节。第5章系统测试与优化说明对系统进行测试的方法和性能优化的措施。5.1测试方法与步骤测试环境的搭建、测试数据的准备及测试流程。5.2测试结果分析对测试结果进行详细分析,验证系统是否满足需求。5.3性能优化措施提出针对系统性能瓶颈的优化建议和实施方案。第6章结论与展望总结研究成果,并展望未来可能的研究方向和改进空间。6.1研究结论概括本文基于Spring Boot开发二手物品交易网站的主要发现和成果。6.2展望与改进讨论未来可能的系统改进方向和新的功能拓展。
1. 用户与权限管理模块 角色管理: 学生:查看个人住宿信息、提交报修申请、查看卫生检查结果、请假外出登记 宿管人员:分配宿舍床位、处理报修申请、记录卫生检查结果、登记晚归情况 管理员:维护楼栋与房间信息、管理用户账号、统计住宿数据、发布宿舍通知 用户操作: 登录认证:对接学校统一身份认证(模拟实现,用学号 / 工号作为账号),支持密码重置 信息管理:学生完善个人信息(院系、专业、联系电话),管理员维护所有用户信息 权限控制:不同角色仅可见对应功能(如学生无法修改床位分配信息) 2. 宿舍信息管理模块 楼栋与房间管理: 楼栋信息:名称(如 "1 号宿舍楼")、层数、性别限制(男 / 女 / 混合)、管理员(宿管) 房间信息:房间号(如 "101")、户型(4 人间 / 6 人间)、床位数量、已住人数、可用状态 设施信息:记录房间内设施(如空调、热水器、桌椅)的配置与完好状态 床位管理: 床位编号:为每个床位设置唯一编号(如 "101-1" 表示 101 房间 1 号床) 状态标记:标记床位为 "空闲 / 已分配 / 维修中",支持批量查询空闲床位 历史记录:保存床位的分配变更记录(如从学生 A 调换到学生 B 的时间与原因) 3. 住宿分配与调整模块 住宿分配: 新生分配:管理员导入新生名单后,宿管可按专业集中、性别匹配等规则批量分配床位 手动分配:针对转专业、复学学生,宿管手动指定空闲床位并记录分配时间 分配结果公示:学生登录后可查看自己的宿舍信息(楼栋、房间号、床位号、室友列表) 调整管理: 调宿申请:学生提交调宿原因(如室友矛盾、身体原因),选择意向宿舍(需有空位) 审批流程:宿管审核申请,通过后执行床位调换,更新双方住宿信息 换宿记录:保存调宿历史(申请人、原床位、新床位、审批人、时间) 4. 报修与安全管理模块 报修管理: 报修提交:学生选择宿舍、设施类型(如 "
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值