00:00:00.000 Why can the same button lead to a different channel? A television starts on channel five. Press channel up to reach six. Press again to reach seven. The same command gives different results because the television remembers its current channel. A sensor receiver can use stored state, too. 00:00:20.460 The sensor moves on before the receiver is ready The sensor produces one result and moves on to the next. If the receiver only has a wire, it may find a newer result by the time it is ready. A register keeps a sample taken at an agreed time. The receiver can read that saved value while the input changes. 00:00:43.090 D is the input and Q is the retained result D is the input. Q is the retained output. At twenty five nanoseconds, the rising edge samples hexadecimal three C and Q updates. At twenty seven nanoseconds D changes to four four. There is no sampling edge at that instant, so Q still holds three C. 00:01:09.900 Enable decides whether this edge writes Q At thirty five nanoseconds, the input has changed again and enable is low. This edge preserves Q. At forty five nanoseconds a different input is present, and Q still holds. At fifty five nanoseconds enable is high, so the register finally stores seven D. 00:01:33.880 Active-low reset takes priority over enable Before any reset, enable is low. Q is still unknown in simulation after the first edge. At fifteen nanoseconds, reset and enable are both asserted, so the register clears to zero. The same control combination at sixty five nanoseconds clears the value it had stored. 00:01:56.050 Releasing reset does not restore earlier data After reset, Q contains zero. At the following rising edge, reset has been released, but enable is still low. Q keeps zero. At the next rising edge enable is high, and the register stores the new hexadecimal D eight. 00:02:14.450 Encode the priority in a clocked block This block runs on the rising edge. It checks active low reset first, then enable. If neither branch requests a write, Q keeps its value. The nonblocking assignment samples the input at the edge and schedules the update for later in the same time step. 00:02:34.210 Drive and check on opposite sides of the sampling edge Drive the test vectors on falling edges to keep the drive away from the sampling edge. At twenty seven nanoseconds, we deliberately change D between rising edges to test whether Q holds. Which value did the prior rising edge save? 00:02:52.875 Synchronous and asynchronous reset Pull synchronous reset low between edges and keep it low. The next rising edge clears the register. An asynchronous reset can clear it between clock edges. Its release has timing requirements of its own. The lab uses synchronous reset.