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

Overrun Error Detector

HardLogic CircuitBuild

Serial communication interfaces drop data if the host processor fails to service the receive buffer in time. The overrun error detector flags this condition to prevent silent data corruption.

The circuit tracks the availability of unread data using a data_valid register and catches missed reads using an overrun_err register. The behavior follows these exact rules:

  • When rx_done asserts, data_valid goes high.
  • When read_ack asserts, data_valid goes low.
  • If rx_done asserts while data_valid is already high and read_ack is low, overrun_err goes high.
  • The overrun_err flag is sticky: once asserted, it remains high until a reset occurs.
  • If rx_done and read_ack assert on the same clock cycle, data_valid remains high and no overrun occurs.
  • rst is a synchronous active-high reset that clears both registers.

Constraints

  • Implement synchronous active-high reset logic.
  • Use only D flip-flops for state elements.
  • Do not use latches.

Topics

RegistersInterfaceError Handling

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