Derek McAuley


Lecture notes for G54ARC

This course is Advanced Computer Architecture and presumes existing knowledge of basics in computer architecture,  logic, machine code and compilers. This should fit year 3 CS or year 4 ACS students or master's students with significant existing knowledge of the low level design of computing or electronic systems, including: fundamental of computer archietcture, compilers (particularly code generation) and operatings systems. If in doubt discuss with the Module Convenor before signing up for this course as several students were ill-advised last year as they had insufficient background to suceed in this module (see marks distribution below).

Textbook: Computer Architecture: A Quantitative Approach, 4th Edition (Oct, 2006); Hennessy and Paterson' you might want to check this out before committing to this course!
You need the PPT as there are animations in the slides!

Previous exams

Practical work

1. MIPS and pipelines: There is a great animated MIPS tutorial provided by Dr Jeremy Jones of  TCD School of Computer Science. It shows examples of the single cycle MIPS and provides examples of hazards, interlock, delayed branches in the pipelined version. Work through the tutorial and aim to answer the questions at the end. The Vivio plug-in requires a WIndows PC; it needs to download and install an ActiveX plugin.

2. Memory: Cache effects are easy to experiment with on modern computers - just run some software and time it! Look at Igor's blog on cache effects. Write some simple programs that investigate the cache on your computer - do example 2, 3 & 4 from Igor's blog; plot the results; then see if you can detect the size of your caches on your processor. Check by looking up your processor model online!

On Linux you can "time" your command and note the user time. If progamming in C just call getrusage() and figure it out from the user process times or in Java on Linux you could call a native method (using JNI) to get the times. Windoze is suckful in this regard but a bat script with echo %time% before and after will give you some semblance of the Linux time command. You can also try system.nanoTime() from Java, and pray the prorgam is not preempted :-) (Run repeatedly and take minimum time.)
See if you can explain the following from my machine (spreadsheet, progam output):

Machine spec
Example 2
Example 3

Other resources

Unsurprisingly for MIPS32 architecture why not look at http://www.mips.com; lots of material online - perhaps you might want to glance at some of the manuals on the MIP32 architecture page.

QtSPIM is a great MIPS simulator from James Larus that now runs on Windows, Mac OS X and Linux. Serious code can be written and executed on this.

Thanks

With acknowledgements to colleagues at UC Berkeley and MIT, I am basing this course on their material. I include the full set of slides given in Spring 2010 at UCB for reference. These US courses presume much deeper electrical and electronic engineering background, and their lectures are substantially longer, so plenty of material has been removed, but the full set of slides may interest the enthusiast.... look here.