First Step to building a CPU
Posted by anirudhsaraf on February 11, 2008
For those wishing to build a CPU on their own here are the steps I would outline :
1) Understanding completely how a CPU works. There are many resources out there which explain the process in detail. It’s called a Single Cycle Datapath. If you Google it you will come up with a bunch of links from CS departments of various places explaining the process. Most of them are software simulations, so you will find 32 bits implementations of MIPS processor explained. Before you begin building your own CPU, it is vital you understand clearly how the CPU actually functions. ( I had the advantage of taking a class in CS where we build a software simulation of the 32 bit MIPS processor in LOGISM)
2) Find a software simulation of the MIPS processor / any other processor online and run it just to see how the big picture looks. It helps to know how to work in one of these simulation softwares too. Logism is free and an awesome piece of software to test out your circuit before you actually build them.
3) I found these helpful notes online which outline a 8 Bit processor ( Note : a 32 bit processor is way to many bits to wire up in a short time) Lecture Notes by Andreas Moshovos I found Online.
4) Break your circuits into testable units i.e the Instruction memory and Program Counter, the Control, the Registers, The ALU ( breaks down into many subcircuits), the Datapath and the data memory and possibly a few more.
5) Find datasheets and chips which can reduce your work :). I am currently on this step of the process and incidentally OneNote is of great help here as I just print the Datasheets and notes I gather online to OneNote for reviewing later. This way I don’t have to worry about saving(remembering where I saved it) the huge amounts of data I seem to gather in one “googling session” . For anyone doing research OneNote is an indispensable tool.
Side Note : it would be really nice if the OneNote Printer somehow allowed me to print to a particular section insteaad of putting the print out into the unfiled notes. A trick I often use is to capture the page using Snagit and use its Send to Onenote Plugin Tool.
6) Be willing to spend a lot of sleepless nights in the lab….. more to come as I actually progress to this step 🙂