Gray code counter In progress
A 3-bit binary count with its Gray code loaded beside it at the same edge, and why one bit per step, the wrap included, lets a count cross clock domains.
Reference pages: a live circuit, its waveform on the same time axis, and the SystemVerilog that produces it.
rtl
A 3-bit binary count with its Gray code loaded beside it at the same edge, and why one bit per step, the wrap included, lets a count cross clock domains.
rtl
Four flip-flops and one XOR that step through every nonzero 4-bit value, fifteen in all. The taps, the seed a reset must load, and the value it cannot leave.
rtl
A one-cycle pulse carried into another clock domain. A toggle flop makes it a level, two flops carry it across, and a flop and an XOR make it a pulse again.
rtl
A D flip-flop takes d at each rising edge of the clock and holds it until the next. The always_ff that describes it, an enable, and an asynchronous reset.
rtl
Two flip-flops that assert a reset at once and release it only just after a clock edge. Why the release has to be synchronous, shown on a ring it can break.
rtl
Four flip-flops in a row that take one bit per edge and hold the last four side by side. Serial in, parallel out, and what the order of four lines decides.
rtl
A Moore state machine that finds 1011 in a serial bit stream, overlaps included. Five states, ten arrows, and the one state that reports a match.
rtl
A four-state Moore machine for a junction, where a timer and the side road's queue decide when green changes hands. Holding, bus outputs, a synchronous reset.
rtl
The control state machine of a UART receiver, with its counters outside it. Priorities, Mealy outputs on arrows, a framing error and a false start.
rtl
A counter drawn as one box, and a count that leaves it as a bus. What a block hides, and how four bits travel on one wire and one waveform row.
rtl
One rising edge of an input produces exactly one clock period of output. The flip-flop that remembers the last cycle, and the gate that compares.
gate
An output that should have stayed high dips for two ticks, because two paths through the logic are not the same length. The consensus term covers the gap.
rtl
One asynchronous input into a single flip-flop and into two, side by side. What metastability looks like, and what the second flop actually buys.