Chapter 07 RISC
Chapter 07 RISC
Prepared By:
BIJAY MISHRA
(बिजय मिश्र)
[email protected]
@jijibisha
Chapter 7 - RISC 8 Hrs.
IBM 370/168 – It was introduced in the year 1970. CISC design is a 32 bit processor and
four 64-bit floating point registers.
VAX 11/780 – CISC design is a 32-bit processor and it supports many numbers of
addressing modes and machine instructions which is from Digital Equipment Corporation.
Intel 80486 – It was launched in the year 1989 and it is a CISC processor, which has
instructions varying lengths from 1 to 11 and it will have 235 instructions.
History of CISC
In the late 1950s, faced with the need to rationalize it's computer product
lines, IBM instituted a research program having the objective of creating a
range of software compatible computers that would also capture its existing
software investments. The result, introduced on April 7, 1964 was the
System/360, the first commercially available microprogrammed computer
architecture (later me known as complex instruction set computer, or CISC
architecture). The success of System/360 resulted in CISC architectures
dominating computer, and later microprocessor, design for two decades.
• Thus, CPU performance is dependent upon Instruction Count, CPI (Cycles per instruction)
and Clock cycle time, and all three are affected by the instruction set architecture.
• RISC systems shorten execution time by reducing the clock cycles per instruction.
• CISC systems improve performance by reducing the number of instructions per program.
CHARACTERISTICS OF INITIAL RISC MACHINES
• The total clock cycles for the CISC version might be:
(2 movs 1 cycle) + (1 mul 30 cycles) = 32 cycles
• While the clock cycles for the RISC version is:
(3 movs 1 cycle) + (5 adds 1 cycle) + (5 loops 1 cycle) = 13 cycles
• With RISC clock cycle being shorter, RISC gives us much faster execution
speeds.
Advantage of RISC
1. RISC is that they can execute their instructions very fast
because the instructions are so simple. The instructions
usually finish in 4 or 5 processor cycle.
2. Because instruction operand has to store in the register, thus
the operation time is unified.
3. RISC are used pipelining, cache memory, less or do not use
microcode.
4. More important advantage is that RISC chips require fewer
transistors, which makes them cheaper to design and
produce.
Disadvantage of RISC
• There is still considerable controversy among experts about the
ultimate value of RISC architectures. Its proponents argue that RISC
machines are both cheaper and faster, and are therefore the
machines of the future.
• However, by making the hardware simpler, RISC architectures put a
greater burden on the software. Is this worth the trouble because
conventional microprocessors are becoming increasingly fast and
cheap anyway?
• RISC architectures put a greater burden on the software.
• Is this worth the trouble because conventional microprocessors are
becoming increasingly fast and cheap anyway?
Applications of RISC architectures
• Powerful Workstations
• used for engineering purposes (ex. Sun station)
• High-end graphical stations
• used for simulation, animation, etc.
• Microcontrollers
• used for control applications and peripheral devices
• Digital signal processors
• used for signal processing
• Mobile devices
• iPAD, tablet, support for Android systems
•Java
•C
•Python
•Scheme
•Prolog
•C++
•C#
•Java script
•Lisp
•Ruby
RISC and CISC Approaches
RISC
architecture
Applications Primitive 1
CISC
Processes Primitive 2 architecture
Firmware
microprogram
Hardware
Performance Parameters
Completion time of a program
• Benchmark approach to performance evalutation (e.g., SPEC benchmarks)
• Comparison of distinct machines, differing at the assembler (and firmware) level
• On the contary: the Performance parameters is meaningful only for the comparison of
different firmware implementations of the same assembler machine.
m
Tc m T
Clock Cycle 1 2 3 4 5 6 7 8 9 10
Instr 1
Instr 2
With Pipelining
• The processor is able to perform each stage simultaneously.
• If the processor is decoding an instruction, it may also fetch another
instruction at the same time.
With Pipelining
Clock Cycle 1 2 3 4 5 6 7 8 9
Instr 1
Instr 2
Instr 3
Instr 4
Instr 5
With Pipelining
Normally this data is not available until after the WB stage, but bypass circuitry allows us
to send the proper data directly to EX of the next stage (this is called forwarding)
Pipelining on the 486/Pentium
Fetch D1 … Target
(2 stage since
ED are
effectively
one stage)
(E1 register
read, E2
execute &
register write
Particularly
beneficial if E
phase is long)
DD-B ADD rA rA
immediate
operand
1
register
SUB rD rD rB
operand
432 3 operands
B C ...
in memory
A
... C A D
D
A 1 operand I
D A N
D in memory C
I 2 operands
N B
in memory D ...
C
... D SUB
REGISTERS
• By having a large number of general purpose registers, a processor can minimize
the number of times it needs to access memory to load or store a value
• This results in a significant speed up, since memory accesses are much slower
than register accesses
• Register accesses are fast, since they just use the bus on the CPU itself, and any
transfer can be done in one clock cycle
• To go off-processor to memory requires using the much slower memory (or
system) bus
• It may take many clock cycles to read or write to memory across the memory bus
• The memory bus hardware is usually slower than the processor
• There may even be competition for access to the memory bus by other devices in
the computer (e.g. disk drives)
• So, for this reason alone, a RISC processor may have an advantage over a
comparable CISC processor, since it only needs to access memory
• for its instructions, and
• occasionally to load or store a memory value
EXAMPLE: BERKELEY RISC I
- 32-bit integrated circuit CPU
- 32-bit address, 8-, 16-, 32-bit data
- 32-bit instruction format
- total 31 instructions
- three addressing modes:
register; immediate; PC relative addressing
- 138 registers
10 global registers
8 windows of 32 registers each
EXAMPLE: BERKELEY RISC I
Berkeley RISC I Instruction Formats
Regsiter mode: (S2 specifies a register)
31 24 23 19 18 14 13 12 5 4 0
Opcode Rd Rs 0 Not used S2
8 5 5 1 8 5
PC relative mode
31 24 23 19 18 0
Opcode COND Y
8 5 19
EXAMPLE: BERKELEY RISC I
• Register 0 was hard-wired to a value of 0.
• There are eight memory access instructions
• Five load-from-memory instructions
• Three store-to-memory instructions.