# kowdoorshashank/amba_chi architecture

> Architecture diagram of the GitHub repository kowdoorshashank/amba_chi, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kowdoorshashank/amba_chi
- Repository: https://github.com/kowdoorshashank/amba_chi

## Overview

##### Project type and purpose
- This is a UVM-based verification environment for the AMBA CHI protocol.
- It instantiates a Device-Under-Test (DUT) that implements CHI and drives it with UVM drivers and sequences, monitors responses, and checks correctness with a scoreboard.

##### File structure
- All files are SystemVerilog (.sv).
- Top-level harness: top.sv (likely instantiates DUT and UVM testbench)
- UVM test components:
– chi_env.sv: environment container
– chi_agent (driver/monitor/sequencer/sequence files)
– chi_driver.sv
– chi_monitor.sv
– chi_sequencer.sv
– chi_sequence.sv / chi_sequence_item.sv
– chi_scoreboard.sv
– chi_test.sv: the UVM test definition
- Protocol definition and reuse:
– chi_pkg.sv: CHI protocol definitions (transactions, enums)
– chi_intf.sv: interface to DUT
- Protocol-specific nodes for modeling traffic patterns:
– chi_home_node.sv, chi_requester_node.sv

##### README
- Confirms: “AMBA_CHI with UVM”
- EDA Playground link shows intended use is functional verification

##### Essential elements to capture
- Clear labels on every block (e.g., “chi_driver,” “chi_scoreboard”).

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% DUT Boundary
    subgraph "DUT Boundary"
        DUT["DUT (AMBA CHI)"]:::dut
        chi_intf["chi_intf"]:::interface
    end

    %% Testbench Envelope
    subgraph "Testbench Envelope"
        chi_test["chi_test"]:::test
        subgraph "Environment (chi_env)"
            chi_env["chi_env"]:::env
            subgraph "Agent (chi_agent)"
                sequencer["chi_sequencer"]:::driver
                driver["chi_driver"]:::driver
                monitor["chi_monitor"]:::monitor
            end
            scoreboard["chi_scoreboard"]:::scoreboard
        end
    end

    %% Sequences and Models
    seq["chi_sequence"]:::package
    seq_item["chi_sequence_item"]:::package
    home["chi_home_node"]:::model
    req["chi_requester_node"]:::model

    %% Protocol Package
    chi_pkg["chi_pkg"]:::package

    %% Interactions
    chi_test -->|"start sequence"| sequencer
    sequencer -->|"send transaction"| driver
    driver -->|"apply stimulus"| chi_intf
    chi_intf -->|"drive DUT"| DUT
    DUT -->|"response"| chi_intf
    chi_intf -->|"observe response"| monitor
    monitor -->|"forward transaction"| scoreboard
    seq -->|"expected behavior"| scoreboard
    home -.->|"model traffic"| scoreboard
    req -.->|"model traffic"| scoreboard

    %% Package usage
    chi_pkg -.-> chi_test
    chi_pkg -.-> chi_env
    chi_pkg -.-> sequencer
    chi_pkg -.-> driver
    chi_pkg -.-> monitor
    chi_pkg -.-> scoreboard
    chi_pkg -.-> seq
    chi_pkg -.-> seq_item

    %% Click Events
    click DUT "https://github.com/kowdoorshashank/amba_chi/blob/main/top.sv"
    click chi_intf "https://github.com/kowdoorshashank/amba_chi/blob/main/chi_intf.sv"
    click chi_pkg "https://github.com/kowdoorshashank/amba_chi/blob/main/chi_pkg.sv"
    click chi_env "https://github.com/kowdoorshashank/amba_chi/blob/main/chi_env.sv"
    click chi_test "https://github.com/kowdoorshashank/amba_chi/blob/main/chi_test.sv"
    click sequencer "https://github.com/kowdoorshashank/amba_chi/blob/main/chi_sequencer.sv"
    click driver "https://github.com/kowdoorshashank/amba_chi/blob/main/chi_driver.sv"
    click monitor "https://github.com/kowdoorshashank/amba_chi/blob/main/chi_monitor.sv"
    click scoreboard "https://github.com/kowdoorshashank/amba_chi/blob/main/chi_scoreboard.sv"
    click seq "https://github.com/kowdoorshashank/amba_chi/blob/main/chi_sequence.sv"
    click seq_item "https://github.com/kowdoorshashank/amba_chi/blob/main/chi_sequence_item.sv"
    click home "https://github.com/kowdoorshashank/amba_chi/blob/main/chi_home_node.sv"
    click req "https://github.com/kowdoorshashank/amba_chi/blob/main/chi_requester_node.sv"
    click chi_agent "https://github.com/kowdoorshashank/amba_chi/blob/main/chi_agent.sv"
    click README "https://github.com/kowdoorshashank/amba_chi/blob/main/README.md"

    %% Styles
    classDef dut fill:#ADD8E6,stroke:#000;
    classDef interface fill:#ADD8E6,stroke:#000;
    classDef driver fill:#98FB98,stroke:#000;
    classDef monitor fill:#FFA500,stroke:#000;
    classDef scoreboard fill:#FFA500,stroke:#000;
    classDef package fill:#D3D3D3,stroke:#000,stroke-dasharray: 5 5;
    classDef env fill:#90EE90,stroke:#000;
    classDef test fill:#90EE90,stroke:#000;
    classDef model fill:#D3D3D3,stroke:#000;
    class chi_test,chi_env env
    class chi_test test
    class sequencer,driver driver
    class monitor monitor
    class scoreboard scoreboard
    class chi_pkg,seq,seq_item package
    class home,req model
    class DUT,chi_intf dut
    class chi_agent env
```
