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

JK Flip-Flop: Hold Violation Risk from Toggle Operation

HardLogic CircuitTiming Diagram

A synchronous circuit features a positive-edge-triggered JK flip-flop driving a downstream positive-edge-triggered D flip-flop. The JK flip-flop operates in conditional toggle mode: it toggles its output Q_JK on the LOW-to-HIGH transition of CLK when EN is 1, and holds its value when EN is 0. The propagation delay (t_pcq) of the JK flip-flop is 0.5 time units, while the D flip-flop requires a hold time (t_hold) of 1.0 time unit. Because t_pcq is strictly less than t_hold, any clock edge that causes Q_JK to change will violate the D flip-flop's hold window and drive its output Q_D into an indeterminate state.

Four signals are shown: CLK (clock, period 2), EN (toggle enable input), Q_JK (JK flip-flop output), and Q_D (downstream D flip-flop output).

Trace both Q_JK and Q_D across all 10 time steps.

Constraints

  • Use X for any time step where a hold violation occurs and for the duration that the indeterminate state persists.
  • The D flip-flop recovers from an X state only if it successfully samples a stable, valid input at a subsequent clock edge.
  • Assume both Q_JK and Q_D are initially 0 at time step 0.

Topics

MetastabilityHold TimeJK Flip-FlopTiming Violation

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