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

UART Receiver State Machine

MediumLogic CircuitBuild

Every serial communication interface requires a controller to frame incoming bits into parallel words. The UART receiver state machine is the core control logic that guides data reception through the standard serial protocol phases.

The circuit must transition exactly through Idle (00), Start (01), Data (10), and Stop (11) states. The 2-bit output state represents the current state of the machine. State transitions occur on the rising edge of clk. When the synchronous rst is 1, the state resets to 00. When rst is 0, the next state is determined by the 1-bit baud_tick, the 1-bit serial line rx, and the 3-bit bit_count according to the following logic:

| state | baud_tick | rx | bit_count | Next state | |---------|-------------|------|-------------|--------------| | 00 | 0 | X | XXX | 00 | | 00 | 1 | 1 | XXX | 00 | | 00 | 1 | 0 | XXX | 01 | | 01 | 0 | X | XXX | 01 | | 01 | 1 | X | XXX | 10 | | 10 | 0 | X | XXX | 10 | | 10 | 1 | X | != 111 | 10 | | 10 | 1 | X | 111 | 11 | | 11 | 0 | X | XXX | 11 | | 11 | 1 | X | XXX | 00 |

Constraints

  • Use only D flip-flops for state storage.
  • Implement synchronous reset logic.
  • State encoding must match the provided table exactly.

Topics

sequentialfsmcommunication

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