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

Programmable Edge Detector Selection

MediumLogic CircuitBuild

Reusable intellectual property blocks often need configurable interrupt polarities to interface with various external peripherals. A programmable edge detector allows a host system to dynamically select which signal transitions trigger a synchronized, one-cycle interrupt pulse.

The circuit monitors the din input and generates a single-cycle high pulse output based on the control signals mode_1 and mode_0. An implicit synchronous clock drives the detection logic.

| mode_1 | mode_0 | Detected Edge | pulse Output Condition | |----------|----------|---------------|--------------------------| | 0 | 0 | None | Always 0 | | 0 | 1 | Rising | din transitions 0 to 1 | | 1 | 0 | Falling | din transitions 1 to 0 | | 1 | 1 | Both | Any din transition |

Constraints

  • Synchronize all state elements to a single clock domain.
  • Produce an output pulse exactly one clock cycle wide for each valid transition.
  • Do not use asynchronous delay elements or RC timing techniques.

Topics

SynchronizationEdge DetectionMultiplexing

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

  • D Latch from a 2:1 MUXEasy
  • 2-bit Ring CounterEasy
  • 3-bit Ripple Counter from Toggle Flip-FlopsEasy
  • T Flip-Flop from a D Flip-FlopEasy
  • Edge Detector Delayed by Extra CycleMedium
  • Signed vs Unsigned Comparison FailureHard
  • Incomplete Case StatementEasy
  • Counter Wrapping at Wrong ValueEasy

Browse all problems · Learning tracks