Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
And
AMBA
Contents
• Introduction to instruction set
• ARM instruction formats
• ARM instruction Execution
• AMBA – the advanced microcontroller bus architecture
5
ARM Instruction Format & Execution
Data Processing Instructions
• ARM data processing instructions enable the programmer to
perform arithmetic and logical operations on data values in
registers.
• All other instructions just move data around and control the
sequence of program execution, so the data processing instructions
8
ARM Instruction Format & Execution
Data Processing Instructions
Register-immediate operations
ARM Instruction Format & Execution
Data Transfer Instructions
• Data transfer instructions move data between ARM registers
and memory.
• There are 3 basic forms of data transfer instruction in the ARM
instruction set:
18
ARM Instruction Format & Execution
Data Transfer Instructions
Instruction Format
19
• Pre indexed mode(P=1)
- LDR r0,[r1,#4]………………..if w=0, r0=mem[r1+4]& r1 =r1 only.
- LDR r0,[r1,#4]!…………………if w=1, r0=mem[r1+4] & r1=r1+4.
- A pre-indexed (P=1) addressing mode uses the computed
21
ARM Instruction Format & Execution
Data Transfer Instructions
Execution:
• A data transfer (load or store) instruction computes a memory
address in a manner similar to the way a data processing instruction
computes its result.
• A register is used as the base address, to which is added (or from
26
ARM Instruction Format & Execution
Branch Instructions
• These instructions neither processes data nor moves it
around. It simply determines which instructions get executed
next.
• The most common way to switch program execution from one
place to another is to use the branch instruction.
32
(a) 1st cycle – compute branch
(b) 2nd cycle – save return address
target
The Advanced Microcontroller Bus Architecture
33
The Advanced Microcontroller Bus Architecture
External bus
interface
UART
DMA controller bridge
Timer
APB
35
Parallel i/f
The Advanced Microcontroller Bus Architecture
• Arbitration: A bus transaction is initiated by a bus master
which requests access from a central arbiter.
• The arbiter decides priorities when there are conflicting
requests and its design is a system-specific issue.
• The ASB only specifies the protocol which must be followed:
- The master, x, issues a request (AREQx) to the central arbiter.
39
The Advanced Microcontroller Bus Architecture
• Advanced Peripheral Bus: The ASB offers a relatively high
performance on-chip interconnect which suits processor,
memory and peripheral macrocells with some built-in
interface sophistication.
- The APB is a simple static bus which operates as a stub on an
ASB to offer a minimalist interface to very simple peripheral