CSC218 Computer Organization

Block 1 (August 27, 2018 to September 19, 2018), Fall 2018

Instructor: Sikder Huq, 206D Law Hall, SHuq AT cornellcollege.edu

Class meeting time: MTWThF 9:00-11:00 AM in 309 Law Hall (Lecture) 

                                      MTWThF  1:00-3:00 PM in 113 Law Hall (Lab)                                   

Office Hours: I will be available in my office after the lab sessions (typically from 3:00 p.m. until 3:30 p.m) and by appointment

Textbook

The Elements of Computing Systems: Building a Modern Computer from First Principles

Noam Nisan and Shimon Schocken

Other resources

Build a modern computer from first principles: from NAND to Tetris

Textbook (optional):

Digital Design and Computer Architecture

Harris and Harris, 2nd Edition, 2012.

Course objectives

We will give special attention to three of Cornell College's educational priorities and outcomes:

Knowledge: you will develop an overall understanding on how computers work and how they are designed. After successful completion of this course, you should be able to:

Inquiry: You will learn how to design a complex and fully functioning computer system from scratch using a hardware simulator. You will break complex problems into simpler ones and ask yourself how you can solve them efficiently to solve the overall larger problems.

Citizenship: In this project-centered course you will learn how to collaborate with classmates. You will learn with one another and from one another.

Grading

You are expected to participate in the discussions and work actively in the laboratory. There will be in-class quizzes/exercises to verify your understanding of the materials presented in class. There will also be four/five short written assignment throughout the block.

Grading of this course will be based on the following components:

Note that, the graded exercises are likely to take place in class. The dates mentioned above are tentative.

The final grade will be assigned according to the following percentages: 90 A, 85 A-, 82 B+, 78 B, 75 B-,

70 C+, 65 C, 60 C-, 55 D+, 50 D, 45 D-, <45 F.

The grades of the graded exercises might be curved to calibrate for the difficulty of the exercise relative to course objectives; your curved grade will always be equal to or higher than your raw points. The instructor reserves the right to adjust the weights and percentages if it is appropriate and will notify students if these adjustments occur.

Materials

All materials (including lecture slides/notes, homework assignments, links to the external resources etc.) will be posted in Moodle.

Lecture/activity summaries

Week 1

Day 1 (8/27, Mon): 

Lecture: Course intro, an overview of the different layers of a general purpose computer system.

Lab: Introduction to hardware simulator and HDL (Hardware Description Language), NAND logic to construct basic logic gates, implementation of basic logic gates (Not, And, Or, Xor, Mux and DMux) using NAND Logic.

Day 2 (8/28, Tue): 

Lecture: Designing Not16, And16, Or16, Mux16, Or8Way, Mux4Way16, DMux4Way and DMux8Way chips using the basic logic gates.

Lab: Implementation and testing of the chips (designed during the lecture) using hardware simulator (project 1).

Day 3 (8/29, Wed): 

Lecture: Boolean algebra, canonical representation of a function, programmable logic devices (PLD), introduction to counting system and two's complement, introduction to different adder chips and ALU.

Lab: Design and implementation of HalfAdder, FullAdder, Add16, Inc16 and ALU (project 2).

Reading: Read chapters 1 and 2, and watch a video tutorial on sign magnitude, one's complement and two's complement.

Day 4 (8/30, Thu): 

Lecture: Number systems, integer representations (e.g. unsigned integers, sign-magnitude, 1's complement, 2's complement), Big Endian vs. Little Endian, floating point number representation (IEEE-754 32 bit single-precision), character encoding, understanding different functionalities of the ALU we studied for project 2.

Lab: Overview of sequential logic, flip-flops, design of an 1-bit register (project 3).

Homework: Short writing assignment 1 is posted. Topic: VLSI fabrication and how does a CPU work.

Announcement: Graded exercise 1 review is posted.

Day 5 (8/31, Fri): 

Lecture: Designing a 16-bit register, RAMs of various sizes (recursive design), and a program counter (PC),

Lab: Implementing register, RAM8, RAM64, RAM512, RAM4K, RAM8K and PC (project 3).

Week 2

Day 6 (9/3, Mon): 

Lecture: Graded Exercise 1 (in-class).

Lab: Introduction to the Hack assembly/machine language.

Day 7 (9/4, Tue): 

Lecture: Hack assembly/machine language, A-instruction, C-instruction, IF and WHILE logic.

Lab: Implementing multiplication hack assembly/machine language (project 4).

Homework: Short writing assignment 2 is posted. Topic: Transistors and Moore's law.

Day 8 (9/5, Wed): 

Lecture: Students worked in groups and implemented division using Hack assembly language ,

Lab: Handling I/O devices (e.g. keyboard and screen_ using Hack assembly language (project 4).

Day 9 (9/6, Thu): 

Lecture: Finding the minimum number from an array/list using Hack assembly language, the detailed architecture of the Hack computer (including instruction memory, data memory, I/O memory, CPU etc.)

Lab: Detailed hardware design of memory, CPU and the overall Hack computer  (project 5).

Announcement: Graded exercise 2 review is posted.

Day 10 (9/7, Fri): 

Lecture: Graded exercise 2 (in-class).

Lab: CPU jump logic, students worked on completing their project 5.

Week 3

Day 11 (9/10, Mon): 

Lecture: Details on how to design and implement an assembler for Hack platform.

Lab: Developing an assembler: parsing (project 6).

Homework: Short writing assignment 3 is posted. Topic: RISC vs CISC, and pipelining.

Day 12 (9/11, Tue): 

Lecture: Implementation of a parser for an assembler.

Lab: Handling symbols in assembler development, finishing up project 6.

Day 13 (9/12, Wed): 

Lecture: Review of the Hack assembler implementation, exercise on Hack architecture, introduction to MIPS architecture, MIPS design principles.

Lab: Introduction to MIPS assembly language and MARS simulator.

Day 14 (9/13, Thu): 

Lecture: Memory handling in MIPS, MIPS instruction types, different MIPS instructions.

Lab: Writing code using MIPS assembly language, focusing on array, IO handling, loop, branching etc.

Announcement: Graded exercise 3 review is posted.

Day 15 (9/14, Fri): 

Lecture: Graded exercise 3 (in-class).

Lab: Implementing bubble sort using MIPS assembly language.

Week 4

Day 16 (9/17, Mon): 

Lecture: Multiplication and division in MIPS, branching in MIPS, function handling with stack, MIPS memory map.

Lab: Playing with MIPS programs that use function and bitmap display handling.

Homework: Short writing assignment 4 is posted. Topic: CPU caches with multiple levels.

Day 17 (9/17, Tue): 

Lecture: Instruction pipelining, data and control hazards, deep pipelining, branch predicition, superscalar processors, out of order processors, SIMD, multithreading and multiprocessors.

Lab: No lab, we had a review session instead.

Announcement: Graded exercise 4 review is posted.

Day 18 (9/17, Wed): 

Lecture: Graded exercise 4 (in-class).