CSS371 - Machine Organization

Syllabus

Fall, 2012

Syllabus Index

General Information

Professor: George Mobus Phone: 692-5894
email: gmobus@u.washington.edu
Office: Cherry Parkes 227
Hours: TTh 10:30 - 12:00, or by appoint.
Class: Time: MW 6:30-8:35 pm 
Location: JOY 215  
Textbook: Introduction to Computing Systems Patt & Patel

What To Expect From the Systems Sequence of Courses (371, 372, 422)

Computation is a mechanical process that manipulates electronic representations of digits to accomplish arithmetic and logic. All too often software developers only see the computer language interface to this process and think they have a complete picture of the science of computing. As often, computer engineers see things from the hardware side and think it is all about moving bits around between circuits. They may fail to appreciate the abstractions provided by high level languages and their relevance to computation. This course is the first in a series of three that will provide an integrated view of software and hardware so that all students will be able to see how both sides affect each other. Software-oriented students will come to understand how the various pieces of hardware produce the computations guided by their programs. They will come to understand how their high level language constructs compile down to machine code and how the machine reads and executes that code to produce the results. Hardware-oriented students will come to understand why hardware designs are predicated on what the software needs of programmers are. Hardware is designed so as to facilitate software development and execution.

Given this orientation, software developers who have a deeper knowledge of how things work ‘under the hood’ — in the hardware — will become better programmers and program designers. As good as compilers might be these days, they still can not compensate for some of the more egregious design errors that more naive programmers make. At the same time, hardware engineers who grasp the requirements of software development will produce better designs in the sense of supporting software.

The three courses, generically called ‘the systems courses’ are Machine Organization (371), Computer Architecture (372), and Operating Systems (422). The first two courses are oriented toward learning the details of machine designs and how software runs on the machine. The latter course is devoted to how hardware designs (that will be discussed in the first two courses) allow for the many advanced functions provided by the modern operating system. Knowledge that you acquire in this first course (371) will be used throughout the series. You cannot treat these courses as stand-alone units. The latter courses build on the former courses. Moreover, the knowledge you gain from the entire series will come to play in a number of advanced electives such as embedded systems (which is a required course for CES students).

In truth, the knowledge to be gained in this sequence of courses is highly integrated with that to be gotten in the ‘theory courses’, Data Structures and Algorithms (for CSS students only). These two tracks, along with the foundation courses of discrete math and programming, constitute the core of computer science. One cannot gain a complete grasp of computation without an understanding of how these are integrated. Throughout the series you will see examples of principles that apply equally to both hardware and software, supporting the notion that complete understanding of this discipline requires knowledge acquired from both tracks.

One final note. The knowledge gained in this series of courses is preparatory for understanding one of the fastest growing areas of computation today and that is embedded systems. While there are many more Web programmers out in the marketplace, quite honestly, those jobs are relatively easy to learn and thus the competition is high. Embedded systems require considerably more detailed knowledge of hardware and software and there are fewer people who seek to enter the field even as the demand increases. This series of courses will position students to take one or more embedded systems courses and provide them with a good head start for breaking into this more lucrative field. I'm just saying...

What To Expect From Machine Organization (371)

We are going to start from the very lowest level of mechanization of computation, how to represent and manipulate a number in digital logic. From there we will build up all of the mechanical methods needed to produce a working computing engine, its associated memory stores, and devices for getting numbers into and out of the engine. We will also examine how numbers stored in the memory (the program) can be used to control the operation of the engine (the CPU) as it manipulates other numbers (the data) to produce computational results. Our principal objective is to demystify the workings of hardware and show how it produces what amounts to abstract results (arithmetic and logic). Moreover, we will demonstrate how those initial abstract results can be manipulated further to produce higher levels of abstraction. The latter are the basis for all forms of symbol and image manipulations that constitute the human use of computation in the modern world.

Simultaneously with the learning of computer hardware will come the learning of a high level programming language that is still ‘close’ to the hardware, the C programming language. It may seem strange to you, at first, to have two simultaneous tracks of learning going on in the same course. But as the quarter progresses you will come to understand this duality as part of the bringing together of software development and hardware design/operation. C is the language of choice for systems programming, that is all programming that utilizes specific hardware features or is involved in hardware manipulations. Operating systems, compilers, database engines, and servers are examples of systems software. The C language lets you look deeper into the hardware of a machine and is analagous to a microscope in biology.

