
Homebrewed CPU Is a Beautiful Mess of Wires - naish
http://www.wired.com/gadgetlab/2009/05/homebrewed-cpu/
======
proee
Idea: "Nerd Knitting"

Get a bunch of the crew together and sit around the table wire wrapping while
exchanging stores from the cube.

Bob: "Steve, can you pass me a blue 16AWG strand..."

Steve: "Sure thing, your 4-bit CPU is turning out quite nice.."

Bob: "Thanks Steve, that's a pretty nice thing to say coming from someone who
just finished a 8-bit dual core"

[Rest of the Crew]: "Ahhhh...."

------
alain94040
You know we have these things called FPGAs. That's where you can have fun with
hardware hacking nowdays.

You can design whatever piece of hardware you want and still have it execute
at a decent speed (say 50 MHz, vs. 2 GHz for a Pentium). But I can put
millions of gates of logic.

An 8-bit CPU is maybe 5,000 gates at most. A decent 32-bit RISC processor is
below 100,000 gates.

My previous employer builds machines filled with such FPGAs (<http://eve-
usa.com>). On those, you can map really crazy stuff like real, modern
processors. It's the ultimate sandbox for the hardware designer.

The only problem is that they tend to be a little bit pricey for amateurs (but
I hear you can get boxes real cheap through university programs - lucky
students).

~~~
mncaudill
I don't think he was focusing on performance. Bill Buzbee, of homebrewcpu.com,
built his the same way, with wire-wrapped TTLs. He did it because he wanted
"touch the magic" of those early machines.

I imagine there is something very satisfying of individually wire-wrapping
thousands of connections and dealing with the minutiae of a complicated
electronic device that prototyping a FPGA just can't give you, especially for
a pet hobby.

------
physcab
My friend just submitted his proposal for PhD research on a new dielectric,
Hafnium-oxide.

He and I were talking yesterday about the massive knowledge-base at Intel
where they have a very tight grip on semiconductor technology. He was musing
that if Intel suddenly went up in flames, our culture would take a step back
about 40-50 years.

His point being that these new transistors (32nm and subsequently 28nm gate
width) are so incredibly complex that few people understand exactly how they
work and all the issues underlying.

Not sure where the industry is headed, but the limit is fast approaching.

~~~
jonknee
> Not sure where the industry is headed, but the limit is fast approaching.

Those types of statements have a short half life in the semiconductor
industry.

~~~
biohacker42
Past performance is not a good indicator of the future, especially when you're
bumping into basic limit of atoms.

~~~
physcab
Exactly. I remember when 50nm was a big deal. Now its 28nm? That's absurd. How
they make those interconnects is beyond me.

------
aswanson
I did this in undergrad, though not a 6502 and using solders and sockets. Wire
wrapping makes this far, far more difficult.

“Why did I do all this?” he says. “I don’t know. But it has been a lot of
fun.”

Same thing everyone asked me, and I gave the same answer. Glad to see I'm not
the only one.

~~~
brk
wire-wrapping is crochet for engineers.

------
quoderat
Awesome. As the complexity of the underlying technology increases, I've often
wondered if this style of hacking won't move solely into software, and then
into virtual worlds -- think a World of Warcraft-like environment, or a
metaverse, Neal Stephenson style.

Not a very well-formed thought, but something I think about from time to time.

~~~
teej
It seems that the complexity of the technology is already out of immediate
reach for hardware hackers of this sort. This is an _8-bit_ cpu!

~~~
jonsen
Well just build two and you got a 16-bit'er and so on. Bit size it really not
much more than linear scaling. Other things like pipe-lining are behind the
complexity of modern cpus.

~~~
rcoder
Two 8-bit cores != a 16-bit CPU.

By your math, every dual-core 64-bit Intel CPU would actually be a 128-bit
processor, a quad-core would equate to a 256-bit system, and the Cell would be
a very studly 1088-bit chip (64-bit PPE + 8x128-bit SPEs).

You appear to be confusing "linear" scaling with "exponential", which makes a
serious difference.

~~~
jonsen
It's in principle pretty simple to interconnect two n-bit CPUs and obtain one
2n-bit CPU. The only element that scales above linear is the multiplier, and
it's not even quadratic.

