Files
2025-07-21 11:52:03 +02:00

73 lines
2.5 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## 📘 **Zusammenfassung: V4 Prozessor (Teil 2) Computerarchitektur**
### 🔁 Wiederholung aus Teil 1
- **Instruktionstypen (MIPS):**
- **R-Format:** arithmetische/logische Operationen (z.B. `add $s1,$s2,$s3`)
- **Load/Store:** Speicherzugriff (z.B. `lw`, `sw`)
- **Branch:** bedingte Sprünge (`beq`, `bne`)
- **Datenpfad (Full Datapath):**
- Register → ALU → Speicher → Register
- Separate Instruktions- und Datenspeicher nötig, da ein Zugriff pro Zyklus
---
### ⚙️ Steuerungseinheit (Control Unit)
- **Erzeugt Steuersignale aus dem Opcode:**
- **MemtoReg:** bestimmt Datenquelle für Register-Schreiben
- **ALUSrc:** wählt ALU-Operand (Register vs. unmittelbarer Wert)
- **RegWrite:** aktiviert Schreibzugriff auf Register
- **MemRead/MemWrite:** steuern Speicherzugriffe
- **Branch:** aktiviert bei bedingten Sprüngen
- **ALU Control:**
- Basierend auf Opcode und Funct-Feld
- Beispiel Mapping:
| ALUOp | Funct | ALU-Funktion |
| ----- | ------ | ------------ |
| 00 | XXXXXX | `add` |
| 01 | XXXXXX | `sub` |
| 10 | 100000 | `add` |
| 10 | 100010 | `sub` |
| 10 | 100100 | `and` |
| 10 | 100101 | `or` |
| 10 | 101010 | `slt` |
---
### 📦 Erweiterter Datenpfad
- Unterstützung für:
- **Jumps (`j`, `jal`):**
- PC-Update mit 26-Bit Zieladresse + oberen 4 Bit des alten PCs
- Steuerleitung „Jump“ wird aus Opcode dekodiert
- **Branches (`beq`, `bne`):**
- Zieladresse berechnen (PC+4 + Offset << 2)
- ALU prüft, ob Bedingung erfüllt (Zero-Flag)
---
### 🚨 Performance-Betrachtung
- **Ein-Zyklus-Datenpfad Problem:**
- Längster Pfad (Critical Path) bestimmt Taktfrequenz
- Beispiel: Load-Befehl → Instruktionsspeicher → Registerfile → ALU → Datenspeicher → Registerfile
- Unterschiedliche Instruktionen hätten unterschiedliche Latenzen → nicht praktikabel
- **Lösung:** **Pipelining**
- Aufteilung des Datenpfads in Stufen
- Überlappende Bearbeitung mehrerer Instruktionen
---
### 📝 Für die Klausur merken
✅ Steuersignale (MemtoReg, ALUSrc, RegWrite, Branch, Jump)
✅ ALU Control Mapping (wie wird aus Opcode+Funct ALU-Funktion bestimmt?)
✅ Erweiterung des Datenpfads für Jump/Branch
✅ Problem des Ein-Zyklus-Datenpfads (Critical Path) → Motivation für Pipelining
✅ Unterschied: Jump vs. Branch
---