Sunday, May 11, 2014

The Elements of Computing Systems, Chapter 3

Finished Chapter 3, all about memory and sequential computer chips. This chapter was generally easier than chapter 2 in my opinion, mostly because all except for one of the chips were just bigger, badder versions of others. Making RAM4k isn't any fundamentally different from making RAM512, so you can't breeze through each of those chips easily. Which is good, because the outlier chip, the counter, was the most difficult chip I found to implement so far.
Unlike the ALU, where my problems were born of my own poor decision making skills, the sequential chips are just more difficult to design. They require a different kind of thinking than the combinatorial chips, because you have to account for past values emitted by the chip and compare them to the value the chip is receiving now. Be ready to make good use of your multiplexers.

The counter itself is particularly difficult for two reasons. One, unless you take the time to look at the test and the .cmp files for the counter, it can be difficult to understand the structure you're aiming for in the chip. Two, the structure itself is complicated, and relies heavily on the order of the gates. I used the debugging flag tool in the software for the first time for the counter, and I was very happy with how it worked, considering I did a LOT of debugging over the course of the chip. If you have trouble, remember its called a sequential chip for a reason. Figure out the order things should be calculated first, then go from there.

  1. Also, the tests for the memory related chips can take forever to complete. If you aren't specifically debugging a certain section of the program, run the test with no animation, otherwise you may be sitting there for ten minutes.