Microprogramming
Tom Kelliher, CS 240
Apr. 5, 2002
Exam II in one week.
Read 5.6, 6.1.
Multicycle implementation control.
- Introduction.
- Implementation.
- History.
Exceptions (briefly), pipelining.
First the what, then the why.
- Data path (defn):
- Register file.
- ALU.
- MDR, other ``data'' registers.
- Memory.
- Control unit (defn):
- IR, PC.
- Instruction decoder/encoder and/or state machine.
- Data path needs sequences of 0's and 1's on control inputs to execute
instructions.
- Control unit provides the sequence.
- Can the control unit be replaced with a memory (control store) whose
output is connected to the data path's control inputs?
- Contents of the control store --- a program for each instruction.
Microprogram. Microinstructions.
- How do we sequence the control store? Required operations:
- Straight line execution.
- Unconditional branches.
- Conditional branches.
A microsequencer:
- Limiting the size of the control store:
- Commonalities between microroutines.
- Utilize branching to ``factor out'' common code.
- Micro-subroutines!!!
Advantages off the bat:
- Easier debugging.
- Quicker to market.
- Emulation.
- Extending the instruction set.
- Easier upgrades.
Disadvantages off the bat:
- Slower than hard-wired.
1970s technology:
- Main memory was core; control stores were solid state (10 times
faster).
- No caches.
- 8Kb ROM = 8 bit register, space-wise.
Implications:
- Program speed was proportional to program size (bandwidth).
- Control stores were ``cheap.''
Solution: Microprogramming and richer instruction sets
- Simplify compiler construction.
- Close the ``semantic gap.''
- Improve architectural quality by decreasing program size and
bandwidth.
- Microinstructions were ``faster'' than regular instructions.
- Register-based architectures were unwieldy; use stack-based or
memory-memory.
1980s technology:
- Main memory was now solid state.
- Caches were common.
- CMOS VLSI.
- Control store ROMs were becoming RAMs (bugs).
- Compilers were sub-setting architectures.
Some weird developments:
- Writable control stores.
- Virtual memory at the control store level.
- Nanocode.
Two CPUs:
RISC design philosophy:
- Functions should be kept simple unless there is very good reason to
do otherwise.
- Microinstructions should not be faster than simple instructions.
- Microcode is not magic.
- Simple decoding and pipelined execution are more important than
program size.
RISC CPU traits:
- Load/store; operations are register-register.
- The operations and addressing modes are reduced.
- Instruction formats are simple and do not cross word boundaries.
- RISC branches avoid pipeline penalties.
Thomas P. Kelliher
Wed Apr 3 09:22:01 EST 2002
Tom Kelliher