Professional Documents
Culture Documents
University of Belgrade
School of Electrical Engineering
Department of Computer Science
Authors:
Goran Timotic gogi@beotel.yu
Gvozden Marinkovic mgvozden@eunet.yu
Prof. Dr. Veljko Milutinovic vm@etf.bg.ac.yu
ARM - Introduction
Advances RISC Machines (now known as ARM) was established
as a joint venture between Acorn, Apple and VLSI between Acorn,
Apple and VLSI in November 1990
ARM is the industry's leading provider of 16/32-bit embedded
RISC microprocessor solutions
The company licenses its high-performance, low-cost, powerefficient RISC processors, peripherals, and system-chip designs
to leading international electronics companies
2/70
ARM - Introduction
Currently available processors:
Arm 1
This was the very first ARM processor and
Arm 2
The ARM2 chip, and processor cell, features 27 registers of which 16 are
accessible at any one time. Four processor modes are available:
USR : user mode
IRQ : interrupt mode (with a private copy of R13 and R14)
FIQ : fast interrupt mode (private copies of R8 to R14)
SVC : supervisor mode. (private copies of R13 and R14)
3/70
ARM - Introduction
Arm 3
This is an upgraded ARM2 cell, with a cache
interface added
Arm 6
This processor cell is the first of the commercially available ARMs to have a full
32bit addressing capability
Additionally the processor now has 31 registers in it along with six new
processor modes:
User32 - 32 bit USR mode
Supervisor32 - 32 bit SVC mode (private SPSR register)
IRQ32 - 32 bit IRQ mode (private SPSR register)
FIQ32 - 32 bit FIQ mode. (private SPSR register)
Abort32 - Memory fetch abort mode (private SPSR register)
Undefined32 Undefined instruction mode (private SPSR register)
4/70
ARM - Introduction
Thumb
This isn't a processor per se, but more a 16 bit compressed instruction
set that is decoded by the Thumb core into full 32 bit instructions that
are then fed to an ARM core for execution
This offers two important advantages for
the embedded processor market:
Increased code density
Simplified system design
5/70
ARM - Introduction
Arm 7
The ARM7 cell is functionally identical to the ARM6 cell in capabilities but may
be clocked faster than the ARM6
A variant of the ARM7 cell offers an improved hardware multiply, suitable for
DSP work
Arm 8
Includes a five stage pipeline, a speculative instruction fetcher
tweaks to the processor to allow a higher clock speed
and internal
StrongARM
This is the high speed variant of the ARM chip family
Architecturally it is similar to the ARM8 core, sharing the five stage pipeline with
that processor
A further difference is change from a unified data and instruction cache to a
split, Harvard architecture, instruction and data cache
6/70
ARM - Introduction
ARM9
An incremental improvement over the ARM8 this chip features the
same five stage pipeline but is now a Harvard Architecture chip,
like the StrongARM
ARM 10
300 MHz
400 MIPS
600 mWatts
7/70
Consumer
Entertainment
Digital Imaging
8/70
ARM7 - Features
9/70
ARM7 - Applications
10/70
nEXEC
DATA32
B IG E N D
PR O G 32
M CLK
n W A IT
nRW
nBW
n IR Q
n F IQ
nRESET
ABO RT
nO PC
nTRANS
nM REQ
SEQ
LOCK
nCPI
CPA
CPB
n M [4 :0 ]
ALE
A d d r e s s R e g is te r
P
C
A
L
U
B
u
s
B
u
s
A d d res s
In c r e m e n te r
R e g is te r B a n k
(3 1 x 3 2 b it r e g is te r s )
(6 s ta tu s r e g is te r s )
A
b
u
s
I
n
c
r
e
m
e
n
t
e
r
In s tr u c tio n
D ecoder &
C o n tr o l L o g ic
B
u
s
B o o t h 's
M u ltip lie r
b
u
s
B a r r e l S h ifte r
W r ite D a ta R e g is te r
3 2 b it A L U
D O U T [3 1 :0 ]
11/70
C o n fig u r a tio n
n M [4 :0 ]
n W A IT
M CLK
A [3 1 :0 ]
PRO G 32
D ATA32
B IG E N D
D A T A [3 1 :0 ]
D O U T [3 1 :0 ]
nENO UT
nEXEC
In t e r r u p t s
B u s C o n tro ls
Pow er
n IR Q
n F IQ
ARM 7
M e m o ry
In t e r f a c e
nM REQ
SEQ
nRW
nBW
nRESET
LO CK
ALE
DBE
nTRANS
ABORT
VDD
VSS
P ro c e s s o r
M ode
nO PC
nCPI
CPA
CPB
M e m o ry
M anagem ent
In t e r f a c e
C o p ro c e s s o r
In t e r f a c e
12/70
Clocks
Configuration
PROG32 32 bit program
configuration
DATA32 32 bit data configuration
BIGEND Big Endian configuration
Bus Controls
Power
VDD Power supply
VSS Ground
Processor Mode
nM[4:0] Not processor mode
Interrupts
nIRQ Not interrupt request
nFIQ Not fast interrupt request
13/70
Memory Interface
A[31:0] Addresses
DATA[31:0] Data bus in
DOUT[31:0] Data bus out
nENOUT Not enable data
outputs
nMREQ Not memory request
SEQ Sequential address
nRW Not read/write
nBW Not byte/word
LOCK Locked operation
Coprocessor Interface
nOPC Not op-code fetch
nCPI Not coprocessor
instruction
CPA Coprocessor absent
CPB Coprocessor busy
Other
nEXEC ******************
nRESET Not reset
14/70
15/70
16/70
Higher Address 31
24 23
16 15
0 Word Address
87
11
10
Lower Address
17/70
Higher Address 31
24 23
16 15
0 Word Address
87
10
11
Lower Address
18/70
19/70
20/70
ARM7 - Registers
37 registers
31 general 32 bit registers
6 status registers
21/70
ARM7 - Registers
22/70
ARM7 - Registers
General Registers and Program Counter Modes
User32
R0
R1
R2
R3
R4
R5
R6
R7
R8
R9
R10
R11
R12
R13
R14
R15(PC)
Fiq32
R0
R1
R2
R3
R4
R5
R6
R7
R8_fiq
R9_fiq
R10_fiq
R11_fiq
R12_fiq
R13_fiq
R14_fiq
R15(PC)
Supervisor32
R0
R1
R2
R3
R4
R5
R6
R7
R8
R9
R10
R11
R12
R13_svc
R14_svc
R15(PC)
Abort32
R0
R1
R2
R3
R4
R5
R6
R7
R8
R9
R10
R11
R12
R13_abt
R14_abt
R15(PC)
IRQ32
R0
R1
R2
R3
R4
R5
R6
R7
R8
R9
R10
R11
R12
R13_irq
R14_irq
R15(PC)
Undefined32
R0
R1
R2
R3
R4
R5
R6
R7
R8
R9
R10
R11
R12
R13_und
R14_und
R15(PC)
CPSR
SPSR_fiq
CPSR
SPSR_svc
CPSR
SPSR_abt
CPSR
SPSR_irq
CPSR
SPSR_und
23/70
ARM7 - Registers
R14 is used as the subroutine link register and receives a copy of
R15 when a Branch and Link instruction is executed
R14_svc, R14_irq, R14_fiq, R14_abt and R14_und are used to
hold the return values of R15 when interrupts and exceptions arise,
when Branch and Link instructions are executed within interrupt or
exception routines
24/70
ARM7 - Registers
31
30
29
28
27
7
F
O v e rflo w
C a r r y /B o r r o w /E x te n d
Z e ro
6
I
M 4
M 3
M 2
M 1
M 0
M o d e B its
F IQ d is a b le
IR Q d is a b le
N e g a tiv e /L e s s T h a n
25/70
ARM7 - Registers
The Mode Bits
M[4:0]
Mode
10000
User PC
R14..R0
CPSR
10001
FIQ PC
R14_fiq..R8_fiq, R7..R0
CPSR, SPSR_fiq
10010
IRQ PC
R14_irq..R13_irq, R12..R0
CPSR, SPSR_irq
10011
Supervisor PC
R14_svc..R13_svc, R12..R0
CPSR, SPSR_svc
10111
Abort PC
R14_abt..R13_abt, R12..R0
SPSR_abt
11011
Undefined PC
R14_und..R13_und, R12..R0
SPSR_und
26/70
ARM7 - Exceptions
Exceptions arise whenever there is a need for the normal flow of
program execution to be broken, so that the processor can be
diverted to handle an interrupt from a peripheral
Many exceptions may arise at the same time
When multiple exceptions arise simultaneously, a fixed priority
determines the order in which they are handled
ARM7 handles exceptions by making use of the banked registers
to save state
27/70
ARM7 - Exceptions
Types of Exceptions
ABORT
An ABORT can be signalled by the external ABORT input
ABORT indicates that the current memory access cannot be completed
28/70
ARM7 - Exceptions
Types of Exceptions
Software interrupt
The software interrupt instruction (SWI) is used for getting into
Supervisor mode, usually to request a particular supervisor function
29/70
ARM7 - Exceptions
Exception Priorities
30/70
ARM7 - Reset
31/70
Cond
Cond
Cond
Cond
Cond
Cond
Cond
Cond
Cond
Cond
Cond
28
19
0
0
0
0
0
1
1
1
1
1
1
0
0
0
1
1
0
0
1
1
1
1
I
0
0
I
1
0
1
0
1
1
1
Opcode
0 0 0 A
1 0 B 0
P U B W
S
S
0
L
P U S W L
L
P U N W L
0 CP Opc
0 CP Opc L
1
15
Rn
Rd
Rn
Rn
11
Rd
Rn
Rd
Rd
Operand 2
Rs
1 0 0 1
0 0 0 0 1 0 0 1
Offset
XXXXXXXXXXXXXXXXXXXX
1
Rn
Register list
offset
Rn
CRd
CP#
offset
CRn
CRd
CP#
CP
0
CP
CRn
Rd
CP#
1
ignored by processor
Rm
Rm
Multiply
Single Data Swap
Single Data Transfer
xxxx
Undefined
Block Data Transfer
Branch
Coproc Data Transfer
CRm
CRm
32/70
31
27
Cond
33/70
27
Cond
Condition field
34/70
35/70
Logical Operations
Assembler
Mnemonic
AND
OpCode
Action
0000
EOR
0001
TST
1000
TEQ
1001
ORR
1100
operand1 OR operand2
MOV
1101
BIC
1110
MVN
1111
36/70
Arithmetic Operations
Assembler
Mnemonic
SUB
OpCode
Action
0010
operand1-operand2
RSB
0011
operand2-operand1
ADD
0100
operand1+operand2
ADC
0101
operand1+operand2+carry
SBC
0110
operand1-operand2+carry-1
RSC
0111
operand2-operand1+carry-1
CMP
1010
CMN
1011
37/70
38/70
39/70
40/70
41/70
42/70
43/70
Undefined instruction
44/70
45/70
Sequential cycle
ARM7 requests a transfer to or from an address which is either the
same as the address in the preceding cycle, or is one word after the
preceding address
Internal cycle
ARM7 does not require a transfer, as it is performing an internal
function and no useful prefetching can be performed at the same
time
46/70
nMREQ
SEQ
Cycle type
47/70
N -c y c le
S -c y c le
I-c y c le
C -c y c le
M CLK
A [3 1 :0 ]
a+4
a+8
nM REQ
SEQ
nRAS
nCAS
D [3 1 :0 ]
48/70
S -c y c le
M C LK
A [3 1 :0 ]
nM R E Q
S E Q
nR A S
nC A S
D [3 1 :0 ]
49/70
50/70
nBW
M CLK
CAS
NCAS0
NCAS1
D
Q
NCAS2
Q uad
L a tc h
NCAS3
51/70
Little Endian
operation byte 0 of the memory system should be connected to data
lines 7 through 0 (D[7:0]) and strobed by nCAS0
nCAS1 drives the bank connected to data lines 15 though 8
Big Endian
byte 0 of the memory system should be connected to data lines 31
through 24
52/70
53/70
nRW can be used by the memory manager to protect pages from being
written to
nTRANS indicates whether the processor is in user or a privileged
mode, and may be used to protect system pages from the user, or to
support completely separate mappings for the system and the user
nM[4:0] can give the memory manager full information on the
processor mode.
54/70
ARM7 includes a data swap (SWP) instruction that allows the contents
of a memory location to be swapped with the contents of a processor
register
This instruction is implemented as an uninterruptable pair of accesses:
55/70
56/70
57/70
The CPA and CPB inputs should be driven high except when they
are being used for handshaking
58/70
59/70
60/70
61/70
62/70
63/70
64/70
65/70
66/70
ARM7 - DC Parameters
Absolute Maximum Ratings
Symbol Parameter
Min.
Max.
Units
Supply voltage
VSS-0.3
VSS+0.7
Vin
VSS-0.3
VSS+0.3
Vts
Storage temperature
-40
125
deg C
VDD
67/70
ARM7 - DC Parameters
DC Operating Conditions
Symbol Parameter
Min.
Typ.
Max.
Units
5.0
5.5
VDD
Supply voltage
4.5
Vihc
3.5
VDD
Vilc
0.0
1.5
Ta
Ambient operating
temperature
70
Deg C
68/70
ARM7 - AC Parameters
AC Test Loads
Output
Signal
D[31:0]
Test Load
(pF)
5
Output Derating
(ns/pF)
0.5
A[31:0]
0.5
LOCK
0.5
nCPI
0.5
nMREQ
0.5
SEQ
0.5
nRW
0.5
nBW
0.5
nOPC
0.5
nTRANS
0.5
69/70
70/70