A N 3 7 0
48
Rev. 1.0
7.4. Encoding Module
The encoding module provides predefined and customer configurable mechanism for input data conversion for the
transmission ready data to be written to the ODS for transmission. There are 3 predefined encodings: none (NRZ),
Manchester, and 4 bit to 5 bit encoding. Then users can provide their own functions for custom encoding.
The encoding functions in this module are provided to a user as a convenience, but they will not be usually called
by the user in the main application. Instead, prior to using the Single Tx Loop module, the user must setup the
encoding function by using the vStl_EncodeSetup() function. The selected encoding function is then called from
the vStl_EncodeByte() function, which is called from the vStl_SingleTxLoop() function during frame transmission.
7.4.1. No Encoding (NRZ)
No encoding means that the input byte is passed “as is” during the encoding process. Note that the bit 0 (LSb) is
fed to the PA first in the ODS. To set ODS to shift all 8 bits of the byte to PA the user must set the
tOds_Setup.bGroupWidth=7
when calling the vOds_Setup() function. It is also possible that the user prepares the
raw data first and requires that, for example, only 6 LSb bits will be transmitted for each byte. In that case the value
tOds_Setup.bGroupWidth=(6-1)
has to be used when calling the vOds_Setup() function.
7.4.2. Manchester Encoding
Table 7 is used for Manchester encoding. Note that the least significant bit of the output is put onto the PA first.
Data bit 0 is encoded to a 1 to 0 transition. Data bit 1 is encoded to a 0 to 1 transition. The least significant bit of the
input is converted into two least significant bits of the output.
When using this encoding the user is responsible for calling the vOds_Setup() function with the input structure
tOds_Setup.bGroupWidth=7 value to transmit all 8 bits in the converted output byte.
Table 7. Manchester Encoding
Input
Output
0x0
0x55
0x1
0x56
0x2
0x59
0x3
0x5A
0x4
0x65
0x5
0x66
0x6
0x69
0x7
0x6a
0x8
0x95
0x9
0x96
0xA
0x99
0xB
0x9A
0xC
0xA5
0xD
0xA6
0xE
0xA9
0xF
0xAA