It’s been an eventful couple of weeks for the EE-diots of SSE. We’ve been making a processor these days for the Computer Organization Project. Indeed, leaving the books and the computer labs for the “real” labs has been a pleasant change.
Let’s talk about processors. They are everywhere: calculators, computers, washing machines, cars, TVs etc. Now that we are done motivating the processors (seemed straight out a textbook, that sentence), let us keep our feet on the ground and consider just the very basic one: the one we are actually implementing. As of today, it just adds ANDs and ORs data.
The long and short of a processor is that it executes a series of binary instructions to do some really useful things. For example the 16 bit instruction 0000101111110000 would pick two numbers stored somewhere in our processor (the numbers are stored in what we call “register files”. Visualize a register file as a huge vertical shelf having lots of drawers - the drawers are the registers), adds them and stores them in a specified register.
To put things in perspective, this instruction is stored in the Instruction memory, a ROM for example, which is in itself best visualized as a huge vertical shelf.
The instruction memory is accessed by a Program Counter, as in, the counter increments and we move on to the next instruction. The most typical instructions are add, subtract, multiply and divide using an Arithmetic Logic Unit. But that is just the square one. These are usually just the means to an end. It can also “branch” to higher or lower instructions in the Instruction Memory by evaluating conditions. Like comparing values in two registers and making its move accordingly.
This in effect, is the hardware implementation of the code we write in, say, C++ or MATLAB.
A=B+C would be translated to the 16 bit instruction whereby A, B and C are actually registers. Whatever is in the B and C register would be added and stored in the A register.
And obviously, complexity is just a series of trivial things put together. A complex recursion code in MATLAB or C++ would be implemented using the same arithmetic and branch instructions.
Now moving to the more human aspects of the Project, a lot of our time is spent soldering:
Switching gears: a lot of psychology talk going on these days. Obviously Inception has a role to play in it. Apart from that Dr. Shahid Khan is offering neuroscience next semester. Got me excited until I checked out the pre requisites: BIO 313. No problem. But the pre reqs for BIO 313? BIO 221 and BIO 212. Pre reqs within pre reqs. Recursion slaps you in the face at times.
Parting words: Happy Eid (although I am disappointed that there will be distasteful TV dramas on bakras, trashy talk shows and televised concerts to celebrate what is in actuality a very solemn occasion. So much that riles me in this country of ours).
Mehdi