Transcript Mips_3
Outline
Architecture of a RISC Processor
Implementation
Pirouz Bazargan Sabet
December 2003
Implementation
RISC vs. CISC concept
Concept of pipeline
An implementation of Mips
Pipeline’s problems
Pirouz Bazargan Sabet
December 2003
RISC vs. CISC concept
A given architecture can be implemented
in many different ways
performance
complexity
implementation
Pirouz Bazargan Sabet
December 2003
RISC vs. CISC concept
The RISC concept has been developped in
early 80’s
CISC
RISC
Complex
Instruction
Set
Computer
Reduce
Instruction
Set
Computer
Pirouz Bazargan Sabet
December 2003
RISC vs. CISC concept
The basic idea of CISCs
Use the constante improvement of the
technology to offer a more powerful
architecture
It is easier to program with a
powerful assembly language
Pirouz Bazargan Sabet
December 2003
RISC vs. CISC concept
high level
languages
instruction set
Reduce the “semantic gap”
between high level languages
and the assembly language
instruction set
hardware
Pirouz Bazargan Sabet
December 2003
RISC vs. CISC concept
Examples:
Strcmp (IBM 370) : string compare
Add with 3 operands in memory (VAX)
Pirouz Bazargan Sabet
December 2003
RISC vs. CISC concept
The basic idea of RISCs
Simplify the hardware
It is easier to design a simple
hardware
Pirouz Bazargan Sabet
December 2003
RISC vs. CISC concept
3 factors have worked towards the
apparition of the RISC concept
Economical factor
User factor
Technology factor
Pirouz Bazargan Sabet
December 2003
RISC vs. CISC concept
Economical factor
A=B+C;
VAX complex
instruction
Add @a, @b, @c
Pirouz Bazargan Sabet
Equivalent
Mips code
Lw
Lw
Add
Sw
R1, @b
R2, @c
R3, R1, R2
R3, @a
December 2003
RISC vs. CISC concept
Economical factor
A given program compiled for a RISC
processor is 2 to 3 times bigger than the
same code generated for a CISC
Strong argument in favor of CISC
…… in 60’s - 70’s
Pirouz Bazargan Sabet
December 2003
RISC vs. CISC concept
User factor
It is easier to program with a powerful
assembly language
Strong argument in favor of CISC
Pirouz Bazargan Sabet
December 2003
RISC vs. CISC concept
User factor
design a new processeur a check the MIX
prog
add
8%
compiler
bne
6%
assembly code
Pirouz Bazargan Sabet
complex 0.0%
December 2003
RISC vs. CISC concept
User factor
complex instructions are NOT used
in contradiction with
the CISC concept
Pirouz Bazargan Sabet
December 2003
RISC vs. CISC concept
User factor
In 80’s assembly language programmers
have been replaced by compilers
A compiler can only use simple instructions
Pirouz Bazargan Sabet
December 2003
RISC vs. CISC concept
User factor
It is easier to program with a powerful
assembly language ……. for a human
Strong argument in favor of CISC
…… in 60’s - 70’s
Pirouz Bazargan Sabet
December 2003
RISC vs. CISC concept
Technology factor
# of trans.
Moore’s law
Time-to-market
Pirouz Bazargan Sabet
frequency
Risk of fail
December 2003
RISC vs. CISC concept
Technology factor
Complex architecture (CISC)
Complex design
Longer time-to-market
(3-4 years)
Pirouz Bazargan Sabet
December 2003
RISC vs. CISC concept
Technology factor
Simple architecture (RISC)
Simple implementation
Short time project
Better prevision
Lower risk
Pirouz Bazargan Sabet
December 2003
RISC vs. CISC concept
RISC concept
simplify the
hardware
gain in speed
gain in time-to-market
The gap between high level languages and the
assembly language can be filled by the compiler
Pirouz Bazargan Sabet
December 2003
RISC vs. CISC concept
RISC concept
Reduce
Instruction
Set
Computer
Pirouz Bazargan Sabet
Reject
Important
Stuffs into the
Compiler
December 2003