Risc and Cisc
Risc and Cisc
and
CISC
1
Outline
• RISC history
• Pipelining
• CISC Architecture
2
RISC
Reduced Instruction Set Computers
• Microprocessor architecture
• Designed to perform a set of smaller
computer instructions so that it can operate
at higher speeds
3
Before the RISC era
• Compilers were hard to build especially for machines with
registers
– Make machine do more work than software
– Have instructions load and store directly to memory (memory-
to-memory operations)
• Software costs were rising and hardware costs were
dropping
– Move as much functionality to hardware
• Magnetic core memory was used as main memory which
was slow and expensive
– Minimize assembly code
• Complex Instruction Set Computers (CISC)
– Use complex instructions “MULT”, “ADD”…
4
Technology was advancing
• Compilers were improving
– Simple compilers found it difficult to use more complex
instructions
– Optimizing compilers rarely needed more powerful
instructions
• Caches
– allowed main memory to be accessed at similar speeds to
control memory
• Semiconductor memory was replacing magnetic core
memory
– Reduced performance gap between control and main
memory
5
RISC Approach
• Use only simple instructions that can be
executed within one clock cycle
– Fewer transistors for instructions = more registers
• Pipelining
• Register-to-register operations
– Operand reuse
– Reduction of load/store
7
Pipelining
Sequential
IF ID OF OE O S
IF ID O F OE OS
Clock Cycle IF ID O F OE OS
Pipelined
IF ID OF OE O S IF – Instruction Fetch
ID – Instruction Decode
IF ID O F OE OS
Clock Cycle
OF – Operand Fetch
IF ID OF OE O S OE – Operand Execution
OS – Operation Store
Time
8
Pipelining
Data Dependency
IF – Instruction Fetch
IF ID OF OE OS
ID – Instruction Decode
IF ID OF OE OS OF – Operand Fetch
OE – Operand Execution
OS – Operation Store
IF ID OF OE OS
9
Pipelining
• Data dependencies can be addressed by
reordering the instructions when possible
(compiler)
• Performance degradation from branches can
be reduced by branch prediction or executing
instructions for both branches until the
correct branch is identified
10
Other Advantages
• New microprocessors can be developed and
tested more quickly if being less complicated
is one of it’s aims
• Smaller instruction sets are easier for compiler
programmers to use
11
What is CISC?
13
Architecture
A typical x86 Architecture
14
Characteristics
o CISC are Mostly Von Neumann Architecture (There are few exceptions)
o Same bus for program memory, data memory, I/O, registers, etc
o Generally Micro-coded ,Variable length instructions
o Segmentation is possible with Segment Register s like DS, ES and an offset which
can be common to all segments.
o Many powerful instructions are supported, making the assembly language
programmer’s job much easier.
o Physical Memory Extension Possible
Addressing modes
o Register Addressing Mode
o Memory Addressing Modes
o Displacement Only Addressing Mode
o Register Indirect Addressing Modes
o Indexed Addressing Modes
o Based Indexed Addressing Modes
o Based Indexed Plus Displacement Addressing
15
CISC Vs RISC
Example Program
Main Memory
General Purpose
Registers
ALU
16
Consider following task of Multiplication
15
20
Operands:
Task : Multiplication
Result:
1 2
21
FAQs
Which one is faster?
Well, it is commonly accepted that RISC ISA's should make
computers faster.
The main reason why is because RISC computers figure out more
words in a shorter amount of time due to pipelining.
So why isn't my computer a RISC?
• x86 (and CISC) make poor use of the faster hardware we have
now.
• Another problem with x86 is that people have been trying to
make it faster for a long time, at least 20 years, and after a while
you have found most of the ways to speed the computer up
significantly