Archive for the ‘build a cpu’ Category

First off, I apologize to those readers who come here primarily to follow OneNote news and Tricks and my posts have taken a turn towards electronics ( which is what’s occupying most of my life right now ). However, I promise to sprinkle usage tips for OneNote as often as I can. Also apologizes to those readers who find these posts hard to follow as I am not posting in any particular sequence. I have to turn in my project by Feb 28th, so I have to go from conception to design to wiring in a relatively short period of time. I am just posting my progress and random observation, but if people are interested I might do a more detailed series after I finish my project.

So as for my progress, I have the Instruction set ( YAY !!) and the Control ciruit designed. I have basically modified the instruction set, added a few more and changed around a few things, from the notes I linked to earlier. And Yes 8 – bit doesn’t mean you have fewer instruction, it just limits the number of registers and the maximum and minimum numbers you can feed in.

The Instruction set table I am implementing is

SideNote: I actually created this Table in Word. I don’t know if its just me but when I know I won’t be using Ink I tend to avoid OneNote, typing in Word and then later Printing it into OneNote. Typing in Word as compared to OneNote just feels “cleaner” to me. I guess it’s the Outlines, lack of rulers etc. which contribute to this effect. Do other OneNote users feel the same way?

And the corresponding control circuit, created without much effort, except for the painfully excruciating strain on the eye as I fed in the Truth Table in Logism ( Yes, you just feed in the truth table and it does the work for you, amazing isn’t it )

And once I created and tested this circuit in Logism it went straight to OneNote so that I could mark it up and make notes and annotate the circuit. Seriously, how do people work without tablets? Without my tablet, it would have taken multiple printout ( meaning multiple trips to the library) and probably such a mess of paper that I would have literally gone crazy ( not that I am not going crazy). I guess a virtual mess in OneNote is lot easier to handle ( thanks to its awesome search) than going through sheaths of paper looking for that one thing I really need but can’t find.

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.

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 🙂

For my Electronics Project this semester I have decided to take on the slightly daunting task of building a very simple 8 bit CPU. Since I will be using my tablet extensively as I plan and execute my project I though it would be an interesting exercise to show off just one of the advantages of having a tablet PC. So stay tuned as I outline the progress (and sleepless night) in my attempt to build a simple CPU. Wish me luck and hopefully I’ll get back to oneNote powertoy programming after I get done with this.

<UPDATE> I initially had this on a separate page, but it seems that page tabs don’t do what I assumed they did. So Instead I got a new category called build a CPU which will show the related post, while oneNote users can click on the one Note category