Docsity

Instruction Set Architecture: RISC vs. CISC - Traditional Issues and New Challenges, Study notes of Computer Architecture and Organization

Partial preview of the text

Download Instruction Set Architecture: RISC vs. CISC - Traditional Issues and New Challenges and more Study notes Computer Architecture and Organization in PDF only on Docsity!

Lecture 3-4:

Instruction Set Architecture

Outline

  • Instruction Set Architecture
    • Traditional issues – The (old) debate: RISC vs. CISC – New issues

Instruction Set Architecture

Application

…SPARC
MIPS
ARM
x
HP-PA
IA-64…
Intel Pentium X
AMD K6, Athlon,
Transmeta Crusoe TM5x
Instruction Set Architecture

Implementation

Instruction Set Architecture

  • Strong influence on cost/performance • New ISAs are rare, but versions are not
    • 8-bit, 16-bit, 32-bit and 64-bit X86 versions
      • Longevity is a strong function of marketing prowess

Instruction Formats

Alpha (fixed length)

x86 (variable length)

opcode

TRAP
prefixes
opcode
adr mode
displ
imm

opcode RA

Branch
0 to 8 bytes

opcode RA RB

Mem

opcode RA RB RC

Operate
0 to 2 bytes (ModR/M and SIB)

6 bits

1 or 2 bytes of opcode

32 bits

0 to 4 bytes of prefix

Variable Instruction Format

Motivation 1: to accommodate a large number ofopcodes with nonuniform frequency of occurrence - VAX has 304 opcodes. If we insisted using uniform

opcode encoding, we would need 9 bits. Due to thepolicy of byte alignment, one needs two bytes toencode each VAX opcode.

  • An observation: some opcodes are used more often than

the others. The top 200

opcodes

acount for about 98%

of the dynamic opcode usage.

  • Instead of using 2 bytes to encode all the 304 opcodes,

use 1 byte to encode the frequently used ones and use 2bytes to encode the infrequently used ones.

VIF Cost

Sequential Decoding Problem - The decoder cannot be sure where the 1st operand

specifier is until the opcode is decoded.

  • The decoder can not be sure where the ith operand

specifier is until the (I-1)th operand specifier isdecoded.

  • The decoder can not be sure where the jth instruction

starts until the last operand specifier of the (j-1)thinstruction is decode.

  • Typical solution: instruction buffering with multi-stage

decode pipeline plus post-decode I-cache or trace cache

VIF Cost (cont.)

Non-aligned Instruction Access: instructions arenot aligned to any byte position in each memoryword. - Instruction opcodes and operand specifiers are not

aligned to the decoding logic when fetched frommemory.

  • Instructions may spill over cache block boundaries and

page boundaries

  • Typical solution: instruction buffer that decouples fetch

and decode

The (old) Debate : RISC vs. CISC

  • At the time, IBM 370 and VAX dominated • CMOS was up and coming technology • RISC was appealing
    • lower design complexity – easier to pipeline – higher performance when fit on a chip
IBM 801 (Cocke et al, 1982) RISC I (Patterson et al, 1982) MIPS (Hennesey et al, 1982)

What is RISC?

Fixed length instructions - Few formats - Load/Store - Few addressing modes - Simple decode/control - Many registers - Few “unpipelinable” insts

Compiler Complexity Hardware Complexity

Pipelining a CISC

Emits RISC-likemicro-operations

Instruction Bytes

Fetch Decode RF Read Execute Mem WB μOp store

The Dynamic-Static Interface

Perhaps the biggest contribution of the “RISC Revolution” “…a willingness to make design tradeoffs freely… between the architecture and implementation…” Colwell et al, 1985. This legacy is still alive and kicking today.

DSI
DSI

RISC Baggage

In hindsight, like CISC, even RISC architectures suffered from legacy effects.

  • Delay slots
    • Used for dealing with branches in short pipelines • Helps primarily with target generation • Becomes a burden for the future generations whose pipelines

need to be deeper

  • Register windows
    • Quick save/restore state for procedure calls • Reduce procedure call overhead to 1 cycle • Makes register renaming and out of order execution more

complex

DSI and Optimization

Very localized opportunity, mostly instruction selection

X86 ISA

Granularity of ISA instruction More global redundancy removal and reuse

Alpha ISA

Potentially customized logic for a program region

ISAs for
reconfigurable
architectures

Potential for Static Optimization