Arm 学习笔记 第二章: ARM Processor Fundamentals

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.

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值