Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Course
  • Reading Paths
  • Concept Map
  • How to Read the Diagrams
  • Part 0: What Is a Protocol?10
  • Part 1: Timing and Clocking11
    • Common-Clock Interfaces
    • Asynchronous Serial and Oversampling
    • Source-Synchronous Clocks and Strobes
    • Embedded Clocks and Clock Recovery
    • Skew and Deskew
    • Clock Relationships
    • Elastic Buffers and Clock Compensation
    • Self-Timed Handshakes
    • Crossing at the Interface
    • Protocols Compared: Timing and Clocking
    • Drills: Timing and Clocking
  • Part 2: Encoding and Framing12
  • Part 3: Handshakes13
  • Part 4: Flow Control17
  • Part 5: Transactions19
  • Part 6: Concurrency and Performance17
  • Part 7: Ordering13
  • Part 8: Sharing and Arbitration12
  • Part 9: Deadlock and Liveness13
  • Part 10: Reliability and Recovery20
  • Part 11: Bring-Up and Link Management10
  • Part 12: Power8
  • Part 13: Shared State and Coherence9
  • Part 14: Security and Isolation7
  • Part 15: Specifying and Verifying11
  • Part 16: Protocols Dissected17
  • Part 17: Capstones5
  • Part 18: Interview Preparation6
Loading lesson

‹Part 1: Timing and Clocking
  1. Topics
  2. First Principles of Hardware Protocols
  3. Part 1: Timing and Clocking
  4. Crossing at the Interface

Part 1 · Timing and Clocking · Working (W)

Crossing at the Interface

Where the clock-domain crossings sit inside a protocol stack, which protocol features make each one safe, and how to place them in a controller.

