Skip to RTL questions

Part 2 · Clock boundaries and flow

CDC, reset, ready-valid, and FIFO boundaries

Choose clock-crossing and reset structures from signal semantics, then preserve payload, occupancy, ordering, and backpressure through every accepted transfer.

Reading path
2 of 3
Chapters
2
Practice links
12

Question indexPractice this reading path.

Open the exact selected question in the practice bank. Premium prompts remain access-gated.

12 practice links shown.

  1. Q004Choose a safe clock-domain crossing strategyCDC & reset · Medium
  2. Q009Synchronize reset release in each clock domainCDC & reset · Easy
  3. Q102Code an asynchronously reset register with enableCDC & reset · Easy
  4. Q905Compare synchronous and asynchronous resetCDC & reset · Easy
  5. Q007Build a synchronous FIFO and race-free BFMDataflow & storage · Medium
  6. Q226Implement a synchronous FIFO with exact boundary behaviorDataflow & storage · Medium
  7. Q020Absorb ready/valid backpressure with a skid bufferDataflow & storage · Hard
  8. Q090Increment a four-digit BCD counterDataflow & storage · Medium
  9. Q218Search a synchronous calibration ROMDataflow & storage · Hard
  10. Q025Stably sort records in a local cache-line bufferDataflow & storage · Medium
  11. Q041Control a tiny exact-LRU associative cacheDataflow & storage · Medium
  12. Q085Schedule bank commands with accepted-slot cooldownDataflow & storage · Medium

RTL Clock boundariesCDC and reset strategy selection

Choose a crossing structure from signal semantics, event rate, coherency, latency, and loss tolerance.

Concept model

Match the crossing structure to the signal

SemanticsStructureContract to proveFailure if misused
Level2-FF synchronizerStable through captureShort pulse can be missed
EventToggle / handshakeNo overwrite before ackFast events can coalesce
Word / streamHandshake / async FIFOCoherent ownership + rateBitwise sync tears words
Reset releasePer-domain synchronizerQualified local clocksAsync release violates recovery
2-FF level
≈ 1–2 destination cyclesConsume stage two, never stage one.
Handshake
hold until acknowledgeBackpressure prevents event loss.
Async FIFO
Gray pointers crossPayload stays in dual-port storage.
Reset
deassert per domainRelease follows qualified local edges.

A persistent level, discrete event, coherent word, and reset release have different capture contracts. The structure must also preserve its physical implementation assumptions.

RTL Transfers and storageReady-valid, backpressure, and FIFO boundaries

A correct interface preserves payload, ordering, and occupancy through stalls and simultaneous events.

Concept model

A stall creates a hold obligation

accept = valid && readyevaluated at the active edge
At ↑clkt0t1t2t3
valid0111
ready1001
dataAAA
accept0001
obligationidlehold Ahold Atake A
Stall propertyvalid && !ready |→ valid && $stable(data)

The source holds the same pending beat until an edge accepts it.

Source owns
valid + payloadValid may rise before ready.
Sink owns
readyReady may rise before valid.
Bubble
valid = 0Payload is ignored.
Peak rate
1 beat / cycleAccept on every active edge.

When valid is asserted and ready is low, the source keeps valid and payload stable until an edge accepts the transfer.