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

Minimum Pulse Width Validator

MediumLogic CircuitBuild

High-speed communication interfaces and control lines often suffer from wide noise spikes that bypass simple RC debouncers. A digital pulse width validator ensures signal integrity by rejecting any transient high state that fails to meet a strict duration threshold.

The circuit must monitor the input sig_in. When sig_in transitions from high to low, the output valid_pulse must assert for exactly one clock cycle if and only if sig_in was continuously high for at least 5 consecutive clock cycles immediately preceding the fall.

| Cycle | sig_in | valid_pulse | Note | |-------|----------|---------------|------| | 1 | 1 | 0 | Pulse begins | | 2 | 1 | 0 | | | 3 | 1 | 0 | | | 4 | 1 | 0 | | | 5 | 1 | 0 | 5th consecutive high cycle | | 6 | 0 | 1 | Pulse falls: valid | | 7 | 1 | 0 | New pulse begins | | 8 | 1 | 0 | | | 9 | 0 | 0 | Pulse falls: invalid (2 cycles) |

Constraints

  • Implement synchronous logic triggered on the rising edge of the implied clock.
  • Use an active-low asynchronous reset via rst_n.
  • Output valid_pulse must remain high for exactly one clock cycle per valid event.
  • Do not assert valid_pulse while sig_in is still high.

Topics

countersstate-machinedebouncerpulse-detection

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