64 lines
2.9 KiB
Markdown
64 lines
2.9 KiB
Markdown
# ArmV8 Emulator and Assembler
|
|
|
|
This project is a custom-built ARMv8 emulator and assembler. The emulator is capable of executing ARMv8 machine code and the assembler is capable of converting ARMv8 assembly code to machine code. This is a fully functional emulator and assembler that can execute and assemble all set of ARMv8 instructions. The code was very thoroughly tested and has been tested against the official Arm emulator and assembler. And it 100% works while being 99% more lightweight. We also tested it with a few Raspberry Pi programs (since it uses ARMv8) as a sort of integration test.
|
|
|
|
This was built as a final First Year Project @ Imperial College London. The project received a grade of 100%, meaning it was the top project of the year.
|
|
|
|
As an extension, an neural network library was built from scratch in C along with a graphical interface for real-time neural network predictions.
|
|
|
|
**PLEASE NOTE: Please do not copy this code or share it with others. As this project was submitted as coursework, it is really important that this is not shared. (Hence why I am using a private git hosting)**. Many of the files were also deleted for this reason from this repo, however, the core functionality remains.
|
|
|
|
# Usage
|
|
|
|
To start, all you need to do, after cloning the repo, is run the makefile in the src directory as follows:
|
|
|
|
```bash
|
|
cd src
|
|
make
|
|
```
|
|
|
|
This will compile the emulator and assembler. To run the emulator, you can run the following command:
|
|
|
|
```bash
|
|
./emulate <binary_file>
|
|
```
|
|
|
|
To run the assembler, you can run the following command: (Optional output file)
|
|
|
|
```bash
|
|
./assemble <assembly_file> [<output_file>]
|
|
```
|
|
|
|
# Testing
|
|
|
|
You can run a test suite of 1000+ test cases by simply running the custom test script as follows:
|
|
|
|
```bash
|
|
./test.sh
|
|
```
|
|
|
|
You may need to give the script permission to run by running the following command:
|
|
|
|
```bash
|
|
chmod +x test.sh
|
|
```
|
|
|
|
# Project Structure
|
|
```bash
|
|
.
|
|
├── doc/ # Full PDF and HTML Documentation, reports, and LaTeX files
|
|
├── extension/ # Neural Network extension and ANN source code
|
|
│ ├── client/ # Python client for interacting with the ANN
|
|
│ ├── examples/ # Example programs (MNIST dataset loading, training, testing)
|
|
│ ├── src/ # Source code for matrix and ANN computations
|
|
│ └── tests/ # Unit tests for matrix operations and ANN
|
|
├── programs/ # Example Raspberry Pi programs, including an LED blink
|
|
├── src/ # ARMv8 Assembler and Emulator source code
|
|
├── README.md # This readme file
|
|
└── test.sh # Test script for running tests
|
|
```
|
|
|
|
# License
|
|
|
|
PLEASE DO NOT COPY OR SHARE THIS CODE. This project was submitted as coursework and should not be shared with others. This is a private repository for this reason.
|