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

Simplified Manchester Decoder

HardLogic CircuitBuild

Ethernet and RFID systems embed clock signals directly into data streams to prevent receiver drift. The decoder must recover the original bit sequence from these continuous transitions.

A 4x oversampling clock drives the circuit. The sync input pulses high for one cycle to mark the 0 percent start of a new bit period. The mid-bit transition occurs at the 50 percent mark. To safely recover the data and ignore edge jitter, sample the man_in stream at the 75 percent mark, which is exactly three cycles after the sync pulse.

During the 75 percent mark cycle, output the sampled bit on data_out and assert valid to 1. At all other times, valid and data_out must be 0.

Constraints

  • Use a synchronous reset driven by rst.
  • valid must strictly pulse for one clock cycle per bit period.
  • data_out must be forced to 0 when valid is 0.
  • Do not use negative-edge triggered flip-flops.

Topics

state-machineoversamplingdata-recovery

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