The OJ finally sped up today! It’s five times faster!!!! 🎉
Final CPU Architecture:
• Register
• Reorder Buffer
• Reservation Station
• Load Store Buffer
• Instruction Queue
• ALU
• Decoder
• Branch Target Buffer
-
Decoder
Decodes the instructions fetched from the MemoryController, primarily distinguishing between Load/Store operations and other operations.
-
Instruction Queue
Stores fetched instructions temporarily and determines whether they should be sent to the Reorder Buffer, Reservation Station, or Load Store Buffer.
-
Branch Target Buffer
Used for branch prediction, with the PC stored inside and a two-bit saturating counter for prediction.
(1) Includes an ICache:
- Instruction cache with a size of 128.
- Uses Direct Mapping due to its relatively small size.
(2) Execution Priority:
- Store > Load > Fetch
-
Queue structure, commits instructions in order.
-
Controls rollbacks:
Stores predicted results and issues rollback commands if predictions are incorrect.
-
Commits only one instruction at a time.
Registers are updated only after committing to ensure correctness.
-
Continuously listens for broadcasts from Reservation Station and Load Store Buffer.
- Supports out-of-order execution.
- Continuously listens for broadcasts from the ALU, ROB, and Load Store Buffer.
- Queue structure with in-order execution and in-order commit.
- Interacts with the Memory Controller.
- Continuously listens for broadcasts from Reservation Station and ROB.
- Renames entries during issue using entries sent by the ROB.
- Updates values or clears rename states only with information committed by the ROB (this is critical).
