CS462 Computer Architecture and Design
Announcements
- Stay tuned to my weekly schedule
for office hours during Finals Week.
- The last homework assignment has been posted below.
- The due date for the final project has been extended to
Tuesday, May 1 at 4 pm.
Old announcements
- My office hour on Wednesday, April 18 will be from 3 to 4 pm,
instead of its usual time (2 to 3 pm).
- Extra office hours for CS 462 students: Tuesday, Apr 17,
9-10 am and 4:30-5:30 pm; Wednesday, Apr 18 from 8-10 am.
- Answer keys for the problems from chapter 4 and appendix C can
be found on weberklinuxfac in the folder
/home/weberk/cs462s2012shared.
- Here are the problems you should work on to prepare for the
test over appendix C (sections 1-5, 7 and 8) and Chapter 4
(sections 1-6):
- Do the Check Yourself
problems in all the covered sections first. These have
answers given at the very end of the appendix. Then work
on the individual problems listed below.
- Appendix C: problems C11, C12, C 18-20, C35 and C36.
- Chapter 4: problems 4.1, 4.4, 4.9 (except 4.9.6), 4.11, 4.12
(except 4.12.6), 4.13, 4.16. For all these problems,
where you are supposed to work with values from a table,
always choose option a.
- Attendance at Presentation Session I (all of it) in T
& H 100 at 10 am on Scholar Day (Apr 17) is worth 5
test points extra credit. Be sure to check in with me at
the session.
- The PowerPoint slides for chapter 4 are available on
weberklinuxfac at
/home/weberk/cs462s2012shared/chapter 4
the processor.ppt.
Read sections 1-6 of Chapter 4.
- Test 2, covering Appendix C and material covered in Chapter 4,
will be on April 18.
- Here is a sample test to
help you prepare for Test 1 on Wednesday. Note that, although the sample
questions dealing with chapter 2 material have been copied
directly from the sample quiz, different questions from chapter 2 from what
appeared on the actual quiz and what appeared on the sample
are not only possible, but highly likely.
- The project specifications are now posted below.
- Read appendix C.
- The PowerPoint slides for chapter 3 are available on
weberklinuxfac at
/home/weberk/cs462s2012shared/chapter 3
arithmetic for computers.ppt.
- The final exam will be replaced with a final project, as per
class consensus. The syllabus has been modified to reflect the
change. Stay tuned for project details.
- Test 1 will be on Wednesday, March 21. It will cover
chapters 1-3.
- You should be reading chapter 3 now. We will be working
next in Appendix C, which is on the CD.
- Office hour on Thursday, March 1, will be moved from 1-2 pm to
3-4 pm.
- Class for
Wednesday, Feb. 22 is cancelled. Please use the time to
work on the bubblesort.s exercise due next
Wednesday. Also do problems 3.3.1 a b, 3.3.2 a b, and
3.3.3 a b to make sure you understand addition, and 3.4.1 a,
to get a start on multiplication.
- Office hour on Thursday, Feb 23 will be moved from 1-2 pm to
3-4 pm.
- Start reading chapter 3.
- Friday’s quiz will cover sections 2.1 through 2.10 of the
textbook, excluding the material on pp. 111-112 that covers the
case/switch statement.
- Please attend the Timken night
on Monday, Feb 13.
- A 3" x 5" card of notes will be allowed on the quiz. In
addition, I will provide a copy of the MIPS/SPIM
reference card.
- A quiz over chapter 2 will be given on Friday, Feb. 10.
See the sample quiz.
- The PowerPoint slides for chapter 2 are available on
weberklinuxfac at
/home/weberk/cs462s2012shared/chapter\
2\ instructions\ language\ of\ the\ computer.ppt.
- Read chapter 2
- Read chapter 1
Assignments
- Due April 18
- Write a Verilog module that implements the 1-bit ALU
diagrammed in Figure C.5.6 on p. C-29 of the textbook (on
CD). Create an ISE project that includes this module and a
testbench module that will test the design on all inputs that
make sense. Name the project cs462a4your_last_name,
so that you can hand it in by just copying it to //recluse/shared$/CSIS/WEBERK/Handin/CS462.
- Due Feb 29
- Modify bubblesort.s
(you can find it in the folder M:\CSIS\WEBERK\Handout\cs462s2012\Bubblesort)
so that it will read in up to 100000 integers, sort them, and
print them out in order. Also, "inline" the
swap method
and remove the code for swap completely.
Try to make the sort method as efficient as
possible when you inline swap.
- Due Feb
3 Feb 6
- Write a MIPS program that
can be executed in SPIM that reads in a sequence of (signed)
integers, until either a 0 or a 1 is encountered. If 0,
the program should print the sum of the numbers, and if 1, the
program should print the product.
- Due Jan 25
- Work in pairs to translate
the C++ program sum2.cpp into MIPS
assembler, making sure that it executes properly in
QtSPIM. Send me the assembly program by attaching the
file to an email message to me. Send me just one file
for the team, but make sure that the assembly program is
documented at the top with a description of the program, the
due date, and the team members.
Examples
Resources
- Open this file in a web browser for directions on getting a
remote desktop to weberklinuxfac from a Windows computer in the
CSIS lab: M:\CSIS\WEBERK\Handout\weberklinuxfacRemoteDesktopDirections.html.
If you open it in Internet Explorer, you can click on the links
to the programs and they will actually execute.
-
Textbook Website (We may not be accessing this site
much. One thing that will be useful is a list of
corrections of errors in the textbook, which is called Errata,
is there.)
Project
All projects are based on the binary
gcd algorithm.
Form a team of two members. Choose one of the following
three projects; there can be at most two teams working on the same
project.
- Use Verilog to specify the functional design of a
combinational circuit that will take two 4-bit unsigned odd
integers as input and produce their greatest common divisor as
output. Use the Xilinx ISE to implement and test the
design.
- Write a MIPS assembly routine that implements the binary gcd
algorithm for 32-bit inputs. Also write a main method that
reads two unsigned integers from the console and writes the gcd
to the console. Test the implementation with SPIM.
- Write a test program that calls the iterative C routine
provided in the Wikipedia
entry for the binary gcd algorithm, which reads two
unsigned integers from standard input and writes the result to
standard output. Compile and test this program on
weberklinuxfac. Then generate the
x86_64
assembly translation of the gcd function (use the
-O2 optimization level) and hand-optimize it.
Name the new function gcd_as and assemble and link
it with the test program to debug it. Then write two
programs that can be used to call the two versions of the gcd
function repeatedly so that the speed of the two implementations
can be compared. Remember that the time
command in Linux/Unix can be used to time a program.
Teams and projects are to be decided by Monday, March 26.
Anyone not in a team with a project by that time will be grouped
into teams by me and given a project by my choice. Email me
the members' names and the choice of project. Projects will
be awarded on a first come, first served, basis. Remember,
there can be at most two teams working on the same project.
The final projects are to be turned in via email by 11 am on Friday, April 27
4 pm on Tuesday, May 1. Archive all pertinent files into a
zip or tar archive and attach the archive to the email.