The 4096-Processor Simulator is a Python-based simulation tool designed to emulate the behavior of a large-scale, multi-processor architecture. It provides an interactive environment for executing assembly-like instructions, debugging code, and visualizing processor operations.
This simulator is ideal for students, researchers, and developers looking to understand parallel computing, memory management, and assembly instruction execution in a multi-processor system.
- Displays key registers like Accumulator, Program Counter, Flags, and others.
- Shows memory addresses in hexadecimal with dynamic updates when storing values.
- Automatically converts between Hexadecimal, Decimal, Binary, and Octal.
- Users can input and execute assembly-like instructions.
- Includes a range of basic and advanced instructions:
- Data Transfer:
LOAD
,STORE
- Arithmetic Operations:
ADD
,SUB
,MUL
,DIV
- Logical Operations:
AND
,OR
,XOR
,NOT
- Branching:
JZ
(Jump if Zero),JNZ
(Jump if Not Zero),JMP
(Unconditional Jump)
- Data Transfer:
- Provides step-by-step execution, breakpoints, and instruction history for debugging.
- Tracks data movement between registers and memory in real-time.
- Converts Decimal, Hexadecimal, Binary, and Octal values.
4096-Processor-Simulator/
│── src/
│ ├── debugger.py # Debugging functionalities
│ ├── instruction_processor.py # Memory management system
│ ├── memory_manager.py # Register management module
│ ├── processor_simulator.py # Assembly instruction execution
│ ├── simulator_gui.py # GUI for visualization (Optional)
│── README.md
│── requirements.txt # Dependencies
│── LICENSE
git clone https://github.com/yourusername/4096-processor-simulator.git
cd 4096-processor-simulator
Ensure you have Python 3.8+ installed. Then, install the required dependencies:
pip install -r requirements.txt
python src/simulator.py
-
Load an Assembly File
- You can write your own assembly-like instructions or use the provided examples.
-
Execute Instructions
- Run the program step-by-step or all at once.
-
Debug & Analyze
- Use breakpoints, instruction history, and visualization tools to analyze execution.
Below is an example of an assembly-like program to add two numbers:
LOAD R1, 10 ; Load value 10 into register R1
LOAD R2, 5 ; Load value 5 into register R2
ADD R3, R1, R2 ; Add R1 and R2, store result in R3
STORE R3, 0x100 ; Store result at memory address 0x100
✅ Multi-threaded execution for faster simulation.
✅ Enhanced GUI for real-time visualization.
✅ Customizable instruction sets and new CPU architectures.
✅ Export execution logs for deeper analysis.
Contributions are welcome! To contribute:
- Fork this repository.
- Create a new branch (
feature-branch
). - Commit your changes and push to your fork.
- Create a Pull Request (PR) for review.
This project is licensed under the MIT License.
For questions, feedback, or support, open an issue or reach out via email at abhijit@imit.ac.in
.