
VLSI
Design and Implementation of a Manchester Encoder and Decoder Using Verilog HDL
Abstract:
This project focuses on designing and implementing a Manchester Encoder and Decoder using Verilog HDL. Manchester encoding is a digital line-coding technique in which every data bit contains a transition at its midpoint. This transition provides clock synchronization between communicating devices and helps maintain a balanced signal. The encoder converts binary input data into Manchester-coded signals, while the decoder recovers the original binary data from the encoded waveform. The design demonstrates digital encoding, decoding, timing synchronization, and serial communication concepts.
Project Description:
The project develops a Manchester encoding and decoding system using Verilog HDL. It consists of an encoder module, decoder module, clock-generation logic, and data-processing circuits.
The encoder converts binary data into Manchester-coded signals according to a selected transition convention. For this project, the following convention is used:
- Binary 0: High-to-Low transition at the middle of the bit period.
- Binary 1: Low-to-High transition at the middle of the bit period.
Each input bit is represented by two signal intervals, ensuring a transition at the midpoint.
The decoder receives the Manchester-coded signal, identifies the midpoint transition, and reconstructs the original binary data. A synchronized clock or oversampling mechanism can be used to identify bit boundaries and sample the encoded waveform reliably.
Working Principle:
1. The system initializes the encoder and decoder after reset.
2. The encoder accepts binary input data and a valid-data signal.
3. Each input bit is divided into two equal time intervals.
4. For binary 0, the encoder generates a High-to-Low transition.
5. For binary 1, the encoder generates a Low-to-High transition.
6. The encoded signal is transmitted to the decoder.
7. The decoder detects the signal transitions and identifies the midpoint of each bit period.
8. The transition direction is interpreted according to the selected encoding convention.
9. The recovered binary bits are stored in an output register.
10. A data-valid signal indicates when the decoded output is available.
Notes:
- Use Verilog HDL for encoder and decoder implementation.
- Define the Manchester transition convention clearly and use the same convention in both modules.
- Generate the encoded waveform using a clock that supports two signal intervals per data bit.
- Use a suitable bit-period counter or clock-enable signal to control encoding.
- Implement decoder timing recovery using a synchronized clock, oversampling, or transition-detection logic.
- Synchronize asynchronous input signals before processing them in the internal clock domain.
- Handle missing transitions, noise, and invalid Manchester patterns where applicable.
- Test different input patterns, including 00000000, 11111111, 10101010, 01010101, and random data.
- Verify encoder and decoder operation using simulation waveforms.
- Tools may include ModelSim, QuestaSim, Vivado, Quartus, and Icarus Verilog.
- Optional enhancements include configurable data width, preamble detection, error detection, and FPGA-based hardware testing.
- Manchester encoding requires a transition in every bit period, but reliable decoding still requires correct bit synchronization and timing recovery.
- The basic design is an educational prototype and does not include a complete Ethernet physical-layer implementation.
Expected Outcome:
The expected outcome is a functional Manchester Encoder and Decoder capable of converting binary input data into Manchester-coded signals and recovering the original data. The system demonstrates midpoint transition generation, transition detection, timing synchronization, digital line coding, and serial data recovery. The project provides practical knowledge of Verilog RTL design, waveform analysis, digital communication, and FPGA-based encoding and decoding applications.
All Projects




