Simulators for use in computer architecture classes.
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.
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)
- .NET 9
- PowerShell 7+ (to run the sample scripts)
Both are cross-platform, so the project and its samples run on Windows, macOS, and Linux.
dotnet test
Run the .ps1 scripts from the Samples folder:
pwsh Samples/Demo-Ramses.ps1
pwsh Samples/Demo-Cesar.ps1
pwsh Samples/Demo-Cesar-Debug.ps1
- Prof. Raul Fernando Weber (in memoriam)
