ERMII encoding lookup tables optimized with different goals

Citation Author(s):
Alexey
Romanov
RTU MIREA, Moscow, Russia
Francesco
Gringoli
Università degli Studi di Brescia, Brescia, Italy
Submitted by:
Alexey Romanov
Last updated:
Tue, 05/17/2022 - 22:18
DOI:
10.21227/mv7m-2d34
Data Format:
Research Article Link:
License:
0
0 ratings - Please login to submit your rating.

Abstract 

Encoding and decoding tables for Enhanced Reduced Media-Independent Interface. Dataset contains 3 sets of lookup tables implementing encoder and decoder. Proposed encoder/decoder garantee that 2-bit TXD/RXD will change each data transmission cycle, making it possible for ERMII interface to work without REF_CLK, TX_EN and CRS_DV lines in difference to regular RMII.

6b8b_encdec_v1.mat  contains set of lookup tables optimized to minimize simultanious switching noise.
6b8b_encdec_v2.mat  contains set of lookup tables optimized to minimize number of periods without transition in a lower bit of bitpairs.
6b8b_encdec_v3.mat  contains set of lookup tables optimized to maximize number simulatnious transitions in both bits of bitpairs.

test__6b8b.m contains encoder/decoder test script.

Instructions: 

To run test:

Step 1. Put all files in one folder

Step 2. Uncomment loading of desired encoding .mat file in the begining of test__6b8b.m

Step 2. Run test__6b8b.m in Octave v.4.2.2 or higher (should be possible to run also in MATLAB)

To encode your own data:

Step 1. Load enc_data lookup table from desired encoding .mat file

Step 2. Devide your data on 6b data blocks If you data length is not multiple of 6 add additional zeros to make last data block length be equal to 6 bit.

Step 3. To encode each data block you should read value from enc_data lookup table cell with address ((nb<<6)||db)+1, where nb - is first bit pair of the next data block and db - is 6 bit data block.  For the last data block nb = 0;

To decode your own data:

Step 1. Load dec_data lookup table from desired encoding .mat file

Step 2. Devide your encoded data on 8b data blocks

Step 3. To decode each data block you should read value from dec_data lookup table cell with address ((nb<<8)||eb)+1, where nb - is first bit pair of the next encoded data block and eb - is 8 bit encoded data block.  For the last data block nb = 0;

If dec_data returns value above 63 then encoded data block was invalid, but decoder tries to fix this error. For such entries 64 should be substructed from dec_data output. If dec_data returns 128, then input encoded block includes error, which cannot be automatically fixed.