This project was developed as part of the Computer Organization and Architecture course. A simple 16-bit processor architecture capable of executing basic instructions was designed using classic Logisim software.
The processor supports the following instructions:
SUBI– Subtracts an immediate value from a register.ORI– Performs a bitwise OR operation with a register and an immediate.STR– Stores the content of a register into memory.BNE– Branches to a new instruction if two registers are not equal.
The processor follows a classic 5-stage architecture:
- Fetch
- Decode
- Execute
- Memory
- Write Back
- Program Counter (PC): Holds the address of the current instruction.
- Instruction Memory: Stores the instruction set.
- Instruction Decoder: Splits instructions into opcode, registers, and immediate fields.
- Register File: Contains 8 general-purpose 16-bit registers.
- ALU: Performs operations like SUBI and ORI.
- Data Memory: Stores data using the STR instruction.
- Control Unit: Generates control signals such as ALUOp, RegWrite, MemWrite, Branch.
- MUXes: Used to select between register or immediate values for ALU and branching.
Opcode (5) | Rd (3) | Rs (3) | Immediate (5)
SUBI Rd, Rs, #imm
ORI Rd, Rs, #imm
Opcode (5) | Rt (3) | Ra (3) | Offset (5)
STR Rt, [Ra, #offset]
Opcode (5) | Rs (3) | Rt (3) | Label (5)
BNE Rs, Rt, #label
- Registers were manually initialized.
- Instructions were executed step-by-step using clock pulses.
- The proper execution of each instruction was verified.
- Branching was based on the zero flag result from the ALU.
Bu proje, Bilgisayar Organizasyonu ve Mimarisi dersi kapsamında gerçekleştirilmiştir. Klasik Logisim yazılımı kullanılarak temel komutları çalıştırabilen, 16-bit genişliğinde bir işlemci mimarisi tasarlanmıştır.
Projede desteklenen komutlar şunlardır:
SUBI– Register ile immediate değeri çıkartır.ORI– Register ile immediate değeri bit düzeyinde VEYA (OR) işlemi yapar.STR– Register'daki veriyi belleğe yazar.BNE– İki register eşit değilse dallanma yapar.
İşlemci mimarisi klasik 5 aşamalı yapıdadır:
- Fetch
- Decode
- Execute
- Memory
- Write Back
- Program Counter (PC): Komut adresini tutar.
- Instruction Memory: Komutları barındırır.
- Instruction Decoder: Komutu opcode ve alanlara ayırır.
- Register File: 8 adet 16-bit yazmaç içerir.
- ALU: SUBI, ORI işlemlerini gerçekleştirir.
- Data Memory: STR komutu ile veriyi yazar.
- Control Unit: Komutlara göre kontrol sinyalleri üretir.
- MUX'lar: ALU ve dallanma kaynaklarını seçmekte kullanılır.
Opcode (5) | Rd (3) | Rs (3) | Immediate (5)
SUBI Rd, Rs, #imm
ORI Rd, Rs, #imm
Opcode (5) | Rt (3) | Ra (3) | Offset (5)
STR Rt, [Ra, #offset]
Opcode (5) | Rs (3) | Rt (3) | Label (5)
BNE Rs, Rt, #label
- Yazmaçlara başlangıç değerleri elle yüklendi.
- Clock darbesi ile komutlar adım adım çalıştırıldı.
- Komutların doğru şekilde yürütüldüğü gözlemlendi.
- Dallanma kontrolleri sıfır bayrağına göre çalıştırıldı.
