Professional Documents
Culture Documents
The ARM Architecture: With A Focus On V7a and Cortex-A8
The ARM Architecture: With A Focus On V7a and Cortex-A8
Agenda
Introduction to ARM Ltd
ARM Processors Overview
ARM v7A Architecture/Programmers Model
Cortex-A8 Memory Management
Cortex-A8 Pipeline
ARM Ltd
Also develop technologies to assist with the designin of the ARM architecture
Software tools, boards, debug hardware
Application software
Bus architectures
Peripherals, etc
ARMs Activities
Connected Community
Development Tools
Software IP
Processors
memory
SoC
Intelligent toys
Utility
Meters
IR Fire
Detector
Exercise
Machines
Tele-parking
Intelligent
Vending
Agenda
Introduction to ARM Ltd
ARM Processors Overview
ARM v7A Architecture/Programmers Model
Cortex-A8 Memory Management
Cortex-A8 Pipeline
Cortex-A15
...2.5GHz
x1-4
Cortex-A9
Cortex-A8
x1-4
x1-4
Microcontroller-oriented processors
for MCU and SoC applications
Cortex-A5
1-2
R Heron
Cortex-R4
Cortex-M4
Cortex-M3
SC300
Cortex-M1
Cortex-M0
12k gates...
Relative Performance*
2500
2000
1500
1000
500
0
Max Freq (MHz)
Min Power (mW/MHz)
CortexM0
CortexM3
ARM7
ARM926
ARM1026
ARM1136
ARM1176
Cortex-A8
Cortex-A9
Dual-core
50
150
184
470
540
610
750
1100
2000
0.012
0.06
0.35
0.235
0.36
0.335
0.568
0.43
0.5
Cortex family
Cortex-A8
Cortex-R4
Cortex-M3
Architecture v7M
MPU (optional)
AHB Lite & APB
Architecture v7A
MMU
AXI
VFP & NEON support
Architecture v7R
MPU (optional)
AXI
Dual Issue
Agenda
Introduction to ARM Ltd
ARM Processors Overview
ARM v7A Architecture/Programmers Model
Cortex-A8 Memory Management
Cortex-A8 Pipeline
10
Instruction
Fetch
Unit
L1 I Cache
Instruction
Decode
Unit
Instruction
Execute &
Load/Store
L1 D Cache
L2 Memory System
Cortex-A8
AXI Level 3 Memory Interface
11
Cortex-A8 Extensions
12
20000
15000
ARM
Thumb
10000
5000
0
32-bit
16-bit
16-bit with
32-bit stack
14
Variable-length instructions
15
User
FIQ
IRQ
Supervisor
Undefined
Abort
System
Monitor
16
FIQ
IRQ
SVC
User
mode
r0-r12
User
mode
r0-r12
Undef
Abort
Mon
User
mode
r0-r12
User
mode
r0-r12
User
mode
r0-r12
r0
r1
r2
r3
r4
r5
r6
r7
r8
r9
r10
r11
r12
r13 (sp)
r14 (lr)
r15 (pc)
r8
r9
r10
r11
r12
r13 (sp)
r14 (lr)
r15 (pc)
r13 (sp)
r14 (lr)
r15 (pc)
r13 (sp)
r14 (lr)
r15 (pc)
r13 (sp)
r14 (lr)
r15 (pc)
r13 (sp)
r14 (lr)
r15 (pc)
r13 (sp)
r14 (lr)
r15 (pc)
cpsr
spsr
spsr
spsr
spsr
spsr
spsr
User
mode
r0-r7
17
0x1C*
0x18*
0x14*
0x10*
FIQ
IRQ
(Reserved)
Data Abort
Prefetch Abort
SVC or SMC
Undefined Instruction
Reset
Vector Table
* Represents an offset, as vector
table can moved to different base
addresses
27 26 25 24 23
Flags
20 19
IT1:0 J Reserved
16 15
GE3:0
10 9
IT7:2
5 4
E A I F T
0
M4:0
T bit
0
1
0
1
State
ARM
Thumb
Jazelle-DBX
Thumb2-EE
19
ARM instructions can be made to execute conditionally by postfixing them with the
appropriate condition code field.
By default, data processing instructions do not affect the condition code flags but
the flags can be optionally set by using S. CMP does not need S.
loop
20
21
MOVEQ
ADDEQ
SUBNE
ORREQ
Branch instructions
Branch :
B{<cond>} label
BL{<cond>} subroutine_label
31
28 27
Cond
25 24 23
1 0 1 L
Offset
Link bit
0 = Branch
1 = Branch with link
Condition field
The processor core shifts the offset field left by 2 positions, sign-extends it
and adds it to the PC
22
32 Mbyte range
How to perform longer branches?
Consist of :
Arithmetic:
Logical:
Comparisons:
Data movement:
ADD
AND
CMP
MOV
ADC
ORR
CMN
MVN
SUB
EOR
TST
SBC
BIC
TEQ
RSB
Syntax:
<Operation>{<cond>}{S} Rd, Rn, Operand2
23
RSC
Operand
2
Barrel
Shifter
Immediate value
ALU
Result
24
STR Word
STRB Byte
STRH Halfword
LDRSB
LDRSH
e.g. LDREQB
25
Agenda
Introduction to ARM Ltd
ARM Processors Overview
ARM v7A Architecture/Programmers Model
Cortex-A8 Memory Management
Cortex-A8 Pipeline
26
Memory Protection
Physical Memory
Privileged
Mode
OS
Code + Data
OS
User Mode
Application Code
27
Application
Code + Data
Memory Allocation
Physical Memory
Privileged
Mode
Virtual
Address
Physical
Address
OS
Code + Data
OS
Memory
Management
Unit
User Mode
Application Code
User Mode
Application Code
28
Application
Code + Data
Application
Code + Data
Memory Management
Memory Management Unit (MMU)
Controls accesses to and from external memory
Assigns access permissions to memory regions
Performs virtual to physical address translation
Instruction and Data Translation Look-Aside Buffers (TLB)
Contains recent virtual to physical address translations
Associates an ASID with each entry
ASID identifies which process is currently active
DTLB
ITLB
cp15
Data
Cache
Cortex-A8 Core
29
Instruction
Cache
Agenda
Introduction to ARM Ltd
ARM Processors Overview
ARM v7A Architecture/Programmers Model
Cortex-A8 Memory Management
Cortex-A8 Pipeline
30
31
Security - TrustZone
Security Property of the System which ensures resources
of value cannot be copied, damaged or made un-available to
genuine users
Security cannot be foolproof so focus should be on
Assets to protect
Attacks against which it has to be protected
Goal: Attack A on Asset B will take Y days at Z dollars cost
Need for Security
Embedded devices are handling data of increasing value such as
Banking data
32
33
TrustZone
34
35
Cortex-A8 References
Cortex-A8 Technical Reference Manual
ARM Architecture Reference Manual v7-AR
RealView Compilation Tools Compiler Reference Guide
RealView Compilation Tools Compiler User Guide
http://infocenter.arm.com
36
http://www.arm.com/support/university/
University@arm.com
37
Fin
38