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

DFF with Asynchronous Reset and Clock Enable

MediumLogic CircuitBuild

Modern digital systems aggressively use clock gating and reset domains to manage power and state. Combining an asynchronous reset with a synchronous clock enable creates a robust storage element that can be initialized instantly while selectively holding data during operation.

The circuit updates the output Q to the value of D on the rising edge of CLK only when CE is 1. If CE is 0, Q retains its current state. The asynchronous, active-low reset RST_bar forces Q to 0 immediately. This reset action overrides all other inputs and clock events.

| RST_bar | CLK | CE | D | Q (next) | |-----------|-------|------|-----|------------| | 0 | X | X | X | 0 | | 1 | ↑ | 1 | 0 | 0 | | 1 | ↑ | 1 | 1 | 1 | | 1 | ↑ | 0 | X | Q (prev) | | 1 | 0/1 | X | X | Q (prev) |

Constraints

  • Implement using a standard D flip-flop primitive and basic logic gates or multiplexers.
  • The reset path must be strictly asynchronous and act independently of the clock.
  • Do not use latches.
  • Do not modify the clock signal path.

Topics

Sequential LogicLatches and Flip-FlopsRegisters

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