# alexforencich/verilog-ethernet architecture

> Architecture diagram of the GitHub repository alexforencich/verilog-ethernet, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alexforencich/verilog-ethernet
- Repository: https://github.com/alexforencich/verilog-ethernet

## Overview

This repository is a Verilog Ethernet component library, spanning packet-processing stacks, MAC/PHY interfaces, and precision-time modules; it also includes board-level UDP echo examples. The documented user path is to select a gigabit or 10G/25G stack or MAC/PHY combination, connect it to a suitable hardware interface, and process Ethernet/IP/UDP traffic. The README explicitly identifies IP–ARP integration and the top-level stack and interface modules. RTL internals were not sampled, so subsystem paths use the existing rtl directory and the graph avoids asserting undocumented internal call relationships.

Main entry points: [`rtl`](https://github.com/alexforencich/verilog-ethernet/tree/master/rtl) (UDP/IP/ARP stack), [`example`](https://github.com/alexforencich/verilog-ethernet/tree/master/example) (UDP echo designs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_stacks["Packet stacks"]
  node_arp["ARP handling"]
  node_ip["IPv4 processing"]
  node_ip_complete["IP plus ARP"]
  node_udp["UDP processing"]
  node_udp_complete["UDP/IP/ARP stack"]
end

subgraph group_ethernet["Ethernet interfaces"]
  node_eth_frames["Ethernet frames"]
  node_mac_1g["Gigabit MACs"]
  node_mac_10g["10G/25G MACs"]
  node_mac_phy["MAC/PHY combo"]
end

subgraph group_physical["PHY processing"]
  node_phy["10G/25G PHY"]
  node_phy_rx["PHY receive"]
  node_phy_tx["PHY transmit"]
end

subgraph group_timing["Precision timing"]
  node_ptp_clock["PTP clock"]
  node_ptp_cdc["PTP clock CDC"]
  node_ptp_output["PTP period output"]
end

subgraph group_examples["Board examples"]
  node_board_examples["UDP echo designs"]
end

node_actor(("Network traffic"))

node_ip_complete -->|"integrates"| node_ip
node_ip_complete -->|"integrates"| node_arp
node_udp_complete -->|"combines"| node_udp
node_udp_complete -->|"combines"| node_ip
node_udp_complete -->|"combines"| node_arp
node_actor -.->|"sends frames"| node_mac_1g
node_mac_1g -->|"handles"| node_eth_frames
node_actor -.->|"sends frames"| node_mac_10g
node_mac_10g -->|"handles"| node_eth_frames
node_mac_phy -->|"combines"| node_phy
node_phy -->|"includes"| node_phy_rx
node_phy -->|"includes"| node_phy_tx
node_ptp_cdc -->|"transfers time"| node_ptp_clock
node_board_examples -.->|"implements echo"| node_udp_complete

click node_arp "https://github.com/alexforencich/verilog-ethernet/tree/master/rtl"
click node_ip "https://github.com/alexforencich/verilog-ethernet/tree/master/rtl"
click node_ip_complete "https://github.com/alexforencich/verilog-ethernet/tree/master/rtl"
click node_udp "https://github.com/alexforencich/verilog-ethernet/tree/master/rtl"
click node_udp_complete "https://github.com/alexforencich/verilog-ethernet/tree/master/rtl"
click node_eth_frames "https://github.com/alexforencich/verilog-ethernet/tree/master/rtl"
click node_mac_1g "https://github.com/alexforencich/verilog-ethernet/tree/master/rtl"
click node_mac_10g "https://github.com/alexforencich/verilog-ethernet/tree/master/rtl"
click node_mac_phy "https://github.com/alexforencich/verilog-ethernet/tree/master/rtl"
click node_phy "https://github.com/alexforencich/verilog-ethernet/tree/master/rtl"
click node_phy_rx "https://github.com/alexforencich/verilog-ethernet/tree/master/rtl"
click node_phy_tx "https://github.com/alexforencich/verilog-ethernet/tree/master/rtl"
click node_ptp_clock "https://github.com/alexforencich/verilog-ethernet/tree/master/rtl"
click node_ptp_cdc "https://github.com/alexforencich/verilog-ethernet/tree/master/rtl"
click node_ptp_output "https://github.com/alexforencich/verilog-ethernet/tree/master/rtl"
click node_board_examples "https://github.com/alexforencich/verilog-ethernet/tree/master/example"

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_arp,node_ip,node_ip_complete,node_udp,node_udp_complete toneBlue
class node_eth_frames,node_mac_1g,node_mac_10g,node_mac_phy toneAmber
class node_phy,node_phy_rx,node_phy_tx toneMint
class node_ptp_clock,node_ptp_cdc,node_ptp_output toneRose
class node_board_examples,node_actor toneIndigo
```

## Components

### Packet stacks

- [ARP handling](https://github.com/alexforencich/verilog-ethernet/tree/master/rtl): `rtl`
- [IPv4 processing](https://github.com/alexforencich/verilog-ethernet/tree/master/rtl): `rtl`
- [IP plus ARP](https://github.com/alexforencich/verilog-ethernet/tree/master/rtl): `rtl`
- [UDP processing](https://github.com/alexforencich/verilog-ethernet/tree/master/rtl): `rtl`
- [UDP/IP/ARP stack](https://github.com/alexforencich/verilog-ethernet/tree/master/rtl): `rtl`

### Ethernet interfaces

- [Ethernet frames](https://github.com/alexforencich/verilog-ethernet/tree/master/rtl): `rtl`
- [Gigabit MACs](https://github.com/alexforencich/verilog-ethernet/tree/master/rtl): `rtl`
- [10G/25G MACs](https://github.com/alexforencich/verilog-ethernet/tree/master/rtl): `rtl`
- [MAC/PHY combo](https://github.com/alexforencich/verilog-ethernet/tree/master/rtl): `rtl`

### PHY processing

- [10G/25G PHY](https://github.com/alexforencich/verilog-ethernet/tree/master/rtl): `rtl`
- [PHY receive](https://github.com/alexforencich/verilog-ethernet/tree/master/rtl): `rtl`
- [PHY transmit](https://github.com/alexforencich/verilog-ethernet/tree/master/rtl): `rtl`

### Precision timing

- [PTP clock](https://github.com/alexforencich/verilog-ethernet/tree/master/rtl): `rtl`
- [PTP clock CDC](https://github.com/alexforencich/verilog-ethernet/tree/master/rtl): `rtl`
- [PTP period output](https://github.com/alexforencich/verilog-ethernet/tree/master/rtl): `rtl`

### Board examples

- [UDP echo designs](https://github.com/alexforencich/verilog-ethernet/tree/master/example): `example`

### Other components

- **Network traffic**

## Connections

- IP plus ARP → IPv4 processing: integrates (evidence: `README.md`)
- IP plus ARP → ARP handling: integrates (evidence: `README.md`)
- UDP/IP/ARP stack → UDP processing: combines (evidence: `README.md`)
- UDP/IP/ARP stack → IPv4 processing: combines (evidence: `README.md`)
- UDP/IP/ARP stack → ARP handling: combines (evidence: `README.md`)
- Network traffic → Gigabit MACs: sends frames
- Gigabit MACs → Ethernet frames: handles (evidence: `README.md`)
- Network traffic → 10G/25G MACs: sends frames
- 10G/25G MACs → Ethernet frames: handles (evidence: `README.md`)
- MAC/PHY combo → 10G/25G PHY: combines (evidence: `README.md`)
- 10G/25G PHY → PHY receive: includes (evidence: `README.md`)
- 10G/25G PHY → PHY transmit: includes (evidence: `README.md`)
- PTP clock CDC → PTP clock: transfers time (evidence: `README.md`)
- UDP echo designs → UDP/IP/ARP stack: implements echo
