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

Maskable Edge Detector

MediumLogic CircuitBuild

Interrupt controllers and peripheral interfaces must precisely identify signal transitions while maintaining the ability to ignore them when busy. A maskable edge detector captures rising edges on an input line but suppresses the output if the channel is disabled.

The circuit must assert pulse high for exactly one clock cycle when din transitions from 0 to 1, provided en is 1 during the transition. If en transitions from 0 to 1 while din is already 1, pulse must remain 0.

| Cycle | en | din | pulse | Notes | |-------|------|-------|---------|-------| | 1 | 1 | 0 | 0 | Stable low | | 2 | 1 | 1 | 1 | Valid rising edge | | 3 | 1 | 1 | 0 | Remains high: no pulse | | 4 | 0 | 0 | 0 | Masked | | 5 | 0 | 1 | 0 | Masked rising edge | | 6 | 1 | 1 | 0 | Unmasked while high: no pulse |

Constraints

  • Use D flip-flops to retain the previous state of the input.
  • Gate the detection logic using combinational gates.
  • Do not use asynchronous resets or clock gating to implement the enable functionality.
  • Ensure the output is strictly synchronous.

Topics

Edge DetectionInterruptsGating

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