Fig. PCIe Gen5 Endpoint Design: From AXI to Link Training · themed illustration
PCIe Gen5 endpoint design spans protocol, physical layer, and system integration challenges; this article walks the complete path from the AXI interface to link training and the key engineering decisions.
The PCIe protocol stack has three layers: Transaction handles TLP assembly and flow control; Data Link handles reliable transport, ACK, and retransmission; Physical handles encoding (128b/130b), equalization, and link training. Endpoint design starts by mapping these three layers’ responsibilities onto FPGA resources (GT transceivers, DMA, AXI bridges).
The AXI4/AXI-Stream to PCIe TLP mapping is the core of datapath design: address-space mapping (BAR space ↔ host addresses), DMA engines (descriptor queues, multi-channel transfers), TLP packing (MRd/MWr/Cpl formats and alignment). Common pitfalls: read/write timeouts, tag reuse, and completion reordering.
Link training at 32GT/s involves negotiating TX equalization and RX equalization, clock recovery (CDR), and link-width downgrade strategy. When debugging, use a protocol analyzer to capture Training Sequences and judge whether the issue is insufficient equalization or reference clock skew.
At this speed, vias, connectors, and trace loss all significantly affect the eye diagram. Engineering points: choose low-loss materials, control via stubs, introduce retimers when needed; verification includes bit error rate (BER) tests and eye-diagram scanning.