Every so often, you come across an idea that is truly brilliant. Such ideas can sometimes make complex, expensive problems seem trivial. The idea of microcode is one such idea.

In order to work its magic, the* Central Processing Unit(CPU) in a computer needs to move data around between various sub-units inside itself. Every clock cycle, a control logic circuit dictates what electronic gates must open and close to move, for example, a byte of information from the B accumulator into the adder, and then a byte from the A accumulator into the L register. The control bus and the logic behind it are the choreographers, dispatchers, and traffic cops of the CPU.

In the early days, designing a CPU involved not only deciding on the number and width of registers and choosing and implementing an instruction set, but designing and simplifying the Boolean logic required to distinguish between various opcodes, which may or may not have been numbered with regard to ease of coding.

Microcode, conceived in 1951 by Maurice Wilkes, makes all of this much easier. Instruction cycles are broken up into T-states. For each T-state of each instruction, the CPU architect decides which gates should be active and which should be off (tristated). These are collected into a matrix, which is simply implemented as a ROM array on the chip. Each bit of the ROM corresponds to the desired behavior of a particular gate (the bit number), at a particular time (T state) in a certain instruction (the opcode). There’s no need to employ complex Quine-McCluskey simplification methods — it’s just a question of connecting the ROM to the gates.


* okay, “the CPU”, or “one of the CPUs.” Sheesh.

This entry was posted in Design, Digital. Bookmark the permalink.

Leave a Reply