Protocols

PCIe protocol basics

By CourseTron Team ·  7 min read ·  Updated Oct 2026 💬 𝕏 in f
Table of Contents
    🖨  Download / Print this guide (PDF)

    In short: PCIe (PCI Express) is a high-speed, point-to-point serial interconnect that links CPUs to GPUs, SSDs, and network cards using independent lanes that scale from x1 to x16. It is built as a three-layer stack — Transaction, Data Link, and Physical — that moves data in packets called TLPs, and each new generation roughly doubles the per-lane bandwidth.

    What Is pcie?

    PCIe, short for Peripheral Component Interconnect Express, is the dominant expansion interconnect inside nearly every modern computer. It replaced the older parallel PCI and AGP buses with a serial, point-to-point design: instead of many devices sharing one wide parallel bus, each device gets its own dedicated connection to a central switch fabric rooted at the CPU or chipset.

    This shift matters because parallel buses hit a wall — keeping dozens of wires perfectly synchronized ("skew") becomes impossible at high clock rates. A serial link sends bits one after another on a differential pair, embeds the clock in the data stream, and sidesteps the skew problem entirely. The result is an interconnect that has scaled from 2.5 GT/s in 2003 to 64 GT/s today while keeping the same software programming model.

    Key fact: A PCIe "lane" is actually four wires — two differential pairs, one for transmit and one for receive — so a x16 slot carries 64 physical signal wires. Because each direction is independent, PCIe is inherently full-duplex.

    Lanes, Links and the Point-to-Point Fabric

    The building block of PCIe is the lane. A lane is a single bidirectional serial channel. Bundling lanes together forms a link, written as x1, x2, x4, x8, or x16, where the number is the lane count. A graphics card typically uses a x16 link; an NVMe SSD commonly uses x4.

    Data striping spreads bytes across the available lanes, so a x16 link delivers roughly sixteen times the throughput of a single lane. Links are negotiated at startup — a x16 card in a x8 slot will train down to x8 rather than fail.

    PCIe point-to-point topologyCPU / RootComplexSwitchlinkGPU (x16)NVMe SSD (x4)NIC (x1)Each endpoint owns a private link; width = lane count.CourseTron · coursetron.com
    PCIe is a switched, point-to-point fabric — every endpoint owns a private link back to the root complex.

    The Three-Layer Protocol Stack

    PCIe organizes its work into three stacked layers, each with a clean job. Understanding them is the key to understanding how a memory read becomes electrical signals and back again.

    Transaction Layer

    The top layer creates and consumes Transaction Layer Packets (TLPs). A TLP carries a request or completion — a memory read, a memory write, an I/O access, or a configuration access. It holds the address, the payload, routing information, and attributes. This layer also manages flow control using a credit system, so a sender never overruns a receiver's buffers.

    Data Link Layer

    The middle layer guarantees reliable delivery between two directly connected devices. It wraps each TLP with a sequence number and a LCRC checksum, and uses an Ack/Nak protocol: a corrupted TLP is detected and automatically retransmitted. It also generates small DLLPs (Data Link Layer Packets) for acknowledgements and flow-control credit updates.

    Physical Layer

    The bottom layer turns packets into bits on the wire. It handles 128b/130b encoding (Gen3 onward), scrambling, lane striping, differential signalling, and the link-training state machine that negotiates speed and width at power-up.

    A TLP travelling through the PCIe stackSenderReceiverTransaction LayerData Link LayerPhysical LayerTransaction LayerData Link LayerPhysical Layer= TLPserial linkCourseTron · coursetron.com
    A TLP descends the sender's stack, crosses the physical link, and climbs the receiver's stack — watch the packet travel.

    Generations and Speeds

    Each PCIe generation has roughly doubled the raw per-lane transfer rate. "GT/s" means gigatransfers per second; after encoding overhead you get the usable byte rate. Gen1 and Gen2 use inefficient 8b/10b encoding (20% overhead), while Gen3 onward switched to 128b/130b (about 1.5% overhead), which is why Gen3's effective rate more than doubled Gen2's.

    • PCIe 1.0 — 2.5 GT/s per lane, ~250 MB/s per lane
    • PCIe 2.0 — 5 GT/s, ~500 MB/s per lane
    • PCIe 3.0 — 8 GT/s, ~985 MB/s per lane
    • PCIe 4.0 — 16 GT/s, ~1.97 GB/s per lane
    • PCIe 5.0 — 32 GT/s, ~3.94 GB/s per lane
    • PCIe 6.0 — 64 GT/s using PAM4 signalling and FLIT-mode framing, ~7.5 GB/s per lane

    A full PCIe 5.0 x16 link therefore delivers roughly 63 GB/s in each direction — enough to feed a modern AI accelerator. Generations are backward and forward compatible: a Gen5 card works in a Gen3 slot, simply running at the lower common speed.

    Approx. usable bandwidth per lanePCIe 1.0~250 MB/s (2.5 GT/s)PCIe 2.0~500 MB/s (5 GT/s)PCIe 3.0~985 MB/s (8 GT/s)PCIe 4.0~1.97 GB/s (16 GT/s)PCIe 5.0~3.94 GB/s (32 GT/s)PCIe 6.0~7.5 GB/s (64 GT/s)Gen3 onward uses 128b/130b; Gen6 uses PAM4 + FLIT mode.CourseTron · coursetron.com
    Approximate usable per-lane bandwidth by PCIe generation, as listed above.

    How a Transaction Actually Flows

    Suppose a GPU needs to read system memory. The sequence is worth tracing:

    1. The GPU's Transaction Layer builds a Memory Read Request TLP containing the target address and a requester ID.
    2. The Data Link Layer stamps a sequence number and LCRC, then hands it down.
    3. The Physical Layer scrambles, encodes, and serializes the bits across the link's lanes.
    4. The root complex receives it, verifies the LCRC, returns an Ack DLLP, and forwards the request toward the memory controller.
    5. The data comes back as one or more Completion TLPs, matched to the original request by its tag.

    Because requests and completions are split rather than blocking, PCIe can keep many transactions in flight at once — a property called split-transaction or non-posted traffic — which is central to its high throughput.

    Learn this hands-on

    Real projects and industry tool flows, with certification.

    Explore CourseTron Courses →

    pcie — FAQ

    Is PCIe the same as the slots on my motherboard?

    The physical slots are one expression of PCIe, but the protocol also runs over M.2 connectors, U.2 cables, and backplanes in servers. The connector shape differs; the three-layer protocol underneath is the same.

    What is the difference between a lane and a link?

    A lane is a single serial channel (one transmit pair plus one receive pair). A link is a group of lanes negotiated to work together, such as x4 or x16. More lanes mean proportionally more bandwidth.

    Will a newer PCIe card work in an older slot?

    Yes. PCIe is both backward and forward compatible. The two devices train to the highest speed and widest lane count they both support, so a Gen5 SSD runs fine (just slower) in a Gen3 slot.

    Why did PCIe move away from 8b/10b encoding?

    8b/10b spends 2 of every 10 bits on encoding, a 20% tax on bandwidth. From Gen3, PCIe adopted 128b/130b, cutting the overhead to about 1.5% and letting the usable rate more than double even though the raw rate only went from 5 to 8 GT/s.

    Related: related topic · Glossary · all courses.

    Advertisement