# ansari-fawaz/previous-project architecture

> Architecture diagram of the GitHub repository ansari-fawaz/previous-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ansari-fawaz/previous-project
- Repository: https://github.com/ansari-fawaz/previous-project

## Overview

This repository contains parameterized 2-D mesh NoC router RTL in two tracks: a flat valid/ready design and a virtual-channel, credit-based design. The documented runtime flow routes flits through buffering, XY routing, arbitration and crossbar stages; the repository also includes Track A UVM and self-checking RTL verification. The README documents these stages, but no source excerpts were provided, so edges below cite the README and implementation-specific details are limited to paths present in the tree. Some README-described assets, including the FPGA harness and Track B mesh top, are absent from the supplied tree.

Main entry points: [`verification/router_monitor.sv`](https://github.com/ansari-fawaz/previous-project/blob/main/verification/router_monitor.sv) (Router monitor), [`verification/rtl_tests`](https://github.com/ansari-fawaz/previous-project/tree/main/verification/rtl_tests) (RTL testbenches), [`verification/driver.sv`](https://github.com/ansari-fawaz/previous-project/blob/main/verification/driver.sv) (Router driver), [`verification/packet_generator.sv`](https://github.com/ansari-fawaz/previous-project/blob/main/verification/packet_generator.sv) (Packet generator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_track_a["Track A RTL"]
  node_a_router["Flat router"]
  node_a_buffer[("Input FIFO")]
  node_a_route["XY routing"]
  node_a_arbiter["RR arbitration"]
  node_a_crossbar["5x5 crossbar"]
  node_a_flow["Ready backpressure"]
end

subgraph group_track_b["Track B RTL"]
  node_b_router["VC router"]
  node_b_config["Router configuration"]
  node_b_input[("VC input buffers")]
  node_b_route["VC route compute"]
  node_b_vca["VC allocation"]
  node_b_swa["Switch allocation"]
  node_b_crossbar["VC crossbar"]
  node_b_credit["Credit manager"]
  node_b_flow["Credit flow control"]
  node_b_output["Output controller"]
end

subgraph group_mesh["Mesh Integration"]
  node_a_mesh["Valid/ready mesh"]
end

subgraph group_verification["Verification"]
  node_generator["Packet generator"]
  node_driver["Router driver<br/>[driver.sv]"]
  node_monitor["Router monitor<br/>[router_monitor.sv]"]
  node_scoreboard["Scoreboard"]
  node_assertions["Assertions"]
  node_coverage["Functional coverage<br/>[router_coverage.sv]"]
  node_rtl_tests["RTL testbenches"]
end

node_traffic(("Flit source"))

node_traffic -->|"injects flits"| node_a_mesh
node_a_mesh -->|"instantiates mesh routers"| node_a_router
node_a_router -->|"buffers inputs"| node_a_buffer
node_a_router -->|"computes XY route"| node_a_route
node_a_router -->|"arbitrates outputs"| node_a_arbiter
node_a_router -->|"switches flits"| node_a_crossbar
node_a_router -->|"applies backpressure"| node_a_flow
node_b_router -->|"buffers virtual channels"| node_b_input
node_b_router -->|"computes route"| node_b_route
node_b_router -->|"allocates channels"| node_b_vca
node_b_router -->|"allocates switches"| node_b_swa
node_b_router -->|"traverses crossbar"| node_b_crossbar
node_b_router -->|"returns credits"| node_b_credit
node_b_router -->|"uses credit flow"| node_b_flow
node_b_router -->|"registers outputs"| node_b_output
node_b_router -->|"uses parameters"| node_b_config
node_generator -.->|"provides packets"| node_driver
node_driver -.->|"drives DUT"| node_a_mesh
node_monitor -.->|"observes transactions"| node_scoreboard
node_monitor -.->|"samples activity"| node_coverage
node_assertions -.->|"checks behavior"| node_a_mesh
node_rtl_tests -->|"validates mesh"| node_a_mesh
node_rtl_tests -->|"validates router"| node_b_router

click node_generator "https://github.com/ansari-fawaz/previous-project/blob/main/verification/packet_generator.sv"
click node_driver "https://github.com/ansari-fawaz/previous-project/blob/main/verification/driver.sv"
click node_monitor "https://github.com/ansari-fawaz/previous-project/blob/main/verification/router_monitor.sv"
click node_scoreboard "https://github.com/ansari-fawaz/previous-project/blob/main/verification/router_scoreboard.sv"
click node_assertions "https://github.com/ansari-fawaz/previous-project/blob/main/verification/router_assertions.sv"
click node_coverage "https://github.com/ansari-fawaz/previous-project/blob/main/verification/router_coverage.sv"
click node_rtl_tests "https://github.com/ansari-fawaz/previous-project/tree/main/verification/rtl_tests"

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_a_router,node_a_buffer,node_a_route,node_a_arbiter,node_a_crossbar,node_a_flow toneBlue
class node_b_router,node_b_config,node_b_input,node_b_route,node_b_vca,node_b_swa,node_b_crossbar,node_b_credit,node_b_flow,node_b_output toneAmber
class node_a_mesh toneMint
class node_generator,node_driver,node_monitor,node_scoreboard,node_assertions,node_coverage,node_rtl_tests toneRose
class node_traffic toneIndigo
```

## Components

### Track A RTL

- **Flat router**
- **Input FIFO**
- **XY routing**
- **RR arbitration**
- **5x5 crossbar**
- **Ready backpressure**

### Track B RTL

- **VC router**
- **Router configuration**
- **VC input buffers**
- **VC route compute**
- **VC allocation**
- **Switch allocation**
- **VC crossbar**
- **Credit manager**
- **Credit flow control**
- **Output controller**

### Mesh Integration

- **Valid/ready mesh**

### Verification

- [Packet generator](https://github.com/ansari-fawaz/previous-project/blob/main/verification/packet_generator.sv): `verification/packet_generator.sv`
- [Router driver](https://github.com/ansari-fawaz/previous-project/blob/main/verification/driver.sv): `verification/driver.sv`
- [Router monitor](https://github.com/ansari-fawaz/previous-project/blob/main/verification/router_monitor.sv): `verification/router_monitor.sv`
- [Scoreboard](https://github.com/ansari-fawaz/previous-project/blob/main/verification/router_scoreboard.sv): `verification/router_scoreboard.sv`
- [Assertions](https://github.com/ansari-fawaz/previous-project/blob/main/verification/router_assertions.sv): `verification/router_assertions.sv`
- [Functional coverage](https://github.com/ansari-fawaz/previous-project/blob/main/verification/router_coverage.sv): `verification/router_coverage.sv`
- [RTL testbenches](https://github.com/ansari-fawaz/previous-project/tree/main/verification/rtl_tests): `verification/rtl_tests`

### Other components

- **Flit source**

## Connections

- Flit source → Valid/ready mesh: injects flits (evidence: `README.md`)
- Valid/ready mesh → Flat router: instantiates mesh routers (evidence: `README.md`)
- Flat router → Input FIFO: buffers inputs (evidence: `README.md`)
- Flat router → XY routing: computes XY route (evidence: `README.md`)
- Flat router → RR arbitration: arbitrates outputs (evidence: `README.md`)
- Flat router → 5x5 crossbar: switches flits (evidence: `README.md`)
- Flat router → Ready backpressure: applies backpressure (evidence: `README.md`)
- VC router → VC input buffers: buffers virtual channels (evidence: `README.md`)
- VC router → VC route compute: computes route (evidence: `README.md`)
- VC router → VC allocation: allocates channels (evidence: `README.md`)
- VC router → Switch allocation: allocates switches (evidence: `README.md`)
- VC router → VC crossbar: traverses crossbar (evidence: `README.md`)
- VC router → Credit manager: returns credits (evidence: `README.md`)
- VC router → Credit flow control: uses credit flow (evidence: `README.md`)
- VC router → Output controller: registers outputs (evidence: `README.md`)
- VC router → Router configuration: uses parameters (evidence: `README.md`)
- Packet generator → Router driver: provides packets
- Router driver → Valid/ready mesh: drives DUT
- Router monitor → Scoreboard: observes transactions
- Router monitor → Functional coverage: samples activity
- Assertions → Valid/ready mesh: checks behavior
- RTL testbenches → Valid/ready mesh: validates mesh (evidence: `README.md`)
- RTL testbenches → VC router: validates router (evidence: `README.md`)
