7 ms·
Homebrewed CPU Is a Beautiful Mess of Wires
- quoderat 17y agoAwesome. 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 17y agoIt 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 17y agoWell 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 17y agoTwo 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 17y agoIt'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 17y agoTrue, 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 17y agoMy 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).
- bitwize 17y agoBy 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). That's why the Atari Jaguar is 64-bit. DO THE MATH.
- ajross 17y agoTo some extent, hacks like CPU design have already moved into software, or at least HDL code (depends on your definition of "software", of course). Check out the selection of FPGA-usable projects on opencores.org for examples. That said, I suspect there will always be a desire to make physical machines with our hands. Even decades after such a thing stopped being a practical tool, this still looks fun.
- hellweaver666 17y agoWow... that's quite an achievement, I don't think I would even know where to start with building a CPU from scratch!
- bockris 17y agoWhile 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.
- likpok 17y agoIt's somewhat simple. You just design the finite-state table and either use a ROM (microcode) or some sort of hardwired logic to implement it. I'm glossing over a lot of stuff here, but a simple CPU is just that, simple.
- aswanson 17y agoI 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 17y agowire-wrapping is crochet for engineers.
- ErrantX 17y agohe says it didnt really add to the development time though.. which suggests soldering would have made little difference for him :)
- RiderOfGiraffes 17y agoI don't understand why you say that. I'm a good solderer - my field engineers let me do real work - and yet I find wire-wrapping (for some things) better. I guess your mileage really does vary.
- wglb 17y agoQuite 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 17y agoi'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 17y agoIf 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...
- noodle 17y agokind of makes me want to sit down and take a swing at building one myself
- ovi256 17y agoEven 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.
- DLWormwood 17y agoEven 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. I actually had to work with one of these for a class in college. My project was to create a compiler for a fictional assembly language, and emit object code for a finctional processor. While I got basic stuff like move, load and add working, I never got branching to work right... /-: (The only C I ever got in a computer related class.)
- ricree 17y agoOr if you're more hardware inclined but don't feel up to spending the time and money needed to make a wire wrapped cpu, I'd recommend learning vhdl or verilog and designing a cpu in that. It's at the logical level rather than physical, but it will still let you get a feel for the factors that go into designing a processor, and it is easier to add in more advanced aspects to the design.
- gchpaco 17y agoOnce upon a time, I hacked a simulator and an assembler for the Pendulum chip. It was an interesting and fun project in a lot of ways, but fair warning: the example program that computes Fibonacci numbers, I think, is wrong, and correcting that loop was not difficult per se but it was sure mind bending.
- eduardoflores 17y agoWe 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?
- ars 17y agoIs this using transistors? Vacuum tubes? Or discrete IC's?
- Todd 17y agoHis blog says he's using 7400 series TTL ICs. Just one step up from transistors.
- HeyLaughingBoy 17y agoI'm waiting for the first one built with relays :-)
- Porthos 17y agohttp://web.cecs.pdx.edu/~harry/Relay/index.html http://web.cecs.pdx.edu/~harry/Relay/index.html
- physcab 17y agoMy 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 17y ago> 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 17y agoPast performance is not a good indicator of the future, especially when you're bumping into basic limit of atoms.
- physcab 17y agoExactly. I remember when 50nm was a big deal. Now its 28nm? That's absurd. How they make those interconnects is beyond me.
- chaosmachine 17y agos/limit/singularity/
- ajross 17y agoWell, it's not that bad. Intel, it's true, is way ahead on process technology right now (disclosure: my wife is a process engineer there, and I'm unashamedly biased). But let's be honest: AMD, IBM, TSMC et. al. are behind Intel, but they're maybe 1-2 years behind. An Intel catastrophe might be a disaster of lost science, but I think society as a whole could survive if it had to subsist on Phenoms and ARM11s.
- proee 17y agoIdea: "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...."
- maclifer 17y agoThis 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.
- rjurney 17y agoWow, the Tyranny of Numbers in action in modern times: http://en.wikipedia.org/wiki/Tyranny_of_numbers http://en.wikipedia.org/wiki/Tyranny_of_numbers
- alain94040 17y agoYou 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 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 17y agoI 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.
- maximilian 17y agoSparkfun has a number of relatively inexpensive FPGA boards to use. I might get one if I finish some of my other things this summer. http://www.sparkfun.com/commerce/advanced_search_result.php?keywords=fpga&x=0&y=0&search_section=products http://www.sparkfun.com/commerce/advanced_search_result.php?...
- anigbrowl 17y agoI think that's a bit like saying that there's no point in painting pictures when you could just use a camera...this is obviously a labor of love. Incidentally, if you ever get to the Computer History Museum in San Jose, they have an original computer from the Apollo missions there...which is also a bunch of wrapped wires. Gave me quite a shiver to imagine 3 people trusting their life to that.
- kqr2 17y agoPeople in the Bay Area should visit the Computer History Museum in Mountain View. http://www.computerhistory.org/ 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.
- jmtulloss 17y agoWhy not a breadboard? Wire wrapping seems pretty tedious.
- RiderOfGiraffes 17y agoI 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 17y agoYou 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 17y agoUIUC 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.
- RiderOfGiraffes 17y agoJust curious - have you done both? I have, and my preference falls to wire-wraping. I'd be interested to hear an alternative opinion from someone who's done both.