You are here: Home » Study Plan » Subject


Subject: COMPUTER ARCHITECTURE (A.A. 2020/2021)

degree course in COMPUTER SCIENCE

Course year 1
Teaching units Unit Architettura dei calcolatori
Information Technology (lesson)
  • TAF: Compulsory subjects, characteristic of the class SSD: ING-INF/05 CFU: 9
Teachers: Andrea MARONGIU
Exam type oral
Evaluation final vote
Teaching language Italiano
Contents download pdf download




The course aims at providing basic knowledge on modern computer architectures. Starting from fundamental logic gates and logic circuits, the students will be guided toward the development of a working processor prototype, so as to better understand its main architectural elements. Specifically, basic knowledge on the RISC-V microarchitecture and the corresponding assembly languages is provided, also by means of practical activities. Key notions about the memory hierarchy and the virtual memory system of a modern computer will also be provided.

Admission requirements

The course does not require any specific prerequisite, but some skills about the imperative programming paradigm are recommended

Course contents

Positional notation
Binary and hexadecimal encoding, two's complement
Fixed point and floating point representations. The IEEE 754-1985 standard

Boolean algebra, expressions and theorems
Synthesis of combinational circuits
Karnaugh maps, normal and minimal forms
Decoder, Multiplexer, Half and Full Adder, ALU

SR latch, D latch, SR, D, JK and T Flip-flop
Synthesis of sequential circuits
Finite state machines (Mealy, Moore), state diagrams
Counter, Register, Memory Bank

RISC-V registers and operands (register, memory, immediate)
RISC-V instruction formats: R, I, S.
Conditional operations and procedure calling.
Synchronization instructions
Compiling, linking and loading a program.
Effects of compiler optimizations.

Integer addition and subtraction. Overflow
Multiplier and Divider hardware
RISC-V instructions for multiplication and division
IEEE 754 floating-point support: hardware and RISC-V instructions
Subword parallelism: SIMD extensions

CPU overview. Instruction execution.
Building datapath and control HW
Pipelined RISC-V CPU design
Structural, data and control hazards. Forwarding
Branch prediction
Instruction-level parallelism (ILP): out-of-order execution (OoO) and very-long instruction word (VLIW)

Locality and memory hierarchies
Introducing the cache. Direct mapped caches
Cache miss. Write-back and write-through
Associative cache. Replacement policies
Multilevel caches. Performance
Virtual memory

Teaching methods

Lectures with slides for the theoretical part of the course, complemented by exercises. Remote access to the classes and materials will be provided. Depending on the evolution of the COVID19 pandemic situation traditional taught classes will be delivered.

Assessment methods

There are six examination sessions in a year. The examination is composed by a written test and an oral part. The written test, approximately one hour and a half long, consists of questions with a single or multiple correct answers, to assess the knowledge of the theory, plus exercises or questions with an open answer to evaluate the understanding of more practical topics from the course. During this examination it is forbidden to use any tipe of teaching material, books or similar. The oral part covers all the theoretical and practical concepts, and is based on the outcome of the written test (typically a barely sufficient score at the written test requires an in-depth oral examination). The final score is the average of the scores achieved in the written and oral tests. The tests might be conducted remotely or in presence depending of the evolution of the COVID19 pandemic situation.

Learning outcomes

Knowledge and understanding
Binary representation of information
logic circuits
computer architecture

Applying knowledge and understanding
skills using binary representation
boolean logic
Analysis and synthesis of simple logic circuits, both combinational and sequential ones
Assembly programming skills

Making judgements:
Ability to recognize and evaluate computer's features and performance. Ability to find the best solution to a given problem. To this aim, during the written test the student is allowed to use notes and books.

Communication skills
The student should present and revise his knowledge, with a particular focus on the lexicon and technical jargon.

Learning skills:
students will learn a very low-level language, far to their usual abstraction level and intuitive developing schema.
Moreover, they have to delve into collateral aspects of the discussed arguments.


Per la parte di reti logiche:
M. Morris Mano, Charles Kime, Tom Martin, "Reti logiche", 5/Ed., Pearson Editore
ISBN: 9788891905819

Per la parte di architettura dei calcolatori, microarchitettura e assembly RISC-V:
David A Patterson, John L Hennessy, "Struttura e progetto dei calcolatori - Progettare con RISC-V" Edizione italiana a cura di Alberto Borghese. Zanichelli Ed.
ISBN: 9788808820594

Più le dispense fornite dal docente.

Testi opzionali/aggiuntivi:

Giacomo Bucci, "Calcolatori elettronici. Architettura e organizzazione", Mc. Graw Hill
ISBN: 9788838664700