# youssef-fd/risc-v-pipelined-uvm-verification architecture

> Architecture diagram of the GitHub repository youssef-fd/risc-v-pipelined-uvm-verification, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/youssef-fd/risc-v-pipelined-uvm-verification
- Repository: https://github.com/youssef-fd/risc-v-pipelined-uvm-verification

## Overview

The tree indicates a SystemVerilog RISC-V processor with single-cycle and pipelined datapaths, instruction/data memories, and supporting execution and control logic. The likely workflow is instruction fetch, decode, execution, memory access, and writeback, with pipeline-specific hazard handling. No README or source excerpts were provided, so those stages and module responsibilities are inferred from filenames; no module-to-module relationships can be evidenced safely.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_datapaths["Processor Datapaths"]
  node_single_cycle["Single-Cycle Datapath"]
  node_pipelined["Pipelined Datapath"]
end

subgraph group_execution["Execution and Control"]
  node_alu["ALU<br/>[alu.sv]"]
  node_alu_pkg["ALU Definitions<br/>[alu_pkg.sv]"]
  node_control["Control Unit<br/>[control_unit.sv]"]
  node_branch["Branch Resolution<br/>[branch_resolve.sv]"]
  node_immediate["Immediate Generator<br/>[imm_gen.sv]"]
  node_opcodes["RISC-V Opcodes"]
end

subgraph group_pipeline["Pipeline Support"]
  node_forwarding["Forwarding Unit<br/>[forwarding_unit.sv]"]
  node_hazards["Hazard Unit<br/>[hazard_unit.sv]"]
  node_pipeline_pkg["Pipeline Definitions<br/>[pipeline_pkg.sv]"]
end

subgraph group_storage["Memory and State"]
  node_instruction_memory["Instruction Memory<br/>[I_mem.sv]"]
  node_data_memory["Data Memory<br/>[D_mem.sv]"]
  node_register_file["Register File<br/>[regfile.sv]"]
end

click node_single_cycle "https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/datapath_single_cycle.sv"
click node_pipelined "https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/datapath_pipelined.sv"
click node_alu "https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/alu.sv"
click node_alu_pkg "https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/alu_pkg.sv"
click node_control "https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/control_unit.sv"
click node_branch "https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/branch_resolve.sv"
click node_immediate "https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/imm_gen.sv"
click node_opcodes "https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/riscv_opcodes_pkg.sv"
click node_forwarding "https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/forwarding_unit.sv"
click node_hazards "https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/hazard_unit.sv"
click node_pipeline_pkg "https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/pipeline_pkg.sv"
click node_instruction_memory "https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/I_mem.sv"
click node_data_memory "https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/D_mem.sv"
click node_register_file "https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/regfile.sv"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_single_cycle,node_pipelined toneBlue
class node_alu,node_alu_pkg,node_control,node_branch,node_immediate,node_opcodes toneAmber
class node_forwarding,node_hazards,node_pipeline_pkg toneMint
class node_instruction_memory,node_data_memory,node_register_file toneRose
```

## Components

### Processor Datapaths

- [Single-Cycle Datapath](https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/datapath_single_cycle.sv): `rtl/datapath_single_cycle.sv`
- [Pipelined Datapath](https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/datapath_pipelined.sv): `rtl/datapath_pipelined.sv`

### Execution and Control

- [ALU](https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/alu.sv): `rtl/alu.sv`
- [ALU Definitions](https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/alu_pkg.sv): `rtl/alu_pkg.sv`
- [Control Unit](https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/control_unit.sv): `rtl/control_unit.sv`
- [Branch Resolution](https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/branch_resolve.sv): `rtl/branch_resolve.sv`
- [Immediate Generator](https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/imm_gen.sv): `rtl/imm_gen.sv`
- [RISC-V Opcodes](https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/riscv_opcodes_pkg.sv): `rtl/riscv_opcodes_pkg.sv`

### Pipeline Support

- [Forwarding Unit](https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/forwarding_unit.sv): `rtl/forwarding_unit.sv`
- [Hazard Unit](https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/hazard_unit.sv): `rtl/hazard_unit.sv`
- [Pipeline Definitions](https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/pipeline_pkg.sv): `rtl/pipeline_pkg.sv`

### Memory and State

- [Instruction Memory](https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/I_mem.sv): `rtl/I_mem.sv`
- [Data Memory](https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/D_mem.sv): `rtl/D_mem.sv`
- [Register File](https://github.com/youssef-fd/risc-v-pipelined-uvm-verification/blob/main/rtl/regfile.sv): `rtl/regfile.sv`
