About the Course - Fall 2008
This course presents an introduction to computer architecture, beginning with digital gates and number representation; building up through the Von Neumann model, Instruction Set Architecture (ISA) and assembly language; and ending with C programs interacting with assembly programs. Most of the concepts in this course will be reinforced through programming assignments in C.
Announcements
December 15, 2008
- In my recitation I mentioned that you will be given LC3 reference on the test. I was wrong about that. Please bring your own MIPS and LC3 instruction reference on your cheat sheet if you want it. -Jeshua Bratman
- You must bring a photo ID to be admitted into the final. Like the midterm, we will be checking you off as you enter the room.
- The final is tomorrow, December 16th at 11:20 in our normal classroom.
December 14, 2008: Monday December 15th there will be 2 review sessions in USC 310B. Come prepared with questions.
December 12, 2008: The answers from last week's recitation are now available here.
December 10, 2008: Notes for tomorrow's review session are posted on the schedule.
December 9, 2008: Example final questions have been posted on the schedule.
December 8, 2008: The guideline for PA6 has been posted to here. This shows the points breakdown for the upcoming assignment.
December 3, 2008: The notes for tomorrow, which will also take us through most of next Tuesday, are posted.
December 2, 2008: Many of you did well on the MIPSdriver portion of PA5, but there are still a number of you that didn't fully complete it. Since understanding the run-time stack is a key goal of this course, we are going to allow resubmits of the MIPSdriver (or LC3driver if that is what you initially submitted for PA5). You can resubmit the MIPSdriver.s file with your PA6 code. The portions of your resubmitted MIPSdriver.s program that work where they didn't in the initial PA5 submission will receive 50% credit and improve your PA5 grade.
December 2, 2008: There will be a lab in recitation this week.
November 30, 2008: PA6 is posted. It is due a week from this Tuesday.
November 30, 2008: The notes for December 2nd's class will be the same as for the last class meeting. See the schedule for more details.
November 30, 2008: Michelle is now in the new building in room 342. Tuesday December 2nd she will hold lab hours in the USC linux lab. Thursday December 4th she will hold office hours in the new building.
November 20, 2008: PA5 is more work than it should be based on its 5% weight. Therefore, for PA5 you need only submit the C and C-- portions along with either LC3 or MIPS. Only one of LC3 or MIPS is due for PA5 and then the other will be due for PA6. PA6 will have some minor additional exercises as well to make sure you have seen how to have MIPS call C-- and C-- call MIPS.
Due TOMORROW November 21st at 6pm PA5: Cdriver and related files, CMMdriver.c, and either MIPSdriver.s or LC3driver.asm. Due 12/9/08 for PA6 The driver you did not turn in for PA5, either LC3driver.asm or MIPSdriver.s. Some additional exercises that will be posted after Thanksgiving. These will be significantly reduced from the planned PA6 assignment.
November 19, 2008: Notes for tomorrow have been posted on schedule.
November 15, 2008: For PA5, assume that fib(0)=0. See the wikipedia article about fibonacci numbers and another article for more information.
November 14, 2008: Michelle will be out-of-town Monday and Tuesday of next week (Nov 17 and 18). Weston will be covering material in class that will be on the final.
November 13, 2008: To run Mars without it crashing make sure you are using java 1.6. There seem to be some problems running Mars with java 1.7. You can check your java version by using java -version. If it says you are using 1.7, you'll need to run Mars with the java binary at: "/usr/local/jdk1.6.0_07/bin/java". We've made at ~cs270/public/Mars to run Mar.jar with the correct version of java. If you just type this in, it should run Mars correctly.
November 9, 2008: Notes for the week have been posted in schedule.
November 11, 2008: The MIPS examples from class this week have been posted on the schedule.
November 11, 2008: This week's recitation will be graded and it is recommended that students read the MIPS tutorial that is on the schedule page and work through the examples from class which will also be posted in the schedule page.
November 9, 2008: Notes for the week have been posted in schedule.
November 7, 2008: PA5 is due Friday November 21st at 6pm.
November 6, 2008: PA5 has been posted on assignments page.
November 5, 2008: Here is a fix for the HW1 question 7 code.
printf("argc=%d\n", argc); int i; for (i=0; i<argc; i++) { printf("argv[%d] = %s\n", i, argv[i]); }
November 4, 2008: There will be a graded lab on C and LC3 recursion in this week's recitation.
November 4, 2008: PA5 will be posted after the 200 midterm.
November 2, 2008: Notes for November 4th and 6th have been posted on the schedule.
October 29, 2008: Notes for tomorrow have been posted on the schedule.
October 28, 2008: HW1 is posted on the assignments page.
October 27, 2008: The notes for tomorrow's class have been posted on the schedule.
October 25, 2008: The error message in pass_three for ADD should be the following in order to match with the reference compiler.
fprintf(stderr, "ERROR: Immediate operand 0x%04X (%d) for ADD " "does not fit with range -16 to 15\n", insn_ptr->immediate, insn_ptr->immediate); exit(1);
October 23, 2008: Folks have been asking some questions about PA4. Here are the answers:
October 22, 2008: The notes for tomorrow's class have been posted on the schedule.
October 22, 2008: There will be a cap on extra credit for PA4 at 15 points.
October 21, 2008:
October 20, 2008: The notes for tomorrow have been posted in the schedule.
October 20, 2008: There will be a lab this week in recitation.
October 19, 2008: Midterm grades have been posted to RamCT. See mailing list for more details.
October 19, 2008: Two minor typos that will not affect how the program runs.
October 18, 2008:
October 17, 2008: Example C programs from lecture have been posted on the schedule. The PA4 writeup now details the LC3 assembly program expectations.
October 15, 2008: Notes for tomorrow have been posted.
October 15, 2008: PA4 has undergone minor wording changes so as to be more clear. For example, there are two header files and the writeup used to mention that there was only one.
October 14, 2008: PA4 has been posted.
October 14, 2008: Assignment PA4 will be released at 9PM tonight. One of the sections of PA4 is a 10 point extra credit opportunity. To get the 10 points of extra credit you will need to write a shell script. Also, Wednesday, Oct. 15 @5PM, ACM is having a presentation on shell scripting.
October 13, 2008: There will be a study session today from 2-4PM to help prepare for the test. We will be starting in the north lab and then at 2PM moving to 310B.
October 10, 2008: Sent some notes about midterm example questions to email list.
October 9, 2008: Look in the schedule for posted PA1, PA2, and PA3 partial keys.
October 9, 2008: Midterm info
- Tuesday, October 14th, in same classroom, at same time
- Bring an ID.
- Optionally bring ONE side of an 8.5x11 with notes on it.
- Bring a writing utensil and perferably a backup.
- Attempt to come 5 minutes before the midterm begins.
- No calculators or any other electronic device may be visible during the exam.
October 7, 2008: After meeting this afternoon, we decided that recitations this week will cover example midterm questions.
October 7, 2008: For the exam Tuesday October 14th students are required to bring identification in order to be admitted to the test. We will be checking these as you come in the door on Tuesday.
October 7, 2008: Problem 6.16 from the book (README problem 16). Here are some issues that people were having with this problem:
- The MAR is not the PC. A trace of the MAR is a list of values that have been written into the MAR. During the fetch phase, the PC is written into the MAR, but instructions write into the MAR for other reasons as well.
- The trace given is not a FULL trace. It just stops once a trap is called.
- Traps cause the instruction stored at the trap vector address to be loaded, so the bits at x3003 are 1111 0000 0010 0001.
October 7, 2008: There was a bug in LC3sim.c that made it so programs could not start at address 0x0000. This bug should not affect you unless you have decided to have your programs start at 0x0000. I new copy of LC3sim.c has been placed in ~cs270/public/PA3-start/.
October 6, 2008: Notes for tomorrow's class have been posted in the schedule.
October 6, 2008: The PA3 writeup was missing the find-five.asm file in the list of files that should be in your PA3 subdirectory. That file has now been put in that list in the PA3 writeup and has been added to the list of files being checked by the submission verifier. If you have already submitted your assignment, then please rerun the following:
~cs270/bin/SubmissionVerifier.sh PA3
October 4, 2008: Someone found a bug in test_LC3state_simulate.c. The file ~cs270/public/PA3-start/test_LC3state_simulate.c has been modified. See the mailing list for more detail.
October 4, 2008: In class we discussed the fact that we often grab test cases from other students to create the full set of test cases for grading the assignment. This suggests that you should exchange test cases with other students. As this is an example of sharing code, we need to set some clear guidelines. We still expect each student to create their own test case for each instruction being simulated in LC3state_simulate. Therefore, in your test_LC3state_simulate.c file, indicate with comments which test case is yours and which test cases you have borrowed from others. You may also send your test case to the mailing list. That helps all students test their code and it helps you by recording your test case as your own.
October 2, 2008: A student has reported a bug that required some modifications in PA3-start/LC3state_dump.c. Please see the mailing list post for more details and grab the new versions of that file from ~cs270/public/PA3-start.
October 2, 2008: See schedule for some example floating point conversion questions.
October 1, 2008: See schedule for an example midterm.
October 1, 2008: The notes for tomorrow's lecture have been posted.
September 29, 2008: The answer for question 13 on PA3 was accidentally left in the assignment instructions. Go ahead an try to understand why this is the answer, but this question will be a free point for everybody.
September 28, 2008:
- Some students weren't clear about when they can turn in the lab from last week. As long as you show your results to Michelle, Weston, or Jeshua before your recitation the next week it will be counted.
- There will be another lab this week in recitation. To prepare for it read chapter 6 and at least do the example in Part 3 of the PA3 writeup.
- On the PA2 README the grade on the top for "readme specs" is a grade for including "name, userid, a high-level description of what the functions in the assignment do, how to compile and run the unit tests, an overview of how the functions were tested" as specified in the assignment instructions. Make sure to read and follow all the directions in the assignment instructions in order to get full points.
September 25, 2008: A student has reported a bug that required some modifications in PA3-start/test_LC3state_simulate.c and PA3-start/test_LC3state_write_reg.c. Please see the mailing list post for more details and grab the new versions of those files from ~cs270/public/PA3-start.
September 24, 2008: The notes for tomorrow's lecture have been posted.
September 24, 2008:
The lab in recitation this week is taking students longer than the
time allotted.
For those of you who have not been to recitation yet, make sure you
understand the notes that Weston covered in class this past Tuesday
the 23rd. Also, try to figure out the bit_field_to_int_sext function
as much as possible before coming to recitation.
For those of you in today's recitation who did not finish in time, you
can show the lab results to Weston, Jeshua, or myself during the
following times:
- Wed 3-5pm (Weston's lab hours)
- Thurs 2-3:30 (in lab, moving lab hours to Thursday this week due to being gone 9/23 and 9/30)
- Thurs 10pm-12midnight (Jeshua's lab hours)
- Tues 10pm-12midnight (Jeshua's lab hours)
There will be another lab next week in recitation. To prepare for it read chapter 6 and at least do the example in Part 3 of the PA3 writeup.
September 23, 2008: There will be a graded lab in recitation this week.
September 18, 2008: Minor clarification in PA3. The start position should be greater than or equal to the end position for bit_field_to_unsigned and bit_field_to_int_sext.
September 17, 2008: Notes for September 18th have been posted.
September 17, 2008: A student caught an error in the PA3 writeup, which has now been corrected. In the description of LC3state_write_reg, the Z condition code should only be set if the value being written is zero.
September 16, 2008: Assignment PA3 has been posted.
September 15, 2008: Minor change in PA2 Getting Started section. Removed the mkdir PA2 command.
September 11, 2008: Michelle switched her lab hours and office hours. Starting the 16th, Tuesday 2-3pm she will be in the lab and Thursday 2-3pm she will be in her office.
September 10, 2008: The notes for tomorrow have been posted on the schedule.
September 10, 2008: Next week 9/15-9/19, there will be a graded lab done during recitation. Bring your book. Read sections 3.6.1 through 3.6.3 to prepare for the lab. You must attend recitation to do the lab.
September 10, 2008: The PA2 writeup and programming guidelines have undergone minor changes over the past few days to clarify questions that arose during PA1. One of the more significant changes is that you will now be docked points if you use tabs in your code. Using tabs is not allowed in the coding style requirements.
September 9, 2008: More minor additions to PA1.html to help clarify the usage of tar with respect to the sanity check.
% cd ~/CS270/ % mkdir ~/Temp % cp PA1_username.tar ~/Temp % cd ~/Temp % tar xf PA1_username.tar % cd PA1 % make all // this should compile and run unit tests
September 8, 2008: Minor addition to PA1.html to help clarify the usage of tar. Before tarring up the PA1 directory, you need to be in the directory that contains the PA1 directory, which is typically ~/CS270/.
% cd ~/CS270 % tar cvf PA1_username.tar PA1/Make sure to do the sanity check, preferably by copying PA1_username.tar to a temporary directory somewhere.
September 8, 2008: Some useful links have been added to the External Links page.
September 7, 2008: Notes for September 9th have been posted on the schedule.
September 7, 2008: PA2 has been posted. The overflow recitation on Monday the 8th will cover topics related to PA2. In PA2, we will be taking off points for incomplete and incomprehensible sentences in the README file. We will also be taking off points for not copying the questions into the README file. (See PA2-start/pa2.guideline).
September 5, 2008: PA0 has been graded. Use the ~cs270/bin/grade program to check your grade. Graded README files will be handed out in class Tuesday.
September 5, 2008: We are scheduling an extra recitation for Mondays, from 1-2PM. If this time works better than your current recitation time, please send Dr. Strout or one of the TAs an e-mail so we can switch you.
September 4, 2008:In Thursday's recitation I incorrectly explained big-endian and little-endian in terms of bits. To be correct I should to said that in little-endian machines, the bytes are ordered in terms of least significant to most significant. Inside each byte however, the bits are ordered from most to least significant as you would expect. This is why in the isBigE() function the first byte extracted will be 1 if it is little-endian, but 0 if it is big-endian.
I apologize for the confusion -- Jeshua Bratman
September 4, 2008: Question 8 in PA1 indicated 16-bit words, but floating point numbers use 32-bit words. The PA1 writeup has been modified accordingly.
September 3, 2008: Posted 04-FP.txt notes in schedule.
September 2, 2008: Reposted cbits.c in schedule with minor printf formatting correction.
September 1, 2008: Posted 03-Cbits.txt notes for September 2 class in schedule and posted PA1 in assignments.
Aug 31, 2008: Moved midterm to October 14th. See schedule. Changed PA4 and PA5 around to accomodate the new midterm date. See assignments. Also put percentage of grade each assignment is worth on assignments page.
Aug 31, 2008: Minor modifications have been made to PA0 and the SVN Notes.
Changes to svn-notes.html- Read chapters 1 and 2 of subversion manual instead of 2 and 3.
- Replaced $HOMEDIR, $USER, etc. with clearer instructions.
- The directories PA0.html suggests you create now match those in the svn-notes.html.
Aug 27, 2008: The class notes for August 28th have been posted.
Aug 26, 2008:
- Office hours updated on syllabus. Some of the lab hours are different from those listed on the printed syllabus you got in class, so make sure to check the new hours. Also, Michelle's office hours are at the top of the syllabus.
- In order to complete programming assignment 0 (PA0), which is due Tuesday 9/2/08, you must get the handout from the 8/26 class. If you missed class, pick up a copy in one of the recitations.
Aug 23, 2008: The first set of class notes and reading assignments have been posted on the schedule link. PA0 has been posted in the list of assignments.
Recitations: You MUST attend regularly. You may attend a section other than the one for which you are enrolled only after all those enrolled in that section have been accommodated.