Fall 2017 / DM548
Computer Architecture
General Information
Course introduction
The course introduces the student to the architecture of general purpose computers, from the logic level over the microprogramming level to the conventional ISA level; also major components in the storage hierarchy, bus architectures and the organization of pipelined CPU's are presented. In addition, the main aspects of a system programming language are introduced.
Topics Covered
The student will obtain insight into the organization of modern computers and their CPU's, in order to be able to compare and evaluate their performance on a level independent of the specific technology. More specifically the course provide the following competences:
- to understand basic logic diagrams, and to express the functionality of basic CPU components in terms of such diagrams.
- to express the functionality of an ISA level instruction by interpretation on an underlying (micro)architecture.
- to be able to interpret ordinary binary integer and floating point number representations, and to be able to convert between these.
- to know and be able to explain the properties and limitations of the different storage components, including their addressing, and to evaluate the performance of a multi-level storage hierarchy.
- to be able to explain and discuss the exploitation of parallelism in the form of pipelining, their limitations, and the distribution of tasks on multiple functional units.
- to be able to explain and discuss the internal organization and internal communication paths at a high level, including communication with external units and interrupts from these.
- to express the functionality of a given algorithm as an assembler program, including to bring such a program to execution on a specific machine.
- to express the functionality of a given algorithm as a system program, including to bring such a program to execution on a specific machine.
Requirements
During the course the students have to complete two mandatory projects. One project will cover programming in assembly language, the other will cover system programming. Both projects will be evaluated with pass/fail and need to be passed in order to be eligible for the written exam at the end of the semester. Please go to the according section of the website for examples of old exams. The lab courses are mainly targeted towards the mandatory projects, the exercises mostly prepare for the written exam.
All about the Exam
The written exam will follow in terms of style, difficulty, and length (4h) the exams of the previous years. Below, you will find a link to download examples of previous years (unfortunately in Danish language only). This years exam will be in English. Also note, that the old exams miss the systems programming part of this years lecture. Furthermore, the old exams used a different assembly language, so there might be parts in them which are no longer relevant for you.
Information about the exact time and location will follow in due course.
Download very old (and only party relevant) exams here.
Relevant Exam from 2014 exam and solution. This year's exam will follow this exam in style and type of questions ... with different questions, though :-)
Lectures
# |
Date |
Content |
Slides |
Readings |
1 |
Fri, 01.09.2017 |
Introduction |
here |
Chapter 2 |
2 |
Tue, 05.09.2017 |
Assembly |
here |
|
3 |
Thu, 07.09.2017 |
Computer Arithmetic |
here |
Chapter 9 & 10 |
4 |
Tue, 12.09.2017 |
Continuation of last lecture |
-- |
-- |
5 |
Thu, 14.09.2017 |
Digital Logic |
here |
Chapter 11 |
6 |
Thu, 21.09.2017 |
Top Level View |
here |
Chapter 3 |
7 |
Tue, 26.09.2017 |
Caches 1 |
here |
Chapter 4 |
8 |
Thu, 28.09.2017 |
Caches 2 |
See Lecture 7 |
Chapter 4 |
9 |
Thu, 05.10.2017 |
RAM & HDD |
here |
Chapter 5 & 6 |
10 |
Tue, 10.10.2017 |
I/O |
here |
Chapter 7 |
11 |
Thu, 12.10.2017 |
Operating System Support |
here |
Chapter 8 |
12 |
Wed, 25.10.2017 |
Processor Structure and Pipelining |
here |
Chapter 14 |
13 |
Tue, 31.10.2017 |
RISC |
here |
Chapter 15 |
14 |
Thu, 02.11.2017 |
Superscalar Processors |
here |
Chapteres 16, 17, 18 |
15 |
Tue, 07.11.2017 |
Control Unit |
here |
Chapter 19 & 20 |
16 |
Thu, 09.11.2017 |
Finishing Control Unit |
|
|
17 |
Thu, 23.11.2017 |
Introduction to C |
here |
|
18 |
Mon, 27.11.2017 |
Control Flow & I/O |
here |
|
19 |
Thu, 30.11.2017 |
Pointers |
here |
|
20 |
Mon, 04.12.2017 |
Libraries |
here |
|
21 |
Thu, 07.12.2017 |
Memory Management |
here |
|
Assignments
Assignment 1 - Sorting in Assembler
Download this pdf in order to receive all necessary information for the first assignment.
The deadline is Sunday, November 12th before Midnight Danish time
You are allowed to work in teams of up to five students. Please only submit one file per team and include all team members' names in the README file.
In case you have any questions or doubts, do not hesitate to ask us. Use the lab snippets and the cheat sheet to recycle helpful snippets (e.g., reading files)!
Collection of useful snippets: here.
Assignment 2 - String Vector in C
Download this pdf in order to receive all necessary information for the second assignment.
The deadline is Sunday, December 17th before Midnight Danish time.
You should use the following header file for your data structure: vector.h
There will be no extended deadline for this assignment! You have to pass this assignment in order to be eligible for the exam! You are allowed to work in teams of up to five students. Please only submit one file per team and include all team members' names in the README file.
Exercises
# |
Date |
Topic |
Questions |
Solution |
1 |
Wed, 06.09.2017 |
CANCELLED |
|
|
2 |
Tue, 19.09.2017 |
Computer Arithmetic |
here |
here |
3 |
Tue, 03.10.2017 |
Computer Arithmetic & Boolean Algebra |
here |
here |
4 |
Thu, 26.10.2017 |
Bus, Cache & Memory |
here |
here |
5 |
Wed, 08.11.2017 |
I/O & Virtual Memory |
here |
here |
6 |
Wed, 29.11.2017 |
Pipelining |
here |
here |
7 |
Tue, 05.12.2017 |
Superscalar Processors & Parallel Processing |
here |
here |
Lab
Do not forget to read the Cheat Sheet by Svend!
Materials
We are using the following Textbook:
- William Stallings: Computer Organization and Architecture - Designing for Performance, 8th, 9th or 10th edition, Pearson, 2013/2014/2015.
- Assembler Cheat Sheet by Svend!
Furthermore, all lecture slides are relevant for the exams.
Useful Links
Very good and regularly updated C manual: link
Differences between Intel and ATT syntax: link
GNU Assembler Manual: link
x86 Assembly Wiki Book: link
x86 Opcode and Instruction Reference: link
x86_64 Cheat sheet:
link
Linux syscalls: 32bit, 64bit.