Complete the supplied circuit to transfer Event_A from Clock_A to Clock_B. Store each accepted event as a toggle, synchronize it, and generate a one-cycle Pulse_B in the destination domain.
Constraints
Clock_A (100 Hz), Clock_B (71.4286 Hz), Event_A (1-bit event request), nReset (active-LOW asynchronous reset).Pulse_B (one Clock_B-cycle pulse per successfully transferred event).Event_A = 1 for only one rising Clock_A edge. Wait for the resulting Pulse_B to go HIGH and then LOW before issuing another event.Pulse_B follows 0 → 1 → 0 across the first three rising Clock_B edges.nReset = 0 asynchronously clears all four DFFs and cancels any pending transfer. Initialize clocks and Event_A LOW; release reset while the clocks are stable.Follow the rows in order, lowering each clock before its next rising edge. Set Event_A HIGH before the indicated rising Clock_A edge, then return it LOW. The stored source toggle is stable before the first destination edge.
| Event / Condition | Pulse_B |
|---|---|
Assert nReset = 0; allow reset to settle | 0 |
| Release reset with both clocks LOW | 0 |
Capture Event_A = 1 on rising Clock_A | 0 |
First rising Clock_B | 0 |
Second rising Clock_B | 1 |
Third rising Clock_B | 0 |
Later rising Clock_B edges without a new event | 0 |
Digital circuits must deliver correct results at the correct time. This guide covers timing checks, clock control, reset, and clock-domain crossing. It focuses on practical circuit choices and common failures.
A synchronous path must produce correct data before the capture edge and keep it stable around that edge.
┌──────────┐ ┌──────────────┐ ┌──────────┐
───────►│ Launch │───►│ Combinational│───►│ Capture │──────►
│ Register │ │ Logic │ │ Register │
└──────────┘ └──────────────┘ └──────────┘
▲ ▲
└────────────── Clock ───────────────┘
| Timing path | From → To |
|---|---|
| Register-to-register | Launch register → Capture register |
| Input-to-register | Input → Register |
| Register-to-output | Register → Output |
| Input-to-output | Input → Output |
tCQ,max, tCQ,min — launch-register output delay.tcomb,max, tcomb,min — delay through logic.tsetup — data must arrive before the capture edge.thold — data must remain stable after the capture edge.For the basic zero-skew, zero-uncertainty register-to-register model:
Setup: TCLK ≥ tCQ,max + tcomb,max + tsetup
Hold: tCQ,min + tcomb,min ≥ thold
Arrival = tCQ,max + tcomb,max
Required = TCLK - tsetup
Setup Slack = Required - Arrival
Hold Slack = tCQ,min + tcomb,min - thold
Positive slack: pass; zero: boundary; negative: violation.
Example: TCLK=6 ns, tCQ,max=0.8 ns, tcomb,max=3.9 ns, tsetup=0.7 ns. Arrival = 4.7 ns; required = 5.3 ns; setup slack = +0.6 ns. With tCQ,min=0.25 ns, tcomb,min=0.35 ns, thold=0.80 ns, hold slack = −0.20 ns, so hold fails although setup passes.
The path requiring the longest clock period limits the operating frequency.
Reg A ──► Path 1 ──► Reg B
Reg C ──► Path 2 ──► Reg D
Reg E ──► Path 3 ──► Reg F
| Path | Required period |
|---|---|
| 1 | 4.6 ns |
| 2 | 6.1 ns |
| 3 | 5.2 ns |
Path 2 is critical: TCLK,min = 6.1 ns and Fmax(MHz) = 1000 / TCLK,min(ns) ≈ 163.9 MHz.
| Skew | Setup margin | Hold margin |
|---|---|---|
| Positive | Increases | Decreases |
| Negative | Decreases | Increases |
With skew and uncertainty:
Setup Slack = TCLK + Skew - Setup_Uncertainty
- (tCQ,max + tcomb,max + tsetup)
Hold Slack = tCQ,min + tcomb,min - thold
- Skew - Hold_Uncertainty
Debug: setup failure → inspect maximum delay, period, skew, uncertainty. Hold failure → inspect minimum delay and clock relationship. Slowing the clock can help setup but does not normally repair same-clock hold.
Prefer one master clock with clock enables when only the update rate changes.
┌────────────────┐
Data ───────────►│ │
Enable ─────────►│ Register │────► Output
Clock ──────────►│ with │
│ Clock Enable │
└────────────────┘
Enable at active edge | Register action |
|---|---|
| 0 | Hold |
| 1 | Capture |
100 MHz Master Clock
Block A → Enable every cycle
Block B → Enable every 4 cycles
Both blocks remain in the 100 MHz clock domain; Block B updates every fourth cycle without a divided clock.
A direct Clock · Enable gate can generate shortened or extra pulses if Enable changes while the clock is HIGH. For positive-edge-triggered logic, a low-level-sensitive latch holds the gating enable during the HIGH phase.

