Digital Architecture - II. Program in Computer Science. Syllabus.

CPU
The architecture of a simple CPU and its Control Unit.CISC and RISC architectures. Principles of pipelining, hazards and stalls. Feed-forwarding. Pipeline multiple issues. Out-of-order execution. Speculation. Multi-cores and clusters. Principles of parallel distributed processing.

Memory hierarchies
Memory structure and characteristics. The hierarchy of memories and the cache. Direct mapped and associative cache memories. SRAM and DRAM technology. Memory coherence and consistence in single and multi-processor architectures. Error Correction codes. Disks and flash memories.

Other components
Introduction to Intel architectures. Input/output and buses. Evaluation of architecture performances. 

Laboratory
The lab course of Computer Architectures II is an introduction to assembly programming with particular reference to MIPS architecture. The laboratory provides the basis for understanding the relationship between high-level code and assembly language. Through the development of code segments of increasing complexity, the course aims at developing practical skills of low-level programming, emphasizing the difficulties and benefits of writing programs at a low level of abstraction with a detailed control of the hardware. 
In detail, the workflow of the laboratory is as follows:
•	Introduction to Assembly language and brief tutorial on the simulator SPIM. 
•	Memory access in read and write modes, use of different addressing mechanisms. 
•	Low-level programming techniques: use of the stack and data segment, register spilling, flow control.
•	Calling conventions in procedures and use of system calls. 
•	Handling interrupts and exceptions, understanding the Exception handler and trying methods to modify its behavior. 
•	Developing nested and recursive procedures. 

Bibliography

Main text (in English or Italian)
•	Struttura e progetto dei calcolatori: l'interfaccia hardware-software, D.A. Patterson and J.L. Hennessy, Quarta edizione, Zanichelli, estate 2014 (Nota: la quarta edizione Zanichelli è la traduzione della quinta edizione inglese).
•	“Computer Organization & Design: The Hardware/Software Interface”, D.A. Patterson and J.L. Hennessy, Morgan Kaufmann Publishers, Fifth Edition, 2014. 
•	You can found the text and solution of many exercises at the following URL: http://books.elsevier.com/companions/1558606041/.
•	Lab software tool is PCSpim: http://pages.cs.wisc.edu/~larus/spim.html