Skip to content

Welcome to NUS CG3207 - Computer Architecture

Welcome to CG3207! In this repository, you will find the manuals for each of the 4 lab exercises you will complete for this course, as well as instructions on how to set up the tools you'll need.

Labs for this course are generally free and easy. Physical attendance is recommended, but not necessary EXCEPT FOR ASSESSMENTS. There are 4 lab assignments in total, each of which will first be introduced in a briefing, and then assessed in a subsequent (not necessarily the next) week. At least one member of the teaching team will always be present in the lab during lab sessions to assist with any doubts you have.

Check NUSMods for the lab venue corresponding to your lab slot.

Intended learning outcomes (labs)

In the lab component of this course, you will put into practice the concepts learned in lecture (as well as some you explore on your own), and see them come to life.

You will learn:

  • The RISC-V architecture and assembly language.
  • How to build your very own CPU which can execute real RISC-V programs.
  • Advanced CPU design tricks to improve performance.

First steps

To make the most of the labs, we recommend doing some reading before you come for your first session.

  1. First, the page on how to use this website. Pay special attention to the section on "How to get help", as it is very important.

  2. Next, the prerequisites for the lab. If you have any concerns with these prerequisites, please approach the teaching team as early as possible. The background knowledge outlined in this page is critical for you to do well in this course.

  3. Make sure you read Getting to know your Nexys 4 and install Vivado on your personal computer as soon as possible. If you do not have access to a Windows or Linux (preferred) PC, you should try your best to get/borrow one for this course. Vivado does work in Parallels Desktop on a Mac, but this is an expensive piece of software, and not entirely a supported configuration.

  4. Finally, choose an architecture that you want to work with for the labs. You may choose between RISC-V (recommended), or ARM (deprecated, not well-supported by teaching team). This might also be a good time to form teams of two to three people for labs 2, 3, and 4. Note that Lab 1 will be an individual exercise, and you will not be assessed as a team - though, of course, we encourage you to work together (academically honestly, of course - no copying or direct sharing of work, please).

Lab outline

Lab Description Marks Remarks
1 Familiarisation with HDL/FPGA and Assembly Language.
Omae wa mou shindeiru.
10 Individual exercise
2 Basic CPU design.
All your base are belong to us.
30 Teams of 2 or 3 students
3 ALU Design.
Billions of blue blistering barnacles.
20+5$ Teams of 2 or 3 students
4 Advanced CPU design.
It was the best of times, it was the worst of times.
15+10$ Teams of 2 or 3 students
Total 90 = 45% of the module grade

The lab assignment repository contains all the files you need to download. Some other useful resources can also be found using the menu on the left of this page.

Lab Schedule

Week Monday Lab Date (18:00-21:00) Friday Lab Date (09:00-12:00) Activity
3 24 Aug 2026 28 Aug 2026 Assignment 1 Intro + Consultation
4 31 Aug 2026 4 Sep 2026 Assignment 1 Demo (optional) + Consultation
5 7 Sep 2026 11 Sep 2026 Assignment 1 Demo
6 14 Sep 2026 18 Sep 2026 Assignment 2 Intro + Consultation
Recess 21 Sep 2026 25 Sep 2026 No Lab Session
7 28 Sep 2026 2 Oct 2026 Assignment 2 Demo
8 5 Oct 2026 9 Oct 2026 Assignment 3 Intro + Consultation
9 12 Oct 2026 16 Oct 2026 Assignment 3 Demo
10 19 Oct 2026 23 Oct 2026 Assignment 4 Intro + Consultation
11 26 Oct 2026 30 Oct 2026 Assignment 4 Consultation
12 2 Nov 2026 6 Nov 2026 Assignment 4 Demo

Note

You may start working on the subsequent assignment as soon as you are finished with the current one. The assignment requirements for assignment N will be frozen on the first day of assignment N-1 demos.

Fair Use of LLMs and Open Source Code

Fair Use of LLMs and Open Source Code Use of AI/LLMs, agents, or other online code is permitted. However, you should

  • Understand the code in detail and be able to explain it. Do not resort to cognitive offloading.
  • Not infringe anyone's copyright, i.e., it should be code released under an open-source/permissive license.
  • Demarcate such code clearly, and give proper attribution to the source/LLM, along with the prompts used. Using AI-generated code without attribution is considered plagiarism. You should also respond to a survey on Canvas which will open closer to the end of the course.

Discussions are encouraged, but 'we had discussed' is not a valid excuse if your codes turn out to be uncomfortably similar to that of another group (except when you use online code with attribution as mentioned above).

Though there will be intra-team differentiation in marks according to the contribution levels, a team will be collectively responsible for plagiarized code.

License

NUS CG3207 Lab Assignments © 2026 by NUS CG3207 Team is licensed under CC BY-NC-SA 4.0