Final Office Hours
Greg will be holding what are likely to be the final office hours of the semester from 8am-10am Friday, 12/14 in 271 Soda.
This is your last chance for both technical and grading issues.
If you accidentally interpreted the addresses in problem 1 as decimal instead of hexadecimal and lost significant credit because of it, please submit a regrade request.
Grading Status Updates
Keep an eye on the Grading Status page. We are busily grading so don't be surpised to find your score changing, or
extra autograder logs appearing. Please check the Grading Status page before you report any "problems."
Grading Status Updates (Updated 11pm)
Regrades are in progress. Do not be surprised if you
receive the relevant log file long before your score is changed. If you receive
such a log file, you will eventually receive a new score with a comment mentioning
the regrade. Questions like "when will my score change" will be ignored.
- All assignments now have grading deadlines posted.
- We have clearly spelled out the regrade policies for all projects and homeworks. You need to read this before submitting one!
- Greg will be handling all homework regrades.
- The proj5 autograder had some troubles and has
been re-run several times, we will extend the regrade deadline if final logs are
not availible later today.
- Exam2 will be returned today in lecture.
Just to be clear on scheduling for this week:
- There is lecture on Monday, 12/10. It will be the final lecture.
- Homework 12, a survey, will be posted on Monday.
- There is no discussion or lab.
- There is a final exam review on Tuesday 12/11 from 4-7pm in 10 Evans. From 7-8pm, TAs will be availible for individual questions.
- Greg will have his Tuesday & Friday office hours as normal, further hours may be availible by appointment if you have an emergency and he has a bad habit of hanging out in 271 at random times.
- Peter will have office hours Tuesday 12/11 from 12-2pm in 511 Soda.
- Alex will have office hours Monday as normal.
- Valerie will have office hours Monday as normal.
- Regrade deadlines can be seen on the Grading Status Page. This contains all the grading information we know to date. Do not e-mail us questions
which this page answers. Please direct issues to the appropriate reader as listed
on this page.
- The final exam is Saturday 12/15 from 12:30-3:30pm in Bechtel Auditorium.
There will be an twelfth homework. It will be a survey, and it will be released on Monday 12/10.
Exam2 & Exam3 Updates
We've posted links to our cache (not that kind) of old CS61C final exams. You may also wish to look back over old midterms,
since the Exam3 is cumulative.
Exam2 e-mails should go out Monday. Depending on how long this takes they will be returned either Monday
at lecture or Tuesday at the review. We apologize for the delay, a miscommunication among the staff prevented their return by today.
Be sure to attend the final two lectures. Tomorrow, Prof. Wawrzynek will cover parallel programming and HKN will collect course reviews. On Monday
Greg will be giving a mystery lecture to wrap up the semester.
Grading Status Updates
- All quizzes have been graded.
- All autograded homeworks have been graded.
- Proj5 will be autograded after Saturday 12/8 at 2:45pm to accomodate people with slip days to use.
- Any issues should be e-mailed to the person listed on the Grading Status page as being responsible for the assignment.
- We're hoping to distribute exam2 results this weekend, and return exams early next week. We apologize for the delay.
A number of people are still unclear and justifiably worried about the
accessCount and LRU parts of proj5.
As such we've added a section entitled "AutoGrading Corner Cases" which contains answers to the most common questions. We've also updated the comments
yet again to reflect these notes.
Finally, as a few people pointed out the LRU scheme in our solution had a bug and definitely did not work correctly. Good catch to those students. In
addition, our solution was not properly initializing all the data words of the cache to 0 before running, again good catch to those students who noticed.
Keep an eye out for the next autograder run today at 2:45pm.
Proj5 Minor Update
For those people struggling to understand
accessCount and when it should be incremented to match the autograder,
we've updated the comments in
Proj5 Early Autograder
Given how few people actually managed to get something submitted for the early autograder run yesterday, we've decided to run it again on Monday 12/3 at 2:45pm.
Final Exam Time & Place
The final exam will be held Saturday, December 15th from 12:30-3:30pm in the Bechtel Auditorium. For those of you in
CS61CL, contrary to BearFacts, your final is the same time and place as the rest of the CS61C students.
If you are confused as to the difference between 1MB (1,000,000B) and 1MiB (1,048,575B) you may wish to read this:
Wikipedia: Binary Prefix. We will be lenient on the different when grading this quiz,
and we will be more clear (as you should be) in the future.
We updated some of the comments in
memory.h both to fix typos left over from old
versions of the project, and to explain some of the struct fields a little better. In particular, the least significant bit of the
cache tag, should appear at the least significant bit of the
tag field, in order to avoid autograding problems.
Final Exam Review
We now have a time and a room for the final exam review. We will post the actual final exam room shortly.
As always, let us know about conflicts or problems ASAP.
Proj5 Early Autograder
We apologize for the late announcement, but we will be running the proj5 early autograder Friday 11/30. Submissions before 2:45pm will
definitely be processed, but we make no promises about later submissions. As before, any bugs in the autograder will result in a second
run, most likely on Monday 12/3.
Proj4 AutoGrading Update
During one of the autograder rebuilds, some files got left behind it would appear, resulting in the
being run twice, once for 1 point and once for 2 points. We have corrected this and are re-running the autograder as of noon today.
You results and score shouldn't change by much.
There was a small error on line 18 of
proj5.c. The code
struct row * should have been
struct set *, we missed this as we updated the project from past semesters.
Project regrade requests for proj3-5 must consist of a list of the files, the line numbers within those files and the changes you
wish us to make to those files to bring your submission in line with the autograder's expectations. Regrade requests of the form
"can you look at my project" and "can you explain the autograder log to me" are not acceptable. We will, however, be more than
happy to talk to you during office hours to help you formulate an acceptable regrade request. Figuring out how to make these
requests and what changes you need to make is actually a great way to study for the final exam in this class.
For those of you under a rock, Thursday and Friday this week are U.C. Berkeley holidays. That means no lab tomorrow, Thursday 11/22,
no office hours and no lecture on Friday 11/23. There is lecture today, Wednesday 11/21 and then again Monday 11/26. Enjoy your holiday.
There are a number of grading updates as we shuffle things around to compensate for the issues caused by losing a reader. We'd like to apologize yet again
for the inexcusable confusion this has caused in the grading process.
Note also that we have posted regrade deadlines for all of the assignments which have been or will be autograded. As we get more
human read assignments back to you, the regrade deadlines for those will appear.
- HW8 will be AutoGraded.
- HW11 will be AutoGraded.
- Proj3 has been regraded (in progress as of 9am 11/21) to account for slip days. There will be no human reading of this project. Regrades should go to cs61c-ta.
- Proj4 has been regraded (in progress as of 9am 11/21) to account for slip days and to fix a couple of minor autograder bugs. Regrades should go to cs61c-ta.
- Proj5 will be AutoGraded only.
No regrades submitted 12/13 or later will be accepted for any reason whatsoever.
HW11 Posted & AutoGrading
We've posted HW11 which will be due the week after Thanksgiving. Please make sure you conform to the
template.txt file, as we will be autograding this, in the hopes of helping to catch up on
Proj4 Graded (Updated 11/20/2007)
There was a bug in our solution processor causing it to ADD instead of OR for the
instruction. This appears only to have affected the
matrix test. We are currently re-running the autograder
to account for this, and any slip days you may have used. You log e-mail may take up to 24 hours to appear.
In an effort to deal with the fact that we've had 1/3 as many readers as we should have for much of the semester, we will only autograde
Proj5, no reader will be involved (they're busy with homeworks
and earlier projects). Please check your
e-mail and glookup. Regrade requests should be sent to
cs61c-ta. Aside from obvious autograder mistakes,
if you failed a wide variety of tests (for example because
lui didn't work properly) and you can fix this in
only one or two lines of code, you should include those changes, and what line numbers in what file to change. We reserve
the right not to accept changes we deem, too large, but this may help you get points back. Deadline for these requests is 11/28.
For those people who used slip days, they will be applied, give us a day or two to do it though. Consider also letting us
know why you used a slip day, by posting to the newsgroup. Many people used them for this project and we'd like to know:
was it too hard or
did it simply overlap with midterms and projects from other classes? Most people we've heard from said the latter.
Proj5 (Updated 11/14/2007)
The files and description for proj5 should be fully debugged, as we have completed our solution.
We've posted proj5. It will be due 2:45pm on Wednesday 12/5. Please note that we have not yet
finished our solution, and there may be some updates forthcoming in the next few days. Please
be sure to report any bugs you find in the assignment on the newsgroup.
Grading Status Update
Okay, so we've gotten another reader, and we're working to clear up the grading situation. In particular one of our readers
dropped off the face of the earth for a month and still hasn't completed any real grading. We're doing our best, so please
All of the quizzes to date have been graded completely. Many people's proj2 have been graded, and we're working on proj1 and proj3.
Our new reader will be helping to clear the homework grading backlog.
We will be getting all grades back by 12/15 (the final) or heads will roll. All regrade requests of any kind must be submitted by 12/15, except
for those assignments which are not graded by that deadline, for which we'll come
up with another policy. Please submit the request to whoever actually entered your
grade first, and in the event of no response contact your TA.
Exam2 (Updated 11/14/2007)
The exam2 review will be held 4-7pm in 2040 VLSB.
We've posted some basic information to the new Exam2 page. The exam is a week and a half away!
In particular the second Midterm will be held on Tuesday, November 20th, 2007 from 7-9pm in 2050 VLSB,
the same room the lectures are in. If you have a conflict it's quite late to notify us, but
much better now than a week from now.
Proj4 Blocks Update
The way our that
Block.s printed information cause many people with excellent proj4 implementations
to fail several autograder tests. We have updated
Block.s, and will use the updated version
for the next early run, mentioned below.
Proj4 Early Autograder
The first early autograder run is complete, and you should be able to see your results.
Please report any suspected bugs in the autograder ASAP. We will re-run the early autograder
not before 12am (midnight) Friday night. Results should be availible early on Saturday.
Proj4 Early Autograder
(Update 8:30pm 11/7/2007 & 10:30pm)
We have gotten the autograder running. Results should appear
in your inbox in a few hours. It is still very likely that we will re-run the autograder on Friday after 2:45pm.
As of now, the proj4 autograder
will not run properly on the instructional cluster. We are working with
instructional support to resolve the problem, and we hope to be able to run the autograder
by Friday during lecture.
Submissions received by 2:45pm Friday 11/9/2007 will be autograded and results should be
availible later that evening. Our sincerest apologies to anyone who rushed to meet the
If you submit your proj4 solution, however partial it may be, by 2:45pm Wednesday 11/7/2007,
we will run a partial autograder on it, and send you the results. We will probably not
be able to return results before 7 or 8pm as running ModelSim on many projects may take a while.
The cutoff of 2:45pm is to strongly encourage everyone to attend lecture that day.
As a note, if significant bugs are found in the autograder, we will re-run it Thursday around 3pm.
Quiz27 Solution Update
It was pointed out to us that our solution to Ex1 was wrong, and that the solution
to Ex2 needed some explanation. We've updated the solution to compensate. We apologize
for any confusion.
We have added a number of helpful notes to the Proj4 description.
Nothing major, but if you find yourself confused consider refreshing the project description and
checking if we've already answered your question.
There were some minor typos in the comments of
Blocks.v. We've fixed them.
There was also a small bug in how
BreakCodes. We have
fixed this too.
HW8 & Verilog Circuit RulesTweaks
In response to some last minute questions (we suggest you start a little earlier next time) we've clarified a few
points of HW8:
- HW8 Ex1: You may only use primitive gate instantions in your code.
- Verilog Circuit Rules: we have added simple explanations of the three subsets of Verilog, and general rules about when you may use them.
We wrote the solution to proj4, and in the process tweaked a few minor things about the project.
Below is a list of changes you might be interested in. If you haven't started the project yet, don't bother reading this list.
- We added a note to the effect that you may freely change the interface of the
Control.v module (but you shouldn't need to change any others,let us know if you feel otherwise).
- We added a 1bit register to the
Blocks.v file for those who might want it.
- We've added a hint to the effect that your first test program should test nothing but the break instruction.
- We noted that proj3 and proj4 implement nearly identical instruction sets, which you might find useful during testing.
- We've fixed a number of small bugs in the given code, from reordering the ports for
Control.v to fixing a few typos in
- We will be running the autograder (or a subset thereof) at least once before
the deadline allowing you to see your results and get in some extra debugging.
We are aiming to do this on the evening of Nov7th more details as follows.
The more or your processor you've completed by then, the more useful your results
We ran quite a few autograders this evening: quiz23-25, hw7 and proj3. You should check the
Grading Status page, and contact cs61c-ta@imail if there are
any autograder mistakes on quiz23-25 or hw7. As usual major autograder mistakes on proj3
should be reported to cs61c-ta@imail, but slip days and full grading will be accounted for by the readers.
In other news at least some of the reading situation is being sorted out slowly but surely.
Verilog Circuit Rules & Green Card
We've split up the "Verilog Crib Sheet" into the Green Card, which is a short
reference and the Circuit Rules, which detail
the things which will not be allowed in CS61C. Note that the Circuit Rules
may be further restricted on certain homework, project or exam problems, but we will be very clear about this. If you are ever
in doubt, feel free to double check with us.
We've shifted the lecture schedule listed on the calendar so that it matches reality over the last few weeks.
We updated the
Block.v file for proj4 to ensure that the register file will
work properly when a register is read and written on the same clock cycle.
For proj4, we have updated
mars-cs61c. In particular you will find that there is a new dropdown
next to the
Save Dump button. This dropdown selects the format of the dump file.
should be used for proj3 and
Hex Listing for proj4.
The instructions in both projects have been updated accordingly.
We've finally posted proj4. In order to bring the project and lecture schedules back
into line, we're making the following deadline changes:
- proj4 will be due 11/14/2007 instead of 11/7/2007.
- proj5 will be due 12/5/2007 instead of 11/28/2007.
- quiz25 will be due Monday 10/29/2007 instead of Friday 10/26/2007.
Verilog Crib Sheet (Updated 10/29/2007)
We've separated and renamed the two components, into the
We're created a Verilog Crib Sheet,
which we hope you'll find helpful. In addition to being a short, printable resource which
you might use on an exam, it is the definitive reference on which constructs are allowed in circuits, and which are restricted to
testbenches. As with
all such resources you'll find a link to this on the Resources
Assignment Deadline Extensions
The three assignments due today, 10/24/2007 at 2:45pm have been extended due to the number of random technical problems
on the instructional computing machines. Please use
glookup -t to confirm your submissions have been logged, just in case.
- Quiz24 & Proj3: Both have been extended to Wednesday 10/24/2007 at 7:45pm (same day, just 5 hours later). Note that proj3 slip days will still be computed
from the normal 2:45pm deadine.
- hw7: Extended to Friday, 10/26/2007 at 2:45pm (48 hour extension).
Proj3 Updates (Updated 10/24/2007 11:15am)
One enterprising student discovered a weird bug in
sim.c that seems to only
appear when testing your project using the Microsoft Visual Studio C libraries (not gcc on the instructional machines)
it turns out we were opening the
.dump files as if they were text!
sim.c has been updated.
If this causes a problem with your project somehow, relax, and don't waste a slip day. Let us deal with it during grading instead.
We have posted the output from our proj3 solution while running
sample.dump, for those of you
who are paranoid about formatting errors. It is availible
sample.output in the project files directory.
There is a post below which mentions that you should check for
accessing memory illegally, but the truth is that any memory access should be checked. However, you needn't check for
PC because the code in
computer.c will do this for you as it calls
contents() to get the instruction from memory (line 64).
Grading Status Page
Rather than answer questions all the time, we've created a grading status page to let you know
how the readers are doing with your assignments. There are some questions marks as the information
gets pulled together properly. We're hoping to improve on this dismal situation quite soon.
Exam1 Grades (Updated 10/23/2007 7:45pm)
Exam1 scores have been entered into glookup, and grade breakdowns mailed to your
course mailbox. Regrade request deadline is 11/2 (no exceptions), instructions are in the e-mail. If you
have not received a grade breakdown e-mail, send mail to cs61c-ta (Greg Gibeling) ASAP. We have also posted
summary statistics (mean, standard deviation and histogram) to the Exam1 page.
The answers, and grading key have been posted to the Exam1
Barring unforseen problems exam1 grades will be in glookup tomorrow along with an e-mail to your
course account showing your grade breakdown. Paper exams will likely be returned in lab on Thursday,
at the end of your lab section. This news item will be updated as we know for sure.
Proj3 Error Message (Updated 10/23/2007 10:30am)
It was pointed out that our
files illegally accessed memory in a way which would likely overwrite
$0. We've fixed that.
We also added an alignment check to
In the event that a
lw instruction accesses memory which
does not exist you should display exactly the same error message, and call
as in the recently updated
contents() function in computer.c.
Lab8 & HW7
Because we cut the parallel sorter exercise from lab8
in order to reduce the length of the
lab and allow people to focus we have made that exercise into HW7. This homework should be
very easy after you've completed lab8 and we will be grading it very loosely: any reasonable attempt at a solution will be accepted.
intended to give you more practice with Verilog and ModelSim and give you a chance to
setup up ModelSim from home if you intend to use it for proj4.
ModelSim Tutorial (Updated 10/18/2007 8:00am)
We made some minor edits to the tutorial, including listing the
sections which you need to read (see the introduction) and fixing the website URL, which
has since been bought by an company unrelated to ModelSim
We have posted the tutorial for ModelSim to the
Resources page, the Verilog simulator which you will be using on
Thursday in lab. You may wish to wait until after lecture tomorrow, but you should read this
tutorial before coming to lab, as it will save you time to have even glanced through it.
While reading: you don't not need to know anything about RDL or Xilinx libraries. This
tutorial is more widely used than this class.
The first midterm for CS61C Fall 2007 will be held tonight Tuesday 10/16/2007 in 155 Dwinelle
from 7-9pm. Seating is assigned, so be prepared to come 5min early, and bring your Cal Student
ID card with you.
The midterm is open book, open notes and you may use any written material you like during the
test. Electronic aids of any kind of strictly prohibited. The midterm will cover material
from the start of class through lecture on 10/5/2007.
Proj3 Update (Updated 1:00pm)
There was a second fix to this line, and we've improved the
notes in the project description about the exact ouput from disassembled by giving a short example.
We've made a minor bugfix to line 101 of
order to avoid segfaults when using the
-m command line option. The two base
addresses on this line have been changed from
Please make sure you have the latest version.
Quizzes, Reading & Schedule(Updated 10/14/2007 8:30pm & 10/15/2004 1:30pm)
The reading has been adjusted yet again. Quizzes 21 and 22 will be
up as soon as we're sure we've got the material sorted out correctly. We apologize for the
changes, we're trying to improve this section of the course over past semesters.
We adjusted the readings for this coming week. In particular
there are a few more for tomorrow, which you should try to get through. Obviously we're
posting them a bit late, and there's a lot, so you may not get through them all before
We've updated the lecture schedule, reading lists and posted the quizzes for next week.
We apologize for the last minute change, but we miscalculated lecture positions before
the semester started, there is a lot of information to be learned next week and
it's important for us to get it right.
Proj2 AutoGrader & Network Outtages
Some off confluence of events on Thursday appears to have left some of the autograder files
in an odd state, and our re-run that evening 1) had errors in the test output and 2) did not
regrade all students. Rather than worry about how and why, we're rerunning the autograder
now. Sometime tomorrow or Monday please double check that 1) you received an e-mail from the
autograder, and 2) the autograder test cases are behaving properly.
Proj3 Update (Updated 10/13/2007 10:00am)
As a student pointed out to us, you'll need to manage the memory
for any string returned from
disassembled(). We've added a note to the webpage
computer.c for project 3, it had a bug in it which basically guarentees that your
project 3 would not run. As a consequence it's a fair bet that few people have started project 3. I assure
you that the solution material for project 3 will be covered on the midterm.
In order to actually have time to properly grade homeworks and assignments, and to get assignments back
sooner we will no longer be automatically reviewing imperfect quiz scores. Quiz16 and later will be autograded
and we will only review your score if you have a specific complaint, and can explain why you deserve points back.
Above is a link to the exam1 (e.g. the midterm) webpage. Please read it before you come to the exam.
Furthermore if you would like to request that the Friday review cover certain topics, please post to
the course newsgroup. The more such posts, the better the review will be.
Project2 AutoGrading (Updated 10/11/2007 4:05pm)
We are re-running the autograder. You will receive your new
score in ~18 hours as the proj2 autograder takes quite a while. The re-run
is because the
test.1.hex_over.out file generated by our solution was wrong (the
solution had a bug) and because we forgot to test for certain register initialization
conditions: namely that you initialized registers properly before use. Many
scores will go up because of the first, and a very few will drop because of the
Project2 has been autograded, and the results have been sent to the readers. It's unlikely you'll
see reader adjustments before the midterm. Rest assured, as you examine your score, that everyone
did pretty poorly on proj2. Our solution is the only implementation to get a full 8/8. Below are
common mistakes which will result in an adjustment of some kind:
Below are common errors which will not result in changes by your reader:
%x take a pointer to the data instead of the actual data as the argument.
- Calling or jumping to
onedig, or any other given code. You were to write your own solution, copying would have been okay.
- Forgetting to save some of the
- Overwriting the pre-guard, which is before the output buffer.
- Overwriting the after-guard, which is after the output buffer.
- Forgetting a null terminator on the output.
- Off by one on the number of characters output (e.g. the output count shouldn't include the
- Arithmetic exception because you used
add instead of
- Not handling any of the error cases we listed in the assignment.
Project3 has been updated to explain what to do when
disassembled encounters an unsupported
instruction (it should call
exit(0) to exit), and we have updated the code in
proj3.c slightly to match. We have also reinforced the need
for you to format your output precisely as specified, otherwise you will lose points.
MARS Update (Updated 10:45pm)
We patched MARS to recognize the '\0' and "\0" escape sequences.
We made a small update to MARS so that it can be used to run programs from the command
line without an X11 (GUI) server. This means that you can now type
for example, to run your project. This will work whether you have loged in at a terminal or using SSH.
You can check if you have the current mars-cs61c.jar at home by checking the file size against
~cs61c/bin/mars/mars-cs61c.jar. File size is a crude indicator of file identity. Furthermore
the latest revision was uploaded 10/9/2007 at 8:29am, so if your jar is newer than that, you're fine.
MARS Bugs (Updated 3:40pm)
Please make sure you are using
mars-cs61c, which is our modified version of MARS.
It includes some features (memory dump) required for proj3, and some bug fixes (PC relative branches
xori with 32bit values).
Furthermore, please post any suspected or known MARS bugs to the course newsgroup, or e-mail
Greg. Don't e-mail the MARS maintainers, they are unlikely to be able to help you very quickly,
whereas we can patch the code quite easily.
There was a second, related, set of bugs which our fixes introduced. If you
had trouble assembling immediate instructions with negative immediates, please close
We made some minor changes to HW6.
- The questions remain the same.
- To help try and get all the grades we can back to you ASAP, we're using
quiz-style autograding (based on template.txt).
- We have added several hints and clarifications, in an effort to avoid confusion.
Proj1 Grading (Updated 10/1)
I'm getting tired of saying this, but proj1 was autograded
a third time. At least one of the test files had been corrupted. It
is unlikely that this re-run will significantly affect your score.
We re-ran the autograder last night, and as always if the comment for your score says
"a reader will review" then it's quite likely your score is too low, and a human will
look over it. Please relax about your score until that message changes.
There were two common causes of low scores, all of which will be corrected by readers:
Furthermore, please do not be alarmed that your project has memory leaks. All solutions
do because there is no
- You allocated the name for the root node statically (a constant instead of malloc). This
is fine, but will cause the autograder to give you 0/8 because it's a little stupid.
- You used different error messages than the oracle. This is fine, but again the autograder
isn't smart enough to know that.
exit command, and thus no chance to free all memory.
The trick is that you should have the same number of leaked memory blocks as the oracle.
You can see the memory leak tester code at
In response to some of the errors, and inconsistencies students have found in the course textbooks
we have created an Errata page. It will contain a listing of all those
problems which we cannot actually fix (bugs in code we don't have source, or errors in textbooks).
Please let us know if you believe you have found things to be added to this list.
A few students tried to get clever about the quiz13 question2, by using MARS to
generate the machine code, instead of doing it by hand, or perhaps just to check
their answers. Unfortunately, MARS had what we in this class will consider a bug
in how it converted branches to machine code. The resulting program would run correctly,
but the hexadecimal machine code representations of branch instructors were wrong. Full
details would involve a description of "delayed branches" and can be obtained by asking on the
In order to fix the bug, we have installed a second copy of MARS on the instructional servers
mars-cs61c, in which this bug is fixed. Running
run normal MARS, as downloaded from the
MARS website. Running
mars-cs61c will run the version with our bug-fixes. You can download our version
to your computer at home, from
~cs61c/bin/mars/mars-cs61c.jar. Please post
any questions to the newsgroup.
Project 2 Slight Fix
There was a bug in the
snprintf.s code we gave you.
Line 73 should have been
addi $t0,$0,-39, rather than
(notice the negative sign on the constant?). You can either download the new version or just
make the change yourself.
PS: If you download the new file, and have already modified yours, the utilities
patch might come in handy, if you don't feel like trying to copy-and-paste
all the changes around properly. It's totally up to you though.
Midterm 1 Review Session
We have a time and a place for the midterm1 review session: Friday, October 12 4-9pm in the Woz, the Wozniak Lounge
430/434 Soda Hall, right after class that day. You can see this event on the
Calendar page. You should have most, if not all, assignments graded and back
to you by then, we hope.
Autograder E-mails (Updated 9/26)
We have finally sent all the autograder reports to your course e-mail addresses.
You can use
pine on the instructional servers to read your e-mail
and see which test cases passed and which failed.
Alternatively you can set up
.forward file so that all future e-mail is forwarded to
another address, simply put the address to forward all your mail to into a file
~/ under your account.
You can find more information about
e-mail setup here,
including spam filtering!
Proj1 Grading (Updated 9/26)
We finally ran the autograder for proj1. Most people didn't get full credit. Keep a few things
in mind before you get indignant:
- We grade hard.
- Your error messages might not have matched ours, this is fine and will be adjusted by the readers.
- Projects have slip-days (see the Info page) a zero for lateness will be double checked by the readers, and your slip days used instead.
- Don't bother worrying too much until the reader adjusts your score (if necessary).
- If you think your score is too high, let us know ASAP, first person to report a problem like this will keep their "too high" score.
- We forgot the test for memory leaks, and will be re-running
this autograder on 9/29, your score may drop a bit if you have memory leaks
We caught some bugs in project2 shortly after posting it, namely we hadn't finished updating
it to use the MARS MIPS simulator instead of the old SPIM simulator. If you downloaded
a file "snpf-main.s" from this site, please delete it, and go get the new "snprintf.s" instead.
Project Slip Days
We just wanted to remind you that you have a total of 3 project slip days to use this
semester. Check the course Info page for the details.
Proj1 Oracle (Updated 3:30pm)
There was yet another bug in the oracle, in that the move command did not track parent pointers, when
moving a file to a subdirectory. Making automated test cases out of these bugs would be
a good idea.
Diligent students continue to find bugs in our project1 oracle. For example
mkdir a followed by
mv a a would result in the subdirectory
a actually moving into itself, and thus
disappearing. The oracle now prints an error instead, as your code should. Our deep copy was not properly
setting the parent pointers, leading to some behaviour while using
cd in a copied directory.
Finally, we had yet another string handling bug in dirmain, which meant that if you hit
on an empty command line, the previous command would be re-run. All of these have now been fixed. Our
apologies for all the problems.
Instructional Computing maintains a number of servers.
The main server for the course is
nova.cs.berkeley.edu, but since that is often
heavily loaded, we suggest that you use others when you can. Any of the sun/solaris servers
on that list will run all of the course software properly, including precompiled code which
we distribute. The intel/solaris servers are the second choice, and should be mostly the
same, though they will not run our precompiled code. The rest of the servers are quite useable
but you should test your code on one of the solaris servers before handing it in, just to be
You should also feel free to used cygwin to work on your
windows machine at home, or, of course, any linux machine or Mac will already have most
tools installed. Again be sure to test your code again on one of the solaris servers, before
submitting it. C code, unlike Java, can have bugs (buffer overflows and pointer mistakes)
which do different things on different machines, like crashing on one, but magically working
on another. The only way to avoid this is to fully debug your code, and test it.
Autograding Info (Updated 9/13)
To stem the tide of confusion, we've updated the autograding policy. In the future, starting
with quiz7, everyone will receive a grade at the same time. Those which need review by a reader
will be marked as such in the comments. We've updated the info page to match. We apologize for all
the confusion, we hope this will stem the tide of questions like "why don't I have a grade for xxx".
We've added a description of how the autograding process works to the Info page.
We apologize for not making this clear earlier.
We cannot stress enough that a blank score, or a
score with a comment "a reader will review this" means that your grade is not yet set in stone. Please
don't bother asking us about it until you have a score, and the comment does not mention a need for
review by a reader.
Projec1 Oracle (Updated 5pm & 9:40pm)
There was a second bug in our solution, whereby copying an empty directory would result in a segfault.
Thankfully we caught it before anyone noticed.
There was a bug in our solution to the project, running
cp existingdir newdir would copy
the directory, and only the first file within it. Good catch to those students who noticed it. Please
let us know if you ever see bugs in our solutions.
We have released a compiled version of our project 1 solution. You can use this
to check on the proper behavior in the event that our project spec is wrong. also use this
to test any automated test cases you develop for your project. We apologize for not
releasing this sooner.
This version will run on nova.cs.berkeley.edu, but not your home computer. Sorry.
Quiz4&5 Regrades & Late Quizzes (Updated 12:30pm)
The autograder for quizzes 4 & 5 was seriously brain damaged, and accepted some very wrong
responses and probably gave some very wrong grades. Quizzes 4 & 5 have been regraded.
Thanks to the student who brought this mistake to our attention.
Having to regrade these quizzes means that every has a grade now for quiz4 & quiz5. If
you have a grade of 2, your score will not be examined unless you wish to complain or point out an
If your score is less than 2, a reader will examine it.
Normally you would
not have been assigned a score of less than 2 until a reader had examined your submission.
The first student to report receiving a grade higher than they deserve, will keep that high grade,
as an incentive to report grading errors quickly.
Students who submitted a late version of any quiz have received 0s. A reader will review this
to check if you submitted an on time version with a correct answer, in which case you will
receive credit for your on-time version.
Please use the course newsgroup to ask general grading questions.
Quiz Solutions & Grading
We've posted solutions to all the past quizzes on the Calendar page, and
we've started autograding all submissions. If you don't yet see a score for the past quizzes
when you run
glookup it means that either you didn't get the right answer and we're
going to check if you need partial credit, or we couldn't figure out how to automatically grade
your solution, so a human will assign your score shortly. If we misgraded your quiz (gave you 100% when
you got it wrong), please let Greg know ASAP.
Connecting to the Newsgroup
Instructional Support Group has an excellent, and quite comprehensive
tutorial on connection to the newsgroups here
on campus. If you use a UNIX based reader on your class account, make sure you set the name you post under to
be your own, otherwise all of your posts will appear to come from "Class Account", which makes it rather hard
to follow a discussion. You can check your name with
finger | grep <login>, your name is
the "In Real Life". You can change your name by running
ssh update and changing your
Alternate Debugger: ddd
Adam Megacz kindly wrote up a tutorial on the
ddd debugger, which you might find more or less useful than
gdb. You might want to spend a few minutes playing with
ddd to find out.
Testing: We added notes about how to run automated tests against your project, such as the kind you wrote for homework #2.
Example: We added an example transcript of commands and their responses as you would see them when running the project to help clarify the spec.
We've added a slight clarification to the
cp command details: "Checks to ensure that the move does not replace an existing file."
For those of you with quick eyes or a stale browser cache, we've updated the location of some of the files
on this website. We updated all the links we could find, and everything should be put back together.
If you have any website troubles, e-mail
cs61c-ta <at> imail.eecs.berkeley.edu.
Proj1 Buffer Overflow
dirmain.c contained a buffer overflow error. You probably didn't even notice it on
the instructional machines, but it may have caused problems on other systems, or other C compilers.
We'll discuss this class of errors, and the specific error in discussion next week, since it's a common
mistake. For now, get the updated
dirmain.c, and don't worry too much about it.
When you submit a quiz, your submission should consist of exactly one file (
and no others. You should fill your answers into
template.txt. Any other files in your submission will
be completely ignored for quiz4 and later, though we will be lenient for quiz3 and earlier and go the extra mile to try
and figure things out. If you have submitted quiz3 using a different filename for some reason, please go back and
resubmit. A note about this has been added to quizzes 3 and 4.
Remember: one file,
template.txt, containing all your answers, no other files.
All of the GSIs have now posted their office hours. You can find them on both the Staff and
Project1 Due Date
We have moved the project1 deadline to 9/19/2007, mostly so that we can give you more homework and labs to help
get everyone up to speed and ensure things go smoothly. We'll also be adding a list of the tests you will
be expected to pass to the assignment shortly. Feel free to get started early however, as the projects will
be densely packed in the middle of the semester (see
There were a few typos in the web page for HW1,
first the source code for bitcount.c had some minor typos (the
actual file was okay, but the listing in the assignment web page was wrong).
Also, we forgot to mention that you are not allowed to use arrays or strings in
exercise 2, we've added a note about that.
Accounts, Quiz1 & Clickers
For those people who were unable to get accounts yesterday, we will have account forms today after lecture.
As a result of this and for the people who have been having trouble with submit, we will be pushing the Quiz1
deadline back to 7pm tomorrow, meaning you will get a chance to submit during lab. That way your TA can help
if things go wrong.
Greg will hold some impromptu office hours outside the back of 2050 VLSB after lecture, to distribute account
forms, deal with any odd CPS clicker problems and answer your various questions.
Please also consider taking a look at the Info page and the course newsgroup (see the
Resources page) to answer your questions.
HW1: has been posted to the Calendar page and is due 2:45pm before class on
Wednesday 9/5, no late credit, no exceptions.
Quiz1: has been fully posted to the Calendar page, including submission instructions
and is due 2:45pm before class on Wednesday 8/29. There has been some confusion on the difference between pre-lecture quizzes
which are submitted using your cs61c-** account, and the in-class peer instruction questions using the clickers, the Info
page is a good place to find this kind of information.
Lab1: has been posted to the Calendar page. You should read it over, and make
sure your account works before thursday's lab. In particular you may want to read some of the EMACS and GDB tutorials on
the Resources page before lab, as that will save you quite a bit of time. Notice that the
Calendar has tutorial sessions listed for Wednesday, Thursday and Friday this week on logging in
EMACS and VI. These are run by CSUA and are strongly recommended for those unfamiliar with the tools we use.
The e-mail addresses on the staff page were slightly incorrect (cs61-ta instead of cs61c-ta) and have been fixed.
Gen1 CPS Keypads
The slightly older generation 1 CPS keypads should work just fine for this semester. Please make sure
to register yours before lecture tomorrow, as we will be using them for the first time.
Reading & Quiz Changes
We've added sections 5.1 and 5.2 of Kernighan & Ritchie to the reading list for wednesday, and swapped the
order of the first two quizzes to better match the lecture and first lab. We apologize for any confusion this
may have caused.
To participate in the in-class peer review questions, which you must do as part of your participation grade, you
will need to enroll your CPS response pad using the einstruction website. Simply follow
the class key is "K32356C544", and the
class name is "CS61C". Note: please do not enter your actual UC Berkeley Student ID when
prompted for a student ID, instead enter the last two letters of your class account username. For example,
cs61c-ta would enter "ta" for their student ID on the einstruction website.
The First Week
For the first week of lecture, we expect you to have purchased both of the textbooks
(see above left), and a CPS-RF transmitter which you can get from the Cal Bookstore.
There will be lecture, discussion and lab during the first week. We will also
be handing out the first homework and project by Wednesday, so be prepared to get
started early. There is reading for the first discussion section, but not
the first lecture. We will cover all of these announcements in the first lecture
for those who have not read the website, so feel free to ask questions then.
Note also that the first two lectures will be given by the Head GSI,
Greg Gibeling, because Prof. Wawrzynek
is out of town. As such, Prof Wawrzynek will not be having office hours this week,
and you may wish to direct course questions to Greg.
Welcome to the CS61C website for Fall 2007. Above, you will find links to
all the major course related pages. We're still adding content to the site, particularly
the calendar. In the meantime please read the course information
We expect you to check this webpage often, we will assume you
have seen any announcements within 24 hours of their posting (news about exam or assignment
changes in particular).
Any problems with this site should be reported to your Head GSI, Greg Gibeling.