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

Byte Aligned Deserializer

HardLogic CircuitBuild

High-speed serial links transmit continuous bitstreams without word boundaries. The receiver must hunt for a known synchronization pattern to establish byte alignment before downstream logic can extract payloads.

The circuit receives a continuous serial bitstream on din. Upon reset, the system is unaligned and valid is 0. The circuit must monitor din for the 8-bit sync word 10100101 (received MSB first, meaning older bits are shifted left). Once this exact pattern is detected in the shift register, the receiver locks alignment. Starting exactly 8 clock cycles after the sync word is detected, and every 8 cycles thereafter, the circuit must assert valid high for one cycle. The dout port must continuously reflect the 8 most recently received bits.

Constraints

  • Use a synchronous active-high reset rst.
  • The dout bus must update on every clock cycle regardless of the alignment state.
  • Once the sync word is found, the circuit must remain locked in alignment until a reset occurs.
  • Do not assert valid when the sync word itself is detected: assert it for the payload bytes that follow.

Topics

FSMShift RegisterCountersSerial-to-Parallel

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