The first F13 result is hexadecimal 034. The manager needs only the byte 34 and has its own clock. The collector drives a pulse high for one source cycle, then drives it low. Will the manager always see it? Draw the two clocks first. At a clock-domain boundary, delivery cannot rely on a shared rising edge.
A running clock can still miss the entire pulse
The source period is 10 ns, with rising edges at 5, 15, 25 ns and so on. The source raises the pulse at 15 ns and drops it at 25 ns. The destination period is 16 ns. Keep both periods fixed and vary the time of the first destination rising edge. It serves as the phase label: phase 4 or phase 12.
| Destination clock | First three rising edges | Sampler output after edge | Pulse observed? |
|---|---|---|---|
| Phase 4 | 4, 20, 36 ns | reset clears output, 1, 0 | Yes, at 20 ns |
| Phase 12 | 12, 28, 44 ns | reset clears output, 0, 0 | No |
For phase 4, the edge at 20 ns lies inside the high interval. For phase 12, 12 ns is too early and 28 ns is too late. Simulation releases reset at 13 ns. At the first edge of each phase, reset clears the receiving register. At 4 ns the source has yet to reach its first rising edge, so the raw pulse is X and reset still makes the receiver output zero. By 12 ns the source was reset at 5 ns. The pulse is zero and the receiver is still in reset.
Seeing the pulse once answers one sampling question
The sample edges above avoid transitions in the pulse. In real hardware a flip-flop requires its input to stay stable for a short time before and after an edge. If a crossing signal changes in that interval, the first receiving flip-flop may become metastable. Its output may take extra time to resolve to a stable zero or one.
A common starting point for single-bit control is a two-stage synchronizer on the destination clock. The first stage samples the crossing. The second samples its Q one destination cycle later, allowing time for the first output to resolve. Downstream logic uses the final stage. Avoid feeding multiple logic paths from the first stage. Clock rate, signal activity, device characteristics and synchronizer routing all affect reliability. Choose the synchronizer for the requirements and implementation conditions.
The synchronizer reduces the chance that an unresolved value propagates. If a short pulse falls entirely between destination edges, the first stage still misses it. Reading one at a particular phase in the test establishes that the high interval contains that ideal sample point.
Hold the event until the other side receives it
The manager needs the byte 34. The source stores that byte and raises request. Since request stays high, phase 12 can see it at 28 ns. The runnable extension keeps the destination at phase 12 and uses two stages to receive the request. The first updates at 28 ns and the second at 44 ns. At 60 ns the manager sees the settled second-stage value, captures 34 and raises ack.
Ack crosses back through two source stages, which update at 65 ns and 75 ns. The source sees the synchronized ack at 85 ns and clears request. Once the manager sees the synchronized request go low, it clears ack. The source waits until that low level crosses back before accepting another word. This four-phase handshake allows one outstanding word.
If the source changes data while waiting for ack, the manager may receive a word that belongs to a different request. Here the source holds the complete word. The bundled data path also needs timing constraints so the entire word settles with margin before destination capture. Giving every bit its own two-stage synchronizer can make bits from one source update appear in different destination cycles. The resulting word can mix values from two updates.
Separate asserting and releasing active-low reset
To assert reset is to drive it active. To deassert it is to release it. For active-low rst_ni, assert by driving low and release by driving high. The verb assert here refers to a reset action. In F15, an assertion checks a property.
A synchronous reset only changes its registers on an active edge. An asynchronous reset can assert between edges. A common design for asynchronous assertion with synchronous release gives each clock domain its own reset release chain. Pulling the global reset low clears both stages. Returning it high lets the first register take a one and the second register take that one on the next local edge.
Asynchronous reset release needs physical recovery and removal checks. One domain may resume before its peer can send or receive. The lab tests the handshake under a controlled common reset policy. If the product permits unilateral reset, define what happens to outstanding requests, data and acknowledgements, and verify the reset-domain crossings.
Does the crossing carry a state, an event or a word?
| Signal | Receive contract | Conditions to check |
|---|---|---|
| Sustained single-bit level | Read the settled state after synchronization latency | Level duration, synchronizer structure and reliability |
| Short pulse | Deliver each emitted event once | Hold request until ack, avoid accepting an event without space, check reset and event rate |
| Multi-bit word | Read all bits of the same word | Constrain a held-data handshake or use a suitable asynchronous FIFO |
| Encoded pointer | Interpret only the states specified by the encoding | Even a Gray pointer with one bit changing per source increment needs timing and inter-bit skew constraints |
Replay the experiment in an extracted copy
Download the lab package, extract it on Linux or WSL and run bash run.sh. Check the two sampled phases against the independently calculated Python table. Icarus 12.0 also exercises one delivery of 34 and the local reset release. Yosys 0.33 checks the generic two-stage control and reset structures. See the run summary, raw waveform and evidence with hashes.
A hardware implementation still needs CDC and reset-domain review, crossing constraints and evidence about the implemented synchronizer. Estimating mean time between failures (MTBF) also requires device and operating-condition data.
Transfer question: shorten the notification from four source cycles to one
The source period is 10 ns and the destination period is 16 ns. Both clocks keep running. A notification used to last four source cycles and now lasts one. Which ideal sampling assumption stops holding? Which phase reproduces the problem?
Answer
The original level is high for 40 ns, longer than the 16 ns destination period. Every ideal phase then has at least one sample in the high interval. A 10 ns level loses that guarantee. Phase 12 misses it between 12 ns and 28 ns. If every event must arrive, specify a delivery protocol such as holding request until ack. Physical setup, hold and synchronization delay still matter.
The next lesson writes the rule that a stalled result must hold as a property and checks that the test actually reaches a stall.