This project involves the design and implementation of a 4-stage pipelined multimedia processing unit using VHDL/Verilog hardware description languages. The unit incorporates a forwarding unit to handle data hazards and is designed with features inspired by SIMD (Single Instruction, Multiple Data) processing for multimedia instructions, similar to the Sony Cell SPU and Intel SSE architectures.
- Learn VHDL/Verilog: Gain proficiency in HDL for digital circuit design and implementation.
- Understand Pipelining: Develop and test a clock-edge-sensitive pipeline with four stages:
- Instruction Fetch (IF)
- Instruction Decode/Register Read (ID)
- Execution (EX)
- Write Back (WB)
- Design Multimedia Operations: Implement a reduced instruction set supporting multimedia-specific operations like
Multiply-Add
,Shift
, andAdd-Unsigned
.
- Fetches 25-bit instructions from a 64-entry instruction buffer.
- Updates the Program Counter (PC) to point to the next instruction.
- Decodes the instruction and reads up to three 128-bit register operands.
- Handles register write signals for ensuring write consistency.
- Executes ALU operations such as:
- Arithmetic (Add, Subtract)
- Logic (AND, OR)
- Multimedia-specific operations (Multiply-Add with Saturation).
- Incorporates a Forwarding Unit to resolve data hazards and ensure the most recent data is used.
- Writes results back to the register file.
-
Multimedia ALU
- Performs SIMD-style arithmetic and logic operations.
- Supports data saturation and overflow handling.
-
Register File
- 32 registers, each 128-bits wide.
- Supports simultaneous reads/writes with explicit signal handling.
-
Instruction Buffer
- Stores instructions for execution and increments the PC per cycle.
-
Forwarding Unit
- Resolves Read-After-Write (RAW) data hazards by forwarding the most recent data to dependent instructions.
-
Pipeline Control
- Ensures proper instruction progression through the stages.
- Handles pipeline stalls and flushes when necessary.
- LI (Load Immediate): Loads a 16-bit immediate value into a 128-bit register.
- Multiply-Add (R4 Format): Performs multiply-add or multiply-subtract with saturation.
- Arithmetic (R3 Format):
AHS
: Add Halfword Saturated.AU
: Add Unsigned.SFHS
: Subtract Halfword Saturated.