Academy
English한국어

15 / 24 · Concept

Diagnose reset and counting errors

Check the initial value, reset and first edge in order.

Learning goals

  • Build an expected-state trace before observing results
  • Distinguish reset, initialization and bit-order mistakes

The first edge anchors the trace

The provided lab starts at 11 and resets at the first rising edge. After reset is released, the predicted observed sequence is 00, 01, 10, 11, 00. Assuming it began at 00 can shift your edge count.

The run settings apply reset for the first cycle in this lab. Check that mechanism before adding rst to the input JSON. Keep the source of a signal clear instead of controlling it from two places.

SymptomFirst check
Never leaves 00Reset remains asserted?
Sequence starts one value lateInitial state and first reset edge
01 and 10 appear swappedBit order in values and display
Stops at 11RTL contains a hold condition?

Change one condition per comparison

Change initialization and reset duration in separate experiments. Changing both makes differences harder to explain. Keep the source, settings and expectations together for comparison.

If the output differs from your prediction, trace only as far as the first mismatch. Calculate the next value from count and rst at that edge before considering the rest of the waveform.

Try it yourself

If count is 00 after every rising edge, should you change the addition first?

Read the explanation

First check whether rst stays high and whether clock edges occur. With reset asserted, the correct code repeatedly stores 00.

Your choice applies to this browser. Change it any time using the footer.