Hacker News new | past | comments | ask | show | jobs | submit login
Homemade CPU – from scratch (14.by)
118 points by BarsMonster on Feb 16, 2010 | hide | past | favorite | 31 comments



Magic-1

"Made of ~200 low-scale chips, clock rate is up to 4Mhz. Have working Minux port, homebrewcpu.com site is served by this computer."

Man that is the very definition of coolness. Awesome. I wish I could build my own CPU, port *nix to it and serve a site about building it from it.


From homebrewcpu.com: "Except when I'm working on it, Magic-1 is connected to the net. It serves web pages at http://www.magic-1.org

magic-1.org is a noticeably slow website. (Not complaining or being a jerk, just observing. It's all very cool)


If you do so, you would eventually be invited to huge corp :-)


Is that advice or a warning? :)


I have probably linked to this before on HN, but hey, love is blind: http://www.kilian-leonhardt.de/relaiscomputer/kurz6.htm

It's a 4-bit computer made out of 171 relays. It's got different 8 commands, an input register and 2 CPU registers, one of which is the accumulator. There's memory for 16 instructions (dip switches!). As output it uses LEDs on the registers, so you can for example program it to multiply 2 4-bit numbers, and read out the accumulator at the end. It clicks away at 10 instructions per second.

The guy who built it also made a 1500 relais computer which is much more capable. You truly don't need much to build a computer - just a basic building block and enough ingenuity.


Had to build a CPU from "scratch" at CMU. Of course, we were allowed to use 290x bit-slice parts. And PALs or FPGAs (we didn't use FPGAs; if you were sufficiently clever you could get the whole thing in one FPGA.) Designed our own ISA though. Had to be able to do a 16 bit multiply. Looked like a multicolor explosion of wire-wrap.

One of the other groups built a fully asynchronous machine. Ours was a single board, but theirs had a backplane (using an 80 SCSI cable.) Each unit had a value line and a ready line, so the system advanced to the next state as the parts were ready.

Happy days.


These guys are like vintage car nuts. Its like they are reliving the glory days of simple and understandable CPUs. Those days have gone! Building your own CPU is cool, but its a bit of a waste of talent; it does nothing to advance technology is you see what I mean.

Give me a Tesla Roadster.


It may not advance today's hardware technology, but understanding these sorts of things means you have a deep understanding of many, many principles.

It's common when writing threaded software for multi-core systems to have an ""edge-race," where correct behavior can depend on exact ordering of earlier processing. Most of the people I know who have never had a software edge-race are people with significant hardware knowledge. They know what it's like to have many things going on simultaneously, and have the experience to reason about it more easily than those with a pure software background

With aggressively multi-core systems becoming more common (we are routinely using systems with 32 cores, and then we use 30 or more of them) material like this is becoming more relevant.


As part of the computer science/engineering program I went to at university, we had courses spanning the entire stack. Intro courses were in Scheme and C, and later courses went on to higher-level OO and relational databases and other paradigms. But we also had a short course in analogue electronics, followed by one in digital electronics, both of which were extremely hands-on, requiring us to construct simple circuits in the analogue course, but eventually progressing up to making our own simple CPU in the digital one, including making the microcode for it, and programming it in our own machine code.

That was a real eye-opening moment for me when I realized I had actually been all over the stack and had some sort of understanding of how a high-level program gets compiled and executed and what actually happens at the lowest level, and that that was useful for understanding the high level better.


I second this. One of the most eye opening and impactful classes I took in my undergrad was the digital circuits class. It finally made it click. Breadboarding a simple ALU at a workbench out of simple logic components, making them work off of a clock (seeing how the clock was just a final input that forced the operation to occur blew my mind), etc. etc. then doing it again in an FPGA was awesome. Suddenly all of the stack made sense, my compiler class made sense (when we wrote an emulator for a fictional target system to compile to, I kept thinking about how that system would work as a logic diagram), the OS class made sense (thinking about how the contents of an instruction could be swapped out for context switches in a multi-tasking system)...

I wish that the curriculum at my school had started with that class. It would have been a much better foundation to start off of than C++ and Prolog.


Sure... If you want to learn about that you could practice writing code for a low level emulator (loads are available). No need to actually build your own CPU.

It is pretty cool though.


I'll take a Caterham 7 over your Tesla any day. It's cheaper, lighter, faster in a straight line, faster around the corners, and better for the environment.

Did I also mention I could drive it from San Jose to San Francisco and back without needing a tow truck or an overnight recharge?

Did they do anything to advance technology to build it? Probably not. But they sure made damn good use of existing technology, and in doing so have produced something truly amazing to drive.

In the same vein, have the retro CPU hackers 'advanced' existing technology? No. But they've given themselves a really deep knowledge of how CPUs work, and on top of that, added a rather impressive bullet point to their resumes. And they've made something that is pretty damn cool.


I'll take an Ariel Atom over both of those.

Doesn't even need body panels.


One advantage to the Caterham is that it actually comes with a roof :-p


I have loved the C7 for a long time, but I was unaware they were available for purchase in the US. Is there some kind of program (maybe like the Noble in which it is sold as a "kit car") where these are available?


"Dr. X was the ideal man for this job because of his very disreputability. He was a reverse engineer. He collected artificial mites like some batty Victorian lepidopterist. He took them apart one atom at a time to see how they worked, and when he found some clever innovation, he squirreled it away in his database. Since most of these innovations were the result of natural selection, Dr. X was usually the first human being to know about them.

"Hacksworth was a forger, Dr. X was a honer. The distinction was at least as old as the digital computer. Forgers created a new technology and then forged on to the next project, having explored only the outlines of its potential. Honers got less respect because they appeared to sit still technologically, playing around with systems that were no longer start, hacking them for all they were worth, getting them to do things the forgers had never envisioned." (Neal Stephenson, The Diamond Age)

Don't diss the forgers.


The people who build the cutting edge stuff have to understand the basics really really well. How do you propose they go about getting that experience?


Can you build any sort of CPU or any sort of car from scratch?


Yes, some of CPUs mentioned in article are reproducible, and everyone can make it :-)


Is that how you feel about people who cook their own food?


To be fair, it is still possible for a home cook to create something that's better than commercially available food. I'd be very surprised if a homebrewer could do that for a cpu.

I definitely disagree that homebrewing cpus is a waste of time or talent though.


it is still possible for a home cook to create something that's better than commercially available food

I’d go so far as to say it’s likely


What about not just cook, but grow it at your back-yard? :-)


dammit, that would have been better


Direct link to homebrewcpu: http://homebrewcpu.com/


Link to previous discussion on homebrewcpu:

http://news.ycombinator.com/item?id=743583


I'd like to build an Apple II from scratch, I think I would learn a lot from it. Do you guys know if it is possible? Are there any "blueprints" or guides to do it? Are the parts still around?


You can build an Apple I from a kit: http://www.brielcomputers.com/replica1.html


Not at all the same thing.


I just looked up a 6502 CPU at Jameco.com for $5.95 and I know they are available on the surplus market even cheaper. Buying from surplus dealers you should be able to find everything you need. My WAG is that you could probably build an Apple ][ for about $50 - $100 without a keyboard (I haven't priced a scan keyboard in years, but you can build one from discrete pushbuttons if you needed to). I don't know if you can find source code for the ROMs though.

Google/check library for a cheap 1980's "Introduction to microprocessors" type book and find the Apple schematics online somewhere. It's a learning experience, but not particularly difficult once you get started. You can get some basic CPU/ROM/RAM/blinkenlights handwired and running a basic POST in a weekend if you already know 6502 assembly. A week if you don't!


This is l33t beyond all words.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: