From the point of view of frame structure encapsulation, GEM is similar to other data encapsulation methods. However, GEM is embedded inside the PON and has nothing to do with the OLT end SNIs and the ONU end UNls type(see Figure 3). That is, the GEM encapsulation function ends inside GPON, and systems other than GPON can not see.
2 GEM frame structure
The GEM frame structure is shown in Figure 4 and consists of two parts: the GEM frame head and the net load domain. The GEM frame header consists of PLI(net load length indicator), PortID(port ID), PTI(net load type indicator), and HEC(head error check). PLI indicates that the length of the net load domain behind the head is L bytes, the length is 12 bits, and the maximum is 4095 bytes. Therefore, user data frames larger than this value must be transmitted using a split mechanism. 12Bit PortID can provide 4096 different ports for multi-port reuse, equivalent to VPI in APON.
PTI is used to indicate the content type and corresponding processing of the net load segment, similar to the application in ATM. The highest bit in 3bit indicates whether the data frame or the GEM OAM frame. The lowest bit of the data frame indicates whether it is the end of the frame in the fragmentation mechanism, and the lower bit indicates whether congestion occurs.
PTI reserved some codes. HEC is 13 bits and provides head error detection and error correction functions. It is a combination of BCH(39, 12, 2) codes and a parity bit.
After the GEM frame header is determined, the sender sends the head and the fixed OxOXb6AB31E055 for XOR operations and sends the head out. The receiver uses the same XOR calculation to restore the head.