← Questions

Clock domain crossing synchronizers and RTL lint

0
AppleCodingLast asked Dec 2025

A coding interview question asked in Apple's technical phone screen, last asked Dec 2025. It tests rtl, clock domain crossing and hardware.

A digital design conversation. First, crossing signals between clock domains: which synchronizer to use when, and why. Then, the lint warnings and errors you meet in Verilog or SystemVerilog RTL and how you deal with them.

Part 1: clock domain crossing

  • When do you use a two-flop synchronizer, a pulse or edge-detect synchronizer, a request and acknowledge handshake, and an asynchronous FIFO?
  • Why can a two-flop synchronizer miss a short pulse when the source clock is faster than the destination clock, and how do you fix it?
  • Why are multi-bit buses not synchronized bit by bit?

Part 2: lint

A lint tool reports items such as:

  • a module treated as a black box,
  • a combinational loop,
  • a width mismatch between the left-hand and right-hand side of an assignment.

For each, explain what usually causes it, why it is dangerous if left alone, and how you investigate and fix it. Then say why lint belongs in the design flow at all.

What a strong answer covers

  • Metastability and why two flops reduce its probability to an acceptable level (mean time between failures), not to zero.
  • A pulse stretched or converted to a toggle before crossing; a handshake for control plus data; Gray-coded pointers in an async FIFO so only one bit changes at a time.
  • Black box: a missing file, a wrong module name or a library cell without a model, which leaves logic unchecked.
  • Combinational loop: an output feeding its own input without a register, which causes oscillation and breaks timing analysis.
  • Width mismatch: silent truncation or zero-extension, sign issues; fix with explicit sizing and casts.
  • Lint catches these before simulation and synthesis, when they are cheapest to fix, and enforces coding rules across a team.

Follow-ups

  • How would you verify a CDC crossing in simulation, and why is simulation alone not enough?
  • A lint waiver list keeps growing. How do you manage it?
  • What is a reset synchronizer, and why is reset deassertion the dangerous edge?

Where it's asked

  • Apple · Technical phone screen · Last asked Dec 2025

What it tests

rtl · clock domain crossing · hardware

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding