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. Drills: Timing and Clocking

Part 1 · Timing and Clocking · All levels

Drills: Timing and Clocking

Interview questions, a whiteboard exercise and a ten-question checkpoint for Part 1.

On this page

    Answer each question out loud before opening it. If you miss more than three in the checkpoint, revisit the lessons linked at the end.

    Interview questions

    Check yourself Why can't a common-clock bus run at 2 GHz across a board?

    One period must cover clock-to-output, flight time, setup, skew and margin; at 500 ps the fixed terms alone may exceed it before trace length is added, and reads pay a round trip. Fast board links send timing with the data instead.

    Check yourself How much can two UART baud rates differ?

    The last sample is 9.5 bits after the start edge, so drift must stay under about half a bit minus one oversampling tick: roughly (0.5 − 1/16)/9.5 ≈ 4.6% total with 16x oversampling, less in practice, shared between both ends.

    Check yourself Why is DQS edge-aligned on reads but centre-aligned on writes?

    To keep the memory simple: on reads it launches data and strobe together and the controller shifts DQS a quarter period; on writes the controller sends DQS centred so the memory samples directly.

    Check yourself Why can't a SerDes lane carry a long run of zeros?

    The CDR recovers the clock from transitions and drifts by the ppm offset between them; with no transitions for long enough it samples the wrong bit. Protocols guarantee transitions with codes, stuffing or scrambling plus headers.

    Check yourself How does a x16 link line its lanes up?

    An alignment marker (an ordered set) is sent on all lanes at once; each lane buffers from its marker and all are read together once every lane has seen it. Buffers must cover the specified maximum skew at the highest rate.

    Check yourself Two 100 MHz clocks at ±300 ppm: how often does one gain a cycle?

    Up to 600 ppm apart: once every 1/0.0006 ≈ 1,667 cycles, about every 16.7 µs at 100 MHz.

    Check yourself Why does PCI Express send SKP ordered sets?

    Clock compensation: the receiver's elastic buffer deletes or repeats SKP symbols to absorb the ppm difference between the recovered and local clocks; SKP carries no data.

    Check yourself When would you use a self-timed interconnect?

    Rarely: it removes clock trees and crossings but costs handshake round trips, wires or verified delay margins, and specialised tools. Most chips use GALS instead.

    Whiteboard exercise

    Task. A chip-to-chip link must carry 10 Gb/s over 30 cm of cable between two boards with separate 100 MHz oscillators of ±100 ppm. Choose a clocking scheme and list everything the protocol must provide to make it work. Then draw the receive path's clock domains.

    Check yourself Open a model answer

    A common clock or a strobe cannot close at 10 Gb/s over 30 cm, so use an embedded clock with CDR on one or more lanes. The protocol must: (1) guarantee transitions (8b/10b, or a sync-header block code with scrambling); (2) send filler symbols often enough for clock compensation: up to 200 ppm apart means one slip every 5,000 symbols, so filler well inside that; (3) if several lanes, send alignment markers on all lanes at once for deskew; (4) define start-up so the CDR locks before data (Part 11). Receive path: recovered clock, then an elastic buffer, then the link clock, then an async FIFO to the application clock.

    Checkpoint: ten questions

    Check yourself 1. Name the five terms in a common-clock timing budget.

    Clock-to-output, flight time, setup, clock skew, margin (plus a hold check).

    Check yourself 2. Why does a UART receiver wait half a bit after the start edge?

    To sample the start bit in its middle (rejecting glitches) and to place every later sample near the middle of its bit.

    Check yourself 3. What remains in the timing budget of a source-synchronous link?

    The mismatch between strobe and data paths, and the accuracy of the strobe shift, not the flight time.

    Check yourself 4. With a 250 ppm offset, what is the ideal longest safe run of identical bits?

    0.5 / 0.00025 = 2,000 bits.

    Check yourself 5. What does a 64b/66b sync header of 01 mean, and why does it help clock recovery?

    A data block; both 01 and 10 contain a transition, so every block delivers an edge.

    Check yourself 6. Lane skew is 1 ns. How many bits is that at 8 Gb/s per lane?

    A bit is 125 ps, so 8 bits.

    Check yourself 7. Which clock relationship never slips but has an unknown phase?

    Mesochronous.

    Check yourself 8. Why can't a deeper async FIFO fix a 600 ppm rate difference?

    It only delays overflow; only removing or adding symbols can absorb a rate difference.

    Check yourself 9. What is the timing assumption in bundled-data self-timed links?

    The request signal is delayed enough to arrive after the slowest data bit, at every corner.

    Check yourself 10. A link-up level and a dropped-packet pulse cross to another clock. Which crossing does each need?

    Level: a two-flop synchroniser. Pulse: a pulse (toggle) synchroniser, with events spaced far enough apart.

    Revisit

    • 1.1 Common-Clock Interfaces

    • 1.2 Asynchronous Serial and Oversampling

    • 1.3 Source-Synchronous Clocks and Strobes

    • 1.4 Embedded Clocks and Clock Recovery

    • 1.5 Skew and Deskew

    • 1.6 Clock Relationships

    • 1.7 Elastic Buffers and Clock Compensation

    • 1.8 Self-Timed Handshakes

    • 1.9 Crossing at the Interface

    Keep going

    Next: Part 2: Encoding and Framing. The receiver can now sample bits. Next: how it finds where a message starts and ends.

    Previous

    25 / 234

    Next: Part 2: Encoding and Framing

    Up next

    Up nextPart 2: Encoding and Framing

    Sign in to save progress

    Practice this lessonReport an error

    See also

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