Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

SME309_Project

Summary: Microprocessor Design Project Tasks

Below is a detailed summary of each task in the SME309 Microprocessor Design Project, with checkboxes for tracking progress.


1. Implementation of a Five-Stage Pipeline Processor with Hazard Handling [25 points]

  • Objective: Implement a five-stage pipeline processor (based on Lab2's single-cycle processor) and handle both data hazards (e.g., data forwarding, stall, flush) and control hazards (e.g., early BTA, flush).
  • Technical Requirements:
    • (1) Using different clock edges✅
    • (2) Inserting NOPs✅
    • (3) Data forwarding✅
    • (4) Early BTA✅
  • Test Requirements:
    • (1) Verify Read-After-Write (RAW) hazard✅
    • (2) Verify memory-to-memory copy✅
    • (3) Verify load-and-use hazard✅
    • (4) Verify control hazards✅
  • Report Requirements:
    • (1) Introduction (overview of the five-stage pipeline processor) [3 points]
    • (2) Hardware architecture (schematic and description of pipeline stages) [3 points]
    • (3) Hazard handling techniques (data hazards, control hazards, etc.) [4 points]
    • (4) Implementation details (key modules) [5 points]
    • (5) Test code and simulation waveforms (testbench and assembly code for each hazard, and waveform results) [8 points]
    • (6) On-board test result [2 points]

2. Non-Stalling CPU for Multi-Cycle Instructions [10 points]

  • Objective: Implement a non-stalling CPU where multi-cycle instructions (e.g., MUL) do not block the pipeline unless data dependencies exist.
  • Technical Requirements:
    • (1) Detect data dependency:
    • If no dependency: pipeline continues execution.✅
    • If dependency: stall until the result is ready.✅
  • Test Requirements:
    • (1) Demonstrate pipeline continues execution without stalling for no dependency.✅
    • (2) Demonstrate the pipeline stalls when dependency exists.✅
  • Report Requirements:
    • (1) Introduction (overview of multi-cycle instructions) [2 points]
    • (2) Hardware architecture (schematic and implementation details) [2 points]
    • (3) Data dependency detection (algorithm and hardware implementation) [3 points]
    • (4) Test code and simulation waveforms (testbench, assembly code, waveform results) [3 points]

3. Expand the ARM Processor to Support All 16 Data Processing Instructions [10 points]

  • Objective: Extend the ARM processor to support all 16 Data Processing (DP) instructions as described in the ARM Architecture Reference Manual (Section A3.4).
  • Technical Requirements:
    • (1) Modify the ALU and ALU decoder in the Control Unit.
    • (2) Output the C flag from CondiLogic module as an input to the ALU module to support ADC instruction.
    • (3) Implement hardware efficiently without adding unnecessary adders.
  • Test Requirements:
    • Verify the correct operation of all 16 DP instructions using testbench and assembly code.
  • Report Requirements:
    • (1) Introduction (overview of all 16 DP instructions) [2 points]
    • (2) Hardware architecture (schematic and description of implementation) [2 points]
    • (3) Hardware reuse (detailed description of ALU reuse) [3 points]
    • (4) Test code and simulation waveforms (testbench, assembly code, waveform results) [3 points]

4. A 4-Way Set Associative Cache [10 points]

  • Objective: Implement a 4-way set associative cache (4KB total, 256 rows × 4 ways × 4 bytes) integrated with the ARM CPU.
  • Technical Requirements:
    • (1) Read hit: directly load data from cache to register.
    • (2) Read miss: load data from memory to cache, then load data to register.
    • (3) Write hit: write to cache, mark block as dirty, and write back to memory upon replacement.
    • (4) Write miss:
    • If dirty: write back dirty block to memory and replace cache.
    • If not dirty: write directly to memory and load the new block into the cache.
  • Test Requirements:
    • Verify all four cache access scenarios (read hit, read miss, write hit, write miss).
  • Report Requirements:
    • (1) Introduction (overview of the 4-way set associative cache) [2 points]
    • (2) Hardware architecture (schematic and description) [2 points]
    • (3) Cache access implementation (detailed description of four access situations) [3 points]
    • (4) Test code and simulation waveforms (testbench, assembly code, waveform results) [3 points]

5. Floating-Point Unit (FPU) [10 points]

  • Objective: Add a Floating-Point Unit (FPU) to support single-precision floating-point operations (FADD and FMUL) in the ARM CPU.
  • Technical Requirements:
    • Implement the FPU with support for special cases (e.g., NaN).
  • Test Requirements:
    • Write assembly programs to verify all FPU functionalities.
  • Report Requirements:
    • (1) Introduction (overview of floating-point format and computation) [2 points]
    • (2) Hardware architecture (schematic and FPU design details) [2 points]
    • (3) Special case handling (e.g., NaN values) [2 points]
    • (4) Hardware optimization (design considerations and optimizations) [1 point]
    • (5) Test code and simulation waveforms (testbench, assembly code, waveform results) [3 points]

6. Single-Cycle RISC-V CPU Supporting RV32I [25 points]

  • Objective:

    Implement a single-cycle RISC-V CPU core supporting the RV32I instruction set, including:

    • Integer computational instructions (ADD, SUB, AND, OR, XOR, shift).
    • Load/store instructions (LW, SW, etc.).
    • Control transfer instructions (BEQ, BNE, JAL, JALR, AUIPC).
  • Test Requirements:

    • Write assembly programs (manually converted to binary) to verify correct execution of all instruction types.
  • Report Requirements:

    • (1) Overview of the RISC-V ISA and comparison with ARM [5 points]
    • (2) Module description and implementation [5 points]
    • (3) Simulation results for all instruction types [5 points]
    • (4) Simple program using all instruction types [5 points]
    • (5) Challenges and inspirations during implementation [5 points]

7. Pipelined RISC-V CPU [10 points]

  • Objective:

    Extend the single-cycle RISC-V CPU (from Task 6) to a pipelined version with 5 stages:

    • IF: Instruction fetch
    • ID: Instruction decode and register file read
    • EX: Execution or address calculation
    • MEM: Data memory access
    • WB: Write back
  • Hazard Handling:

    • Handle data hazards (e.g., forwarding, stalls) and control hazards (e.g., branch prediction, flushing).
  • Test Requirements:

    • Write assembly programs covering a variety of instructions to verify correct execution across pipeline stages.
  • Report Requirements:

    • (1) Introduction (overview of the 5-stage pipelined RISC-V CPU) [2 points]
    • (2) Hardware architecture (schematic and description) [2 points]
    • (3) Hazard handling techniques (data and control hazards) [2 points]
    • (4) Implementation details (key modules) [2 points]
    • (5) Test code and simulation waveforms (testbench, assembly code, waveform results) [2 points]

Bonus: Advanced Processor Techniques [Up to 20 points]

  • Options (choose one or more):
    • Dynamic branch prediction
    • Multiple-issue (superscalar)
    • Out-of-order execution
    • Interrupt handling (exception handler)
    • Other advanced features
  • Note: Bonus tasks are challenging and time-consuming.

Submission Requirements

  • Report PDF (including simulation waveforms, results, and analysis).
  • Source code ZIP (including RTL files, assembly code, testbench files, etc.).
  • Any other supporting materials.

Deadline: 2025/01/12, 23:55 PM

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages