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

Master-Slave DFF: Both Enables Same Polarity Debug

HardLogic CircuitDebug

A master-slave D flip-flop provides reliable edge-triggered state storage for synchronous digital systems.

Expected behavior:

The output Q should only update to match the input D on the falling edge of the clock signal CLK. At all other times, Q must hold its previous state regardless of changes to D.

Simulation shows timing violations during the high phase of the clock. When CLK is 1, changing D from 0 to 1 causes Q to immediately change to 1. The output fails to hold its state and acts as a transparent latch instead of an edge-triggered device.

Inspect the circuit and correct the fault.

Constraints

  • Do not replace the entire circuit with a primitive DFF component.
  • Only modify the existing gate-level implementation to fix the fault.
  • Do not add external clock edge-detection circuitry.

Topics

debugginglatchesflip-flopsclocking

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