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

Sync Word Detector

HardLogic CircuitBuild

Serial data links often lack a dedicated clock or frame start wire. The receiver must continuously hunt for a known synchronization pattern in the incoming bitstream to align bytes properly.

The circuit monitors a continuous single-bit input stream din. It must detect the 8-bit synchronization word 0xA5 (binary 10100101, received oldest bit first). When this exact sequence is present across the previous 8 clock cycles, the output sync_found must be asserted high for exactly one clock cycle.

| Cycle | din | sync_found | Note | |---|---|---|---| | 1 | 1 | 0 | | | 2 | 0 | 0 | | | 3 | 1 | 0 | | | 4 | 0 | 0 | | | 5 | 0 | 0 | | | 6 | 1 | 0 | | | 7 | 0 | 0 | | | 8 | 1 | 1 | Matches 10100101 |

Constraints

  • Implement the design using only standard logic gates and D flip-flops.
  • Treat rst as a synchronous, active-high reset that clears all stored state.
  • Do not use pre-packaged shift register IP blocks.

Topics

State MachinesShift RegistersSerial Links

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