Codiode

Frequency Limit Detector

HardLogic CircuitBuild

Hardware systems must protect themselves from interrupt storms or mechanical contact bounces that escape early filtering stages. A frequency limit detector acts as a digital throttle: it enforces a strict minimum spacing between incoming events.

The circuit must monitor event_in for a rising edge (a transition from 0 to 1). When a rising edge is detected, the circuit evaluates the number of clock cycles elapsed since the most recent rising edge.

  • If 10 or more clock cycles have elapsed, or if this is the first edge since reset: assert valid_event to 1 for exactly one clock cycle.
  • If strictly fewer than 10 clock cycles have elapsed: assert error to 1 for exactly one clock cycle and keep valid_event at 0.
  • The internal timer restarts its count on every rising edge of event_in, regardless of whether the event was flagged as valid or an error.

Outputs must remain 0 on clock cycles where no rising edge is detected.

Constraints

  • Use a synchronous active-high rst signal.
  • Evaluate the rising edge and assert the corresponding output in the same clock cycle that the 0-to-1 transition occurs.
  • Do not increment the internal counter beyond the threshold required to validate the next event.

Topics

CountersState MachinesEdge 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.

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.

Part of Interface and Communication Circuits

Problem 24 of 79 in the Interface and Communication Circuits track.

Related problems

Browse all problems · Digital logic design practice problems · Learning tracks

Solve this on a laptopSend yourself the link and continue there.