πŸš€ Simulasi CPU

Visualisasi Alur Instruksi dan Komponen CPU

Kontrol Simulasi

Kecepatan

Normal

Program Contoh

Instruction Fetch

Ready
0x0000
-
IF

Instruction Decode

Idle
-
-
-
ID

Execution Unit

Idle
-
A: -
B: -
Result: -
EX

Memory Access

Idle
-
Addr: -
Data: -
MEM

Write Back

Idle
R0
0
R1
0
R2
0
R3
0
WB
Instruction Bus
-
Data Bus
-
Address Bus
-

πŸ“ Program Code

// Program Penjumlahan
LOAD R1, [100]    // Load value from address 100 to R1
LOAD R2, [104]    // Load value from address 104 to R2
ADD R3, R1, R2    // R3 = R1 + R2
STORE [108], R3   // Store result to address 108
HALT              // End program
Program Counter: 0x0000

πŸ’Ύ Memory Contents

⛓️ Pipeline Status

IF
-
ID
-
EX
-
MEM
-
WB
-
Cycles: 0
Instructions: 0
CPI: 0.00

πŸ“Š Performance Metrics

2.5 GHz
0
0%
0

⚠️ Pipeline Hazards

No hazards detected

πŸŽ“ Konsep CPU Pipeline

5-Stage Pipeline:

  • IF - Instruction Fetch: Mengambil instruksi dari memory
  • ID - Instruction Decode: Decode instruksi dan baca register
  • EX - Execute: Eksekusi operasi di ALU
  • MEM - Memory Access: Akses memory jika diperlukan
  • WB - Write Back: Menulis hasil ke register file

Jenis Hazards:

  • Structural: Konflik resource hardware
  • Data: Ketergantungan data antar instruksi
  • Control: Instruksi branch mengubah alur program