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.
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.
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.
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
Switch
Function
LED
Indicates
SW[0]
Indicator state
LED[0]
Global reset_n
SW[1]
Indicator state
LED[1]
UART/MDIO reset_n
SW[2]
Indicator state
LED[2]
PHY PLL 125 MHz_n
SW[3]
Indicator state
LED[3]
PHY interrupt
SW[4]
Indicator state
LED[4]
UDP loopback mode
SW[5]
Indicator state
LED[5]
UDP random or constant data mode
SW[6]
Indicator state
LED[6]
UDP transmitting
SW[7]
Indicator state
LED[7]
MDIO busy
Push Buttons
Button
Function
PUSH[0]
PHY reset
PUSH[1]
Reset UART and MDIO interfaces
PUSH[2]
Global reset
UDP Operation Modes
Mode
Description
Default
Generate and transmit sequence data
Loopback
Echo received packets back to sender
Random data
Generate and transmit random data
Constant data
Transmit predefined data "X" or h58
UART Command Interface
Serial Configuration
Parameter
Value
Baud rate
115200
Data bits
8
Stop bits
1
Parity
None
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
Command
Hex
Description
loopback
6C6F6F706261636B
Enable loopback mode (LED[4] on)
.trigger
2E74726967676572
Send a trigger pulse
..random
2E2E72616E646F6D
Enable random data mode (LED[5] on)
...flood
2E2E2E666C6F6F64
Transmit as fast as possible
udpmtu\xHH\xHH
7564706D7475HHHH
Set MTU size (16-bit, default \x05\xA0 = 1440 B)
pktn\xHH\xHH\x00\x00
706B746EHHHHHHHH
Set packet count per trigger (32-bit, default \x00\x00\x00\x01 = 1)
IP / Network Configuration Commands
Command
Hex
Description
ip_g\xII\xII\xII\xII
69705F67IIIIIIII
Set gateway IP (32-bit)
ip_s\xII\xII\xII\xII
69705F73IIIIIIII
Set local/source IP (32-bit)
ip_d\xII\xII\xII\xII
69705F64IIIIIIII
Set destination IP (32-bit)
subm\xMM\xMM\xMM\xMM
7375626DMMMMMMM
Set subnet mask (32-bit)
srport\xPP\xPP
7372706F7274PPPP
Set UDP source port (16-bit)
dsport\xPP\xPP
6473706F7274PPPP
Set 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
Command
Hex
Description
..mdio_w
2E2E6D64696F5F77
Switch to MDIO write mode
..mdio_r
2E2E6D64696F5F72
Switch to MDIO read mode (default)
phyaddr\xHH
70687961646472HH
Set PHY address (5 LSBs of \xHH, default \x07)
regaddr\xHH
72656761646472HH
Set register address (5 LSBs of \xHH, default \x00)
mdio_d\xHH\xHH
6D64696F5F64HHHH
Set 16-bit write data
mdio_sta
6D64696F5F737461
Start 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.
# 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.
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).