Skip to content

Backup of my UCLA F23 S M151B/ECE M116C Computer Assignment 1: RISC-V CPU Simulator

Notifications You must be signed in to change notification settings

vinlin24/csm151b-ca1

Repository files navigation

RISC-V CPU Simulator

Description

Computer Assignment 1 (CA1) for UCLA F23 COM SCI M151B/EC ENGR M116C: Computer Systems Architecture.

The goal of this computer assignment is to create a simulator for a (simple) RISC-V CPU. The rest of the details can be found in the spec.

Building

To build the main executable locally, run the Makefile rule:

make

This will create a binary named cpusim in the current directory.

Note that the source files are deliberately at the root of the project directory because that is the directory structure the Gradescope auto-grader expects.

Usage

From the spec:

The entry point of your project is "cpusim.cpp". The program should run like this:

./cpusim <inputfile.txt>

...and print the value of a0 and a1 in the terminal:

(a0,a1)

(no space). For example, if a0=10, and a1=-8, then you should print (10,-8).

You should use exactly this format, otherwise, our automated tests cannot evaluate your code.

Trace files are provided under the traces/ subdirectory.

Cleanup

To clean the project directory of this binary and intermediate object files, run this Makefile rule:

make clean

Submission

  • The code source files for submission are the *.cpp and *.h files in the project root.
  • The project report is report.pdf (built from the report.md Markdown source).

About

Backup of my UCLA F23 S M151B/ECE M116C Computer Assignment 1: RISC-V CPU Simulator

Resources

Stars

Watchers

Forks

Packages

No packages published