ARM ARMAdvanced RISC Machines ARM 32RISCIP 10 ARM
- Slides: 130
ARM简介 ARM——Advanced RISC Machines ARM—— 32位RISC结构IP核提供商 10
ARM微处理器系列 ARM 7系列 ARM 9 E系列 ARM 10 E系列 ARM 11系列 Secur. Core系列 Cortex系列 Inter的Strong. ARM和Xscale系列 19
ARM 微处理器核: ARM 6, ARM 7, ARM 9, ARM 10, ARM 11 扩展: Thumb, DSP, SIMD, Jazelle etc. 其它IP核: UART, GPIO, memory controllers, etc 21
ARM处理器的使用量 ARM 2003 22
ARM体系结构版本 - 1 Version 1 (obsolete) 基本数据处理 字节, 字以及多字 load/store 软件中断 26 bit 地址总线 Version 2 (obsolete) Multiply & Multiply-accumulate 支持协处理器 支持线程同步 26 bit 地址总线 23
ARM体系结构的发展 1 2 3 Early ARM architectures Halfword and signed halfword / byte support System mode 4 ARM 7 TDMI ARM 720 T 5 TE CLZ SA-110 SA-1110 Thumb instruction set Improved ARM/Thumb Interworking 4 T ARM 9 TDMI ARM 940 T Saturated maths DSP multiplyaccumulate instructions ARM 1020 E XScale ARM 9 E-S ARM 966 E-S Jazelle 5 TEJ Java bytecode execution ARM 9 EJ-S ARM 926 EJ-S ARM 7 EJ-S ARM 1026 EJ-S SIMD Instructions 6 Multi-processing V 6 Memory architecture (VMSA) Unaligned data support ARM 1136 EJ-S 29
ARM微处理器特性 ARM 7 ARM 9 ARM 10 ARM 11 流水� 3 5 6 8 典型� 率(MHz) 80 150 260 335 功耗(m. W/MHz) 0. 06 0. 19(+cache) 0. 5 (+cache) 0. 4 (+cache) 性能 MIPS**/MHz 0. 97 1. 1 1. 3 1. 2 � � 伊曼 哈佛 哈佛 哈佛 8 32 16 32 �目 架构 乘法器 33
ARM 9 TDMI流水线的变化 ARM 7 TDMI Instruction Fetch Thumb®ARM decompress FETCH ARM decode Reg Select DECODE Reg Read Shift ALU Reg Write EXECUTE ARM 9 TDMI Instruction Fetch ARM or Thumb Inst Decode Reg Decode Read FETCH DECODE Shift + ALU EXECUTE Memory Access Reg Write MEMORY WRITE 40
带Cache的ARM 9 TDMI ARM 920 T 2 x 16 K caches MMU 支持虚拟地址和内存保护 写缓冲 D Cache GLUE ARM 9 TDMI I Cache ARM 9 xx. T 外部 存储器 MMU ARM 940 T 2 x 4 K caches MPU 写缓冲 48
示例 A. 小端存储法(0 x 01234567) 0 x 8000 0 x 8001 0 x 8002 0 x 8003 数据(16� 制表示) 0 x 67 0 x 45 0 x 23 0 x 01 数据(二� 制表示) 011001 11 0100010 1 00100011 0000000 1 地址 B. 大端存储法 0 x 8000 0 x 8001 0 x 8002 0 x 8003 数据(16� 制 表示) 0 x 01 0 x 23 0 x 45 0 x 67 数据(二� 制 表示) 00000001 00100011 01000101 01100111 地址 60
数据和指令类型 ARM 采用的是 32位架构. ARM 约定: Byte : 8 bits Halfword : 16 bits (2 byte) Word : 32 bits (4 byte) 大部分ARM core 提供: ARM 指令集(32 -bit) Thumb 指令集(T变种)(16 -bit ) Jazelle cores 支持 Java bytecode(J变种,4 TEJ) 61
字节顺序 The ARM 可以用 little/big endian 格式存取数据. 31 r 0 = 0 x 11223344 24 23 16 15 8 7 0 11 22 33 44 r 1 = 0 x 100 STR r 0, [r 1] 3 31 2 1 24 23 16 15 Byte Lane 0 8 7 0 Memory 11 22 33 44 0 31 1 24 23 16 15 2 3 8 7 0 11 22 33 44 LDRB r 2, [r 1] 31 24 23 16 15 8 7 0 R 2 = 0 x 44 00 00 00 44 Little endian n 31 24 23 16 15 8 7 0 00 00 00 11 R 2 = 0 x 11 Big endian For more information, see: “Application Note 61: Big and Little Endian Byte Addressing” 62
ARM状态各模式下的寄存器 各模式下实际访问的寄存器 寄存器类别 寄存器在汇编中的名称 用户 通用寄存器 和程序计数 器 状态寄存器 系统 管理 中止 R 0(a 1) R 0 R 1(a 2) R 1 R 2(a 3) R 2 R 3(a 4) R 3 R 4(v 1) R 4 R 5(v 2) R 5 R 6(v 3) R 6 R 7(v 4) R 7 未定义 中断 快中断 R 8(v 5) R 8_fiq * R 9(SB, v 6) R 9_fiq * R 10(SL, v 7) R 10_fiq * R 11(FP, v 8) R 11_fiq * R 12(IP) R 12_fiq * R 13(SP) R 13_svc* R 13_abt * R 13_und * R 13_irq * R 13_fiq * R 14(LR) R 14_svc * R 14_abt * R 14_und * R 14_irq * R 14_fiq * SPSR_und SPSR_irq SPSR_fiq R 15(PC) R 15 R 16(CPSR) CPSR SPSR 无 SPSR_abt 66
ARM状态各模式下的寄存器 各模式下实际访问的寄存器 寄存器类别 寄存器在汇编中的名称 用户 系统 管理 中止 R 0(a 1) R 1(a 2) R 0 R 1 R 2(a 3) R 1 R 2 R 3(a 4) R 5(v 2) R 3 R 2 R 4 R 3 R 5 R 6(v 3) R 4 R 6 R 7(v 4) R 7 R 5 R 4(v 1) 通用寄存器 和程序计数 器 R 8(v 5) R 9(SB, v 6) R 9 R 10(SL, v 7) R 10 R 11(FP, v 8) R 11 R 8 R 12 R 9 R 12(IP) § 31个通用 32位寄存器; R 13(SP) R 13_svc R 14(LR) R 14_svc R 10 § 6个状态寄存器。 R 15(PC) R 11 CPSR SPSR 中断 R 8 所有的37个寄存器,分成 两大类: 状态寄存器 未定义 快中断 R 8_fiq R 6 R 9_fiq R 7 R 10_fiq R 13_abt R 13_und R 13_irq R 11_fiq R 8_fiq R 12_fiq R 9_fiq R 13_fiq R 14_abt R 14_und R 14_irq R 10_fiq R 14_fiq R 15 R 11_fiq CPSR SPSR_abt SPSR_und SPSR_irq R 12_fiq SPSR_fiq R 13_svc R 13_abt R 13_und R 13_irq R 13_fiq R 14_svc R 14_abt R 14_und R 14_irq R 14_fiq SPSR_und SPSR_irq SPSR_fiq 无 SPSR_abt R 13 R 14 R 12 R 15 CPSR SPSR_abt 67
ARM状态各模式下可以访问的寄存器 各模式下实际访问的寄存器 寄存器类别 寄存器在汇编中的名称 R 0(a 1) 通用寄存器 和程序计数 器 用户 用户 系统 系统 管理 管理 R 1(a 2) R 0 R 1 R 2(a 3) R 2 R 1 R 3(a 4) R 4(v 1) R 3 R 2 R 4 R 5(v 2) R 3 R 5 R 6(v 3) R 6 R 4 R 7(v 4) R 7 R 5 R 8(v 5) 未定义 中断 中断 R 8 快中断 R 8_fiq R 9(SB, v 6) R 9 R 6 R 10(SL, v 7) R 10 R 7 R 10_fiq R 11(FP, v 8) R 11 R 8 R 12 R 9 R 13_abt R 13_und R 13_irq R 11_fiq R 8_fiq R 12_fiq R 9_fiq R 13_fiq R 14_abt R 14_und R 14_irq R 14_fiq R 10_fiq R 12(IP) R 13(SP) R 13_svc R 14(LR) R 14_svc R 10 R 15(PC) 状态寄存器 中止 中止 R 0 R 11 CPSR SPSR R 15 R 9_fiq R 11_fiq CPSR SPSR_abt SPSR_und SPSR_irq R 12_fiq SPSR_fiq R 13_svc R 13_abt R 13_und R 13_irq R 13_fiq R 14_svc R 14_abt R 14_und R 14_irq R 14_fiq SPSR_und SPSR_irq SPSR_fiq 无 SPSR_abt R 13 R 14 R 12 R 15 CPSR 无 SPSR_abt 68
一般的通用寄存器 各模式下实际访问的寄存器 寄存器类别 寄存器在汇编中的名称 用户 系统 R 0 R 1(a 2) R 0 R 1 R 2(a 3) R 2 R 1 R 3(a 4) R 4(v 1) R 3 R 2 R 4 R 5(v 2) R 3 R 5 R 6(v 3) R 6 R 4 R 7(v 4) R 7 R 5 R 8(v 5) R 8 R 9(SB, v 6) R 9 R 6 R 10(SL, v 7) R 10 R 7 R 11(FP, v 8) R 11 R 8 R 12(IP) 未定义 中断 快中断 R 8_fiq R 9_fiq R 10_fiq R 11_fiq R 8_fiq R 12_fiq R 13(SP) R 13_svc R 9 R 13_abt R 13_und R 13_irq R 9_fiq R 13_fiq R 14(LR) R 14_svc R 10 R 14_abt R 14_und R 14_irq R 14_fiq R 10_fiq R 15(PC) 状态寄存器 中止 R 0(a 1) 在汇编语言中 寄存器R 0~R 13为保存数 据或地址值的通用寄存 器。它们是完全通用的 寄存器,不会被体系结 构作为特殊用途,并且 可用于任何使用通用寄 存器的指令。 通用寄存器 和程序计数 器 管理 R 11 CPSR SPSR R 15 R 11_fiq CPSR 无 SPSR_abt R 13_svc R 12 SPSR_abt SPSR_und SPSR_irq R 12_fiq SPSR_fiq R 13_abt R 13_und R 13_irq R 13_fiq 69
一般的通用寄存器 各模式下实际访问的寄存器 寄存器类别 寄存器在汇编中的名称 用户 系统 管理 R 0(a 1) R 0 R 1(a 2) R 0 R 1 其中R 0~R 7 为未分组的寄存器, 也就是说对于任何处 理器模式,这些寄存 器都对应于相同的32 位物理寄存器。 通用寄存器 和程序计数 器 R 2(a 3) R 2 R 1 R 3(a 4) R 4(v 1) R 3 R 2 R 4 R 5(v 2) R 3 R 5 R 6(v 3) R 6 R 4 R 7(v 4) R 7 R 5 R 8(v 5) R 8 R 9(SB, v 6) R 9 R 6 R 10(SL, v 7) R 10 R 7 R 11(FP, v 8) R 11 R 8 R 12(IP) 未定义 中断 快中断 R 8_fiq R 9_fiq R 10_fiq R 11_fiq R 8_fiq R 12_fiq R 13(SP) R 13_svc R 9 R 13_abt R 13_und R 13_irq R 9_fiq R 13_fiq R 14(LR) R 14_svc R 10 R 14_abt R 14_und R 14_irq R 14_fiq R 10_fiq R 15(PC) 状态寄存器 中止 R 11 CPSR SPSR R 15 R 11_fiq CPSR 无 SPSR_abt R 13_svc R 12 SPSR_abt SPSR_und SPSR_irq R 12_fiq SPSR_fiq R 13_abt R 13_und R 13_irq R 13_fiq 70
一般的通用寄存器 各模式下实际访问的寄存器 寄存器类别 寄存器在汇编中的名称 用户 通用寄存器 和程序计数 器 系统 管理 R 0(a 1) R 0 R 1(a 2) R 1 R 2(a 3) R 2 R 3(a 4) R 3 R 4(v 1) R 4 R 5(v 2) R 5 R 6(v 3) R 6 R 7(v 4) R 7 寄存器R 8~R 14为 分组寄存器。它们所对应的 物理寄存器取决于当前的处 理器模式,几乎所有允许使 用通用寄存器的指令都允许 使用分组寄存器 未定义 中断 快中断 R 8(v 5) R 8_fiq R 9(SB, v 6) R 9_fiq R 10(SL, v 7) R 10_fiq R 11(FP, v 8) R 11 R 8 R 11_fiq R 8_fiq R 12(IP) R 12 R 9 R 13(SP) R 13_svc R 14(LR) R 14_svc R 10 R 15(PC) 状态寄存器 中止 R 11 CPSR SPSR R 13_und R 13_irq R 14_abt R 14_und R 14_irq R 10_fiq R 14_fiq R 15 R 11_fiq CPSR SPSR_abt SPSR_und SPSR_irq R 12_fiq SPSR_fiq R 13_svc R 13_abt R 13_und R 13_irq R 13_fiq R 14_svc R 14_abt R 14_und R 14_irq R 14_fiq 无 SPSR_abt R 13 R 14 R 12 R 13_abt R 12_fiq R 9_fiq R 13_fiq 71
一般的通用寄存器 各模式下实际访问的寄存器 寄存器类别 寄存器在汇编中的名称 用户 系统 R 0 R 1(a 2) R 1 R 2(a 3) R 2 中断 快中断 R 3 R 4 R 5(v 2) R 5 R 6(v 3) R 6 R 7(v 4) R 7 R 8(v 5) R 9(SB, v 6) R 10(SL, v 7) R 11(FP, v 8) R 12(IP) R 8_fiq R 9_fiq R 10_fiq R 11 R 8 R 12 R 9 R 13(SP) R 13_svc R 14(LR) R 14_svc R 10 R 15(PC) R 11 CPSR SPSR 未定义 寄存器R 8~R 12有两个分 组的物理寄存器。一个用于除FIQ 模式之外的所有寄存器模式,另一 个用于FIQ模式。这样在发生FIQ中 断后,可以加速FIQ的处理速度。 R 4(v 1) 状态寄存器 中止 R 0(a 1) R 3(a 4) 通用寄存器 和程序计数 器 管理 R 13_abt R 13_und R 13_irq R 11_fiq R 8_fiq R 12_fiq R 9_fiq R 13_fiq R 14_abt R 14_und R 14_irq R 10_fiq R 14_fiq R 15 R 11_fiq CPSR 无 SPSR_abt R 12 SPSR_abt SPSR_und SPSR_irq R 12_fiq SPSR_fiq 72
一般的通用寄存器 各模式下实际访问的寄存器 寄存器类别 寄存器在汇编中的名称 用户 通用寄存器 和程序计数 器 管理 中止 R 0(a 1) R 0 R 1(a 2) R 1 R 2(a 3) R 2 R 3(a 4) R 3 R 4(v 1) R 4 R 5(v 2) R 5 R 6(v 3) R 6 R 7(v 4) R 7 未定义 中断 快中断 R 8(v 5) R 8_fiq R 9(SB, v 6) R 9_fiq R 10(SL, v 7) R 10_fiq R 11_fiq R 12_fiq CPSR 寄存器R 13、R 14分别有6 个分组的物理寄存器。一个用于用 户和系统模式,其余 5个分别用于5 种异常模式。 SPSR 无 SPSR_abt SPSR_und SPSR_irq SPSR_fiq R 13_svc R 13_abt R 13_und R 13_irq R 13_fiq R 14_svc R 14_abt R 14_und R 14_irq R 14_fiq R 11(FP, v 8) R 12(IP) R 13(SP) R 13_svc R 13_abt R 13_und R 13_irq R 13_fiq R 14(LR) R 14_svc R 14_abt R 14_und R 14_irq R 14_fiq R 15(PC) 状态寄存器 系统 R 15 CPSR 73
异常处理 当异常产生时, ARM core: 拷贝 CPSR 到 SPSR_<mode> 设置适当的 CPSR 位: 改变处理器状态进入 ARM 态 0 x 1 C 改变处理器模式进入相应的异常模式 0 x 18 0 x 14 设置中断禁止位禁止相应中断 (如需要) 0 x 10 保存返回地址到 LR_<mode> 0 x 0 C 设置 PC 为相应的异常向量 0 x 08 返回时, 异常处理需要: 从 SPSR_<mode>恢复CPSR 从LR_<mode>恢复PC Note: 这些操作只能在 ARM 态执行. 0 x 04 0 x 00 FIQ IRQ (Reserved) Data Abort Prefetch Abort Software Interrupt Undefined Instruction Reset Vector Table Vector table can be at 0 x. FFFF 0000 on ARM 720 T and on ARM 9/10 family devices 106
进入异常的操作-2 R 14_<Exception_Mode>=Return Link SPSR_<Exception_Mode>=CPSR[4: 0]=Exception Mode Number CPSR[5]=0 ; 当运行于ARM状态时 IF<Exception_Mode>==Reset or FIQ then ; 当响应FIQ异常时,禁止新的FIQ异常 CPSR[6]=1; CPSR[7]=1; PC=Exception Vector Address 107
例子: 用户模式到 FIQ模式* Registers in use FIQ 模式 用户模式 r 0 r 1 r 2 r 3 r 4 r 5 r 6 r 7 r 8 r 9 异常 r 8 r 9 r 10 r 7 r 8_fiq r 9_fiq r 10_fiq r 11_fiq r 12_fiq r 13 (sp) r 13_fiq r 14_fiq r 13 (sp) r 14 (lr) r 13_fiq r 14 (lr) r 15 (pc) cpsr r 15 (pc) 返回一个从用户模式计算的地址, PC值存储 在FIQ模式 spsr_fiq cpsr spsr_fiq 用户模式 CPSR 复制到 FIQ 模式 SPSR 109
IRQ中断 1 IRQ zcvqjift_user 2 zcvqj. Ift_irq spsr_irq=cpsr r 14_irq=pc pc=0 x 18 返回用户 模式代码 3 软件处理 程序 119
FIQ中断 1 IRQ zcvqjift_user 2 zcvqj. IFt_fiq spsr_fiq=cpsr r 14_fiq=pc pc=0 x 1 c 返回用户 模式代码 3 软件处理 程序 120
- Acorn risc machines
- Advanced risc machines
- Arm advanced risc machine
- Advanced risc machines
- Risc vs cisc vs arm
- Arm vs risc
- Types of clasp prosthodontics
- Retainer partial denture
- Effort arm and resistance arm
- The ankle is a third class lever.
- Levers in everyday life
- Linker arm left arm
- Arquitectura risc y cisc
- Risc design philosophy
- Makalah risc dan cisc
- Risc and cisc difference
- Alasan mengapa digunakan risc
- Riscv green card
- Zero instruction set computer
- Define instruction set
- Risc cisc architecture
- Andrew hodgkinson architect
- Pengertian risc
- Assembly
- Cisc processor examples
- Risc v green card
- Tipuri de risc
- Architettura cisc
- 32 bit risc processor
- Pengertian risc
- Arquitetura risc e cisc
- Factori de risc biologici
- Risc vs cisc
- Rindx
- 16 bit risc
- Flynn's classical taxonomy
- Risc v members
- Types of instruction set architecture
- Risc v green card
- Spital buhusi
- Risc vs cisc
- Risc v sw instruction
- Disadvantages of risc processor
- Msp 430 architecture
- Arduino risc or cisc
- Tireotoxicoza cu gusa difuza
- Risc versus cisc
- Risc definitie
- Architettura cisc
- Risc vs cisc example
- Risc
- Complesso risc
- Arquitectura risc
- Cisc risc
- Risc vs cisc
- Examples of a cinquain poem
- Pulleys uses
- Amperage can be described as
- Dynamics of machines
- An inclined plane wrapped around a center post
- Examples wheel and axle
- Colorado lottery machines
- Transductive support vector machines
- La plus grosse pelleteuse au monde
- Icesea ice maker
- Job order sheet
- 6 machine simple
- The jobs we'll lose to machines
- Simple machine examples
- Neural networks and learning machines
- I spy simple machines
- Used to hold things together
- Chapter 14 work power and machines
- Evolution of machines
- Compound machines
- Self operating napkin simple machines
- Simple machines study guide
- Work absorbing device example
- In running nip points
- What are the six types of simple machines
- Johnson rule for 3 machines
- Change is inevitable except for vending machines meaning
- Function machines worksheets
- Examples of third class lever machines
- Principles of electrical machines vk mehta
- Describe pulley
- Formula of conditional probability
- Ideal machine efficiency
- Types of simple machines
- Edhead simple machines
- "simple machines"
- Mechanical drives and lifting machines n2
- Forces one pager
- In an incompletely specified machine
- Cribmaster login
- Benefits of simple machines
- The process of chamfering the entrance of a drilled hole
- Poe fulcrum
- Members of the progressive movement generally supported
- Building the longest tallest fastest scream machines
- What is a power machines throw
- Inclined plane wrapped around a cylinder
- Lever wedge wheel and axle
- Armature winding diagram
- Cosi simple machines
- Constructional features of cnc machines
- Machines and gadgets
- Trusses and frames
- General plane motion
- Transitory defect marks
- Dynamics of machines
- Simple machines in a bike
- Target seam ripper
- Simple machine in kitchen
- Work power and machines
- Theory of computation
- Chapter 4 work and energy section 1 work and machines
- Compound machine wheelbarrow
- Dudley sargent exercise machines
- How do pulleys make work easier
- The infernal desire machines of doctor hoffman
- Simple machines
- How do mri scans work
- A device that does work with only one movement
- Powered by simple machines
- Surgical diathermy machine working principle
- What kind of simple machine is a jar lid
- โปรแกรม cnc simulator
- Software for atm machines
- Simple machines tools
- Fulcrum load effort examples