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

Manchester Encoder

MediumLogic CircuitBuild

Baseband communication systems like Ethernet and RFID embed clock and data on a single wire to ensure synchronization. The encoder accomplishes this by guaranteeing a voltage transition in the middle of every bit period.

Construct a Manchester encoder driven by a double-speed system clock. The data input remains stable for a full bit period, which equals two clock cycles. A logic 1 is encoded as a high-to-low transition. A logic 0 is encoded as a low-to-high transition.

Use an internal phase state that tracks the current half of the bit period. When rst is 1, the phase resets to 0. When rst is 0, the phase toggles on every clock cycle. The output tx must follow this precise behavior based on data and phase:

| data | phase | tx | |--------|---------|------| | 0 | 0 | 0 | | 0 | 1 | 1 | | 1 | 0 | 1 | | 1 | 1 | 0 |

Constraints

  • Implement an internal 1-bit phase register that toggles every clock cycle.
  • Reset the phase register to 0 synchronously when rst is high.
  • Generate the output tx combinationally using only data and the internal phase.

Topics

sequentialencodingclockscommunication

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