6.3.3 · D4Interconnects, Buses & SoC

Exercises — PCIe lanes, links, and bandwidth

2,574 words12 min readBack to topic

This page is a self-test ladder. Every problem builds on the parent note. Work each one on paper first, then open the collapsible solution. The difficulty rises in five levels — do not skip.

Before you start, keep this one core chain in your head (we derived it in the parent note):

How to read the reference card below. The bars show each generation's x16 one-direction bandwidth in GB/s (the number floating above each bar). Inside each bar, in cream text, is that generation's per-lane rate — divide the top number by 16 and you get it. Use the card as a sanity check: after you finish a problem, find its generation's bar and confirm your per-lane figure matches the cream number, and that your x16 total matches the number above the bar. Notice the small annotation marking where the encoding switches from 8b/10b to 128b/130b between Gen 2 and Gen 3 — that is why the bars jump by slightly more than a clean at that boundary.

Figure — PCIe lanes, links, and bandwidth

Level 1 — Recognition

Goal: read the right number off the right row without a mistake.

L1·Q1

A device negotiates a PCIe 2.0 x1 link. What encoding does it use, and what is its efficiency as a fraction and a percentage?

Recall Solution

WHAT we do: identify the generation, then look up its encoding. Gen 1.0 and 2.0 both use 8b/10b. For every 8 payload bits, 10 bits go on the wire. Efficiency . The extra 2 bits per 10 are spent on DC balance and clock recovery — real bits on the wire, but not your data.

L1·Q2

A device negotiates PCIe 4.0 x1. State its raw signaling rate (in GT/s) and its encoding scheme.

Recall Solution