On this page

    Note

    Level: Working (W) · Answers: When is the data valid?

    Before this: Clock Relationships, Elastic Buffers and Clock Compensation

    An engineer joins a team building a serial link controller and is asked a simple question in the first design review: "How many clock domains does the receive path cross, and where?" The block diagram on the wall shows a PHY, a link layer and an application interface, with no clocks drawn at all.

    Where do clock crossings sit inside a protocol stack, and what makes each one safe?

    The obvious answer, and why it breaks

    The obvious answer is "one crossing, at the edge of the chip": data comes in on the link's clock and goes out on the chip's clock. In practice a receive path usually crosses at least twice, for different reasons, and each crossing needs a different mechanism. Treating them as one, or placing a crossing where the protocol gives it nothing to work with, produces the hardest bugs a link can have: rare, rate-dependent and invisible in single-clock simulation.

    The idea: each crossing sits where the protocol makes it safe

    Follow a symbol from the wire to the application in a typical serial receiver:

    • Recovered clock → local link clock. The CDR delivers symbols on the transmitter's timing (lesson 1.4). The two clocks are plesiochronous, so the crossing must also absorb a rate difference. The protocol makes that safe by sending filler symbols, and the receiver uses an elastic buffer (lesson 1.7).

    • Link clock → application clock. The link layer runs on a clock tied to the line rate; the application (a bus such as AXI, or the rest of the chip) runs on its own, unrelated clock. This crossing carries whole packets or transactions, so an async FIFO with flow control (credits or ready) is the usual answer. The protocol makes it safe by having flow control that tolerates the FIFO's extra latency (Part 4).

    • Control and status signals. Single-bit events (link up, error, interrupt) cross with synchronisers or pulse synchronisers; multi-bit status crosses with a handshake. The protocol's job is to make these quasi-static or event-like, never fast-changing buses.

    Three clock domains and three kinds of crossing in one receive path. Each crossing uses what the protocol provides at that point.

    Worked example: choosing the crossing for each signal

    Signal or stream

    From → to

    Relationship

    Crossing

    What the protocol provides

    Received symbols

    Recovered → link clock

    Plesiochronous

    Elastic buffer

    Filler symbols at a guaranteed interval

    Received packets

    Link → application clock

    Asynchronous

    Async FIFO

    Flow control that tolerates the FIFO latency

    "Link is up"

    Link → application clock

    Asynchronous

    Two-flop synchroniser

    A level that changes rarely

    "Packet dropped" event

    Link → application clock

    Asynchronous

    Pulse (toggle) synchroniser

    Events spaced far enough apart

    Error counter value

    Link → application clock

    Asynchronous

    Handshake, or Gray-coded counter

    A value read occasionally, not a live bus

    Notice the last column: every crossing depends on something the protocol guarantees. Designing the crossing and designing the protocol are the same activity seen from two sides.

    The design space: where to put the main crossing

    Placement

    What it costs

    When it wins

    Cross early (near the PHY), run the link layer on the application clock

    Link layer must keep up with the line rate on a clock it does not control

    Application clock comfortably faster than the line's symbol rate

    Cross late (at the application interface), run the link layer on the link clock

    An async FIFO at the transaction boundary; flow control must cover its latency

    Most controllers: the link layer stays tied to the line

    Cross in the middle (between transaction and link layers)

    Two well-defined interfaces to keep consistent

    Controllers with separate PHY and protocol vendors

    How real protocols place their crossings

    Protocol

    Crossings

    PCI Express

    An elastic buffer at the receiver absorbs the up to 600 ppm difference (PCIe 1.0–4.0) by adding or removing SKP symbols; credit flow control on the link tolerates the latency of whatever buffering follows.

    DDR memory

    Read data is captured with its strobe (DQS) in the memory's timing and then handed to the controller's clock, so every read crosses from the strobe's timing into the controller's domain.

    UART

    The line is asynchronous to the receiver, so it passes through a synchroniser before the oversampling logic (lesson 1.2).

    What breaks

    A team connects a link layer to an application bus running on another clock and, to save area, passes the received packet's header fields across with only a two-flop synchroniser on each bit (illustrative). Most of the time the header is stable long before it is used. Occasionally the application samples while bits are changing, and different bits land in different cycles: a header with half the old packet's fields and half the new one's. The fix is a proper crossing for multi-bit data, an async FIFO or a handshake, and the CDC course has an entire section on why bit-by-bit synchronisation of buses fails.

    Why this matters

    Senior lens. In every link design review, ask for the clock-domain map of the receive and transmit paths, with each crossing named and justified by what the protocol guarantees there. Then check the protocol side of each justification: is the filler interval really guaranteed, is the flow control sized for the FIFO's latency, are status signals really slow-changing? A crossing is only as safe as the promise it relies on, and that promise usually belongs to a different team.

    Interview

    Asked: "Where would you put the clock-domain crossings in a PCIe controller's receive path?"

    Weak answer: At the input, with a FIFO.

    Strong answer: At least two places, for different reasons. First, from the recovered clock to the local link clock: plesiochronous, so an elastic buffer that adds or drops SKP symbols. Second, from the link clock to the application or bus clock: asynchronous, so an async FIFO, with credit flow control sized to cover its latency. Status and events cross with synchronisers or handshakes. Each crossing relies on a protocol guarantee: filler symbols, flow control, or slow-changing status.

    Follow-ups: (1) Why can't one async FIFO do both jobs? (2) How do you cross an error counter's value safely?

    Check yourself Why is an elastic buffer used for the first crossing and an async FIFO for the second?

    The first crossing must absorb a rate difference in a continuous stream, which only filler adjustment can do. The second carries packets between unrelated clocks with flow control, so ordinary back-pressure can keep the FIFO from overflowing.

    Check yourself A "link up" level and a "packet dropped" pulse both cross to the application clock. Do they use the same crossing?

    No. A slowly changing level can use a two-flop synchroniser. A short pulse could be missed by the slower side, so it needs a pulse (toggle) synchroniser, and the protocol must space such events far enough apart.

    Check yourself What protocol guarantee does an async FIFO at the transaction boundary depend on?

    Flow control that tolerates the FIFO's latency, so the sender stops before the FIFO fills even though its "full" indication arrives several cycles late (Part 4).

    Key takeaways

    • A link's receive path usually crosses clock domains more than once: recovered to link clock, and link to application clock.

    • Each crossing uses what the protocol guarantees there: filler symbols for an elastic buffer, flow control for an async FIFO, slow-changing signals for synchronisers.

    • Never synchronise a multi-bit value bit by bit; use a FIFO or a handshake.

    Keep going

    Next: Protocols Compared: Timing and Clocking. How ten protocols answer "when is the data valid?", side by side.

    Related topics

    • Part 1 overview: Timing and Clocking

    • CDC & RDC course: Async FIFO CDC

    • RTL course: CDC Protocols

    Previous

    23 / 234

    Next: Protocols Compared: Timing and Clocking

    Up next

    Up nextProtocols Compared: Timing and Clocking

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Common-Clock Interfaces
    • Asynchronous Serial and Oversampling
    • Source-Synchronous Clocks and Strobes