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

UART Receiver Bit Counter

MediumLogic CircuitBuild

Serial communication protocols require precise tracking of payload boundaries to distinguish data bits from framing bits. A UART receiver relies on a dedicated counter to determine when an entire byte has been shifted in and the stop bit is expected.

The circuit must track the number of received bits and output a 3-bit value count. The counter increments by 1 on the rising edge of clk only when both the data_state flag is high and the baud_tick strobe is active. The counter must synchronously reset to 0 whenever the idle_state flag is asserted, overriding any increment conditions.

| idle_state | data_state | baud_tick | Next count | |--------------|--------------|-------------|--------------| | 1 | 0 | 0 | 0 | | 1 | X | X | 0 | | 0 | 0 | X | count | | 0 | 1 | 0 | count | | 0 | 1 | 1 | count + 1 |

Constraints

  • Implement a synchronous 3-bit counter.
  • Trigger state updates only on the rising edge of clk.
  • Ensure the reset condition is synchronous and takes priority over the increment logic.

Topics

CountersState MachinesUART

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