Skip to content

nithya333/CPU-Design-and-Implementation

Repository files navigation

4-bit CPU Design & Implementation: Logisim-Based RISC Architecture

A custom-built 4-bit CPU demonstrating the fundamental principles of Computer Organization and Digital Logic.

Team Members: M Nithyashree, Krupa P Nadgir, Manasa S

Overview

This project involves the design and simulation of a 4-bit CPU within the Logisim environment. The architecture is built to execute a custom 16-bit instruction set, utilizing a Harvard Architecture to separate instruction and data memory for higher efficiency. It serves as a practical implementation of RISC (Reduced Instruction Set Computer) principles, featuring a multi-bus system for streamlined data flow.

Key Specifications

  • ALU (Arithmetic Logic Unit): Performs 4-bit integer arithmetic (ADD, SUB) and logical operations (AND, OR, XOR, NOT, SLL, SLR).

  • Register File: Contains 8 general-purpose registers (R0 through R7).

  • ROM: 1024 locations for 16-bit instruction storage.

  • RAM: 256 locations for 4-bit data storage.

  • Instruction Set: 16-bit instructions designed for modular execution cycles.

  • Control Flow: Includes a Program Counter (PC) capable of addressing 256 locations.

Instruction Set Architecture (ISA)

The CPU supports various operations defined by specific opcodes, including:

  • Arithmetic: ADD, SUB, INC, DEC.

  • Logical: AND, OR, XOR, NOT, SLL, SLR.

  • Data Transfer: MOV (Register to Register), MVI (Move Immediate).

Circuit Design

The implementation is divided into several modular components within Logisim:

  1. Instruction Fetch: Managing the PC and ROM to retrieve the next 16-bit instruction.

  2. Instruction Decode: A dedicated control unit that breaks down the 16-bit instruction into opcodes and register addresses.

  3. Execute: The ALU processes data from the Register File based on the decoded signals.

  4. Write-Back: Results are written back to the registers or data RAM.

Simulation Results

The design has been verified through Logisim's simulation engine, successfully executing a sequence of assembly-like instructions:

  • Verified Arithmetic: Demonstrated operations like ADD R1, R2, R4 with correct overflow/value handling.

  • Verified Logic: Validated XOR, AND, and SUB operations across multiple registers.

About

A custom 4-bit RISC-style Central Processing Unit designed and simulated using the Logisim platform.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors