- BMOW - Big Mess O' Wires - this is the first homebrew CPU I'd ever seen. The designer is a lot like me -- not an electrical engineer, just a hobbyist. He built a very impressive working computer using wire-wrap sockets. Wow.
- MyCPU - Another very impressive project. This guy is definitely on the "high end" of homebrew design, complete with a passive backplane and replaceable cards in his design. Oh, and custom printed PCBs!! He's even published all of his work so you can build one yourself (which many have done). His homebrew CPU is even network-connected, runs Minix, and hosts his webserver. Wow.
- HomebrewCPU - I stumbled upon this one when creating this blog -- I wanted to use homebrewcpu.blogspot.com but it was taken. Haven't read much into this guy's blog, but he looks to be doing about the same thing I want to do.
- Props to my friend Sean for sending me this link...
Project Goals:
- HAVE FUN! Any of the rules may be broken if following them starts to feel more like drudgery than a fun project.
- Design a functional, programmable CPU that is capable of doing useful things, like playing Tetris, Pong, or maybe even a custom OS.
- The design will all be done using (effectively) pencil and paper. Not because there isn't automation software available (see here), but because there's something visceral and interesting about getting down to basics.
- NO MICROCONTROLLERS! I would feel like that's totally cheating. The design will be comprised of mostly 4700 and 4000-series logic, with more complex circuits for things like the ROM and RAM. Pre-programmed microcontrollers like the EDE707 I'll use for non-essential stuff like driving LED displays.
- KISS - gotta keep it simple, since I'm not an EE and won't be able to debug really hairy stuff.
- No custom PCBs. Too much work, feels like cheating since I don't have to solder anything but the pins. Automatic place and route takes all the satisfaction out of completing a complex build.
- No microcode. Sound impossible? It's not. In fact, I've already finished my instruction set and have figured out how to design the CPU to work without a single microcode unit. The most complex "microcode" will be a few (as in 1-2 per board) AND and OR gates.
- It's gotta look cool. Lots of blinky LEDs and 7-segment displays so that you can "see" the CPU functioning.
After a fair amount of research, I've determined that this will be an optimal architecture for my design. Again, I'm in good company -- this is how most other homebrew CPU designers setup their systems.
- 16-bit registers and ALU
- 24-bit fixed-width instructions
- Harvard architecture design (as opposed to a von Neumann architecture)
- Single-cycle operation. This requires more chips (everything has to be parallel) but is much easier to design and debug.
This is a big project, so I need to make sure that I'm able to build it in discrete chunks, each of which plug into the larger architecture and work largely independent of each other. I've designed seven major components, that I plan to build in this order:
- Control Unit - Power, reset, and clock signals for the whole design
- Program Counter - EEPROM unit and 16-bit loadable address register
- Register File - 4x 16-bit registers with 2 reads and 1 write to any of the four
- Jump/Shift Unit
- Arithmetic Logic Unit - 16-bit parallel ALU based on the 74181 chip
- Load/Store Unit - 512K RAM in 16-bit words
- I/O unit - graphical LCD display and keyboard input
So that's it -- a quick summary of the design. As we speak I already have the schematics done, the instruction set figured out, and I'm about halfway through building the control unit. I'll be posting pictures, progress, etc. as I get more time.
It's a very interesting. Good luck to you. And as i see, you've made some good job already.
ReplyDeleteCould you advise some books to read? (but not like 400Pages on designing x86 clone) - i've already read almost all descriptions and concepts of BMOW,myCPU.
Added to favorites
Tough to say what good books would be. Most of what I learned for this project were picked up in a couple of my elective courses in college. I got my degree in computer science. That degree didn't cover any electrical engineering topics, so I took a couple electives in that area. Probably the two best books I can recommend are textbooks -- and they're dense, >400pg tomes. But, they're also very good and made it easy for somebody like me without any formal EE training to pick up the basic ideas:
ReplyDeleteDigital Design by M. Morris Mano, and Computer Organization and Design by John L. Hennessy and David A. Patterson.
The latter was used in a course I took in college where our final project was designing a simple pipelined MIPS processor in Verilog. It was that project that inspired me to take on this one.