Skip to content

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. πŸš€

Notifications You must be signed in to change notification settings

Mehedi-86/My_CPU

Repository files navigation

πŸš€ 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

  1. Download and Install Logisim Evolution β†’ Logisim Evolution
  2. Open Logisim Evolution.
  3. Click "File β†’ Open" and select 2107086_CPU.circ.
  4. Use "Simulate β†’ Tick Once" to execute step-by-step.
  5. 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.

About

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. πŸš€

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published