~~~
likpok
True, depending on what you mean by "bit". I'm not sure it is entirely trivial
to interconnect the instruction-parsing parts, and memory operations might
also be interesting. The ALU would be pretty simple, but you'd lose a lot of
speed there (assuming something else didn't kill you first), as even if you
have two CLA's (seems unlikely, given the additional complexity), you'd double
the time it would take to stabilize the outputs.

~~~
jonsen
My point is, that just characterizing a CPU by saying it's an n-bit
architecture, doesn't say very much about the complexity of the real thing.

You should not fall prey to the (in other contexts appropriate) assumption
that an increase of one bit inherently doubles complexity (confusing linear
with exponential).

------
kqr2
People in the Bay Area should visit the Computer History Museum in Mountain
View.

<http://www.computerhistory.org/>

They have an example of a computer used on board the Apollo missions that was
entirely wirewrapped. The docent said that when they were done debugging they
would then pot the whole thing.

------
wglb
Quite cool.

Actually surface mount is not all that bad. I have some friends who use it on
boards at home for fun.

And I would be surprised if there weren't vendors or other activity using
surface mount at the Faire.

~~~
bisceglie
i'm working with surface mount components for a project. def. not as bad as
the article makes it out to be. just takes a steady hand, a decent soldering
station (i've got a weller WES51, around $80), small tips, lots of flux, and a
magnifying glass. getting the first component down took a while, but
improvement (fast and clean connections) came quickly. now it's kind of fun.

~~~
rbanffy
If I had a hand that steady I would be a brain surgeon...

Better:

If I had a hand that steady I would still be a brain surgeon...

------
maclifer
This is so cool to see! I'm looking forward to spending time in his blog to
follow from start to finish.

I don't have the skill or knowledge to attempt a project like this, so I guess
that means I have project envy at this point and will have to be voyeur. :)

This brings back lots of late 70's and early 80's memories.

------
noodle
kind of makes me want to sit down and take a swing at building one myself

~~~
ovi256
Even better idea : write a CPU simulator! Just a while loop that reads
assembler from a file and interprets it on a virtual CPU. I did this in Java a
while ago, I reproduced a few Intel x86 ASM instructions. MOV, CMP and JMP are
all you need for Turing completeness, if I recall correctly.

You could make up your own assembly language.

Next easy step : add a memory-mapped bitmap display to your virtual machine.
Bochs watch out!

After that, write a compiler for your favourite language towards your
assembler and watch it run on your CPU. Then a debugger. Then you would be
more awesome than Zed Shaw.

~~~
alain94040
What I'd love to see is someone invent an assembly language that is
reversible. Meaning that if you execute the code backward, you undo whatever
the code was doing.

This way, the undo function of office becomes trivial to implement! (minus
some IO issues)

~~~
abecedarius
I've written a simulator for one (not of my own design):
<http://www.accesscom.com/~darius/hacks/pisa.tar.gz>

------
eduardoflores
We also build one at engineering school (national university of Mexico),
although 12 years ago it was a 4-bit CPU (from gates, a couple of ALU, some
sequencer,...), I think now they build 8-bit CPUs. Did you guys build similar
things?

------
rjurney
Wow, the Tyranny of Numbers in action in modern times:
<http://en.wikipedia.org/wiki/Tyranny_of_numbers>

------
ars
Is this using transistors? Vacuum tubes? Or discrete IC's?

~~~
HeyLaughingBoy
I'm waiting for the first one built with relays :-)

~~~
Porthos
<http://web.cecs.pdx.edu/~harry/Relay/index.html>

------
jmtulloss
Why not a breadboard? Wire wrapping seems pretty tedious.

~~~
RiderOfGiraffes
I wire-wrapped my first computer. It's not that tedious, it beats the hell out
of soldering when you're doing your first design, and if you make a mistake
it's easy to fix.

When I then made modifications I used red wire instead of blue. If it didn't
work I knew which wires to replace. If it did I could either leave it and use
yellow as the next red, or I could replace the wires. At a glance I could see
the state of the build.

A good wire-wrapping tool, good flow with the circuit, I could put three wires
every minute for an hour.

I may still have it somewhere ...

~~~
jmtulloss
You could do the same things with a breadboard, without the tedious wrapping.

At UIUC, one of the assignments for a required course in the Computer
Engineering department is to build a (simple) 4-bit processor. We only got a
week to do it, so you can be damn sure we used a breadboard and had a system
in place to debug the thousands of wires.

~~~
aswanson
UIUC is the truth. If they require you to do a project like that in order to
graduate, they have a good grasp on what a CE needs to understand. Wish I
would have went there.

------
hellweaver666
Wow... that's quite an achievement, I don't think I would even know where to
start with building a CPU from scratch!

~~~
bockris
While I don't have the skill/time to take on a project like this I really
loved the book 'Code' by Charles Petzold. It walks you through the design of a
CPU starting from nothing.

There is also 'From NAND to Tetris in 12 steps', I haven't looked closely at
that but from what I've heard it gives a similar level of detail.

