Skip to content

miloszwasacz/cpu-sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPU-SIM

This is a simulator of a CPU implementing the RISC-V RV32I ISA. It was made for the Advanced Computer Architecture (COMS30046) unit at University of Bristol.

Prerequisites

Usage

First, clone the repository:

git clone git@github.com:miloszwasacz/cpu-sim.git
cd cpu-sim

Then, to compile test programs, run the Docker image with RISC-V toolchain:

docker compose run --remove-orphans riscv-toolchain

# Inside the docker container, run GNU Make to compile 
# all programs from the `test/res/` directory
make 

exit # Exit the docker container

Lastly, to compile the simulator and run a RISC-V program:

cargo run --release -- "<path-to-riscv-binary>"

About

Cycle-accurate simulator of a RISC-V core

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages