Skip to the content
2 layers54 × 47.5 mmPCB Ethernet-1Gbps Spartan-6, the printed circuit board in 3D

PCB Ethernet-1Gbps Spartan-6

Lampranthus/KSZ9031RNXCC-PCB

A 1 Gbps Ethernet UDP communication system implemented on a Xilinx Spartan-6 FPGA with a KSZ9031 Gigabit PHY. Achieves 1 Gbps throughput in TX, RX, and full-duplex modes, controlled via UART or UDP commands.

Size
54 × 47.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
80
Nets
67
Pads
270
Tracks, vias
782, 28
Pours
4
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
14 Feb 2026
Updated
24 Jun 2026

Overview

PCB Ethernet-1Gbps Spartan-6 is an open-source printed circuit board by Lampranthus, from the Lampranthus/KSZ9031RNXCC-PCB repository on GitHub, published under the MIT licence. It is a 2-layer board of 54 × 47.5 mm with 80 parts on 67 nets, routed with 782 tracks and 28 vias.

It is built around the KSZ9031RNXCC and ARJM11B1-502-AB-EW2. Its parts include 29 capacitors, 18 resistors, 4 connectors, 4 fuses and 2 ICs. It belongs with the fPGA and programmable logic and interfaces and adapters boards and the FPGA and CPLD boards of this library.

Main components

2

README

README.md

Spartan-6 1GbE Interface

Board photo

A 1 Gbps Ethernet UDP communication system implemented on a Xilinx Spartan-6 FPGA with a KSZ9031 Gigabit PHY. Achieves ~1 Gbps throughput in TX, RX, and full-duplex modes, controlled via UART or UDP commands.

Hardware

ComponentPart
FPGAXilinx Spartan-6 XC6SLX9-2TQG144C
PHYKSZ9031RNXCC
ConnectorARJM11B1-502-AB-EW2

Features

  • UDP TX/RX at line rate (~1 Gbps)
  • Full-duplex simultaneous TX + RX (237 MB/s measured)
  • UART control interface — configure and trigger tests via serial commands
  • UDP command interface — remotely set packet count, size, and rate
  • ARP support — FPGA responds to ARP requests
  • Software shutdown mode — low-power state via command (~159 mA)

Board Controls

Switches & LEDs

SwitchFunctionLEDIndicates
SW[0]Indicator stateLED[0]Global reset_n
SW[1]Indicator stateLED[1]UART/MDIO reset_n
SW[2]Indicator stateLED[2]PHY PLL 125 MHz_n
SW[3]Indicator stateLED[3]PHY interrupt
SW[4]Indicator stateLED[4]UDP loopback mode
SW[5]Indicator stateLED[5]UDP random or constant data mode
SW[6]Indicator stateLED[6]UDP transmitting
SW[7]Indicator stateLED[7]MDIO busy

Push Buttons

ButtonFunction
PUSH[0]PHY reset
PUSH[1]Reset UART and MDIO interfaces
PUSH[2]Global reset

UDP Operation Modes

ModeDescription
DefaultGenerate and transmit sequence data
LoopbackEcho received packets back to sender
Random dataGenerate and transmit random data
Constant dataTransmit predefined data "X" or h58

UART Command Interface

Serial Configuration

ParameterValue
Baud rate115200
Data bits8
Stop bits1
ParityNone

Sending Commands

Commands are sent using send_uart.py. Multiple commands can be chained in a single call — they are concatenated in order with no separator:

bash
python3 send_uart.py command1 command2 command3

Hardware constraint: every transmission must be exactly 8 bytes or a multiple of 8 bytes. The script enforces this and will error before touching the serial port if the length is wrong.


UDP Control Commands

CommandHexDescription
loopback6C6F6F706261636BEnable loopback mode (LED[4] on)
.trigger2E74726967676572Send a trigger pulse
..random2E2E72616E646F6DEnable random data mode (LED[5] on)
...flood2E2E2E666C6F6F64Transmit as fast as possible
udpmtu\xHH\xHH7564706D7475HHHHSet MTU size (16-bit, default \x05\xA0 = 1440 B)
pktn\xHH\xHH\x00\x00706B746EHHHHHHHHSet packet count per trigger (32-bit, default \x00\x00\x00\x01 = 1)

IP / Network Configuration Commands

CommandHexDescription
ip_g\xII\xII\xII\xII69705F67IIIIIIIISet gateway IP (32-bit)
ip_s\xII\xII\xII\xII69705F73IIIIIIIISet local/source IP (32-bit)
ip_d\xII\xII\xII\xII69705F64IIIIIIIISet destination IP (32-bit)
subm\xMM\xMM\xMM\xMM7375626DMMMMMMMSet subnet mask (32-bit)
srport\xPP\xPP7372706F7274PPPPSet UDP source port (16-bit)
dsport\xPP\xPP6473706F7274PPPPSet UDP destination port (16-bit)

IP format: IPs are sent as raw 32-bit big-endian values. Example: 192.168.1.100 → \xC0\xA8\x01\x64


MDIO / PHY Control Commands

CommandHexDescription
..mdio_w2E2E6D64696F5F77Switch to MDIO write mode
..mdio_r2E2E6D64696F5F72Switch to MDIO read mode (default)
phyaddr\xHH70687961646472HHSet PHY address (5 LSBs of \xHH, default \x07)
regaddr\xHH72656761646472HHSet register address (5 LSBs of \xHH, default \x00)
mdio_d\xHH\xHH6D64696F5F64HHHHSet 16-bit write data
mdio_sta6D64696F5F737461Start MDIO operation

MDIO Transaction Sequence

text
1. Set mode      →  ..mdio_r  or  ..mdio_w
2. Set PHY addr  →  phyaddr\xHH
3. Set reg addr  →  regaddr\xHH
4. Set data      →  mdio_d\xHH\xHH   (write operations only)
5. Execute       →  mdio_sta

Always return to read mode after a write to leave the interface in a safe state.


Command Examples

Read PHY register (default config)

bash
python3 send_uart.py ..mdio_r "phyaddr\x07" "regaddr\x00" mdio_sta

Sequence: read mode → PHY 7 → register 0 → execute


Write to PHY register, then read back to confirm

bash
python3 send_uart.py ..mdio_w "phyaddr\x07" "regaddr\x00" "mdio_d\x11\x40" mdio_sta ..mdio_r mdio_sta
StepCommandAction
1..mdio_wSwitch to write mode
2phyaddr\x07Target PHY 7
3regaddr\x00Target register 0
4mdio_d\x11\x40Write data = 0x1140
5mdio_staExecute write
6..mdio_rSwitch back to read mode
7mdio_staExecute read (verify)

Common MDIO sequences

PurposeCommand
Read PHY 7, reg 0python3 send_uart.py ..mdio_r "phyaddr\x07" "regaddr\x00" mdio_sta
Write default config (PHY 7, reg 0)python3 send_uart.py ..mdio_w "phyaddr\x07" "regaddr\x00" "mdio_d\x11\x40" mdio_sta ..mdio_r mdio_sta
Software reset (PHY 7)python3 send_uart.py ..mdio_w "phyaddr\x07" "regaddr\x00" "mdio_d\x91\x40" mdio_sta ..mdio_r mdio_sta
Power down (PHY 7)python3 send_uart.py ..mdio_w "phyaddr\x07" "regaddr\x00" "mdio_d\x19\x40" mdio_sta ..mdio_r mdio_sta

MDIO MMD Register Access

MMD (MIIM Managed Device) registers are accessed indirectly using the MDIO address registers D (0x0D) and E (0x0E).

The access sequence is always:

  1. Write the MMD device address to register 0x0D
  2. Write the target register address to register 0x0E
  3. Write the function (read/write + optional auto-increment) back to 0x0D
  4. Read or write data via register 0x0E
Write MMD — Example: MMD device 0x02, register 0x00 ← 0x0010
bash
# Step 1 — Select MMD device address (device = 0x02)
python3 send_uart.py ..mdio_w "phyaddr\x07" "regaddr\x0D" "mdio_d\x00\x02" mdio_sta

# Step 2 — Select target register inside the MMD (register = 0x0000)
python3 send_uart.py ..mdio_w "phyaddr\x07" "regaddr\x0E" "mdio_d\x00\x00" mdio_sta

# Step 3 — Switch to data function, no auto-increment (0x4000 | device)
python3 send_uart.py ..mdio_w "phyaddr\x07" "regaddr\x0D" "mdio_d\x40\x02" mdio_sta

# Step 4 — Write new data to the MMD register
python3 send_uart.py ..mdio_w "phyaddr\x07" "regaddr\x0E" "mdio_d\x00\x10" mdio_sta

0x4002 = data function (bits [15:14] = 01) + device 0x02, no auto-increment. 0x8002 = data function with post-increment (bits [15:14] = 10) + device 0x02.


Read MMD — Example: MMD device 0x02, registers 0x00 → 0x02 (burst with auto-increment)
bash
# Step 1 — Select MMD device address (device = 0x02)
python3 send_uart.py ..mdio_w "phyaddr\x07" "regaddr\x0D" "mdio_d\x00\x02" mdio_sta

# Step 2 — Select starting register (register = 0x0000)
python3 send_uart.py ..mdio_w "phyaddr\x07" "regaddr\x0E" "mdio_d\x00\x00" mdio_sta

# Step 3 — Switch to data function WITH auto-increment (0x8000 | device)
python3 send_uart.py ..mdio_w "phyaddr\x07" "regaddr\x0D" "mdio_d\x80\x02" mdio_sta

# Step 4 — Read register 0x00
python3 send_uart.py ..mdio_r "phyaddr\x07" "regaddr\x0E" mdio_sta

# Step 5 — Read register 0x01 (auto-incremented)
python3 send_uart.py ..mdio_r "phyaddr\x07" "regaddr\x0E" mdio_sta

# Step 6 — Read register 0x02 (auto-incremented)
python3 send_uart.py ..mdio_r "phyaddr\x07" "regaddr\x0E" mdio_sta

One-liner shortcuts
bash
# Full write — MMD 0x02, reg 0x00 ← 0x0008
python3 send_uart.py ..mdio_w \
  "phyaddr\x07" "regaddr\x0D" "mdio_d\x00\x02" mdio_sta \
  "regaddr\x0E" "mdio_d\x00\x00"               mdio_sta \
  "regaddr\x0D" "mdio_d\x40\x02"               mdio_sta \
  "regaddr\x0E" "mdio_d\x00\x08"               mdio_sta

# Full read — MMD 0x02, reg 0x00 (single, no auto-increment)
python3 send_uart.py ..mdio_w \
  "phyaddr\x07" "regaddr\x0D" "mdio_d\x00\x02" mdio_sta \
  "regaddr\x0E" "mdio_d\x00\x00"               mdio_sta \
  "regaddr\x0D" "mdio_d\x40\x02"               mdio_sta \
  ..mdio_r "regaddr\x0E" mdio_sta
Register 0x0D function field reference
Bits [15:14]ValueFunction
000x0000 | deviceAddress function — points to MMD register
010x4000 | deviceData function — no auto-increment
100x8000 | deviceData function — post-increment on each access read or write
110xC000 | deviceData function — post increment on writes only

Network Setup

Set up a 192.168.1.1/24 network between your PC and the FPGA:

DeviceIP Address
FPGA (default)192.168.1.12
PC (default)192.168.1.11

IPv6 must be disabled on the interface for compatibility.

Configure the PC interface:

bash
sudo ip addr flush dev eth0
sudo ip addr add 192.168.1.11/24 dev eth0
sudo ip link set eth0 up

Verify ARP (confirms the FPGA link is up):

bash
sudo arping -I eth0 -c 10 192.168.1.12

Throughput Tests

TX Test (~1 Gbps)

Terminal 1 — monitor traffic:

bash
sudo tcpdump -i eth0 udp -w - | pv > /dev/null

Terminal 2 — trigger transmission (set ~1 M packets first for accurate results):

bash
python3 send_uart.py .trigger

Expected: ~118 MB/s ≈ 0.994 Gbps


RX Test

Terminal 1 — flood UDP packets to the FPGA:

bash
sudo hping3 192.168.1.12 -2 -p 1234 -d 1440 --flood

Terminal 2 — monitor received traffic:

bash
sudo tcpdump -i eth0 udp -w - | pv > /dev/null

Full-Duplex Test (TX + RX simultaneously)

Run both the TX and RX tests at the same time and monitor with:

bash
sudo tcpdump -i eth0 udp -w - | pv > /dev/null

Measured: 237 MB/s (~1 Gbps full-duplex confirmed)

text
tcpdump: listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
26.9GiB 0:03:54 [236MiB/s]

Power Consumption

Measurements include FPGA + PHY at 1 Gbps link speed.

ModeCurrent
Standby (1 Gbps link up)~467 mA
Software shutdown~159 mA
Full duplex (1 Gbps)~552 mA

Troubleshooting

SymptomSolution
No response from FPGACheck USB connection and power supply
LEDs all offVerify switch positions (SW[1] enables LEDs)
LED[7] stuck onMDIO busy — wait for operation to complete before sending next command
Unexpected data receivedVerify baud rate is set to 115200
Script errors before sendingPayload length must be a multiple of 8 bytes — add \x00 padding

