Sub topic 5
RISC versus CISC design choices
Prerequisites
Assume you know binary numbers, registers, memory, and the basic instruction cycle. An instruction set architecture (ISA) is the programmer-visible specification of a processor. It defines instructions, registers, data types, addressing modes, and memory behavior. RISC and CISC are two different approaches to designing an ISA and its implementation.
RISC: simple instructions
RISC means Reduced Instruction Set Computer. A RISC ISA usually has:
- A small set of simple instructions.
- Fixed-length instruction encoding.
- A load/store design: only load and store instructions access memory.
- Many general-purpose registers.
- A small number of addressing modes.
- Instructions that often complete in one or a few predictable cycles.
For example, an addition usually operates on registers. A separate load instruction brings data from memory into a register:
LOAD R1, [R2]
ADD R3, R1, R4The simple format makes instruction decoding fast. It also makes pipelining easier because instruction stages have more regular timing. The compiler performs more work by selecting and ordering these simple instructions.
CISC: powerful instructions
CISC means Complex Instruction Set Computer. A CISC ISA may provide:
- Many instructions, including specialized operations.
- Variable-length instructions.
- Several addressing modes.
- Instructions that can access memory while performing an operation.
- Instructions whose execution time varies.
- More complex decoding and control logic.
A single CISC instruction might load two operands from memory, add them, and store the result. This can reduce the number of instructions in a program, but the instruction may require several internal steps.
| Feature | RISC | CISC |
|---|---|---|
| Instruction length | Usually fixed | Often variable |
| Memory operations | Usually load/store only | Many instructions may access memory |
| Decoding | Simpler | More complex |
| Registers | Usually many | Historically fewer |
| Compiler role | More instruction scheduling | More work encoded in instructions |
| Pipelining | More predictable | More difficult, but possible |
Design trade-offs
RISC favors simpler hardware, regular timing, and efficient pipelines. Its disadvantages include larger programs and greater dependence on compiler quality.
CISC favors compact code and powerful instructions. Its disadvantages include more complicated decoders, irregular execution times, and greater hardware cost. Complex instructions can also create pipeline stalls when their internal work varies.
Modern processors combine ideas from both designs. An externally visible CISC ISA may be translated into simpler internal micro-operations. This preserves compatibility with existing software while allowing hardware to use RISC-like pipelines and execution units.
GATE focus
When comparing RISC and CISC, distinguish the ISA from the implementation. Fixed-length instructions and load/store operation are common RISC properties, but they are not absolute requirements. Similarly, a CISC processor can use pipelining and multiple execution units.
Exercise
Why does a load/store RISC design simplify pipeline control?
Show answer
Only load and store instructions use memory. Arithmetic instructions operate on registers, so their execution stages have more regular timing and are easier to pipeline.