RISC Architecture
RISC Architecture
INTRODUCTION TO ARM
PROCESSORS
MPMC
RISC
But initially, at the start of execution of the program, all the operands are
in memory.
So, to access the memory operands, the RISC instruction set
has Load and Store instruction.
The Load instruction loads the operand present in memory to the
processor register. The load instruction is of the form:
Load destination, Source
Example Load R2, A // memory to register
The load instruction above will load the operand present at memory
location A to the processor register R2.
CONT..
The pipelined instructions fasten the execution twice when compared to execution in
sequence. The instruction execution stage of first instruction & instruction fetch stage
of second instruction is performed parallelly.
Observing the figure we can see that the execute/memory stage of second
instruction has to stall till the first instruction memory stage completes. This is the case
when we use the single port memory i.e. only one memory access can be done at a
time.
USE OF NOOP
The above stalling condition reduces the
execution speed.
To overcome this, we can use NOOP (No
Operation) instruction which can be inserted in
the instruction stream by the compiler or
assembler.
This would speed up the execution as all the
stages are of equal duration.
But, what if the execution stage is longer, as it ALU
operation.
In this case, the IE stage is divided in two parts
IE1 register reading and IE2 ALU operation.
ADVANTAGES OF RISC PROCESSOR
RISC instructions are simpler machine instruction.
RISC instructions are hardwired to fasten the execution.
There are very fewer instructions in s RISC instruction set.
RISC instruction has simple addressing modes.
RISC instruction executes faster because most of instruction operates on processor
register and there is no need to access memory for each instruction.
It is easy to pipeline RISC instruction as all instruction is of fixed size and opcode
and operand are located in the same position in the word.
RISC instructions execute one instruction per clock cycle.
DISADVANTAGES OF RISC PROCESSOR
RISC instruction size is reduced but more instructions are required to perform an
operation when compared with CISC. So, we can say that the length of the
program is increased.
The machine instructions are hardwired in RISC so, it would cost if any instruction
needs modification.
It finds is difficulty in processing complex instruction and complex addressing
mode.
RISC instructions do not allow direct memory to memory transfer, it requires Load
and Store instructions to do so.
SUMMARY
RISC instructions are simple and engages one word in memory.
RISC instructions are of fixed size, the opcode and the operands in the instruction
are located in the same position within a word in different instructions.
One instruction in RISC architecture executes in one clock cycle.
The instruction size is reduced but, it has increased the program length.
The pipelining of RISC instruction is easier.
The machine instructions in RISC architecture are hardwired.
RISC instruction operates only on register operands.
RISC instruction executes faster as registers are placed in the processor chip which
is faster available memory resource.
RISC instruction performs memory to memory transfer via Load and Store instruction.
INTRODUCTION TO ARM PROCESSORS
INTRODUCTION
A Saved Program Status Register (SPSR) stores the current value of the CPSR when an
exception is taken so that the CPSR can be restored after handling the exception.
Each exception handling mode can access its own SPSR. User mode and System
mode do not have an SPSR because they are not exception handling modes.
CONT..
N, bit [31]
Negative condition flag. Set to bit[31] of the result of the last flag-setting instruction. If the result is
regarded as a two's complement signed integer, then N is set to 1 if the result was negative, and
N is set to 0 if the result was positive or zero.
Z, bit [30]
Zero condition flag. Set to 1 if the result of the last flag-setting instruction was zero, and to 0
otherwise. A result of zero often indicates an equal result from a comparison.
C, bit [29]
Carry condition flag. Set to 1 if the last flag-setting instruction resulted in a carry condition, for
example an unsigned overflow on an addition.
V, bit [28]
Overflow condition flag. Set to 1 if the last flag-setting instruction resulted in an overflow condition,
for example a signed overflow on an addition.
F, Bit [6]
FRQ mask bit.
T, Bit [5]
T=32 bit ARM instruction or Thumb Instructions
Mode Select, Bit [4:0]
for selecting different operating modes
r0 r0
r1 r1
r2 r8 r2
r3 r9 r3
: r10 :
r12 r11 r12
r13 (SP) r12 r13 (SP)
r14 (LR) r13 (SP) r13 (SP) r13 (SP) r13 (SP) r13 (SP) r14 (LR)
r15 (PC) r14 (LR) r14 (LR) r14 (LR) r14 (LR) r14 (LR) r15 (PC)