Students are encouraged to bring laptops to classes in order to best participate in the in-class exercises. For doing work in class or at home you will need to have installed the LC-3 simulator and lab manual on your computer. You can find these at the McGraw-Hill book website [http://highered.mcgraw-hill.com/sites/0072467509/]. You will also need a C programming environment, an editor or integrated development environment, and a gcc compiler. We will be working in class in the cygwin Unix-like environment [http://cygwin.com/]. Other environments are acceptable as long as the programs you turn in compile and run in this environment.

Learning Objectives

The following is a list of specific learning objectives set for this course. These are the main objectives that will be assessed in various ways throughout this course, and will be essential to success in the following courses.

  • basic digital logic and its application to computation
  • logic circuits used for specific computational tasks
  • number representations and their implementation in logic circuits
  • basic CPU/ALU functions
  • machine instruction set architecture
  • assembly language
  • assembly of a symbolic program (assembly language) into machine language
  • programming in a high level language (like C)
  • compilation of high level languages to assembly

Learning Outcomes

The following list is of the specific areas that will be assessed to demonstrate achievement of the above objectives. Demonstration of these capabilities is taken as evidence of achieving the objectives. But recognize that these outcomes will be ‘tested’ many times in future courses as well.

  • understand the basic architecture of computational circuits from logic gates to CPUs and memory
  • demonstrate an ability to write simple assembly language programs, assemble them and run them on a target machine
  • demonstrate an ability to write high level language programs that interface with assembly language routines
  • show competence in writing a wide variety of high level language programs, compiling individual object modules, linking those modules, and producing executable files
  • demonstrate competence in using a high level language tool set without the aid of an IDE

Ground Rules

The following course policies will be observed.

Grades

Grades will be based on a percentage of total points acquired through a variety of exams, in-class assignments, programming assignments and possibly quizzes.

Exams

There will be one two-hour midterm exams and a final. The midterm exam is worth 200 points and the final is worth 200. The final is comprehensive.

Homework and In-Class Exercises

Each week we will have an in-class, small group exercise that will be completed and peer-reviewed. Each exercise will be worth 20 points. The small groups will be assigned differently each week in order to minimize effects of free-riders and dominators. Every person in the group will be expected to participate fully and contribute to the success of the exercise. Exercises will include problems from the book, including assembly programming, and small C design problems. That week there will also be a homework assignment to be done individually. This will be graded and returned to you through the class management web site. Each is worth 10 points.

Programs

There will be a series of C programming assignments that will help firm up your understanding of how the machine works. These programs will be written in C (not C++ or Java) and must be able to run in the cygwin environment for evaluation. You are free to use whatever development environment you choose but you must make sure your final product will compile and run under cygwin.

Each program will be a component in the next program. Each will become progressively more complex, but if you do a good design on the first several programs your final product will not be more difficult than earlier programs. The programs will be simulations of:

  1. logic gates and simple circuits (50 points)
  2. a full adder (75 points)
  3. an ALU and Registers (100 points)
  4. Primitive CPU/Memory Module (125 points)
Total of 350 points.

Later in the course there will also be a few assembly programming assignments for the LC-3 simulator from the text book. You should install the simulator as soon as possible. We will have a few demonstrations in class but you will be expected to write, load, run, and debug assembly programs at home for turnin. Each program will be worth 50 points.

Pop Quizzes

In the event I start to get the feeling that a significant proportion of the students are not coming to class prepared, I will initiate the pop quizzes to reinforce the need to read and think before class. If there is a need for one or more pop quiz, they will be worth enough points to punish the unprepared and reward the prepared. I don't like to use this carrot/stick approach but will if I need to.

Test make-ups

I will give make-up exams only with prior permission or written excuse.

Academic Honesty

Unless otherwise indicated, homework assignments are to be completed on an individual basis. Academic dishonesty is any act of turning in work that is not your own, but representing it as your own. This includes program code, homework and exam answers. I also consider any act of providing others with your work so that they can copy it as an act of dishonesty. Any such act will result in an automatic failing grade on the assignment/exam. Any subsequent repeats may result in a failing grade for the course.

You should feel comfortable discussing topics, including general approaches to assignments, in a collaborative atmosphere. Discussing concepts and methods to be applied to problems is often a tremendous aid to studying. But when it is time to sit down and write down answers or program code, you should work on your own.

Course Mechanics

Lectures

I expect everyone to read the assigned chapters in the text before coming to class. My approach is to pose questions to students to see how well they are preparing for class and how well they are understanding the material. I also encourage students to ask questions that are based on some difficulty understanding the material or come from deeper curiosity. Questions are good.

I rarely, if ever, use slides and power point presentations in class. I prefer to draw diagrams on the white board and hope that you will engage with the material by copying the drawings during the lectures.

Attendance is not mandatory. However, from past experience I can tell you that students who do not regularly attend class do not do as well, particularly on exams and homework.

Office Hours

I maintain regular office hours (see above), but have a general open door policy. If my door is open (even if only cracked open) I am in and willing to take walk-in visits. If my door is closed, even if you know I am in my office, I am not available at that time, so please do not knock.

I sincerely encourage all students to drop by several times during the quarter even if you don't have a specific problem or question. It is good to get to know one another. But if you are having problems you need to come see me for certain. Don't be shy. I really don't bite.

Textbook Resources

The McGraw-Hill web site hosts the resources that come with the textbook. You will need to access the LC-3 simulator and its associated software along with many of the other support materials there. The sales rep has not yet gotten back to me with information re: how to gain access. As soon as I have this information I will be sending it to you.

Support for students with disabilities

Institute Resources