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.
- Find each cycle where
dgoes from 0 to 1.pulseshould be 1 in that cycle and in no other cycle. - Click the cell of
pulsewhere it first disagrees with the spec, then press Check.
No install and no sign-up needed. You write your answer in the editor and Nishkam checks it.