General information


Subject type: Mandatory

Coordinator: Vladimir Bellavista Parent

Trimester: Second term

Credits: 4

Teaching staff: 

Vladimir Bellavista Parent
Pere Vidiella Catalan 

Academic year: 2025

Teaching course: 1

Languages ​​of instruction


  • Catalan

The subject is taught in Catalan/SpanishHowever, the course documentation will be mostly in EnglishTherefore, the student must be able to read correctly in English in order to understand the technical documentation provided to him/her. 

Competencies / Learning Outcomes


Basic skills
  • B2_That students know how to apply their knowledge to their job or vocation in a professional way and have the skills they demonstrate by developing and defending arguments and solving problems within their area of ​​study

  • B5_That students have developed those learning skills necessary to undertake further studies with a high degree of autonomy

Transversal competences
  • T1_That students know a third language, which will be preferably English, with an adequate level of oral and written form, according to the needs of the graduates in each degree

  • T2_That students have the ability to work as members of an interdisciplinary team either as one more member, or performing management tasks in order to contribute to developing projects with pragmatism and a sense of responsibility, making commitments taking into account the available resources

Presentation of the subject


This subject introduces the student to the inner workings of a computer system through low-level programming on the architecture. RISC-V, using a real Linux system I la command console as the main work tool.

The subject combines assembly language programming, C programming and the basic use of the Linux command line, with the aim of the student understanding how a program is built, executed and analyzed from the source code to execution on the processor.

The student must bring their personal laptop during classes, both theoretical and practical.

Contents


The subject is organized into the following topics:

1. Linux work environment and console

  • Introduction to the command line.
  • File system navigation.
  • Editing, compiling and executing programs from the terminal.
  • Execution of programs and permissions.

2. Compilation and execution process

  • What does it mean to compile a program?
  • Program entry point (_start).
  • Using gcc to compile assembler and C code.

3. RISC-V architecture

  • General registers and usage conventions.
  • Memory model.
  • Types of instructions.
  • Execution flow and jumps.

4. Programming in RISC-V assembler

  • Program sections (.text, .data, .bss).
  • Memory access.
  • Loops and conditional structures.
  • Vector processing.
  • Basic algorithms: counting values, ordering vectors, comparisons.

5. Input and output in Linux

  • System calls (read, write, exit).
  • ASCII data management.
  • Difference between data and textual representation.
  • Explicit control of data length.

6. Introduction to the C language

  • Variables and memory.
  • Vectors and data routing.
  • Functions and parameter passing.
  • Basic pointer and pointer arithmetic.
  • Structures (struct).

 

Activities and evaluation system


The subject is assessed based on the following activities:

  • Theory exam (THEORY): 40%
  • Laboratory exam (LABORATORY): 20%
  • Internships (INTERNSHIPS): 40%

The final grade of the subject (NFA) is calculated according to:

  • EXAMS = THEORY x 0,4 + LABORATORY x 0,2
  • If EXAMS >= 5: NFA = EXAMS + PRACTICES x 0.4
  • If EXAMS < 5: NFA = EXAMS

Additional considerations:

  • All activities are mandatory; activities that have not been attended or not performed are evaluated with a zero (0).
  • Exam grades (THEORY and LABORATORY) are recoverable on the official date, while practical grades are not recoverable.
  • Any indication of copying or plagiarism (from peers, from uncited sources, or from tools such as ChatGPT) will result in the activity being assessed with a zero (0).
  • Repeated behavior of copying or plagiarism will result in the subject being assessed as Not Presented (NP) and the student being reported to the University administration.

Bibliography


Basic

David A. Patterson, John L. Hennessy. Computer Organization and Design, the Hardware/Software Interface: RISC-V Edition. Ed. Morgan Kaufman, 1st Edition. 

David Patterson and Andrew Waterman. The RISC-V Reader: An Open Architecture Atlas. Ed. Strawberry Canyon, 1st Edition.

Dennis M. Ritchie, Brian W. Kernighan. The C Programming Language. Pearson Education, 2nd Edition.

Sarah Harris, David Harris. Digital Design and Computer Architecture, RISC-V Edition: RISC-V. Morgan Kaufmann, 1st Edition.