Frequency limitation for homebrew CPUs

It mostly has to do with the lengths of interconnections and propagation delays through the gates. If we reduce a CPU to its essence, it is a feedback machine. A bunch of combinatorial logic circuits compute some boolean functions over the current state of the machine, and those functions determine the new state, which is latched in by sequential circuitry when a new clock edge arrives. The combinatorial circuits all have delays. The clock period cannot be shorter than the time it takes for the slowest path through these gates to produce a stable result because a single incorrect bit stops the show.

Furthermore, the sequential logic has timing requirements. Before the clock edge arrives, there is some minimum setup time that the inputs have to be stable and then afterward they have to be stable for some hold time. If these are violated, the state becomes garbage.

The propagation delays are caused by things like how fast parasitic capacitances can charge, how fast current can build in the face of an inductance and how fast silicon devices can switch. For example, a bipolar transistor with a smaller base can switch faster than one with a larger base, so a tiny transistor on a chip will be faster than a discrete one.

In an earlier answer that I deleted, I wrote about transmission line effects. But I didn't consider that these effects don't even come into the picture at the speeds we are talking about because, say, at 10 Mhz, the wavelength is still about 30 meters. So on the scale of an ordinary sized circuit board, pulses on the time scale of a few megahertz still reach all parts of a copper network simultaneously.

So, if you make a CPU out of discrete components, you're simply not achieving the small components with fast switching times, and the same proximity which minimizes stray capacitances and inductances.

Nevertheless, ancient discrete-component machines in the 1960's did run quite a bit faster than these homebrew machines. It took some time and cunning to get there. For instance the IBM 360 Model 44 (1964) ran at 4 Mhz. That may still be "homebrew speed", but the CDC 7600 released just a few years later in 1969 surpassed 36 Mhz. The Wikipedia article http://en.wikipedia.org/wiki/CDC_7600 gives a hint at some of the tricks that were pulled, for instance:

"As always, Cray's design also focussed on packaging to reduce size, shorten signal paths, and thereby increase operating frequency. ... [E]ach circuit module actually consisted of up to six PC boards, each one stuffed with subminiature resistors, diodes, and transistors. The six boards were stacked up and then interconnected along their edges, making for a very compact, but basically unrepairable module."

So the homebrew CPU's are not necessarily built to their true potential due to some confounding effects having to do with the build quality and layout. Still, anyone who builds a CPU out of individual integrated circuits and discrete components which runs at several megahertz should be applauded.


As a former high schooler who built a special-purpose computer with 7400 series TTL, which won some kinda award at the science fair, I observed these things that kept it from running as fast as possible:

  • Stray capacitance in the breadboard. A few pF between every adjacent pair of connectors. That limited pulse edge rise/fall times and in places added crosstalk. This was probably the biggest factor.

  • Variations of grab-bag chips. (Anyone remember Poly-Paks?) 74LSxx, 74Hxx, 74xx with different propagation delays and other characteristics, made it impossible to have signals stay in sync at higher clock speeds than a few MHz.

  • Cheapo static memory chips, again from a grab-bag or other no-quality source. They just couldn't read or write reliably beyond a certain rate.

  • My test instrumentation was limited to homebrew signal generators, a 5MHz bandwidth oscilloscope, and temporary jury-rigged digital circuitry. Hard to check signal integrity, timing, amplitudes of digital signals that have been low-pass filtered into wobbly mush.

Today, it would be hard to find a 5MHz scope unless one is an antique buyer. Better chips of all kinds are just as easy to get, even in 0.1" spaced DIP packages, except I haven't seen much in the way of grab-bags in a long time. Socket breadboards, however, haven't changed much. Stray capacitance is still a speed killer for any edgy creative digital projects.

Avoiding breadboards by using a homebrew PCB is the best way to avoid stray capacitance, but of course requires more effort and time.


I'd think the primary reason is that as you increase frequency, the impedance of your breadboard's connections will increase and limit the final speed of your circuit.

Every connection in your breadboard has a low, but non-zero inductance. As your frequency gets higher and higher, you need to take these effects into account. The impedance of the wires can be found by:

This formula

where L is the inductance of the wire. Eventually, Z will become high enough that not current will flow and your circuit will stop working. Finding the exact numerical value for this number will be very complicated, especially because breadboards have traces next to each other and that will change each wire's impedance a bit from this formula. If you really want an (imprecise) number, you can try here to calculate the inductance (and therefore impedance) of your wires. If you know the lowest current that a part can operate from, you can determine the maximum frequency before you hit that limit.

Tags:

Cpu

Frequency