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

Delayed Valid Signal in Pipeline

MediumLogic CircuitDebug

A pipelined data path processes incoming data over two clock cycles and asserts a valid flag when the result is ready. The DataOut and ValidOut signals must arrive in the exact same clock cycle to ensure the downstream receiver captures the correct payload.

Expected behavior:

| Cycle | DataIn | ValidIn | DataOut | ValidOut | |-------|----------|-----------|-----------|------------| | 0 | 1 | 1 | 0 | 0 | | 1 | 0 | 0 | 0 | 0 | | 2 | 0 | 0 | 1 | 1 | | 3 | 0 | 0 | 0 | 0 |

Simulation shows a timing misalignment during testing. When ValidIn and DataIn are asserted in cycle 0, DataOut correctly outputs the data in cycle 2, but ValidOut remains 0. The ValidOut signal erroneously asserts in cycle 3. The receiver captures garbage data from cycle 3 instead of the actual payload.

Inspect the circuit and correct the fault.

Constraints

  • Do not alter the data path logic or its registers.
  • The control path latency must perfectly match the data pipeline depth.
  • Use only standard D flip-flops for the delay stages.

Topics

pipelinedebugsequential-logicsynchronization

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