Raw rate: PCIe 4.0 runs at GT/s per lane (double Gen 3's GT/s). Encoding: Gen 3 and up use 128b/130b, efficiency . GT/s means GigaTransfers per second — bit-toggles on the wire, before removing encoding overhead. It is not yet "gigabits of your data."


Level 2 — Application

Goal: run the master chain end-to-end for a single value.

L2·Q1

Compute the one-direction data rate in GB/s of a single PCIe 3.0 x1 lane. Show every step.

Recall Solution

Step A — raw rate: Gen 3 GT/s. Step B — apply efficiency (WHY: GT/s counts every symbol on the wire, including overhead; multiplying by the efficiency strips the encoding overhead and leaves only payload bits). The result is measured in Gbpsgigabits per second, i.e. billions of payload bits per second: Step C — convert bits to bytes (WHY: engineers want GB/s, and there are 8 bits in a byte, so divide by 8): Answer: GB/s per lane, one direction.

L2·Q2

Compute the one-direction link bandwidth of a PCIe 4.0 x8 link.

Recall Solution

Step A — raw rate: Gen 4 GT/s. Step B — apply efficiency (WHY: remove the 128b/130b encoding overhead so we keep only payload bits). Result is in Gbps, gigabits of payload per second: Step C — convert bits to bytes (WHY: 8 bits per byte, so divide by 8 to get GB/s): Step D — scale by lanes (WHY: 8 independent parallel channels each carry this rate simultaneously): Answer: GB/s one direction.

L2·Q3

A PCIe 2.0 x16 link — one-direction bandwidth in GB/s?

Recall Solution

Step A — raw rate: Gen 2 GT/s, encoding 8b/10b so efficiency . Step B — apply efficiency (WHY: strip the 20% 8b/10b overhead to leave payload bits, giving Gbps): Step C — convert bits to bytes (WHY: 8 bits per byte, so divide by 8 to reach GB/s): Step D — scale by lanes (WHY: 16 parallel channels): GB/s. Answer: GB/s one direction.


Level 3 — Analysis

Goal: compare, subtract, and reason about "what did I lose / gain."

L3·Q1

An NVMe drive (NVMe Protocol) advertises 7000 MB/s sequential reads on PCIe 4.0 x4. Is this physically possible on that link? By what fraction of the theoretical maximum is it using the link?

Recall Solution

Step A — theoretical max, PCIe 4.0 x4: Step B — put both numbers in the same units (WHY: MB/s vs GB/s): Step C — compare: ✓ — physically possible. Step D — utilization: The remaining ~11% is lost to NVMe command overhead, NAND read latency, and controller limits.

L3·Q2

A GPU meant to run at PCIe 4.0 x16 is accidentally placed in a slot wired for PCIe 3.0 x4. How much one-direction bandwidth is lost, in GB/s and as a percentage of the intended value?

Recall Solution

Intended — Gen 4 x16: GB/s. Actual — Gen 3 x4: two downgrades at once (generation and width): Loss (GB/s): GB/s. Retained fraction: — you kept only one-eighth. Reason it's so brutal: width fell by (x16→x4) and per-lane rate fell by ~ (Gen4→Gen3). Multiply the two: slower. See GPU Bandwidth Requirements.

L3·Q3

Compare PCIe 3.0 x16 against PCIe 4.0 x8. Which delivers more one-direction bandwidth, and by how much?

Recall Solution

Gen 3 x16: GB/s. Gen 4 x8: GB/s. They are equal (both GB/s). WHY: Gen 4 doubles the per-lane rate versus Gen 3, so halving the lane count exactly cancels it out. This is the general "one generation up = half the lanes for the same throughput" rule.


Level 4 — Synthesis

Goal: combine bifurcation, direction, and multi-device reasoning.

L4·Q1

A PCIe 4.0 x16 slot supports bifurcation (PCIe Bifurcation) into x8/x8. Two PCIe 4.0 x8 NVMe adapters are installed. Give (a) each device's one-direction bandwidth, (b) the combined one-direction bandwidth, (c) whether any bandwidth was destroyed.

Recall Solution

(a) Each device sees x8: GB/s. (b) Combined: GB/s — identical to the original x16 total. (c) Nothing is destroyed — the 16 lanes were divided, not lost. But each individual device is now capped at 15.75 GB/s instead of the full 31.5 GB/s. Bifurcation splits, it does not shrink.

L4·Q2

For a single PCIe 5.0 x16 link, give both the one-direction and the bidirectional aggregate bandwidth. Explain why the aggregate is not the number you should quote for a GPU reading textures from RAM.

Recall Solution

Per lane, Gen 5 (32.0 GT/s): One direction, x16: GB/s. Bidirectional aggregate (WHY: each lane is full-duplex — TX and RX run simultaneously): Why quote one-direction for texture reads: the GPU is pulling data one way (RAM → GPU) during a texture fetch. Only the RX direction is doing that work. The aggregate double-counts a return path you aren't using, so it overstates real throughput. See PCIe Electrical Signaling for why the two directions are physically separate wire pairs.


Level 5 — Mastery

Goal: multi-step, real-hardware reasoning where one wrong assumption sinks the answer.

L5·Q1

A workstation CPU exposes 16 PCIe 5.0 lanes total. The chipset (connected to the CPU by a separate link) additionally exposes 4 PCIe 4.0 lanes for peripherals. A user wants: one GPU that needs at least 32 GB/s one-direction, and one NVMe drive that needs at least 7 GB/s one-direction. Propose a concrete lane plan and show the delivered bandwidth for each device.

Recall Solution

Per-lane rates we will use:

  • Gen 5 lane GB/s (from L4·Q2).
  • Gen 4 lane GB/s (from L2·Q2).

Step 1 — how many CPU lanes does the GPU need? Requirement GB/s. PCIe widths are quantized to powers of two, so 8.13 rounds up to the next valid width — x16. Check: Gen 5 x8 gives GB/s, which is below 32, so x8 fails the strict target. The GPU must take the full x16. GPU delivered: GB/s (comfortably ). This consumes all 16 CPU lanes.

Step 2 — where does the SSD go? The 16 CPU lanes are now fully committed to the GPU, so the SSD cannot use them. Route it to the 4 chipset lanes (PCIe 4.0) instead: SSD delivered: GB/s GB/s ✓.

Concrete plan:

  • GPU → CPU lanes, Gen 5 x16 → 63.02 GB/s (meets ).
  • SSD → chipset lanes, Gen 4 x4 → 7.88 GB/s (meets ).

Mastery insight: the 16 Gen-5 CPU lanes give at most 31.5 GB/s to an x8 device, so a strict " to the GPU" forces the GPU to claim the whole x16. That leaves zero CPU lanes for the SSD, which is exactly why the second device must live on chipset lanes (Motherboard Lane Allocation). The arithmetic — not the slot layout — dictates the routing.

L5·Q2

Verify the parent note's Master Table entry: PCIe 5.0 x16 = 63.02 GB/s one-direction. Then show that a Gen 3 x16 link would need to be run in bidirectional aggregate to match a single-direction Gen 4 x16 — is that possible?

Recall Solution

Verify Gen 5 x16 one-direction: Gen 4 x16 one-direction: GB/s. Gen 3 x16 one-direction: GB/s. Gen 3 x16 aggregate (both directions): GB/s. Comparison: — the Gen 3 x16 aggregate numerically equals the Gen 4 x16 one-direction. But it is NOT a real match: aggregate counts TX+RX; the Gen 4 one-direction figure is achievable in a single stream. A one-way texture pull cannot borrow the return path. So the equality is a coincidence of arithmetic, not of usable throughput. Mastery insight: always compare like conventions — one-direction vs one-direction, aggregate vs aggregate. Mixing them produces "equal" numbers that describe totally different capabilities.


Recall Self-Test Checklist

One-line self-checks — answer before revealing. What are the two encoding efficiencies and their generations? ::: 8b/10b = 0.8 for Gen 1–2; 128b/130b ≈ 0.9846 for Gen 3+. In the master chain, when exactly do you divide by 8? ::: Once, after applying efficiency, to convert bits to bytes — before scaling by lane count. Why does Gen 4 x8 tie Gen 3 x16? ::: Gen 4 doubles per-lane rate; halving lanes cancels it → same 15.75 GB/s. Does bifurcation reduce total bandwidth? ::: No — it divides the lanes; total is unchanged, but each device is capped at its share. Which figure to quote for a one-way GPU texture read? ::: One-direction bandwidth, never the bidirectional aggregate.