Group 9 Risc
Group 9 Risc
Group 9 Risc
Reduced Instruction
Set Computers
Introduction
What is RISC?
Reduced Instruction Set Computer. is a type
of microprocessor architecture that utilizes a
small, highly-optimized set of instructions,
rather than a more specialized set of
instructions often found in other types of
architectures.
Examples of processors with
the RISC architecture include MIPS,
PowerPC, Atmel's AVR, the Microchip PIC
processors, Arm processors, RISC-V, and all
modern microprocessors have at least some
elements of RISC.
Instruction Execution Characteristics
Overview
Operations performed - the functions to be performed by the CPU and its interaction
with memory.
Operands used - types of operands and their frequency of use. Determine memory
organization and addressing modes.
O Weighted studies show that call/return actually accounts for the most work
•Execution Sequencing
O Subroutine calls are the time-consuming operation in HLL's
O Minimize their impact by
O Streamlining the parameter passing
- Efficient access to local variables ßSupport nested subroutine invocation
O Statistics
- 98% of dynamically called procedures passed fewer than 6 parameters
- 92% use less than 6 local scalar variables
- Rare to have long sequences of subroutine calls followed by returns (e.g., a recursive sorting algorithm)
- Depth of nesting was typically rather low
- •Implications
O Reducing the semantic gap through complex architectures may not
be the most efficient use of system hardware
O Optimize machine design based on the most time-consuming tasks of
typical HLL programs
O Use large numbers of registers
- Reduce memory reference by keeping variables close to CPU (more register
refs instead)
- Streamlines instruction set by making memory interactions primarily loads and
stores
O Pipeline design
- Minimize impact of conditional branches
O Simplify instruction set rather than make it more complex
What is a Large register files?
In this case, the number of registers is small compared to the large register file implementation
The compiler is responsible for managing the use of the registers
Compiler must map the current and projected use of variables onto the available registers
Similar to a graph coloring problem
Form a graph with variables as nodes and edges that link variables that are active at the same time
Color the graph with as many colors as you have registers
Variables not colored must be stored in memory
Graph Coloring Approach
Reduced Instruction Set Architecture
Why CISC?
CISC trends to richer instruction sets
More instructions
More complex instructions
Reasons:
To simplify compilers
To improve performance
Are compilers simplified?
Assertion: If there are machine instructions that resemble HLL statements, compiler
construction is simpler
Counter-arguments:
Is performance improved?
Assertion: Programs will be smaller and they will execute faster
Smaller programs save memory
Smaller programs have fewer instructions, requiring less instruction
fetching
Smaller programs occupy fewer pages in a paged environment, so
have fewer page faults
More instructions fit in cache(s)
Counter:
Inexpensive memory makes memory savings less compelling
Characteristics of Reduced Instruction Set Architectures
(1) RISC designs may benefit from the inclusion of some CISC features and that
(2) CISC designs may benefit from the inclusion of some RISC features.
RISC Pipelining
o Register-to-register, so an instruction cycle has 2 phases
I: Instruction Fetch
E: Execute (an ALU operation w/ register input and output)
o For load and store operations, 3 phases are needed
I: Instruction fetch
E: Execute (actually memory address calculation)
D: Memory (register-to-memory or memory-to-register)
Since the E phase usually involves an ALU operation, it may be longer than the other
phases.
o E1: Register file read o E2: ALU operation and register write
Optimization of Pipelining
Delayed Branch
makes use of a branch that does not take effect until after the execution of the following
instruction
• branch "takes effect" during its execution phase
• the instruction location immediately following the branch is called the delay slot
• Rather than wasting an instruction with a NOOP, it may be possible to move the
instruction preceding the branch to the delay slot, while still retaining the original program
semantics
Conditional branches
NOOP delay is still required.
Berkeley RISC and IBM 801 systems
Delayed Load
On load instructions, the register to be loaded is locked by the processor
The processor continues execution of the instruction stream until reaching an instruction needing
a locked register
If load takes a specific maximum number of clock cycles, it may be possible to rearrange
instructions to avoid the idle.
Super pipelining
The one that makes use of more, and
finer-grained, pipeline stages.
The MIPS R3000 is an example of super
pipelining
• All instructions follow the same
sequence of 5 pipeline.
External instruction and data cache
operations, and the ALU operations, into
2 phases
• A super pipelined system existing hardware is used several times per cycle by inserting pipeline registers
to split up each pipe stage
• The multiple depends on the degree of super pipelining
• RISC systems have become more complex (As chip densities and speeds increase)
• To improve performance, CISC systems have increased their number of generalpurpose
registers and increased emphasis on instruction pipeline design.