The response applies to the LatticeECP2M/LatticeECP3/LatticeSC/M PCS/SERDES QUADS used in 10-bit RAW SERDES only mode.
The assumption is that you are coding your own RTL 8b10b decoder in the fabric.
Based on the definition of 8b10b codes , DATA=0x00 for example is encoded as hex value of 0x274 , or a 10-bit sequence abcdeifrgj=10_0111_0100.
In 10-bit SERDES only mode , the encoded 8b10b 10-bit data appears on the PCS RXD/TXD [9:0] bus such that j is mapped to bit 9 and a is mapped to bit 0 of the bus.
You can perform word alignment to Comma characters either in the PCS/SERDES QUAD or using an external word aligner in the FPGA.