liamrosenfeld / EmuGator

Computer engineering senior design team project
1 stars 0 forks source link

EmuGator

Computer engineering capstone team project

Completed Work

Team members who are not familiar with the Rust programming language have been focusing on learning Rust by working on exercises and reading documentation. We have also been working on creating a basic structure for the assembler and emulator to work off in the future. This includes determining how our data structures will be managed to allow emulating pipelining. Furthermore, we have been working on the user-interface.

Project Architecture

Monaco, Tailwind, and Dioxus Frontend

The architecture of the editor was designed and established during the pre-alpha stage. It consists of two key components:

Remaining architectural challenges include:

EmuGator Core

The emulator is modeled as a finite state machine. Instructions are decoded according to the instruction formats defined in the RV32I Base Integer Instruction Set Version 2.0. Each instruction resolves to an instruction handler that consumes the current state and produces the next state. This design allows the ability to replay states forwards or backwards, facilitating debugging of programs executed on the platform.

The emulator's internal state is modeled after the OpenHW CVE2 2-stage pipelined RISC-V processor. By reviewing the top-level SystemVerilog file, we extracted the CVE2's datapath and pipeline components to enable cycle-level debugging.

RISC-V Assembler

The assembler is long yet simple and integrates with the frontend to take in assembly code as input, producing machine code output for the emulator.

Key Features:

A lot of the assembler code is redundant since every supported instruction requires defining components like opcode, funct3, and funct7 in structures. Although the codebase is long, it remains straightforward.

Known Bugs

Development

  1. Install npm: https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
  2. Install the tailwind css cli: https://tailwindcss.com/docs/installation
  3. Install Rust and Cargo: https://doc.rust-lang.org/cargo/getting-started/installation.html
  4. Run the following command in the root of the project to start the tailwind CSS compiler:
npx tailwindcss -i ./input.css -o ./assets/tailwind.css --watch

Run the following command to install the Dioxus CLI:

cargo install dioxus-cli

Run the following command in the root of the project to start the Dioxus dev server:

dx serve --hot-reload