PCIe and CXL Interview Questions
Answer PCIe questions layer by layer: the transaction layer builds a TLP, the data link layer adds a sequence number and CRC and handles flow control and replay, and the physical layer serializes it. When throughput is low, check the negotiated width and speed first, then slot wiring, payload size, and replays. CXL runs over the PCIe physical layer with three protocols.
Practice these questions live in a mock interview with a verified chip design engineer. Find an expert
You plug an accelerator into a x16 slot, run a DMA benchmark, and get roughly half the bandwidth you expected. Where do you start? Interviewers who ask this usually care about the order you check things.
This guide uses public reference material, mainly the Synopsys PCI Express overview, Wikipedia's PCI Express and PCI configuration space articles, the Linux kernel MSI documentation, and public CXL overviews from VIAVI and an arXiv survey. The practice prompts are ours, not questions reported from any employer. The public pages I could read were thin on link training, so confirm that part against the specification.
Three layers, three kinds of questions
Synopsys describes PCIe as a transaction layer, a data link layer, and a physical layer. The data link layer handles flow control, acknowledgments, and low-power transitions. The physical layer has an electrical sub-block and a logical sub-block, and the logical side produces the training sequences.
To answer "walk me through a memory read," follow one request down and back up. The transaction layer builds a packet (a TLP), the data link layer adds a sequence number and a link CRC, and the physical layer serializes it. The completion returns the same way.
Per Wikipedia, the receiver checks the sequence number and CRC, discards a bad packet and those after it, and sends a NAK. The transmitter resends everything not yet acknowledged, and in-flight packets are limited by the replay buffer and credits.
Why does throughput fall short, and what do credits have to do with it?
Flow control is credit based. Each receiver advertises initial credits for its buffers, the sender only transmits while staying within them, and the receiver returns credits as it frees space. Wikipedia notes that credit-return latency does not hurt performance until the sender actually runs out. So a long round trip with too few credits can stall the sender while the wire sits idle.
Packet overhead also matters. The same article quotes efficiency of about 86 percent for 128-byte payloads and 98 percent for 1024-byte payloads, with tiny register accesses far lower. It says the maximum payload size is the smallest value supported by any device in the tree, so one conservative device can cap everyone.
Encoding matters too: 128b/130b from Gen 3 through Gen 5, then PAM-4 with FEC and 256-byte FLITs in Gen 6. Wikipedia's table shows about 31.5 GB/s per direction for Gen 4 x16. Treat that as a ceiling, not a benchmark result. For the electrical side, see our SerDes eye diagram guide and the PLL and jitter questions.
Link training, lanes, and generations
Wikipedia says lane count and speed are negotiated automatically at initialization, either endpoint can restrict them, and a link can run at reduced width to tolerate bad lanes. Synopsys says efficiency depends heavily on negotiation and training. Wikipedia notes that Gen 3 added transmitter and receiver equalization.
Those pages do not give the state machine. Read it in the spec or a vendor white paper, and practice describing how two devices detect each other, agree on a width and rate, and then tune equalization at higher speeds. If you cannot recall state names, describe the idea instead of guessing.
Enumeration, BARs, and interrupts
Per Wikipedia's configuration space article, firmware or the OS scans buses by reading configuration registers, treats an all-ones read as "nothing here," and recurses behind each bridge. To size a BAR, software writes all ones and reads back a value that encodes a power-of-two size. Only then are addresses assigned. Low bits say whether a BAR is memory or I/O, 32 or 64 bit, and prefetchable.
For interrupts, the Linux kernel documentation says MSI allows up to 32 vectors in a power-of-two count, while MSI-X allows 1 to 2048 and can target different CPUs per vector. It also notes that an MSI write cannot pass the device's earlier data writes, so the data is in memory when the interrupt fires.
What is CXL at a conceptual level?
VIAVI and the arXiv survey agree on the shape of it. CXL runs over the PCIe physical layer with three protocols. CXL.io is PCIe-based and covers discovery, configuration, and DMA. CXL.cache lets a device cache host memory. CXL.mem lets the host load and store to device memory. Type 1 devices use io and cache, Type 2 use all three, and Type 3 memory expanders use io and mem.
The arXiv survey, citing other studies, lists CXL-attached memory latency well above local DRAM (for example 170 to 250 ns against 80 to 140 ns in one table). Treat such numbers as examples, since they vary by platform. The cache coherence questions and DDR controller questions connect here.
| Topic | What the sources say | Practice prompt |
|---|---|---|
| Layers | Transaction, data link, physical, each with a distinct job | Trace a read request and its completion through all three |
| Replay | Bad TLP triggers NAK and resend of unacknowledged packets | What limits the number of TLPs in flight? |
| Credits | Sender stays within advertised limits | How can low credits cap throughput on a good link? |
| Efficiency | Payload size changes overhead a lot | Why might small transfers look slow on Gen 5? |
| BARs | Write ones, read back size, then assign | Why must BAR sizes be powers of two? |
| MSI and MSI-X | Vector counts and CPU targeting differ | When would you prefer MSI-X? |
| CXL types | Type 1, 2, 3 differ by protocols implemented | Which protocols does a memory expander need? |
An illustrative scenario: half the expected bandwidth
This scenario is made up for practice: a Gen 4 x16 card moves data at about half the expected rate.
- Check what the link actually negotiated: width and speed. A silent fall back to x8 or a lower generation is a classic cause.
- Check the slot wiring, since a physical x16 slot can be wired for fewer lanes.
- Look at payload size and transfer sizes in the traces. Small TLPs waste more on overhead.
- Check whether the maximum payload size was capped by another device in the tree.
- Look for replays or errors, then consider whether the host or the device is the limit.
State what each check would rule out before moving on. If the PHY side interests you, compare SerDes and memory PHY work and read about chiplet interconnects.
Turning this into practice
Pick two rows from the table and explain each aloud in two minutes. Our two week plan can help you schedule it, and you can book a mock interview on MockVise to rehearse the half-bandwidth walk.
Sources: Synopsys PCI Express overview, Wikipedia: PCI Express, Wikipedia: PCI configuration space, Linux kernel: MSI HOWTO, VIAVI: What is CXL, arXiv: Next-Gen Computing Systems with CXL, a Survey, Wikipedia: Compute Express Link. This article is general technical preparation guidance, not an official interview process or a list of questions reported from any company. Public overviews can be simplified or out of date, so confirm details against the current PCI-SIG and CXL Consortium specifications and ask your recruiter about the interview format. MockVise is not affiliated with or endorsed by Synopsys, Wikipedia, the Linux kernel project, VIAVI, arXiv authors, PCI-SIG, or the CXL Consortium.FAQ
Q: Why might a PCIe x16 card deliver half the expected bandwidth? Possible causes include a silent fall back to x8 or a lower generation, a physical x16 slot wired for fewer lanes, small TLPs that waste more on overhead, a maximum payload size capped by another device in the tree, or replays and errors.
Q: How does PCIe flow control work? It is credit based. Each receiver advertises initial credits for its buffers, the sender only transmits while staying within them, and the receiver returns credits as it frees space. A long round trip with too few credits can stall the sender while the wire sits idle.
Q: What are the CXL device types? Type 1 devices use CXL.io and CXL.cache, Type 2 devices use all three protocols, and Type 3 memory expanders use CXL.io and CXL.mem.
Q: How does software size a BAR? It writes all ones and reads back a value that encodes a power-of-two size. Only then are addresses assigned.
Related guides
Training Chip vs Inference Chip Design: How the Work and the Interviews Differ
Compare training and inference accelerator design roles using public Google, AWS, Microsoft, and NVIDIA documentation, with questions to ask each team before you choose.
FPGA Prototyping vs Emulation for Pre-Silicon Verification
Compare FPGA prototyping and hardware emulation on speed, capacity, debug visibility, compile time, and use cases, grounded in public vendor and industry documentation.
RISC-V Interview Questions: ISA, Privilege Levels, and Extensions
Prepare for RISC-V discussions with a practical guide to the base ISA, standard extensions, privilege modes, CSRs, traps, and the memory model, grounded in the public RISC-V International specifications.
DDR and Memory Controller Interview Questions
Prepare for memory controller and DRAM interface interviews with a practical walk through DRAM organization, timing parameters, refresh, scheduling, and training, grounded in public lecture notes and a vendor datasheet.
Practice with engineers who've run these interviews
Book a 1-on-1 mock interview with verified experts from Intel, NVIDIA, Qualcomm, and Apple. Practice these questions live in a mock interview with a verified chip design engineer.
Find your expertAlready running these interviews at work? Get paid to run them on MockVise, anonymously and on your own hours. Become an expert