Skip to content

The Vole Machine Language Simulator GUI is a graphical application designed to simulate the operations of a simple CPU using Qt.

License

Notifications You must be signed in to change notification settings

Mohammed-3tef/Vole_Machine_Language_Simulator_GUI

 
 

Repository files navigation

Vole Machine Language Simulator GUI

Table of Contents

📌 Introduction

The Vole Machine Language Simulator GUI is a graphical application designed to simulate the operations of a simple CPU. Built with Qt, it provides users with the ability to load instructions, view and edit memory, monitor register states, and perform operations such as fetch, decode, and execute. This tool is intended for educational purposes, aiding in the understanding of basic CPU functionality and object-oriented programming principles.

🚀 Features

  • Memory Management: Visual representation of memory cells, supporting hexadecimal, binary, and integer views.
  • Register Management: Display and management of registers with detailed formats.
  • Instruction Execution: Load, decode, fetch, and execute instructions with step-by-step control.
  • Manual Instruction Input: Option to manually add, decode, and execute instructions without fetching from memory.
  • User Interface: Intuitive Qt-based GUI with a dedicated 'How to Use' window for user guidance.
  • Cross-Platform Compatibility: Runs on Windows, macOS, and Linux.

⚙️ Vole Machine Language Instruction Set

Opcode Format Description
1 RXY LOAD the register R with the bit pattern found in the memory cell whose address is XY.
2 RXY LOAD the register R with the bit pattern XY.
3 RXY STORE the bit pattern found in register R in the memory cell whose address is XY.
4 0RS MOVE the bit pattern found in register R to register S.
5 RST ADD the bit patterns in registers S and T as though they were two’s complement representations and leave the result in register R.
6 RST ADD the bit patterns in registers S and T as though they represented values in floating-point notation and leave the floating-point result in register R.
7 RST OR the bit patterns in registers S and T and place the result in register R.
8 RST AND the bit patterns in registers S and T and place the result in register R.
9 RST EXCLUSIVE OR the bit patterns in registers S and T and place the result in register R.
A R0X ROTATE the bit pattern in register R one bit to the right X times. Each time place the bit that started at the low-order end at the high-order end.
B RXY JUMP to the location in the memory cell at address XY if the bit pattern in register R is equal to the bit pattern in register number 0. Otherwise, continue with the normal sequence of execution.
C 000 HALT execution.
D RXY JUMP to instruction in RAM cell XY if the content of register R is greater than (>) the content of register 0. Data is interpreted as integers in two's complement notation.

🖥️ Watch the Demo

Vole.Machine.Language.Simulator.GUI.mp4

🛠️ Getting Started

📋 Prerequisites

  • Qt Framework: Ensure that Qt (version 5 or later) is installed on your system.
  • C++ Compiler: A compatible C++ compiler is required.
  • CMake: Optional, if you prefer using CMake as the build system.

📥 Installation

  1. Clone the Repository:

    git clone https://github.com/esraa-emary/Vole-Machine-Language-Simulator-GUI.git
    cd Vole-Machine-Language-Simulator-GUI
  2. Build the Project:

    • Ensure that CMake and Qt are installed.
    • Create a build directory:
      mkdir build && cd build
    • Run CMake:
      cmake ..
    • Compile the project:
      make
  3. Run the Application:

    ./Vole-Machine-Language-Simulator

📥 Download the Latest Release

  • Get the latest version of Vole Machine Language Simulator GUI: Download Here
    Visit the release page to download the precompiled binaries for your system. Extract the downloaded file and run the executable to start using the simulator!

📌 Usage

  1. Load Instruction File: Use the 'Open Instruction File' button to load a Vole machine code file in .txt format.
  2. Fetch and Decode: Click 'Fetch' to load the instruction into the Instruction Register, then click 'Decode' to parse it.
  3. Execute: Use the 'Execute' button to run the decoded instruction, updating memory and registers accordingly.
  4. Control Execution:
    • 'Run One Cycle': Execute a single instruction cycle.
    • 'Run Until Halt': Continuously execute instructions until a halt condition is met.
  5. Reset and Clear: Options are available to reset the program counter or clear memory and registers as needed.

🤝 Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes, ensuring adherence to the project's coding style.
  4. Commit your changes with clear and concise commit messages.
  5. Push your changes to your forked repository.
  6. Submit a pull request detailing your changes and the motivation behind them.

Please ensure that your contributions include relevant documentation and, if applicable, update existing documentation to reflect your changes.

🌟 Acknowledgments

We would like to thank our professor, Dr. Mohamed El-Ramly, for his guidance and support throughout this project and our academic journey. We are grateful for the opportunity to work on this project and develop our programming skills.

🖥️ Console Version

Prefer the classic console-based experience? Check out the Vole Machine Simulator Console Version: Console Version Repository

✍️ Authors

📜 License

This project is licensed under the Mozilla Public License 2.0. See the LICENSE file for more details.

Have fun exploring the Vole Machine Language Simulator GUI! Let us know your thoughts and feedback!! 🎉🤖

About

The Vole Machine Language Simulator GUI is a graphical application designed to simulate the operations of a simple CPU using Qt.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 83.8%
  • Makefile 9.8%
  • C 6.1%
  • QMake 0.3%