Post

Anyone use Intel's 386 processor from 1985, the first 32-bit x86? To improve performance, it preloaded instructions into a 16-byte prefetch queue (highlighted in red). Why does such a small queue take up so much of the chip? Let's look under the microscope at its complicated circuitry... 1/N

The 386 processor is a 32-bit processor, so it works in 4-byte chunks. This network shifts bytes around so the chunk is aligned correctly. Bits go down the vertical wires, across horizontal wires, and then out the bottom. Energizing different wires provides the desired shift and lines up the bytes.

0 reposts13 likes

How hard can it be to add 1 to a number? The problem is that incrementing a 30-bit number can require carry the 1, carry the 1, repeated 30 times: slow. In the 386's prefetcher, "Manchester carry chain" and "carry skip" circuits make this fast, implemented with complicated "dynamic logic".

Another part of the prefetcher converts an 8-bit value to a 16- or 32-bit value. This is tricky if the value is negative, since the upper bits must be filled with 1's. Here's a closeup of the sign extension circuitry that fills upper bits with the correct value.

This close-up of the 386 processor's die shows the different parts of the prefetch unit. There's a lot going on just to hold 16 bytes of instructions.