Parts

80
QtyValueFootprintReferences
210.1uFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C28 +5
11TestPoint_Pad_D1.0mmTestPoint:TestPoint_Pad_D1.0mm1V2, 1V2, 3V3, 3V3, 3V3, 5V, 5V, GND, GND, GND, GND
1010kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR2, R3, R4, R5, R6, R7, R8, R9, R10, R12
610uFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC1, C8, C25, C26, C27, C29
40Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderF1, F2, F3, JP1
4220Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR13, R14, R17, R18
3LOGOLOGOG***, G***, G***
21N4148Diode_SMD:D_SOD-123FD1, D2
21kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR11, R15
222pFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC2, C3
2LEDLED_SMD:LED_1206_3216Metric_Pad1.42x1.75mm_HandSolder3V3, 5V0
112.1kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR1
1120Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR16
125MhzCrystal:Crystal_SMD_3225-4Pin_3.2x2.5mm_HandSolderingY1
1ARJM11B1-502-AB-EW2ARJM11B1_502_AB_EW2:ABRACON_ARJM11B1-502-AB-EW2J1
1Conn_01x01_PinConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalJ4
1Conn_01x02_PinConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ3
1Conn_02x20_Odd_EvenConnector_PinSocket_2.54mm:PinSocket_2x20_P2.54mm_HorizontalJ2
1KSZ9031RNXCCKSZ9031RNXCC:IC_KSZ9031RNXCCU2
1LD1117S12TR_SOT223Package_TO_SOT_SMD:SOT-223-3_TabPin2U3
1PMOSPackage_TO_SOT_SMD:SOT-23_HandsolderingQ1
1TestPoint_Pad_1.0x1.0mmTestPoint:TestPoint_Pad_1.0x1.0mmMO

The 78 most common of 80 parts.

Similar boards

  • 4 layers100 × 74 mmBeaglelogic standalone, the printed circuit board in 3D

    Beaglelogic standalone

    abhishek-kakkar/beaglelogic-standalone

    BeagleLogic implemented as a turnkey and standalone logic analyzer

    260 parts15
  • 4 layers77.2 × 25 mmUSB 3.1 to Ethernet, the printed circuit board in 3D

    USB 3.1 to Ethernet

    OmkarTikekar0037/usb3-gigabit-ethernet-adapter

    This is a repository for version control of zoho project - USB 3.1 to Gigabit Ethernet Adapter

    79 parts1
  • 2 layers54.6 × 89.5 mmPicoRX, the printed circuit board in 3D

    PicoRX

    dawsonjon/PicoRX

    Build a SDR SW/MW/LW Receiver with a Raspberry Pi Pico

    80 parts556
  • 2 layers130.4 × 76.6 mmGb stream cart, the printed circuit board in 3D

    Gb stream cart

    Staacks/gbinterceptor

    Capture or stream Game Boy gameplay footage via USB without modifying the Game Boy.

    80 parts542
  • 2 layers100 × 100 mmEleLab v2 Bus100, the printed circuit board in 3D

    EleLab v2 Bus100

    Chrismettal/EleLab_v2

    Cheap DIY lab system for hobbyists and the tinkering folk

    80 parts531GPL-3.0
  • 2 layers59.6 × 109.5 mmKivu12, the printed circuit board in 3D

    Kivu12

    ohmtech-rdi/eurorack-blocks

    Software to Hardware Prototyping for Eurorack using C++, Max/Gen~ or Faust

    80 parts410
  • 2 layers137.9 × 92.7 mmErgoTravel, the printed circuit board in 3D

    ErgoTravel

    jpconstantineau/ErgoTravel

    A Portable Ergonomic Split Keyboard inspired from the ErgoDox, Let's Split and Minidox

    80 parts284MIT

Questions

How big is the PCB Ethernet-1Gbps Spartan-6 PCB?

It measures 54 × 47.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the PCB Ethernet-1Gbps Spartan-6 use?

80 parts, built around the KSZ9031RNXCC and ARJM11B1-502-AB-EW2. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the PCB Ethernet-1Gbps Spartan-6 KiCad files?

From the Lampranthus/KSZ9031RNXCC-PCB repository on GitHub, at the commit this page was made from: the board is hardware/PCB_Ethernet-1Gbps-Spartan-6/PCB_Ethernet-1Gbps-Spartan-6.kicad_pcb and its schematic hardware/PCB_Ethernet-1Gbps-Spartan-6/ADC.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the PCB Ethernet-1Gbps Spartan-6 design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).