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

Byte Serializer with Busy Flag

MediumLogic CircuitBuild

Serial communication interfaces like UART and SPI convert internal parallel data into a single-bit stream. The host system relies on a status flag to know when the transmitter is actively shifting data and cannot accept new input.

This circuit serializes an 8-bit input byte into a 1-bit output stream. On the rising edge of clk where Load is 1, the circuit captures DataIn and transitions to an active shifting state. Over the following 8 clock cycles, the captured byte is shifted out on Tx, starting with the most significant bit (bit 7) down to the least significant bit (bit 0).

The Busy output must assert to 1 on the first cycle of transmission and remain 1 exactly until the final bit has been transmitted.

| rst | State | Load | Next State | Busy | Tx | |-------|-------|--------|------------|--------|------| | 1 | Any | X | Idle | 0 | 0 | | 0 | Idle | 0 | Idle | 0 | 0 | | 0 | Idle | 1 | Shift 7 | 0 | 0 | | 0 | Shift | X | Shift n-1 | 1 | DataIn[n] |

Constraints

  • Implement a synchronous active-high reset using the rst signal.
  • Ignore the Load signal completely while Busy is 1.
  • Output 0 on Tx whenever the circuit is in the Idle state.
  • Transmit the byte strictly MSB-first.

Topics

Sequential LogicState MachinesShift Registers

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