Main Content

Manchester Receiver Using Communications Toolbox

This example shows verification of a Manchester encoder. Manchester encoding is a simple modulation scheme that converts baseband digital data to an encoded waveform with no DC component. The most widely known application of this technique is Ethernet.

This model simulates a digital receiver of Manchester encoded data. The receiver is implemented in VHDL. The receiver uses a simple DLL (delay lock loop) clock recovery mechanism, which requires multiple cycles to lock with the incoming data stream. The performance of the receiver is explored by applying phase and frequency errors to a randomly generated stream of bits that is encoded using a simple MATLAB® function: manchesterencoder().

The VHDL code runs in ModelSim® as a ModelSim® VHDL Cosimulation block labeled VHDL Manchester Receiver.

vsim('tclstart',manchestercmds);
pause(5);
open_system('manchestermodelcommblks')
cmd = get_param('manchestermodelcommblks/VHDL Manchester Receiver','TclPostSimCommand');
set_param('manchestermodelcommblks/VHDL Manchester Receiver','TclPostSimCommand',[cmd '; quit -f;']);
sim('manchestermodelcommblks')