DAY2_ARM
DAY2_ARM
MACHINE
Introduction to ARM Ltd
Programmers Model
Instruction Set
System Design
Development Tools
Founded in November 1990
Spun out of Acorn Computers
cpsr
spsr spsr spsr spsr spsr spsr
Register Organization Summary
User FIQ IRQ SVC Undef Abort
r0
r1
User
r2 mode
r3 r0-r7,
r4 r15, User User User User
and mode mode mode mode Thumb state
r5
cpsr r0-r12, r0-r12, r0-r12, r0-r12, Low registers
r6
r15, r15, r15, r15,
r7 and and and and
r8 r8 cpsr cpsr cpsr cpsr
r9 r9
r10 r10 Thumb state
r11 r11 High registers
r12 r12
r13 (sp) r13 (sp) r13 (sp) r13 (sp) r13 (sp) r13 (sp)
r14 (lr) r14 (lr) r14 (lr) r14 (lr) r14 (lr) r14 (lr)
r15 (pc)
cpsr
spsr spsr spsr spsr spsr
N Z C V Q J U n d e f i n e d I F T mode
f s x c
Condition code flags Interrupt Disable bits.
N = Negative result from ALU I = 1: Disables the IRQ.
Z = Zero result from ALU F = 1: Disables the FIQ.
C = ALU operation Carried out
V = ALU operation oVerflowed T Bit
Architecture xT only
T = 0: Processor in ARM state
Sticky Overflow flag - Q flag T = 1: Processor in Thumb state
Architecture 5TE/J only
Indicates if saturation has occurred
Mode bits
Specify the processor mode
J bit
Architecture 5TEJ only
J = 1: Processor in Jazelle state
Program Counter (r15)
Improved
5TE Jazelle
Halfword
and signed
4 ARM/Thumb
Interworking Java bytecode 5TEJ
1 halfword /
CLZ execution
byte support
System SA-110 Saturated maths ARM9EJ-S ARM926EJ-S
2 mode
DSP multiply-
SA-1110 ARM7EJ-S ARM1026EJ-S
accumulate
instructions
3 ARM1020E SIMD Instructions
Thumb
instruction 4T Multi-processing
6
set XScale
Early ARM V6 Memory
architectures architecture (VMSA)
ARM7TDMI ARM9TDMI ARM9E-S
Unaligned data
ARM720T ARM940T ARM966E-S support ARM1136EJ-S
Agenda
Syntax:
CF Destination 0 Destination CF
Destination CF
Immediate value
8 bit number, with a range of 0-255.
Rotated right through even number of
positions
ALU Allows increased range of 32-bit
constants to be loaded directly into
registers
Result
ARM Branches and Subroutines
B <label>
PC relative. ±32 Mbyte range.
BL <subroutine>
Stores return address in LR
Returning implemented by restoring the PC from LR
For non-leaf functions, LR will have to be stacked
func1 func2
STMFD sp!, :
: {regs,lr}
:
: :
:
BL func1 BL func2
:
: :
:
: LDMFD sp!,
{regs,pc} MOV pc, lr
Example ARM-based System
Interrupt
Controller
Peripherals I/O
nIRQ nFIQ
ARM
Core
8 bit ROM
AMBA
Arbiter Reset
ARM
TIC
Remap/
External Bus Interface Timer
Pause
ROM External
Bridge
Bus
Interface
External
RAM On-chip Interrupt
Decoder RAM Controller
AMBA ACT
Advanced Microcontroller Bus AMBA Compliance Testbench
Architecture
PrimeCell
ADK
Complete AMBA Design Kit
ARM’s AMBA compliant peripherals
The RealView Product Families
RealView Compilation Tools (RVCT) RealView Debugger (RVD) RealView ARMulator ISS
(RVISS)
RealView ICE (RVI)
RealView Trace (RVT)
ARM Debug Architecture
Ethernet
Debugger (+ optional
trace tools)