# kowdoorshashank/python architecture

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

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

## Overview

##### Project type and purpose
- This is a hardware-verification/simulation project implementing and testing AMBA CHI node models in SystemVerilog, driven by a Python testbench (likely via cocotb or a similar framework).
- The SV files define the CHI protocol package (chi_pkg.sv), a “home” node (chi_home_node.sv), and a “requester” node (chi_requester_node.sv). The Makefile builds the simulation, and test_AMBA_CHI.py exercises the DUT.

##### File structure
- Top-level:
- Makefile – simulation build & run scripts
- README.md – links to edaplayground example
- chi_pkg.sv – package of CHI constants/types/interfaces
- chi_home_node.sv – home-node behavioral model
- chi_requester_node.sv – requester-node behavioral model
- test_AMBA_CHI.py – Python-driven testbench
- No “frontend”/“backend” directories; instead this is a unified SV design + external test harness.
- The absence of UVM folders suggests a lightweight cocotb (or similar) approach.

##### README for additional insights
- The linked EDAPLAYGROUND example shows instantiation of both nodes and driving CHI-style request/response flows, verifying correct packet sequencing, response matching, etc.

##### Detailed component breakdown
- Python Testbench:
- cocotb harness
- test sequences (burst reads, writes)
- Simulator:
- Build stage (Makefile)
- VHPI/DPI interface
- chi_pkg.sv:
- Data structs, enums, interface definitions
- chi_requester_node:
- Packet encoder
- State machine for request issuance
- chi_home_node:
- Packet decoder
- Memory model or response generator
- CHI Interconnect:
- Arbitration (if modeled)
- Channels: request, response

## Diagram (Mermaid)

```mermaid
flowchart TB
    MD["README.md<br/>EDAPLAYGROUND Example"]:::external
    TB["Python Testbench"]:::testbench
    Sim["Simulator (Makefile & VHPI/DPI)"]:::simulator

    subgraph "DUT (SystemVerilog)"
        Pkg["chi_pkg.sv"]:::package
        Req["chi_requester_node"]:::module
        Home["chi_home_node"]:::module
        Interc["CHI Interconnect"]:::interconnect
    end

    MD -.->|documentation| TB
    TB -->|"VHPI/DPI calls"| Sim
    Sim -->|"drives stimulus"| Req
    Req -->|"CHI_REQUEST"| Interc
    Interc -->|"CHI_REQUEST"| Home
    Home -->|"CHI_RESPONSE"| Interc
    Interc -->|"CHI_RESPONSE"| Req
    Req -.->|uses types/interfaces| Pkg
    Home -.->|uses types/interfaces| Pkg

    click MD "https://github.com/kowdoorshashank/python/blob/main/README.md"
    click TB "https://github.com/kowdoorshashank/python/blob/main/test_AMBA_CHI.py"
    click Sim "https://github.com/kowdoorshashank/python/tree/main/Makefile"
    click Pkg "https://github.com/kowdoorshashank/python/blob/main/chi_pkg.sv"
    click Req "https://github.com/kowdoorshashank/python/blob/main/chi_requester_node.sv"
    click Home "https://github.com/kowdoorshashank/python/blob/main/chi_home_node.sv"

    classDef testbench fill:#D0E6FF,stroke:#037dd6,color:#000;
    classDef simulator fill:#D0FFD6,stroke:#28a745,color:#000;
    classDef module fill:#FFE6A1,stroke:#d18b00,color:#000;
    classDef package fill:#E0E0E0,stroke:#666,color:#000;
    classDef interconnect fill:#F0F0F0,stroke:#555,color:#000;
    classDef external fill:#FFF0F0,stroke:#C30,color:#000;
```
