Low-latency 1G Ethernet
complete (October 2026)
https://github.com/devanandanj/low-latency-1g-ethernet
Purpose
- To be used in an ITCH 5.0 orderbook replication project.
- Target board : Xilinx Virtex-5 LX110T.
Tools and technologies
- Xilinx Virtex-5 - GMII, 8 bit data @ 125 MHz
- Xilinx ISE
- SystemVerilog RTL
- cocotb 1.9.2 + Verilator 5.020 for verification
- ITCH 5.0 sample data : a full SPY day has gone through it in the order book’s top level sim
FPGA board selection
- Being a student it is hard to acquire modern FPGA boards to learn. Borrowing boards available in my college department lab was the only option.
- The only viable options available were ZedBoard Rev C (Zynq XC7Z020) and Virtex-5 LX110T.
- ZedBoard’s gigabit PHY is wired to the Zynq processing system and not the actual FPGA fabric. So every packet will pass through the processing system’s Ethernet MAC and DMA before reaching the fabric. That adds latency which is unavoidable.
- Another option was to use a PMOD 100 Mb/s Ethernet module. I thought that was a good approach as I would get to use a modern board, but in reality the use of 100 Mb/s Ethernet introduced 10x the latency, incoming packets would be the bottleneck.
1 Gb/s : 8 ns per byte
100 Mb/s : 80 ns per byte
100-byte ITCH packet: ~0.8 us vs ~8 us just to arrive on the wire
- So the only option left was the Xilinx Virtex-5 board, which was actual pain, as I had to use old Xilinx ISE to generate the bitstream.
- The practical experience of 1G ethernet outweighed the ISE pain. So the decision was set to use Xilinx Virtex-5.
Design Decisions
- The CRC is at the end of the frame. Checking it first means holding every byte until the frame is over, so I don’t. Bytes are forwarded as they arrive, the CRC runs alongside them, and
m_badgives the verdict at the end. If it is set, the consumer rolls back. - My first MAC RX still cost 2 cycles. It held each byte back so it could mark the last one, because the end of a frame only shows up a cycle later, when
gmii_rx_dvdrops. Replacingm_lastwith a separatem_eofpulse removed the need to hold anything, andm_databecame a wire fromgmii_rxd. - The parsers keep their header checks in flip-flops beside the stream. The data itself never passes through a register.
- Frames that aren’t for us are dropped silently. Frames that turn out bad are flagged, because by then their bytes have already gone out.
Result
Logic, per payload byte : 0 cycles in the core, +1 at the IOB on the board
Wire, before first payload byte : 400 ns
Frame verdict (m_bad) : 2 cycles after last byte
- The 400 ns is all wire: 8 bytes of preamble plus 42 bytes of headers at 8 ns per byte. It’s measured at GMII, so the PHY’s own latency isn’t included.

Verification
- 59 cocotb tests across 7 suites, running in CI.
- A same-cycle latency test through the whole chain. Adding one register makes it fail.
- I broke the design on purpose to prove the tests could fail.
What’s next
- It only runs in simulation so far. The board top in hardware-orderbook already registers the GMII pins in the IOBs, which adds a cycle at the pins, and ISE meets timing at 125 MHz. Next is running it on the Virtex-5 with a real PHY.