Home › Practice › Design Verification › Waveform: the pulse that is too long

Waveform: the pulse that is too long

EasyWaveformdebugedge detect

A rising-edge detector turns a slow input into a one-cycle pulse. The spec says: pulse is 1 for exactly one clock cycle each time the input d changes from 0 to 1, and 0 at all other times, even while d stays high. The waveform from your teammate's test is below.

Concept first. An edge is a change, so a detector needs to remember what the input was one cycle ago and compare. A pulse must be exactly as long as the spec says. When you check an output against a spec, check its length too, not only that it appears. A pulse that is one cycle too long will look right at a glance, and it can trigger an action twice downstream.

What to do.

Solve in your browser →

No install and no sign-up needed. You write your answer in the editor and Nishkam checks it.

More in this track

← Waveform: the detector that misses a repeatWaveform: the shift register that shifts the wrong way →