Arm 学习笔记 第二章: ARM Processor Fundamentals
2010-10-20 08:43
190 查看
Difference between Von Neumann implementation & Harvard implementation of ARM
Von Neumann implementation: data items and instructions share the same bus.
Harvard implementations: it uses two different buses.
Load-store architecture:
Load : memory-----(load instructions copy data)------->registers in core
Store: registers----(store instructions copy data)------>memory
There are no data processing instructions that directly manipulate data in memory.
Register:
There are 18 active registers available in user mode, 16 data registers(r0~r15) and 2 processor status registers(cpsr,spsr).
r0~r12 are general purpose registers,
r13 is stack pointer(sp),
r14 is link register(lr,store the reture address when a subroutine is called),
r15 is program counter(pc, contains the address of the next instruction to be feteched.)
sometimes r13 and 14 can be used as general-purpose registers, but using r13 is dangerous.
In ARM state r0~r13 are orthogonal: any instructions that you can apply to r0 you can equally well apply to any of the other registers(r1~r13).
Structure of psr:
N Z C V (j) I F T mode
31 30 29 28 ----24----------------------- 7 6 5 4----0
condition flag:
N-Negative: bit 31 of the result is a binary 1
Z-Zero: the result is 0, 常用於indicate equality
C-Carry: an unsigned carry happens in the result
V-Overflow: signed overflow happens
I: Interrupt request
F: Fast inturrupt request
Six privileged Modes
abort: when there is a failed attempt to access memory.
fast interrupt: 略
interrupt request: 略
supervisor: is the mode that the processor is in after reset and is the mode that an OS kernel operates in.
system: a special version of user mode that allow full read-write access to cpsr.
undefined:
Nonprivileged mode
user: 略
Interrput Masks
used to stop specific interrput requests from interrupting the processor.
bit 7 and 6 (or I and F) are controlling the masking of IRQ and FIQ. When I bit is set to 1 IRQ is masked. So does F.
Conditional execution:
Conditional execution controls whether or not the core will execute the instruction.
The condition attribute is postfixed to the instruction mnemonic, which is encoded into the instruction. When a condition mnemonic is not present, the defalt behavior is to set it to always execute.
Pipeline:
Using a pipeline speeds up execution by fetching the next instruction while other instructions are being decoded and executed.
Pipeline executing characteristics:
1. The pipeline has not processed an instruction until it passes completely through the execute stage.
2. Program counter(ps) alway points to the address of the instruction plus 8bytes (or plus two instructions ahead),因為它指的是下一條要取的指令. In Thumb state, it pluses 4bytes.
3. The execution of a branch instruction or branching by direct modification of pc causes the core to flush its pipeline.
4. ARM10 uses branch protection by predicting possible branches.
5. an instruction in the execute stage will complete eventhough an interrupt has been raised.
Exceptions, Interrupts and the vector table:
When an exception or interrupt occurs, the processor set the pc to a specific memory address which is called the vector table. The entries of this are instructions that brach to specific routines designed to handle a particular exception or interrupt.
There are 3 hardware extensions of core:
1.Cache and tightly coupled memory(TCM)
2.Memory management: 1)no extensions 2)Memory protection unit(MPU) provides limited protection 3)Memory management unit(MMU) providing full protection.
3.Coprocessor interface: A coprocessor extends the processing features of a core by extending the instruciton set or by providing configuration registers.
Von Neumann implementation: data items and instructions share the same bus.
Harvard implementations: it uses two different buses.
Load-store architecture:
Load : memory-----(load instructions copy data)------->registers in core
Store: registers----(store instructions copy data)------>memory
There are no data processing instructions that directly manipulate data in memory.
Register:
There are 18 active registers available in user mode, 16 data registers(r0~r15) and 2 processor status registers(cpsr,spsr).
r0~r12 are general purpose registers,
r13 is stack pointer(sp),
r14 is link register(lr,store the reture address when a subroutine is called),
r15 is program counter(pc, contains the address of the next instruction to be feteched.)
sometimes r13 and 14 can be used as general-purpose registers, but using r13 is dangerous.
In ARM state r0~r13 are orthogonal: any instructions that you can apply to r0 you can equally well apply to any of the other registers(r1~r13).
Structure of psr:
N Z C V (j) I F T mode
31 30 29 28 ----24----------------------- 7 6 5 4----0
condition flag:
N-Negative: bit 31 of the result is a binary 1
Z-Zero: the result is 0, 常用於indicate equality
C-Carry: an unsigned carry happens in the result
V-Overflow: signed overflow happens
I: Interrupt request
F: Fast inturrupt request
Six privileged Modes
abort: when there is a failed attempt to access memory.
fast interrupt: 略
interrupt request: 略
supervisor: is the mode that the processor is in after reset and is the mode that an OS kernel operates in.
system: a special version of user mode that allow full read-write access to cpsr.
undefined:
Nonprivileged mode
user: 略
Interrput Masks
used to stop specific interrput requests from interrupting the processor.
bit 7 and 6 (or I and F) are controlling the masking of IRQ and FIQ. When I bit is set to 1 IRQ is masked. So does F.
Conditional execution:
Conditional execution controls whether or not the core will execute the instruction.
The condition attribute is postfixed to the instruction mnemonic, which is encoded into the instruction. When a condition mnemonic is not present, the defalt behavior is to set it to always execute.
Pipeline:
Using a pipeline speeds up execution by fetching the next instruction while other instructions are being decoded and executed.
Pipeline executing characteristics:
1. The pipeline has not processed an instruction until it passes completely through the execute stage.
2. Program counter(ps) alway points to the address of the instruction plus 8bytes (or plus two instructions ahead),因為它指的是下一條要取的指令. In Thumb state, it pluses 4bytes.
3. The execution of a branch instruction or branching by direct modification of pc causes the core to flush its pipeline.
4. ARM10 uses branch protection by predicting possible branches.
5. an instruction in the execute stage will complete eventhough an interrupt has been raised.
Exceptions, Interrupts and the vector table:
When an exception or interrupt occurs, the processor set the pc to a specific memory address which is called the vector table. The entries of this are instructions that brach to specific routines designed to handle a particular exception or interrupt.
There are 3 hardware extensions of core:
1.Cache and tightly coupled memory(TCM)
2.Memory management: 1)no extensions 2)Memory protection unit(MPU) provides limited protection 3)Memory management unit(MMU) providing full protection.
3.Coprocessor interface: A coprocessor extends the processing features of a core by extending the instruciton set or by providing configuration registers.
相关文章推荐
- C++ Primer 学习笔记(第二章:变量和基本类型)
- iOS 10 Programming Fundamentals with Swift 学习笔记 0
- 一份好的ARM体系结构学习笔记
- C++ primer 学习笔记 第二章
- 集体智慧编程第二章学习笔记
- c++ primer 学习笔记 第二章 变量和基本类型
- 手把手教你使用eclipse+qemu+gdb来单步调试ARM内核【学习笔记】
- 学习笔记 第二章
- 深入理解java虚拟机学习 笔记 第二章 java 内存区域和内存溢出异常
- OpenGL2.0学习笔记【二】——(第二章)矩形的绘制
- arm 汇编学习常用指令伪指令笔记汇总
- JavaScript学习笔记-第二章
- C++的学习笔记(第二章:基本数据类型与表达式)
- 第二章、Objective-c 语法,继承,protocol和delegate(iOS学习笔记,从零开始)
- JAVA学习笔记15——Spring框架第二章
- 《COM原理及应用》学习笔记之第二章
- 【ARM学习笔记】实验三:S3C2440A与内存SDRAM连接实验
- ARM学习笔记010之Gcc编译新问题
- arm体系结构学习笔记 part2 -- 中断相关
- 第一行代码学习笔记-第二章 探究活动-5. 活动的最佳实现