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

Combinational Output Causing Glitches

MediumLogic CircuitDebug

A clock gating enable signal is derived from state machine bits to control downstream logic power.

Expected behavior:

The output clk_en must be synchronized to the rising edge of clk to prevent combinational glitches during state transitions. It should evaluate to 1 when input A=1 and B=0 at the rising edge of clk and hold its value until the next clock edge.

Simulation shows clk_en = 1 immediately when A=1 and B=0, even while clk = 0. The waveform viewer shows spurious clock pulses because the enable signal changes state asynchronously. Inspect the circuit and correct the fault.

Constraints

  • Do not change the input or output port names.
  • The output must only update on the rising edge of clk.

Topics

sequentialfsmglitchesclock-gating

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