Protocols

DDR PHY (and DFI)

By CourseTron Team ·  8 min read ·  Updated Oct 2026 💬 𝕏 in f
Table of Contents
    ? Print / Save as PDF

    In short: The DDR PHY is the mixed-signal block that physically drives data to and from DRAM at multi-gigabit rates, and it talks to the memory controller over the standardized DFI interface while a training engine continuously calibrates timing and voltage so that read and write eyes stay open.

    Ask any SoC engineer where the hardest timing closure in a chip lives and the answer is usually the same: the memory interface. A modern LPDDR5 link runs at 6400 MT/s, which means a bit is valid for roughly 156 picoseconds. The circuit that has to launch and capture those bits reliably, across process-voltage-temperature drift, is the DDR PHY (physical layer). This article walks through what the PHY actually contains, how it connects to the controller through DFI, and why training exists at all.

    Where the PHY sits

    A DRAM subsystem has three layers. The memory controller handles scheduling, refresh, bank management and command ordering. The PHY converts the controller's parallel, slow-clocked commands into the fast, source-synchronous signalling the DRAM expects. The DRAM itself stores the charge. The controller and PHY are usually designed by different teams (or different vendors) and are deliberately decoupled by a clean boundary called DFI.

    Where the DDR PHY sits Memory Controller DDR PHY mixed-signal DRAM DFI DQ/DQS/CA on-die, slower DFI clock physical pins, DDR rate CourseTron · coursetron.com
    The controller–PHY boundary is DFI; the PHY–DRAM boundary is the physical bus (DQ data, DQS strobe, CA command/address).

    What DFI actually standardizes

    DFI (DDR PHY Interface) is a JEDEC-adopted specification that defines a synchronous, parallel interface between controller and PHY. Rather than the controller driving fast DDR signals, it presents commands on a slower DFI clock — typically the DRAM clock divided by 2 or 4. At 6400 MT/s the DRAM clock is 3.2 GHz, so a 1:4 ratio gives the controller an 800 MHz digital interface it can actually close timing on. The PHY then serializes those wide buses down to the pin.

    DFI groups signals into functional families: command (dfi_address, dfi_cs), write data (dfi_wrdata, dfi_wrdata_en), read data (dfi_rddata, dfi_rddata_valid), and an update/control channel used during calibration. It also fixes the timing contract: parameters like tphy_wrlat and tphy_rdlat tell the controller exactly how many DFI cycles after a command the PHY expects write data, or will return read data.

    Key fact: DFI decouples IP vendors. A Synopsys or Cadence controller can pair with a third-party or foundry-provided PHY because both honor the same DFI handshake — this is why DFI compliance is a first-class deliverable in commercial DDR IP.

    Inside the PHY: the datapaths

    The PHY is split per byte lane (8 DQ bits plus a DQS strobe pair). Each lane contains both a transmit and a receive path:

    • Write (TX) path: a serializer takes the wide DFI write data and multiplexes it onto the DQ pins at double data rate — one bit on the rising edge, one on the falling edge of the internal clock. An output driver with programmable impedance (ZQ calibration against an external precision resistor, typically 240 Ω) and on-die termination shapes the signal.
    • Read (RX) path: the DRAM sends data edge-aligned with DQS. The PHY must delay DQS by a quarter-cycle so it lands in the center of the data eye, then a sampling flop captures DQ. A deserializer widens the captured stream back onto DFI read data.

    The quarter-cycle shift is the crux. DRAM transmits DQS edge-aligned to data on reads but expects DQS center-aligned on writes. The PHY owns both shifts using delay-locked loops (DLLs) or digitally-controlled delay lines.

    Write datapath: one bit per clock edge SerDes DRAM pin DQS strobe toggles up and down with every launched bit (DDR) CourseTron · coursetron.com
    Animated: a bit serialized from the DFI-side SerDes travels to the DRAM pin; its vertical wobble represents launch on alternating (double-data-rate) clock edges.

    Why training is unavoidable

    At 156 ps per bit, you cannot rely on static, design-time delays. PCB trace lengths differ, package parasitics vary, and the die heats up during operation — a 40 °C swing can shift delays by tens of picoseconds, enough to close the eye. So the PHY runs a sequence of calibration steps at boot and periodically thereafter. A deeper treatment lives in our companion article on DDR training and calibration, but the headline steps are:

    Training stepWhat it calibratesTypical signal
    CA / command-bus trainingAddress/command setup & hold at the DRAMCA vs CK
    Write levelingDQS aligned to CK at each DRAM (deskews fly-by routing)DQS vs CK
    Read DQS gate / enableWhen to open the read capture windowDQS gate
    Read eye (RdDQ)Center DQS inside the read data eye; set VREFDQ vs DQS
    Write eye (WrDQ)Center DQ inside the DRAM's sampling windowDQ vs DQS

    Training is a negotiation using the DRAM's built-in Multi-Purpose Register (MPR) and dedicated training patterns. The PHY sweeps its delay and VREF settings, reads back whether the DRAM latched the known pattern correctly, and builds a 2D pass/fail map — the "eye." It then parks each knob at the centroid of the passing region for maximum margin.

    Training: sweep, find the passing eye, park at centre FAIL PASS FAIL Centroid: maximum margin Sweep delay or VREF, read back the known pattern, then set the knob mid-pass CourseTron · coursetron.com
    Training sweeps a delay or VREF setting, records pass/fail against a known pattern, and parks the knob at the centre of the passing region.

    Key fact: LPDDR5 and DDR5 add per-bit (per-DQ) deskew and periodic retraining because at these rates a single lane's skew budget is only a few picoseconds. DDR5 also moved VREF generation on-die into the DRAM, so write training now programs the DRAM's internal reference.

    Verifying and building a PHY

    In practice, almost no one designs a DDR PHY from scratch — it is a hard analog/custom-digital block supplied as licensed IP by Synopsys (DesignWare), Cadence (Denali/Gigabit), or a foundry. Verification engineers exercise the DFI boundary with VIP (verification IP) from Synopsys VC or Cadence, injecting DFI transactions and checking the training state machines against the JEDEC spec. Signal-integrity teams run channel simulation in tools like Cadence Sigrity or Siemens HyperLynx to confirm the eye at the pin before silicon. For teams building custom memory subsystems or needing full-flow RTL-to-GDS support around such IP, specialist VLSI design-services partners like Avecas often own the integration and timing closure of the controller-PHY block.

    If you want hands-on exposure to the protocol stack above the PHY — scheduling, bank management, and the DFI handshake — see our memory controller architecture deep-dive, and browse the full catalog of protocol and PD modules on our courses page.

    Go deeper: CourseTron's High-Speed Memory Interfaces track walks you from a DQ eye diagram to a full DDR5 bring-up lab — ideal prep for PHY/SI interview rounds. Explore it on the courses page.

    Frequently Asked Questions

    What is the difference between the DDR controller and the DDR PHY?

    The controller is a synchronous digital block that schedules commands, manages refresh and banks, and enforces DRAM timing (tRCD, tRP, etc.). The PHY is a mixed-signal block that serializes those commands onto the physical pins at double data rate, handles termination and impedance, and runs training. They meet at the DFI interface.

    Why does DDR need a strobe (DQS) instead of a shared clock?

    At multi-gigabit rates, a single system clock cannot stay phase-aligned to data across different trace lengths. DDR is source-synchronous: the transmitter sends a strobe (DQS) alongside the data so the receiver recovers timing locally. The PHY shifts DQS to the center of the eye for capture.

    How often does DDR retraining happen?

    Initial training runs once at boot and can take milliseconds. After that, lightweight periodic retraining (or DRAM self-refresh exit retraining) corrects for voltage and temperature drift — in LPDDR5 this may occur every few milliseconds to tens of milliseconds, orchestrated by the PHY's firmware without stopping traffic for long.

    Is DFI a physical interface I can probe on a board?

    No. DFI is an on-die, chip-internal interface between controller and PHY IP blocks. You cannot measure it on a PCB. The signals you can probe (DQ, DQS, CA, CK) live on the PHY-to-DRAM bus, which is defined by the JEDEC DDR/LPDDR standard rather than by DFI.

    Advertisement