Glitch Rejector
Cosmic rays, crosstalk, and noisy mechanical switches can induce single-cycle anomalous pulses that must not corrupt system state. A digital low-pass filter blocks these transient spikes while allowing stable signals to pass through.
The circuit must inspect the incoming din signal. If din flips for exactly one clock cycle, dout must remain unchanged. If din holds its new value for two or more consecutive cycles, dout must update to match the new value. This filtering behavior applies to both positive (0 to 1) and negative (1 to 0) glitches.
| din (current) | din (previous) | dout (current) | dout (next) | |-----------------|------------------|------------------|---------------| | 0 | 0 | 0 | 0 | | 1 | 0 | 0 | 0 | | 0 | 1 | 0 | 0 | | 1 | 1 | 0 | 1 | | 0 | 0 | 1 | 0 | | 1 | 0 | 1 | 1 | | 0 | 1 | 1 | 1 | | 1 | 1 | 1 | 1 |
Constraints
- Use D-flip-flops to maintain the sequential state.
- Update state on the rising edge of the implicit clock.
- Assume all registers initialize to 0.
Topics
Solve this problem
Place the gates, wire them up and watch the signals settle. Every submission runs on the same simulation engine that grades it.
This problem is part of Codiode Pro. The statement above is free to read.
The circuit builder and code editor need a desktop screen. On a phone, read the problem here and open it on a laptop to solve.