CodiodeCodiode
Home
Problem Solving
Skill Tracks
My Assignments
Contests
Leaderboard
Community
Settings
Codiode/Problems/Sequential Logic

Glitch Rejector

MediumLogic CircuitBuild

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

sequentialstate-machinefiltering

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.

Sign in to solveSee what Pro unlocks

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.

Related problems

  • 3-bit Ripple Counter from Toggle Flip-FlopsEasy
  • D Latch from a 2:1 MUXEasy
  • 2-bit Ring CounterEasy
  • T Flip-Flop from a D Flip-FlopEasy
  • Handshake Deadlock Due to Early ResetHard
  • Reconvergence of Individually Synchronized BitsHard
  • Debug: Asynchronous Clear GlitchHard
  • Clock Gate Enable Crossing DomainsHard

Browse all problems · Learning tracks