CMPUT 229 - Computer Organization and Architecture I

Winter 2025 Lab Assignments

Starting in lab #2, the lab assignments are distributed as a repo through git classroom using the links below. Students are encouraged to use the git repository using commit and push commands throughout the development of their solutions. The solution that will be graded will be the last version pushed to the repository before the deadline.


Lab Information

RISC-V Analyzer for CMPUT 229

NEW: RISC-V Analyzer is a static analysis tool for linting RISC-V assembly code. Learn more at the homepage below:

Git and Github

Git and Github are very important version control management systems that are widely used by software practitioners in the industry. The sooner students in this area become familiar with these tools, the more productive and qualified they will be. To encourage students to get started with their learning, the labs in CMPUT229 are distributed through gitclassroom. Students are expected to learn the basics about github on their own. There are very tutorials in different forms on the web. Here is one that we found very useful:

This is a short video where Quinn Pham explains how to clone a lab and how to use the command line in a terminal to issue git commands:

The git command cheat sheet that Quinn refers to is here:

Basic Linux Commands

If you are new to Linux, here is a short video where Quinn Pham explains important basic commands:

Debugging in Assembly

Debugging can be a daunting task in assembly programming. In this video, Quinn Pham walks you through a debugging task:

CMPUT 229 Software License

A solution file included in the repository distributed for each lab contains the CMPUT 229 Student Submission License. Read the license carefully.

Replace with your name at the top to indicate that you understand and will abide to the terms of the license.

The submission graded will be the last commit to your private github repository before the deadline.

Lab Policies - Assessment Integrity

Lab Assignments are individual assessments: The entire lab assignment is to be completed by a single student. If receiving or providing help from/to another person the student should be careful to never have direct access to code written by another person and to never provide access to her/his own code.

The CMPUT 229 grading system integrates the tool Measure of Software Similarity (MOSS), developed at Stanford University, to detect plagiarism in solutions. Any suspected case of plagiarism will be forwarded to the Associate Dean Undergraduate at the Faculty of Science as a suspected case of Inappropriate Academic Behaviour to be investigated.

If you find a solution to the lab or to any other course assessment component on the web immediately report it via email to the instructor. Appropriate measures will be taken to safeguard the fair assessment of all students

All work on all assignments must be individual work. Identical or almost identical solutions will be considered copies, and are grounds for disciplinary actions.

Even though the lab assignments used this term are new and have never been used in the past, the CMPUT229 teaching staff has all solutions ever submitted to labs in CMPUT 229 archived and uses automated plagiarism-detection software to identify copied solutions. Your own solutions will become part of this corpus.

Help maintain the integrity of your degree. All previous solutions submitted by any student to CMPUT229 labs must contain the CMPUT229 Software License and thus must remain private forever. If you stumble into a solution for past labs, even if they are different from the labs used this term, please report it to the instructor.

Lab Interviews

Starting on Lab 3 - Fix Branch, students will be randomly selected for a lab interview with a Teaching Assistant. Once a student is selected for an interview, the interview is a requirement in order for that lab assignment to be considered for grading. Interviews will be scheduled during the student lab class to ensure that there are no scheduling conflicts. The purpose of the interview is to determine that the student created the solution submitted. To this end, there will be two levels of questions. Questions on the first level aim to establish that the student understands the solution that they submitted. Questions on the second level aim to establich that the student has gone through the creative intelectual process of creating the solution.

If during the interview the student fails to demonstrates the they both understand the solution that they submitted and that they were part of the creative intellectual process that led to the creation of the solution, then the solution that they submitted may be deemed unadimissible for grading. Such an outcome of the interview is independent of the establishment that there are causes to start a process to determine that there are potential violations of the University of Alberta Code of Student Conduct.

Writing RISC-V

Instructions to Install RARS

Remote use of the RARS Simulator installed in the lab machines

These instructions will enable students to remotely login to the lab machines and to use the RARS simulator that is installed there.

You may also use X2Go, an open-source remote desktop tool, to connect remotely to the computers in the Computing Science Department. Here are instructions to install and X2Go on the client side. General information about X2Go can be found here.

Setting up the RARS simulator on your own machine

View one of the following pages to set up your own RARS simulator environment on a Linux, macOS, or Microsoft Windows system.

These instructions are for your personal machines only. Lab machines are already equipped with RARS. Follow the instructions above.

Lab solutions are graded using the setup that exists on the lab machines.

Examples of Code Patterns and Structure in RISC-V

Many of the common code patterns and structure seen in higher level languages such as for-loops, if-statements, etc are not present in assembly programming. However, they can be recreated in RISC-V, and a collection of tutorials and examples are provided which go through the basics.

RARS Environmental Calls and Assembler Directives

Programming Style

Refer to this example to learn how to format and document the code.

RISC-V Dot Graph Generator: A Call-Graph Display for RISC-V Assembly


Lab Sections

Lead TA: Sarah Thomson
Sarah Thomson
(smt@ualberta.ca)
Session Day/Time Room TA 1 TA 2 TA 3
LAB-H01-74843 Tuesdays (11:00AM-1:50PM CAB 311 Avani Tiwari
Avani Tiwari
(avani4@ualberta.ca)
LAB-H02-70781 Tuesdays (5:00-7:50 PM) NRE1-003 Patrick Zijlstra
Patrick Zijlstra
(pzijlstr@ualberta.ca)
Amir Bahmani
Amir Bahmani
(bahmani1@ualberta.ca)
Tina Nguyen
Tina Nguyen
(ngocthuy@ualberta.ca)
LAB-H03-70782 Wednesdays (5:00-7:50PM) NRE 2-003 Christiaan Venter
Christiaan Venter
(clventer@ualberta.ca)
Ayokunle Amodu
Ayo Amodu
(aaamodu@ualberta.ca)
Sadid Bin Hasan
Sadid Bin Hasan
(sadidbin@ualberta.ca)
LAB-H04-70783 Thursdays (11:00AM-1:50PM) CAB 311 Sasha Dudiy
Sasha Dudiy
(dudiy@ualberta.ca)
LAB-H05-74842 Thursdays (5:00-7:50 PM) NRE 1-003 Gunkirat Singh
Gunkirat Singh
(gunkirat@ualberta.ca)
Nate Pane
Nate Pane
(npane@ualberta.ca)
Isabelle Hansen-Yang
Isabelle Hansen-Yang
(hansenya@ualberta.ca)