# gokulbalagopal/verification-of-apb-protocol-using-uvm architecture

> Architecture diagram of the GitHub repository gokulbalagopal/verification-of-apb-protocol-using-uvm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gokulbalagopal/verification-of-apb-protocol-using-uvm
- Repository: https://github.com/gokulbalagopal/verification-of-apb-protocol-using-uvm

## Overview

##### Project type and purpose
- This is a hardware-verification project using UVM (Universal Verification Methodology) to verify an APB (Advanced Peripheral Bus) protocol implementation.
- The README confirms a SystemVerilog/Verilog design, a UVM testbench, and use of QuestaSim for simulation and coverage.

##### File structure
- Top-level RTL/DUT files:
– bridge_apb.sv (bus-bridge logic)
– slave_apb.sv (APB slave model)
– timer.v (example peripheral)
– top_apb.sv (top-level APB system instantiation)
- UVM testbench components (all .sv):
– apb_agent.sv
– apb_driver.sv
– apb_monitor.sv
– apb_scoreboard.sv
– apb_seq_item.sv (transaction definition)
– apb_sequence.sv (sequence of transactions)
– apb_sequencer.sv
– apb_env.sv (aggregates agent + scoreboard)
– apb_testbench_top.sv (top of UVM testbench)
– apb_test.sv (defines specific test scenarios)

##### Extract insights from the README
- UVM components created: sequencer, driver, monitor, agent, environment, scoreboard, testbench.
- Coverage report generation implies a coverage collector component (could be part of the UVM environment).

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Device Under Test"
        DUT["top_apb.sv"]:::dut
        Bridge["bridge_apb.sv"]:::dut
        Slave["slave_apb.sv"]:::dut
        Timer["timer.v"]:::dut
    end

    subgraph "UVM Testbench"
        Test["apb_test.sv"]:::uvm
        TB["apb_testbench_top.sv"]:::uvm
        Env["apb_env.sv"]:::uvm
        Agent["apb_agent.sv"]:::uvm
        Sequencer["apb_sequencer.sv"]:::uvm
        Driver["apb_driver.sv"]:::uvm
        Monitor["apb_monitor.sv"]:::uvm
        Scoreboard["apb_scoreboard.sv"]:::analysis
        SeqItem["apb_seq_item.sv"]:::uvm
        Sequence["apb_sequence.sv"]:::uvm
        Coverage["Coverage Collector"]:::coverage
    end

    %% Test flow
    Test --> TB
    TB --> Env

    %% Environment composition
    Env --> Agent
    Env --> Scoreboard
    Env --> Coverage

    %% Agent internals
    Agent --> Sequencer
    Agent --> Driver
    Agent --> Monitor

    %% Sequence and transaction definition
    Sequence -->|"uses"| SeqItem
    Sequence -->|"triggers"| Sequencer

    %% Transaction to signal flow
    Sequencer -->|"TLM transport"| Driver:::tlm
    Driver -->|"drives signals"| Bridge

    %% DUT datapath
    Bridge --> Slave
    Bridge --> Timer

    %% Observation flow
    Slave --> Monitor
    Timer --> Monitor
    Monitor -->|"observed transactions"| Scoreboard

    %% Click Events
    click DUT "https://github.com/gokulbalagopal/verification-of-apb-protocol-using-uvm/blob/master/top_apb.sv"
    click Bridge "https://github.com/gokulbalagopal/verification-of-apb-protocol-using-uvm/blob/master/bridge_apb.sv"
    click Slave "https://github.com/gokulbalagopal/verification-of-apb-protocol-using-uvm/blob/master/slave_apb.sv"
    click Timer "https://github.com/gokulbalagopal/verification-of-apb-protocol-using-uvm/blob/master/timer.v"
    click Test "https://github.com/gokulbalagopal/verification-of-apb-protocol-using-uvm/blob/master/apb_test.sv"
    click TB "https://github.com/gokulbalagopal/verification-of-apb-protocol-using-uvm/blob/master/apb_testbench_top.sv"
    click Env "https://github.com/gokulbalagopal/verification-of-apb-protocol-using-uvm/blob/master/apb_env.sv"
    click Agent "https://github.com/gokulbalagopal/verification-of-apb-protocol-using-uvm/blob/master/apb_agent.sv"
    click Sequencer "https://github.com/gokulbalagopal/verification-of-apb-protocol-using-uvm/blob/master/apb_sequencer.sv"
    click Driver "https://github.com/gokulbalagopal/verification-of-apb-protocol-using-uvm/blob/master/apb_driver.sv"
    click Monitor "https://github.com/gokulbalagopal/verification-of-apb-protocol-using-uvm/blob/master/apb_monitor.sv"
    click Scoreboard "https://github.com/gokulbalagopal/verification-of-apb-protocol-using-uvm/blob/master/apb_scoreboard.sv"
    click SeqItem "https://github.com/gokulbalagopal/verification-of-apb-protocol-using-uvm/blob/master/apb_seq_item.sv"
    click Sequence "https://github.com/gokulbalagopal/verification-of-apb-protocol-using-uvm/blob/master/apb_sequence.sv"

    %% Styles
    classDef dut fill:#ADD8E6,stroke:#000;
    classDef uvm fill:#90EE90,stroke:#000;
    classDef analysis fill:#FFA500,stroke:#000;
    classDef coverage fill:#DDA0DD,stroke:#000;
    classDef tlm stroke-dasharray:5 5;
```
