Skip to content

fdcastel/ArchSims

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArchSims

Simulators for use in computer architecture classes.

Overview

This project is a clean room implementation of the hypothetical machines used in computer architecture classes at the Institute of Informatics of Universidade Federal do Rio Grande do Sul.

The goal is to faithfully recreate the instruction set architecture of each machine. Every implementation is backed by an extensive test suite and follows the original specifications provided by professors Raul Fernando Weber and Taisy Silva Weber.

The four machines form a progression of increasing complexity:

Machine Width Highlights Manual
Neander 8-bit Baseline: single accumulator, one addressing mode, N/Z flags doc/Neander.md
Ahmes 8-bit Adds SUB, shifts, rotates, C/V/B flags, extended conditional jumps doc/Ahmes.md
Ramses 8-bit Multiple registers (RA/RB/RX), four addressing modes, JSR doc/Ramses.md
Cesar 16-bit Eight registers, eight addressing modes, stack, memory-mapped I/O doc/Cesar.md

Each manual documents the programmer's model, instruction set, execution cycle, and UI design suggestions.

There is no UI yet, but there are plans to create one in the future.

Content

This repository contains:

  • Core implementations for Neander, Ahmes, Ramses, and Cesar (fs/ArchSims.Core)
  • Assemblers for Ramses and Cesar (fs/ArchSims.Assemblers)
    • Neander and Ahmes ship without an assembler (by design)
  • A Ramses emulator for Cesar (it was a cold and rainy day...)
  • Thorough test cases (fs/ArchSims.Core.Tests)
    • An adapter to test the Ramses emulator with the same test cases used for Ramses
  • A command-line utility for simple demos (fs/ArchSims.CmdLine)

Prerequisites

Both are cross-platform, so the project and its samples run on Windows, macOS, and Linux.

To run the tests

dotnet test

To run the samples

Run the .ps1 scripts from the Samples folder:

pwsh Samples/Demo-Ramses.ps1
pwsh Samples/Demo-Cesar.ps1
pwsh Samples/Demo-Cesar-Debug.ps1

Special thanks

  • Prof. Raul Fernando Weber (in memoriam)

About

Simulators for use in computer architecture classes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages