Section 001: TR 2 BR 165
Section 800: Online
Office: CI 2034,
Office Hours: TR in BR 165: 9:00 - 9:30; TR in CI 2034: 10:45 - 11:30 am, 1:00 - 2:00 pm
Phone: (910) 962-7013
The Elements of Computing Systems
Building a Modern Computer from First Principles
Noam Nisan and Shimon Schocken
The MIT Press
Prerequisites: CSC 131
and CSC 133.
representation, CPU organization, I/O memory and communication,
machine-level representation of programs, introduction to a modern
instruction set, introduction to assembly language programming.
Our goal in this class is to build a computer. This computer is based on a series of hands-on hardware and software construction projects. The hardware projects (building a CPU, RAM, and an overall computer platform called Hack) are implemented in a simple hardware description language (HDL) that can be learned in a few hours. The software projects (building an assembler, virtual machine, and a compiler for a simple Java-like language called Jack) can be done in any programming language. Throughout this journey, you will gain many cross-section views of the computing field from the bare bone details of switching circuits to the high level abstraction of object-based software design.
COURSE REQUIREMENTS AND GRADING CRITERIA
This course is mostly hands-on. You will be implementing a series of hardware and software modules. Each hardware or software development task will be accompanied by an executable solution (illustrating what your chip or program is supposed to do), a detailed design document (proposing how to build it), and a test script (specifying how to test it). The assignments will be spread out evenly, so there will be no special “crunch” toward the semester’s end. The resulting chips (as well as the topmost computer-on-a-chip system) will be tested and simulated on a supplied hardware simulator that can run on your home computer.
Altogether, the hardware platform comprises 33 chips. The chips are constructed gradually, and bottom up, starting with elementary Nand.hdl chips and ending a few weeks later with the final Computer.hdl chip. Using a given Nand gate (the only "given" artifact in the course), you will be guided to build a Not gate; using Not and Nand gates, an And gate is built; using Not and And gates, an Or gate is built; using Or, And, and Not gates, a Multiplexor is built, and so on. At the end of this recursive ascent – divided into five projects and five semester weeks – a simple Von Neumann platform emerges. This platform is called Hack. Each chip in the architecture consists of just a few lower-level chip parts, and, correspondingly, can be implemented with just a few lines of HDL code. The most complex chip – the CPU – can be implemented with 17 lines of HDL code. The top-most chip – the Computer itself – is implemented with three lines of code, specifying the connectivity of the three lower-level chips of which it is made: CPU, RAM, and ROM. Next you build the computer's software hierarchy, whose development is broken into seven projects. Each software project is specified by an API describing several classes, each consisting of a handful of methods (implement the API's using Java, C#, Python, or Perl). For example, the Assembler API includes a Parser class (8 methods), a CodeGenerator class (3 methods), and a SymbolTable class (4 methods). For each stage there is a detailed blueprint and a plan of action that walks you through a staged development of each API from simple to complex methods.We build a total of seven projects, 1 Elementary Logic Gates, 2 Combinational Chips, 3 Sequential Chips, 4 Machinie Language Programming, 5 Computer Architecture, 6 The Assembler, and 7 Virtual Machine 1 -Stack Arithmetic.
Projects are due by the end of the day (11:59 pm on the server's clock) on the due date. No late projects are accepted. There is no penalty for turning in a project early. Projects count a total of 3/5 of your course grade. Partial solutions are accepted and given credit as appropriate. Projects must be submitted with the relevant code and required test runs as applicable in a zipped file labeled yourlastnamePartnerslastnameProjXX.zip. Turning in the wrong file electronically does not provide additional time. You are responsible for ensuring that the correct file(s) are submitted. Your name (and your partner's name if you have one) must be in the source code for all files with your work (.hdl, .tst, .py, .java, .doc, etc.) Do not add your name to files that you do not modify. Turning in copied work or duplicate files will result in zero grades, as a minimum, for all parties regardless of fault. Share your ideas, not your files.
The final exam (Thursday, May 5th, 3;00-6:00 pm) will be comprehensive and counts 2/5 of your course grade. The final is closed book, no calculators.
A modified 10-point scale will be used to compute your course grade. If your course score falls just below a cutoff, a higher + grade may be assigned. Factors that affect this judgment are the distribution of grades, improvement during the semester, and attendance.
90 - 100 A
80 - 89.99 B
70 - 79.99 C
60 - 69.99 D
UNCW practices a zero-tolerance policy for violence and harassment of any kind. For emergencies contact UNCW CARE at 962-2273, Campus Police at 962-3184 or 962-2222, or Wilmington Police at 911.
ACADEMIC HONOR CODE
It is the responsibility of every student to
uphold and maintain the UNCW
Academic Honor Code. You
violate the honor code when you represent
someone else's work as your own. Programming projects may be
discussed at a conceptual level with other students but details and
coding must be your own. Copying and team collaboration is prohibited.
You will have to deal with challenging and time-consuming (but cool)
projects. In many cases, you may wish to discuss these projects with
others. At that point, you will find yourself walking a fine line
between cooperation, which we encourage, and cheating, which
Cooperation versus cheating: You can discuss the homework problem with other students. You can read together code from the lecture notes, from the course site, or from the textbook, and think together how to attack the problem. However, at some point the consultation must end, and from this point onward you are on your own. Each student should write the code or solve the problem separately, without further consultation.
The minute you start working on a computer together, you are cheating. The minute you start sharing pieces of code or solution steps, or use solutions of other people, obviously you are cheating. You are allowed to share all your work within the pair, if you are working within a pair.
What to do when you get stuck: Most students cheat because they struggle with difficult problems under time pressure. When the problem that you are working on goes nowhere, it is tempting to cut corners. What can you do instead? There are at least two alternatives. First, you can seek help from your professor or TA, or via the online Q&A. Second, you can always submit any program or partial solution for grading, even if the program is not working or the solution is not perfect. It's not the end of the world, and you will always get partial credit for your work. Let's keep things in perspective: the program that gives you a hard time is only one part of the homework; and this homework is only one part of many assignments in this course; and all these assignments, taken together, are only one part of the course grade and this course grade amounts to about 1/40 of your overall grade point average. So in most cheating cases, students risk their entire careers in order to up improve their GPA from, say, 3.45 to 3.46.
How we detect cheating: It's quite simple. Students who cheat submit programs or text that are either identical to, or contain deviations from, the original source. It is very simple for the graders to detect these pseudo-identical programs and documents. We really don't care who wrote the original and who copied it. They are both treated equally, as cheaters. It is also very easy to find the source of borrowed work over the Internet. The graders know how to use search engines just as well as you do.
STUDENTS WITH DISABILITIES
If you have a disability and need reasonable accommodation in this course, you should inform the instructor of this fact in writing within the first week of class or as soon as possible. If you have not already done so, you must register with the Office of Disability Services in DePaolo Hall (extension 3746) and obtain a copy of your Accommodation Letter. You should then meet with your instructor to make mutually agreeable arrangements based on the recommendations of the Accommodation Letter.
STUDENT LEARNING OUTCOMES
by J. A. Tompkins