# chasep255/nexys-4-ddr-ethernet-mac architecture

> Architecture diagram of the GitHub repository chasep255/nexys-4-ddr-ethernet-mac, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chasep255/nexys-4-ddr-ethernet-mac
- Repository: https://github.com/chasep255/nexys-4-ddr-ethernet-mac

## Overview

This is an RMII Ethernet MAC IP core for the Nexys 4 DDR. User logic sends and receives packet bytes through native or AXI-stream interfaces; the core handles Ethernet framing and CRC, while SMI/MDIO provides PHY register access and link-status outputs. The README documents these capabilities but no source excerpts were supplied, so internal module connections are shown only as unverified dashed relationships. The simple board example is omitted as an example rather than a core subsystem.

Main entry points: [`rtl/eth_mac.v`](https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/eth_mac.v) (MAC core), [`rtl/eth_smi.v`](https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/eth_smi.v) (SMI / MDIO), [`rtl/eth_status.v`](https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/eth_status.v) (Link status), [`rtl/eth_rx.v`](https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/eth_rx.v) (RX engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_packet_io["Packet interfaces"]
  node_eth_mac["MAC core<br/>[eth_mac.v]"]
  node_rx_native["Native RX<br/>[eth_mac.v]"]
  node_tx_native["Native TX<br/>[eth_mac.v]"]
  node_rx_axis["RX AXI adapter<br/>[rx_axis_adapter.v]"]
  node_tx_axis["TX AXI adapter<br/>[tx_axis_adapter.v]"]
end

subgraph group_ethernet["Ethernet datapath"]
  node_rx_engine["RX engine<br/>[eth_rx.v]"]
  node_tx_engine["TX engine<br/>[eth_tx.v]"]
  node_crc["CRC32<br/>[crc32.v]"]
end

subgraph group_phy_control["PHY control"]
  node_smi["SMI / MDIO<br/>[eth_smi.v]"]
  node_status["Link status<br/>[eth_status.v]"]
end

node_user_logic(("User logic"))
node_phy(("Ethernet PHY"))

node_user_logic -->|"sends packets"| node_eth_mac
node_eth_mac -->|"delivers packets"| node_user_logic
node_eth_mac -->|"RMII transmit/receive"| node_phy
node_eth_mac -.->|"provides register access"| node_smi
node_smi -->|"reads/writes registers"| node_phy
node_user_logic -->|"receives native bytes"| node_rx_native
node_user_logic -->|"sends native bytes"| node_tx_native
node_rx_axis -->|"adapts interface"| node_rx_native
node_tx_axis -->|"adapts interface"| node_tx_native
node_rx_engine -.->|"checks frames"| node_crc
node_tx_engine -.->|"generates CRC"| node_crc
node_eth_mac -.->|"receives frames"| node_rx_engine
node_eth_mac -.->|"transmits frames"| node_tx_engine
node_status -.->|"checks PHY status"| node_smi
node_status -->|"reports link state"| node_user_logic

click node_eth_mac "https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/eth_mac.v"
click node_rx_native "https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/eth_mac.v"
click node_tx_native "https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/eth_mac.v"
click node_rx_axis "https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/rx_axis_adapter.v"
click node_tx_axis "https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/tx_axis_adapter.v"
click node_rx_engine "https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/eth_rx.v"
click node_tx_engine "https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/eth_tx.v"
click node_crc "https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/crc32.v"
click node_smi "https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/eth_smi.v"
click node_status "https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/eth_status.v"

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_eth_mac,node_rx_native,node_tx_native,node_rx_axis,node_tx_axis,node_user_logic toneBlue
class node_rx_engine,node_tx_engine,node_crc toneAmber
class node_smi,node_status toneMint
class node_phy toneIndigo
```

## Components

### Packet interfaces

- [MAC core](https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/eth_mac.v): `rtl/eth_mac.v`
- [Native RX](https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/eth_mac.v): `rtl/eth_mac.v`
- [Native TX](https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/eth_mac.v): `rtl/eth_mac.v`
- [RX AXI adapter](https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/rx_axis_adapter.v): `rtl/rx_axis_adapter.v`
- [TX AXI adapter](https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/tx_axis_adapter.v): `rtl/tx_axis_adapter.v`

### Ethernet datapath

- [RX engine](https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/eth_rx.v): `rtl/eth_rx.v`
- [TX engine](https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/eth_tx.v): `rtl/eth_tx.v`
- [CRC32](https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/crc32.v): `rtl/crc32.v`

### PHY control

- [SMI / MDIO](https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/eth_smi.v): `rtl/eth_smi.v`
- [Link status](https://github.com/chasep255/nexys-4-ddr-ethernet-mac/blob/master/rtl/eth_status.v): `rtl/eth_status.v`

### Other components

- **User logic**
- **Ethernet PHY**

## Connections

- User logic → MAC core: sends packets (evidence: `README.md`)
- MAC core → User logic: delivers packets (evidence: `README.md`)
- MAC core → Ethernet PHY: RMII transmit/receive (evidence: `README.md`)
- MAC core → SMI / MDIO: provides register access
- SMI / MDIO → Ethernet PHY: reads/writes registers (evidence: `README.md`)
- User logic → Native RX: receives native bytes (evidence: `README.md`)
- User logic → Native TX: sends native bytes (evidence: `README.md`)
- RX AXI adapter → Native RX: adapts interface (evidence: `README.md`)
- TX AXI adapter → Native TX: adapts interface (evidence: `README.md`)
- RX engine → CRC32: checks frames
- TX engine → CRC32: generates CRC
- MAC core → RX engine: receives frames
- MAC core → TX engine: transmits frames
- Link status → SMI / MDIO: checks PHY status
- Link status → User logic: reports link state (evidence: `README.md`)
