https://github.com/mehedi-86/my_cpu
My_CPU 🖥️ A custom-designed CPU architecture implemented in Logisim with essential components like ALU, registers, control unit, and memory to execute fundamental operations and instructions. 🚀
https://github.com/mehedi-86/my_cpu
logisim-computer logisim-cpu our-tiny-computer
Last synced: 3 months ago
JSON representation
My_CPU 🖥️ A custom-designed CPU architecture implemented in Logisim with essential components like ALU, registers, control unit, and memory to execute fundamental operations and instructions. 🚀
- Host: GitHub
- URL: https://github.com/mehedi-86/my_cpu
- Owner: Mehedi-86
- Created: 2025-02-27T09:54:15.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-03-07T04:49:41.000Z (3 months ago)
- Last Synced: 2025-03-07T05:24:07.503Z (3 months ago)
- Topics: logisim-computer, logisim-cpu, our-tiny-computer
- Homepage: https://www.fpga4student.com/2016/11/16-bit-processor-cpu-using-logisim-tool.html
- Size: 2.24 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
🚀 My_CPU
📖 Introduction
This project implements a Custom CPU Architecture using Logisim Evolution. The design includes an Arithmetic Logic Unit (ALU), Registers, Control Unit, and Memory components to execute fundamental operations.
✨ Features
- ✅ ALU Operations → Supports addition, subtraction, AND, OR, and other basic arithmetic and logical operations. The ALU performs these operations based on the input instructions.
- ✅ Register File → Stores temporary data values that the CPU needs for immediate operations, helping improve processing efficiency and speed.
- ✅ Control Unit → Decodes the instruction and controls the execution of the CPU, coordinating how data flows between components such as ALU, memory, and registers.
- ✅ Clock-Driven Execution → Uses clock pulses to execute operations step-by-step, allowing for synchronization and controlling the flow of instructions in a sequential manner.
- ✅ RAM & ROM Integration → Integrates memory for data storage (RAM) and instruction storage (ROM), enabling the CPU to access data and execute instructions effectively.
📂 File Structure
/CPU_Design
│── 2107086_ALU.circ # Arithmetic Logic Unit (ALU)
│── 2107086_CPU.circ # CPU core logic
│── 2107086_alu2.circ # Alternative ALU design
│── 2107086_Project_report.pdf # Documentation of the project
│── Instruction_1.txt # Instruction file for CPU operations
│── ScreenShot/ # Folder containing simulation screenshots
│ └── Screenshot_1.png # CPU simulation screenshot
│── .DS_Store # System file (macOS specific)
🚀 How to Run the Project
🔹 Steps to Open in Logisim Evolution
- Download and Install Logisim Evolution → Logisim Evolution
- Open Logisim Evolution.
- Click "File → Open" and select
2107086_CPU.circ
. - Use "Simulate → Tick Once" to execute step-by-step.
- Observe the registers, ALU, and memory changes during execution.
🔍 Debugging & Common Issues
🔹 Red Wire Errors (Floating Inputs)
- Ensure all inputs have defined values (use constants if needed).
- Check the Control Unit signals for proper instruction execution.
🔹 Clock Not Working
- Ensure the clock is connected to sequential components.
- Use "Tick Frequency → Slow" to debug step-by-step execution.
🔹 ALU Incorrect Outputs
- Check if the MUX selects the correct ALU operation.
- Verify that input values match expected results.
🛠 Future Improvements
- 🚀 Add pipeline stages for faster execution.
- 🚀 Implement interrupt handling for advanced functionality.
- 🚀 Improve instruction set support to handle more complex operations.
📜 License
This project is open-source. Feel free to use, modify, and contribute!
💡 Conclusion
This project demonstrates CPU architecture design in Logisim, focusing on the ALU, registers, memory, and control unit. It provides a foundation for learning computer organization and digital logic.