Gated_Clock = Clock · Safe_Enable. The latch is transparent while Clock=0 and closed while Clock=1.
Technology choice: ASICs commonly use integrated clock-gating cells; FPGAs normally prefer dedicated enables or supported clock-control resources, not arbitrary fabric gates.
A generated clock is derived by division, multiplication, phase shift, or clock management. Timing analysis must know its frequency/phase relationship to the source; generated clocks are not automatically asynchronous.
A PLL manages clock frequency/phase; a DLL provides delay/phase alignment. A Locked indication signals that the intended relationship has been established.
Selecting live clocks with an ordinary combinational MUX risks extra or shortened pulses. Cross-coupled interlocks ensure break-before-make selection.
Select=0 chooses Clock_A; Select=1 chooses Clock_B.
Request_A = Select' · Enable_B'
Request_B = Select · Enable_A'

Gated_A = Clock_A · Enable_A
Gated_B = Clock_B · Enable_B
Clock_Out = Gated_A + Gated_B
The matching labels represent cross-coupled feedback: Enable_B' feeds Interlock AND A, and Enable_A' feeds Interlock AND B:
Enable_A → NOT → Enable_A'
Enable_B → NOT → Enable_B'
Each clock enable can assert only when the other is LOW. During an A→B switch:
Select → 1
↓
Request_A → 0
↓
Enable_A clears during the LOW phase of Clock_A
↓
Request_B can become 1
↓
Enable_B sets during the LOW phase of Clock_B
↓
Clock_B drives Clock_Out
This preserves pulse integrity. Limitation: a stopped source may prevent its latch from reaching the safe phase, delaying or blocking the switch.
| Requirement | Preferred choice |
|---|---|
| Same clock, slower updates | Clock enable |
| Suppress ASIC clock activity | Integrated clock gating |
| Related new frequency/phase | Clock-management resource |
| Select between active clocks | Glitch-free clock selector |
If only the update rate changes,
prefer one master clock + clock enable.
Create or switch clocks only when
the architecture genuinely requires another clock relationship.
A reset design must define polarity, synchronous/asynchronous behavior, and priority. Active-LOW reset is named nReset (0 = asserted).
| Reset | Assertion | Deassertion |
|---|---|---|
| Synchronous | At active clock edge | At active clock edge |
| Asynchronous | Immediately | May occur between edges unless synchronized |
Example sequential priority:
nReset = 0 → Reset state
else Load = 1 → Load data
else Enable = 1 → Update / state transition
else → Hold
Reset must dominate Load and Enable if that priority is specified.
Recovery: reset is released sufficiently before the active clock edge. Removal: reset is not released too soon after it. A common strategy is asynchronous assertion with synchronous deassertion.

When nReset=0, both DFFs clear immediately. After release with adequate timing margin, the two-stage sequence is:
| Destination rising edge | Stage 1 | nReset_Sync |
|---|---|---|
| Before first | 0 | 0 |
| First | 1 | 0 |
| Second | 1 | 1 |
Thus nReset_Sync releases on the second destination edge in the defined sequence.

Each independent domain uses its own clock to synchronize reset release; do not reuse another domain's already-synchronized release.
Clock_A → controls release of nReset_A
Clock_B → controls release of nReset_B

Synchronization defines how release enters a domain; sequencing defines when it may occur. Dependencies include clock lock, initialization, memory/interface readiness, and prior-block readiness.
A reset tree distributes a high-fanout reset. A reset domain groups sequential elements sharing reset behavior and release policy.
| Symptom | First check |
|---|---|
| Registers release inconsistently | Asynchronous deassertion |
| One domain fails after release | Wrong domain clock/release sequence |
| Load/update wins over reset | Incorrect reset priority |
| Dependent block starts early | Reset sequencing |
A clock-domain crossing (CDC) occurs when one clock domain's signal is sampled by another.
| Clocks | Relationship |
|---|---|
| Same | Identical clock waveform |
| Related | Known frequency/timing relation |
| Phase-unrelated | Phase alignment cannot be relied upon |
| Asynchronous | No guaranteed frequency or phase relation |
An asynchronous transition close to a destination sampling edge can violate setup/hold and cause metastability.

A synchronizer reduces the likelihood of metastability propagating; it cannot eliminate it.

Both stages use Clock_B; downstream logic reads only DFF2. For an input stable before sampling, DFF1 updates on the first destination edge and Sync_Out on the second. Use this for independent single-bit levels, not pulses or related multi-bit words.
A pulse entirely between destination edges is missed:
Source Pulse: ___
| |
__________________| |________________
Clock_B: ↑ ↑ ↑
When pulse widening is permitted, stretch the pulse long enough to guarantee a destination sampling edge with adequate setup/hold margin.

The optional edge detector creates a one-cycle destination pulse; otherwise use the synchronized level. Events must be spaced far enough apart.
One event toggles a retained source state; the destination detects the synchronized change.

Source_Toggle ← Source_Toggle'; Pulse_Dst = Sync_2 ⊕ Prev_Sync. Sync_1, Sync_2, and Prev_Sync are destination-clocked. Initialize Source_Toggle = Sync_1 = Sync_2 = Prev_Sync = 0 to prevent a false event after reset.
Event-rate limit: two source toggles before observation can cancel:
Source: 0 → 1 → 0
Destination: 0 ─────→ 0
When each event must be acknowledged before the next begins, use a two-way handshake:

Request crosses through destination synchronization; Acknowledge crosses back through source synchronization. A new request begins only after the source sees synchronized Acknowledge=0. This adds latency but provides completion confirmation.
| Need | CDC technique |
|---|---|
| Stable independent level | 2-FF synchronizer |
| Pulse may be widened | Pulse stretching |
| Occasional event without acknowledgement | Toggle synchronizer |
| Event requiring acknowledgement | Request/Acknowledge |
Coherency requires all related bits of a transferred word to represent the same transaction. Independent 2-FF synchronization of data bits can create mixed words:
Source change: 01 → 10
Possible incoherent observation: 00 or 11
For an occasional multi-bit word, the source holds Data stable while synchronized control determines destination capture.

The destination captures the held bus directly and only once; Request/Acknowledge controls use synchronizers. Source data must remain stable until acknowledgement, and a new transaction waits for handshake return-to-idle.
Adjacent legal source counter states change one Gray bit. Conversion:
Gray = Binary ⊕ (Binary >> 1)
| Binary | Gray |
|---|---|
00 | 00 |
01 | 01 |
10 | 11 |
11 | 10 |

The Gray value is registered in the source domain, then each bit passes through destination-clocked 2-FF synchronization. Remote pointer visibility is delayed. A slow destination may skip source states, so consecutive observations need not differ by one bit.
Boundary: Gray code is suitable for restricted counters/pointers, not arbitrary multi-bit data, and never replaces synchronization.
For continuous multi-bit streaming across independent clocks:

The data uses dual-port storage; each domain maintains its own binary pointer and receives a synchronized, registered Gray pointer from the other:
| Pointer sent | Destination synchronizer |
|---|---|
| Write Gray pointer → Read domain | Per-bit 2-FF, Read Clock |
| Read Gray pointer → Write domain | Per-bit 2-FF, Write Clock |
| Status flag | Calculated in | Remote information |
|---|---|---|
Full | Write domain | Synchronized read pointer |
Empty | Read domain | Synchronized write pointer |
The write side accepts writes only when Full = 0, and the read side accepts reads only when Empty = 0. Remote activity becomes visible after synchronization delay.
| Transfer | Preferred architecture |
|---|---|
| Independent level | 2-FF |
| Short event | Stretch or toggle |
| Acknowledged event | Request/Acknowledge |
| Multi-bit transaction | Stable-data handshake |
| Restricted pointer | Gray + synchronization |
| Continuous stream | Asynchronous FIFO |
Timing constraints define when transfers must meet their requirements, not how the hardware operates.

| Constraint intent | What analysis needs |
|---|---|
| Clock period | Interval between active edges |
| Input timing | Earliest/latest external arrival |
| Output timing | External receiver's data requirement |
| Generated clock | Source-derived frequency/phase relationship |
For example, TCLK=10 ns corresponds to 100 MHz. External I/O timing consumes part of the internal budget. Related generated clocks must be analyzed with their actual relationship.
| Exception | Legitimate case |
|---|---|
| False path | No valid timed transfer is required in the analyzed mode |
| Multicycle path | A real transfer is deliberately allowed later capture |
A test-only path inactive in the functional mode can be a false path. A multicycle path requires guaranteed suppression of the intermediate capture while the launched data remains valid:
Edge N → Launch data
Edge N + 1 → Destination capture guaranteed disabled
Edge N + 2 → Destination captures stable data
Multicycle exceptions must retain proper setup and hold checks. Never use an exception to conceal a real timing or CDC defect.
| Symptom | Inspect first |
|---|---|
| Data arrives too late | Setup: maximum delay, period, skew, uncertainty |
| Data changes during hold window | Hold: minimum delay, skew, clock relation |
| Extra or malformed clock edge | Gating or clock-source selection |
| Related-clock timing mismatch | Generated-clock relationship |
| Startup/one-domain reset failure | Reset polarity, priority, release sequence |
| Unreliable asynchronous level | Single-bit synchronizer |
| Missed/repeated event | Pulse width, toggle rate, reconstruction |
| Corrupted multi-bit word | Coherency or handshake |
Incorrect FIFO Full/Empty | Pointer synchronization and status ownership |
Start with the failing signal, its source/destination clocks, and the intended transfer. Fix the design or timing assumptions—not just the warning.