WO2018040824A1 - Data encoding method, data decoding method, devices, and data storage medium - Google Patents

Data encoding method, data decoding method, devices, and data storage medium Download PDF

Info

Publication number
WO2018040824A1
WO2018040824A1 PCT/CN2017/095344 CN2017095344W WO2018040824A1 WO 2018040824 A1 WO2018040824 A1 WO 2018040824A1 CN 2017095344 W CN2017095344 W CN 2017095344W WO 2018040824 A1 WO2018040824 A1 WO 2018040824A1
Authority
WO
WIPO (PCT)
Prior art keywords
port
data
disparity value
encoded
ports
Prior art date
Application number
PCT/CN2017/095344
Other languages
French (fr)
Chinese (zh)
Inventor
吴雪松
Original Assignee
深圳市中兴微电子技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市中兴微电子技术有限公司 filed Critical 深圳市中兴微电子技术有限公司
Publication of WO2018040824A1 publication Critical patent/WO2018040824A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4204Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
    • G06F13/4221Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus
    • G06F13/423Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus with synchronous protocol
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/14Conversion to or from non-weighted codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0004Parallel ports, e.g. centronics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0008High speed serial bus, e.g. Fiber channel
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/38Universal adapter
    • G06F2213/3852Converter between protocols

Definitions

  • the present invention relates to communication technologies, and in particular, to a data encoding method, a data decoding method and apparatus, and a storage medium.
  • QSGMII Serial Gigabit Media Independent Interface
  • PHY Physical Layer
  • MAC Media Access Contronl
  • SERDES Serializer
  • SERializer/DESerializer Serializer
  • the traditional QSGMII scheme takes the transmitting end as an example.
  • the transmitting end has 4 (one) channels, and each channel uses QSGMII to transmit 8 bits of data (that is, 8 bits of bit width data), and the 8 bit width data to be transmitted of each channel GMII is to be transmitted.
  • the raw data per 8 bits can be divided into two parts: the lower 5 bits of data: EDCBA (set its decimal value is X) and the upper 3 bits of data: HGF (set its decimal value to Y), then the 8 bit data can be recorded as DXY.
  • 8B/10B encoding is also used Up to 12 control characters can be used as the status indicator of the start of the frame in the transmission, the end of the frame, the idleness of the transmission, etc. Similar to the notation of the data characters, the control characters are generally recorded as K.X.Y. In the 8B/10B encoding, K28.1, K28.5, and K28.7 are used as control codes.
  • each channel of the 4 channels needs to transmit 32-bit bit width data (also referred to as 32-bit data in this paper) through the GMII, it is necessary to press the 32-bit data to 0, 1, 2 for the 4 ports of each channel GMII.
  • the order of the port numbers of 3 implements the 8B/10B encoding method for the 8-bit bit width data to be sent by each port, which results in a high processing frequency of each port, which affects the stability and reliability of the system.
  • embodiments of the present invention are directed to providing a data encoding method, a data decoding method and apparatus, and a storage medium, which reduce the processing frequency of each port when the 8-bit GMII 32-bit data is 8B/10B encoded.
  • an embodiment of the present invention provides a data encoding method, including: receiving 4-port data to be encoded from a QSGMII; determining a disparity value of each port in the 4-port; and determining, according to a disparity value of each port, respectively
  • the data to be encoded of each port is encoded, and the encoded data of each port is subjected to parallel-to-serial conversion processing.
  • the determining the disparity value of each port in the four ports includes: determining a disparity value of each port according to a disparity value of a previous port corresponding to each port; The disparity value of the port is output to the next port of each port.
  • the method further includes: setting the control code of the port 0 in the 4-port by K28 Replace .5 with K28.1.
  • an embodiment of the present invention provides a data decoding method, including: receiving encoded data, performing serial-to-parallel conversion on the encoded data, and converting the parallel-converted 4-way parallel Data, corresponding to the four ports sent to the QSGMII; determining the disparity value of each port in the four ports; decoding the encoded data according to the disparity value of each port, and obtaining the decoded of each port data.
  • the determining the disparity value of each port in the four ports includes: determining a disparity value of each port according to a disparity value of a previous port corresponding to each port; The disparity value of the port is output to the next port of each port.
  • the encoded data is serial-to-parallel converted, and the four parallel data obtained after the serial-to-parallel conversion are respectively sent to the four ports of the QSGMII, and the four ports are determined.
  • the method further includes: when at least one of the encoded data of each port does not exist in the preset encoding table, the encoded data of each port is preset The direction is shifted by one bit until the encoded data of each port exists in the preset coding table.
  • the method further includes:
  • the coded data of each port is shifted to a preset direction until the disparity values of the ports exist in the In the preset value.
  • the method further includes:
  • the control code of the port 0 is replaced by K28.1 to K28.5;
  • the embodiment of the present invention provides a data encoding apparatus, including: a first receiving module configured to receive 4-port to-be-coded data from the QSGMII; and a first determining module configured to determine each port in the 4-port
  • the encoding module is configured to encode the data to be encoded of each port according to the disparity value of each port, and perform parallel-to-serial conversion processing on the encoded data of each port.
  • the first determining module is configured to determine a disparity value of each port according to a disparity value of a previous port corresponding to each port, and output the disparity value of each port to The next port of each port.
  • the apparatus further includes: a first replacement module configured to: after receiving the 4-port to-be-coded data from the QSGMII, before determining the disparity value of each port in the 4-port, in the 4-port
  • the control code for port 0 is replaced by K28.5 to K28.1.
  • an embodiment of the present invention provides a data decoding apparatus, including: a second receiving module, configured to receive encoded data, perform serial-to-parallel conversion on the encoded data, and convert the serialized and converted data.
  • the parallel data is corresponding to the four ports sent to the QSGMII;
  • the second determining module is configured to determine the disparity value of each port in the four ports;
  • the decoding module is configured to send to the disparity value of each port according to the disparity value of each port
  • the encoded data of each port is decoded to obtain the decoded data of each port.
  • the second determining module is configured to determine a disparity value of each port according to a disparity value of a previous port corresponding to each port, and output the disparity value of each port to The next port of each port.
  • the device further includes: a first mobile module configured to receive the encoded data, perform serial-to-parallel conversion on the encoded data, and send the four parallel data obtained by the serial-to-parallel conversion to the After determining the disparity value of each port in the 4 port, the port is encoded when at least one of the encoded data of each port does not exist in the preset encoding table before the 4 ports of the QSGMII are determined. After the data is shifted to the preset direction until the Each port encoded data is present in the preset encoding table.
  • the device further includes: a second mobility module, configured to send to each port according to the disparity value of each port after determining a disparity value of each port in the four ports After the encoded data is decoded, before the decoded data of each port is obtained, when at least one of the disparity values of the ports does not exist in the preset value, the encoded data of each port is forwarded to a preset direction. A shift operation is performed until the disparity values of the respective ports are present in the preset value.
  • the device further includes: a second replacement module, configured to perform decoding on the encoded data respectively sent to the ports according to the disparity value of each port, to obtain the decoded data of each port After that, the control code of the port 0 is replaced by K28.1 to K28.5, and the synchronization detection module is triggered; the synchronization detection module is configured to be the port 1 and 2 in the 4 port after being triggered.
  • a second replacement module configured to perform decoding on the encoded data respectively sent to the ports according to the disparity value of each port, to obtain the decoded data of each port
  • the control code of the port 0 is replaced by K28.1 to K28.5, and the synchronization detection module is triggered
  • the synchronization detection module is configured to be the port 1 and 2 in the 4 port after being triggered.
  • an embodiment of the present invention provides a data encoding apparatus, including:
  • a memory for storing an executable program
  • the data encoding method provided by the embodiment of the present invention is implemented when the processor is configured to execute the executable program stored in the memory.
  • an embodiment of the present invention provides a data encoding apparatus, including:
  • a memory for storing an executable program
  • the data decoding method provided by the embodiment of the present invention is implemented when the processor is configured to execute the executable program stored in the memory.
  • an embodiment of the present invention provides a storage medium, where an executable program is stored, and when the executable program is executed by a processor, the data encoding method provided by the embodiment of the present invention is implemented.
  • An eighth aspect of the present invention provides a storage medium storing an executable program.
  • the data decoding method provided by the embodiment of the present invention is implemented when the executable program is executed by the processor.
  • the present invention after receiving the 4-port to-be-coded data of the QSGMII, first, determine the disparity value of each port in the 4-port. After determining the disparity value of each port, each port is respectively determined according to the disparity value of each port. The coded data is encoded to obtain the encoded data of each port.
  • the received port 4 to be encoded data first calculates the disparity value of each port, so that, in the case where the disparity value of each port is known,
  • the disparity value of each port By using the disparity value of each port, the data to be encoded of each port can be encoded at the same time, thereby realizing the process of parallel encoding of the data to be encoded by the 4-port, and improving the encoding speed of the data to be encoded, thereby reducing the 32-bit of the 4-channel GMII.
  • the processing frequency of 8B/10B encoding is performed on each port of the data, which improves the coding efficiency, thereby improving the stability and reliability of the system.
  • FIG. 1 is a schematic flowchart of a data encoding method according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart of a data decoding method according to an embodiment of the present invention.
  • FIG. 5 is an optional flow chart of encoding and decoding 40-bit data according to an embodiment of the present invention.
  • 6-1 is a schematic flowchart of an optional 40-bit data encoding according to an embodiment of the present invention.
  • FIG. 6-2 is an optional schematic flowchart of decoding 40-bit data according to an embodiment of the present invention.
  • FIG. 7-1 is a schematic structural diagram of an optional data encoding apparatus according to an embodiment of the present invention.
  • FIG. 7-2 is a schematic structural diagram of an optional data encoding apparatus according to an embodiment of the present invention.
  • 8-1 is a schematic structural diagram of an optional data decoding apparatus according to an embodiment of the present invention.
  • FIG. 8-2 is a schematic structural diagram of a data decoding apparatus according to another embodiment of the present invention.
  • the embodiment of the invention provides a data encoding method, which can be applied to logic devices such as Field Programmable Gate Array (FPGA) and logic circuit (IC), and can also be applied to a central processing unit.
  • FPGA Field Programmable Gate Array
  • IC logic circuit
  • CPU Central Processing Unit
  • DSP Digital Signal Processing
  • FIG. 1 is a schematic flowchart of a data encoding method according to an embodiment of the present invention.
  • the traffic of the channel shown in FIG. 1 is 125 megabytes (M) bytes, that is, an octets of 125 M, and data is input to the channel.
  • the exchange is K28.1; for every 8 bits of data, the encoded data of 10 bits is output after 8B/10B encoding, physical medium access (PMA, Physical)
  • the Media) service interface outputs 10 bits of data per channel, and a total of 500 megabytes of code combination (each code combination is a 10-bit block).
  • the data is sent from low to high.
  • the order is sent, that is, bit 0 is sent first.
  • the 0-channel 10 bit control code K28.5 is replaced with K28.1, so that the receiving end can determine the data position of port 0 according to K28.1 on the serial stream, and then convert the 10-bit encoded data into serial.
  • the code stream is sent to the receiving end, the decoding process of the receiving end and the inverse process of the encoding process of the transmitting end.
  • the method includes:
  • S101 Receive 4-port to-be-coded data from the QSGMII.
  • the transmitting end located in the FPGA sends a configuration code when the power is restarted, and sends an idle (idle) code or a low power idle lpidle code when idle, and sends the data to be encoded when the GMII has data;
  • the encoded data includes a data code and a control code, wherein when the data code is transmitted
  • the key signal is 0; when the control code is sent, the key signal is 1.
  • the control codes of the ports 0-3 are all K28.5.
  • FIG. 2 is an optional flow chart of encoding 40-bit data according to an embodiment of the present invention.
  • port 0 receives 8-bit data TXD ⁇ 7:0> of GMII
  • Port1 receives GMII's 8-bit data TXD ⁇ 7:0>
  • Port2 receives GMII's 8-bit data TXD ⁇ 7:0>
  • Port3 receives GMII's 8-bit data TXD ⁇ 7:0>.
  • the method may include:
  • each port of the transmitting end after receiving the 8 bits of data to be encoded, each port of the transmitting end inputs an encoding process, and marks the 7th to the 0th bits of the 8-bit data to be encoded of each port as HGFEDCBA in turn, and then ports the port.
  • the control code K28.5 of 0 is replaced by K28.1.
  • the control code of port 0 is K28.1
  • the control code of port 1-3 is K28.5.
  • the receiving end passes the control code K28. .5 can find the data corresponding to port 0.
  • the disparity value of each port may include: +2, -2, 0; each disparity value corresponds to a 10-bit encoded data. Therefore, in order to obtain 10-bit encoded data, the disparity value of each port must be determined first;
  • S102 may include:
  • the disparity value of the previous port corresponding to each port of the four ports is output to each port; the disparity value of each port is determined according to the disparity value of the previous port corresponding to each port.
  • the previous port of each port is: a port adjacent to the serial number of the port and having a serial number before the port.
  • the disparity value of the port 0 may be +2 or 0, output the disparity value of port 0 to port 1.
  • the corresponding previous port of port 0 is port 3
  • the disparity value of the previous group of data to be encoded in port 3 is output to port 0; according to port 3
  • the disparity value is used to determine the disparity value of port 0, and the disparity value of port 0 is output to port 1;
  • the disparity value of port 0 determine the disparity value of port 1, output the disparity value of port 1 to port 2, determine the disparity value of port 2 according to the disparity value of port 1, and output the disparity value of port 2 to the port. 3. Determine the disparity value of port 3 according to the disparity value of port 2. For example, if port 1 is used as the example and the disparity value of port 0 is -2, the disparity value of port 1 is corresponding to the purpose of DC balance. In the case of +2, -2, 0, it is determined that the disparity value of port 1 is +2, and the disparity value of port 1 is output to port 2.
  • S103 Code the data to be encoded of each port according to the disparity value of each port, and perform parallel-to-serial conversion processing on the data encoded by each port.
  • the data encoding apparatus after receiving the 4-port to-be-coded data of the QSGMII, the data encoding apparatus first determines the disparity value of each port in the 4-port, and after determining the disparity value of each port, according to each The disparity value of the port encodes the data to be encoded of each port to obtain the encoded data of each port.
  • the data encoding device calculates the disparity value of each port for the received 4-port data to be encoded, so that Knowing the disparity value of each port, the disparity value of each port can be used to encode the data to be encoded of each port at the same time, thereby implementing the process of parallel encoding of the 4-port data to be encoded, and reducing the coding of the data to be encoded for each port.
  • the speed then, reduces the processing frequency of 8B/10B encoding for each port of the 4-channel GMII 32-bit data, which improves the coding efficiency and thus improves the stability and reliability of the system.
  • FIG. 3 is a schematic flowchart of a data decoding method according to an embodiment of the present invention. As shown in FIG. 3, the method includes:
  • S301 Receive encoded data, perform serial-to-parallel conversion on the encoded data, and send 4-way parallel data obtained by serial-to-parallel conversion to 4 ports of QSGMII;
  • the receiving end receives the encoded data of the transmitting end, serially converts the serial 40-bit encoded data, and obtains 4 parallel data to be sent to 4 ports of the QSGMII, wherein each port receives 10 bits of encoded data;
  • FIG. 4 is an optional flow chart of decoding 40-bit data in the embodiment of the present invention.
  • the PMA interface receives the encoded data at a speed of 5 Gbps and sends the data to the 4-port, each port.
  • Receive the encoded 10bit data where Port0 is port 0, receive 10bit data of GMII 0 1 2 3 4 5 6 7 8 9, Port1 is port 1, receive 10bit data of GMII 10 11 12 13 14 15 16 17 18 19
  • Port2 is port 2
  • the method may include: when at least one of the encoded data of each port does not exist in the preset encoding table, the data encoded by each port is shifted to a preset direction until each port is encoded. The data is stored in the preset encoding table.
  • the comma sequence is aligned at a possible position.
  • the position of the 40-bit encoded data has been aligned with each port. If at least one 10-bit encoded data does not exist in the preset encoding table, the position of the encoded data after 40 bits is not aligned with each port.
  • the 40-bit encoded data is shifted to the preset direction, and then continues to detect whether the 10-bit encoded data of each port exists in the preset encoding table until the data of each port is encoded in the preset In the coding table; in the case where it is determined that the position of the 40-bit encoded data has been aligned with each port, the 10-bit data 0 1 2 3 4 5 6 7 8 9 is aligned with the port 0, and the 10-bit data is 10 11 12 13 14 15 16 17 18 19 Align with port 1, align 10bit data 20 21 22 23 24 25 26 27 28 29 with port 2, and 10 bit data 30 31 32 33 34 35 36 37 38 39 with Port 3 is aligned.
  • the preset direction may be leftward or rightward.
  • S302 may include:
  • the disparity value of the previous port corresponding to each port of the four ports is output to each port; the disparity value of each port is determined according to the disparity value of the previous port corresponding to each port.
  • the disparity value of port 0 can be +2 or 0, and the disparity value of port 0 is output to the port. 1;
  • the corresponding previous port of port 0 is port 3
  • the disparity of the decoded data of the previous group in port 3 is The value is output to port 0.
  • the disparity value of port 3 is determined, and the disparity value of port 0 is output to port 1.
  • the disparity value of port 0 is determined, and port 1 is determined.
  • the disparity value is output to port 2.
  • the disparity value of port 1 the disparity value of port 2 is determined, the disparity value of port 2 is output to port 3, and the disparity value of port 3 is determined according to the disparity value of port 2; for example, port 1 is used as the example, and the disparity value of port 0 is -2. Therefore, for the purpose of DC balance, the disparity value of port 1 is determined to be port 1 in the case of +2, -2, 0. The disparity value is +2, and the disparity value of port 1 is output to port 2.
  • the method may include: If at least one of the disparity values does not exist in the preset value, the data encoded by each port is shifted to a preset direction until the disparity value of each port exists in the preset value.
  • the preset value may include: +2, -2, 0; determining whether the determined disparity value of each port is in a preset value, and when the disparity value of each port exists in the preset value, the 40 bit is specified.
  • the position of the encoded data has been aligned with each port. If the disparity value of at least one port does not exist in the preset encoding table, it indicates that the position of the encoded data after 40 bits is not aligned with each port, then The 40-bit encoded data is shifted in the preset direction, and then continues to detect whether the disparity values of the ports exist in the preset values until the disparity values of the ports exist in the preset values;
  • the 10-bit data 0 1 2 3 4 5 6 7 8 9 is aligned with the port 0, and the 10-bit data is 10 11 12 13 14 15 16 17 18 19 Align with port 1, align 10bit data 20 21 22 23 24 25 26 27 28 29 with port 2, and align 10 bit data 30 31 32 33 34 35 36 37 38 39 with port 3.
  • S303 Decode the encoded data according to the disparity value of each port, and obtain the decoded data of each port.
  • the physical decoding sublayer (PCS, Physical Coding Sublayer) of the receiving end performs the 8B/10B decoding process, and searches for the 10-bit encoding from the preset encoding table according to the disparity value of each port.
  • Data, the 8-bit decoded data corresponding to the disparity value of the port is represented by HGFEDCBA in FIG. 4, so that the decoded data of each port is obtained, and the 8-bit decoded data is subjected to carrier detection processing.
  • the method may include:
  • the execution returns each port.
  • the control code of port 0 after determining the disparity value of each port, in order to determine the data of port 0, the control code of port 0 is replaced by K28.1 to K28.5, then in the process of decoding, the control code can be After finding the 10-bit encoded data corresponding to port 0, the four 10-bit encoded data are decoded separately. After the decoding is completed, the control code of port 0 is replaced by K28.5 to K28.1, and then the port 1-3 is detected. If it is detected that at least one of the control codes of the ports 1, 2, and 3 is not K28.1, or if at least one of the decoded data of each port is not present in the preset coding table, the decoding is performed.
  • the data decoding device after receiving the 4-port encoded data of the QSGMII, the data decoding device first determines the disparity value of each port in the 4-port, and after determining the disparity value of each port, according to each The disparity value of the port decodes the encoded data of each port to obtain the decoded data of each port.
  • the data decoding device calculates the disparity value of each port for the received 4-port data to be encoded, so that Knowing the disparity value of each port, the disparity value of each port can be used to decode the encoded data of each port at the same time, thereby realizing the process of parallel decoding of the data after 4-port encoding, and then reducing the 32-bit data of the 4-channel GMII.
  • the processing frequency of 8B/10B decoding is performed on each port, which improves the decoding efficiency, thereby improving the stability and reliability of the system.
  • FIG. 5 is an optional flow chart of encoding and decoding 40-bit data according to an embodiment of the present invention. As shown in FIG. 5, at the transmitting end (recorded as send), four parallel ports Port0 are received from GMII. The 8bit data to be encoded is distributed to Port0, Port1, Port2, and Port3 in the encoder, and the encoded data is encoded into four 10-bit data and serially converted by SERDES to obtain 40-bit encoded data. Before being sent to the receiving end, the SERDES is passed. The serial-to-parallel conversion is performed to obtain four 10-bit encoded data, which are distributed to Port0, Port1, Port2, and Port3 in the decoder.
  • the data encoding method may include:
  • S601 Send a control code or data according to the GMII receiving and link status.
  • the configuration code is sent.
  • the idle code or lpidle code is sent.
  • the data code is sent.
  • the key signal is 0.
  • the control code is sent, the key signal is 1.
  • S602 The sending end determines whether the current port is Port0, and if it is Port0, it processes to S603. If it is another port, it is processed to S604;
  • S604 The transmitting end calculates the disparity value of the local port according to the disparity value of the previous port, and outputs the disparity value of the local port to the next port to perform 8B/10B encoding.
  • S605 The transmitting end combines the 4-bit 10-bit encoded data into 40-bit encoded data.
  • the transmitting end transmits the 40-bit code to the receiving end by parallel-to-serial conversion into a 5G SERDES differential signal.
  • FIG. 6-2 is an optional flowchart of decoding 40-bit data according to an embodiment of the present invention. As shown in FIG. 6-2, the data decoding method may include:
  • the receiving end receives the differential signal from the 5G SERDES line, and converts the serial to 40-bit data.
  • S608 The receiving end judges whether the encoded data is an illegal code stream (the encoded data does not exist in the preset code table, that is, the illegal code stream), and if yes, performs a 1-bit shift operation, if not, Then go to S610;
  • S609 The receiving end moves the 40-bit encoded data (right shift) by one bit.
  • S610 The receiving end distributes 10 bits of data to 4 ports in order.
  • the receiving end calculates the disparity value of the port according to the disparity value of the previous port.
  • the calculated disparity value is sent to the next port; the disparity value calculated by Port0 is sent to Port1, the disparity value calculated by Port1 is sent to Port2, the disparity value calculated by Port2 is sent to Port3, and the disparity value calculated by Port3 is sent to Port0.
  • 8B/10B decoding
  • S612 The receiving end interprets whether the 8-bit code stream is illegal, or whether the disparity value is wrong. If the code stream is illegal or the disparity value is wrong, go to S608, otherwise, execute S613;
  • S613 The receiving end determines the current port. If it is Port0, it goes to S614 for processing. If the current port is another port, it goes to S615 for processing.
  • S614 The receiving end replaces the control code K28.1 with K28.5;
  • S615 The receiving end performs synchronization state detection, and forms the received data into a frame format.
  • S616 The receiving end determines that if it is not synchronized with the transmitting end, or detects the control code K28.1, it proceeds to S612; otherwise, S617 is executed.
  • S617 Send the received data frame to the GMII interface.
  • FIG. 7-1 is an optional structural diagram of a data encoding apparatus according to an embodiment of the present invention.
  • the apparatus includes : a first receiving module 71, a first determining module 72 and an encoding module 73;
  • the first receiving module 71 is configured to receive the 4-port to-be-coded data from the 4QSGMII.
  • the first determining module 72 is configured to determine the disparity value of each port in the 4-port.
  • the encoding module 73 is configured to be based on the disparity value of each port. And encoding the data to be encoded of each port separately, and performing parallel-to-serial conversion processing on the encoded data of each port.
  • the first determining module 71 is configured to output the disparity value of the previous port corresponding to each port of the four ports to each port. Determine the disparity value of each port based on the disparity value of the previous port corresponding to each port.
  • the apparatus further includes: a first replacement module configured to determine each port of the 4 port after receiving the 4-port to-be-coded data from the QSGMII Before the disparity value, replace the control code of port 0 in port 4 from K28.5 to K28.1.
  • the first receiving module 71, the first determining module 72, and the encoding module 73 can be configured by a central processing unit (CPU), a microprocessor (MPU, a microprocessor unit), and a dedicated integrated device located at the transmitting end device.
  • CPU central processing unit
  • MPU microprocessor
  • ASIC Application Specific Integrated Circuit
  • FPGA field-programmable gate array
  • FIG. 7-2 is an optional structural diagram of a data encoding apparatus according to an embodiment of the present invention.
  • the intent as shown in Figure 7-2, includes at least one processor 74, memory 76, at least one memory 76, and a network interface 77.
  • the various components in the data encoding device are coupled together by a bus system 75.
  • the bus system 75 is used to implement connection communication between these components.
  • the bus system 75 includes a power bus, a control bus, and a status signal bus.
  • various buses are labeled as bus system 75 in Figure 7-2.
  • memory 76 can be either volatile memory or non-volatile memory, and can include both volatile and nonvolatile memory.
  • the non-volatile memory may be a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), or an Erasable Programmable Read (EPROM). Only Memory), Electrically Erasable Programmable Read-Only Memory (EEPROM).
  • ROM Read Only Memory
  • PROM Programmable Read-Only Memory
  • EPROM Erasable Programmable Read
  • Only Memory Only Memory
  • EEPROM Electrically Erasable Programmable Read-Only Memory
  • the memory 76 described in the embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.
  • the memory 76 in the embodiment of the present invention is used to store various types of data to support the operation of the data encoding apparatus.
  • a program implementing the data encoding method of the embodiment of the present invention may be included in the application 761.
  • Processor 74 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 74 or an instruction in the form of software.
  • the processor 74 described above can be a general purpose processor, a DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, or the like.
  • the processor 74 can implement or perform the various methods, steps, and logic blocks disclosed in the embodiments of the present invention.
  • a general purpose processor can be a microprocessor or any conventional processor or the like.
  • the steps of the method disclosed in the embodiment of the present invention may be directly implemented as a hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a storage medium located in memory 76, and processor 74 reads the letter in memory 76. And complete the steps of the foregoing method in combination with its hardware.
  • the data encoding device may be an ASIC (Application Specific Integrated Circuit), a DSP, a Programmable Logic Device (PLD), or a Complex Programmable Logic Device (CPLD). ), an FPGA, a general purpose processor, a controller, a microcontroller (Micro Controller Unit), a microprocessor, or other electronic component implementation for performing the aforementioned data encoding method.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Signal Processing Unit
  • PLD Programmable Logic Device
  • CPLD Complex Programmable Logic Device
  • FIG. 8-1 is an optional structural diagram of a data decoding apparatus according to an embodiment of the present invention.
  • the apparatus includes : a second receiving module 81, a second determining module 82 and a decoding module 83;
  • the second receiving module 81 is configured to receive the encoded data, perform serial-to-parallel conversion on the encoded data, and send the four parallel data obtained by the serial-to-parallel conversion to the four ports of the 4QSGMII, respectively; the second determining module 82
  • the decoding module 83 is configured to decode the encoded data according to the disparity value of each port to obtain the decoded data of each port.
  • the second determining module 82 is configured to output the disparity value of the previous port corresponding to each port of the four ports to each of the ports. Ports; determine the disparity value of each port based on the disparity value of the previous port corresponding to each port.
  • the apparatus further includes: a first mobile module configured to receive the encoded data and perform serial-to-parallel conversion on the encoded data, After the four parallel data obtained by the serial-to-parallel conversion are respectively sent to the four ports of the QSGMII, before determining the disparity value of each port in the four ports, at least one of the encoded data of each port does not exist in the preset encoding. In the table, the data encoded by each port is shifted to a preset direction until the data encoded by each port exists in the preset coding table.
  • the apparatus further includes: a second mobile module configured to determine After the disparity value of each port in the four ports, the encoded data is decoded according to the disparity value of each port, and at least one of the disparity values of each port does not exist in the preset value before the decoded data of each port is obtained. In the middle, the data encoded by each port is shifted to a preset direction until the disparity value of each port exists in the preset value.
  • the device further includes: a second replacement module and a synchronization detection module;
  • the second replacement module is configured to decode the encoded data according to the disparity value of each port, and obtain the decoded data of each port, and then replace the control code of port 0 with K28.5 to K28.1, and
  • the synchronization detection module is triggered, and the synchronization detection module is configured to: at least one of the control codes of the ports 1, 2, and 3 in the 4-port is not K28.1 after being triggered, or at least one of the decoded data of each port
  • the first mobile module is triggered to perform a shift operation of the data encoded by each port in a preset direction.
  • the second receiving module 81, the second determining module 82, and the decoding module 83 can all be implemented by a CPU, an MPU, an ASIC, or an FPGA located at the receiving end.
  • FIG. 8-2 is a schematic structural diagram of a data decoding apparatus according to another embodiment of the present invention, and a data decoding apparatus.
  • the data decoding apparatus shown in FIG. 8-2 includes at least one processor 84, a memory 86, and a network interface 87.
  • the various components in the data decoding device are coupled together by a bus system 85.
  • bus system 85 is used to implement connection communication between these components.
  • the bus system 85 includes a power bus, a control bus, and a status signal bus in addition to the data bus.
  • the various buses are labeled as the bus system in Figure 8-2. System 85.
  • the memory 86 in the embodiment of the present invention is used to store various types of data to support the operation of the data decoding apparatus.
  • a program for implementing the data decoding method of the embodiment of the present invention may be included in the application 861.
  • Processor 84 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 84 or an instruction in the form of software.
  • the processor 84 described above can be a general purpose processor, a DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, or the like.
  • This embodiment describes a computer readable medium, which may be a ROM (eg, a read only memory, a FLASH memory, a transfer device, etc.), a magnetic storage medium (eg, a magnetic tape, a disk drive, etc.), an optical storage medium (eg, a CD- ROM, DVD-ROM, paper card, paper tape, etc.) and other well-known types of program memory; computer-readable medium storing computer-executable instructions that, when executed, cause at least one processor to perform the foregoing as shown in FIG.
  • the data encoding device after receiving the 4-port to-be-coded data of the QSGMII, first, determine the disparity value of each port in the 4-port. After determining the disparity value of each port, each port is respectively determined according to the disparity value of each port.
  • the data to be encoded is encoded to obtain the encoded data of each port. That is to say, the data encoding device first calculates the disparity value of each port for the received 4-port data to be encoded, so that the discardity value of each port is known.
  • the disparity value of each port can be used to encode the data to be encoded of each port at the same time, thereby implementing the process of parallel encoding of the 4-port data to be encoded, and reducing the encoding speed of the data to be encoded by each port, then reducing the speed of 4
  • the 32-bit data of the channel GMII performs the processing frequency of 8B/10B encoding for each port, which improves the coding efficiency, thereby improving the stability and reliability of the system.
  • the embodiment of the present invention discloses a data encoding and decoding method, including: receiving 4-port to-be-coded data from the QSGMII; determining a disparity value of each port in the 4-port; and respectively performing the port according to the disparity value of each port.
  • the data to be encoded is encoded, and the data encoded by each port is subjected to parallel-to-serial conversion processing.
  • the embodiment of the invention also discloses a data encoding and decoding device and a storage medium.
  • the embodiment of the invention can reduce the processing frequency of each port when the 32-bit data of the 4-channel GMII is 8B/10B, and provides stability and reliability of the system.

Abstract

A data encoding method, data decoding method, data encoding device, data codec device, and data storage medium. The encoding method comprises: receiving data to be encoded and from 4 QSGMII interfaces (S101); determining disparities of the 4 interfaces, respectively (S102); encoding, according to disparities of the respective interfaces, data to be encoded of the respective interfaces, and converting, from parallel to serial, the encoded data of the respective interfaces (S103).

Description

数据编码方法、数据解码方法和装置、存储介质Data encoding method, data decoding method and device, and storage medium
相关申请的交叉引用Cross-reference to related applications
本申请基于申请号为201610793617.2、申请日为2016年8月31日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的内容在此引入本申请作为参考。The present application is filed on the basis of the Chinese Patent Application No. PCT Application No.
技术领域Technical field
本发明涉及通信技术,尤其涉及一种数据编码方法、数据解码方法和装置、存储介质。The present invention relates to communication technologies, and in particular, to a data encoding method, a data decoding method and apparatus, and a storage medium.
背景技术Background technique
4串行千兆媒体独立接口(QSGMII,Quard Serial Gigabit Media Independent Interface),即4个串行的千兆媒体独立接口(GMII,Gigabit Media Independent Interface),使用更少的管脚将4个通道的端口速率为10/100/1000的物理层(PHY,Physical Layer)与媒体接入控制层(MAC,Media Access Contronl)互联,QSGMII接口为5吉(G,Gigabit)串行高速串行器/解串器(SERDES,SERializer/DESerializer)接口。4 Serial Gigabit Media Independent Interface (QSGMII), which is 4 serial Gigabit Media Independent Interfaces (GMII), using 4 channels of fewer pins. The physical layer (PHY, Physical Layer) with a port rate of 10/100/1000 is interconnected with the Media Access Contronl (MAC), and the QSGMII interface is a Gigabit (Gigabit) serial high-speed serializer/solution. Serializer (SERDES, SERializer/DESerializer) interface.
传统的QSGMII方案,以发送端为例,发送端具有4(个)通道,每个通道使用QSGMII发送8bit数据(即8bit位宽的数据),将每个通道GMII的待发送的8bit位宽数据,按照通道0,1,2,3的顺序进行8字节/10字节(B,Byte)/10B编码,也就是将8bit位宽数据编码成10bit位宽数据以进行传输,其中输入端口的每8bit的原始数据可以分成两部分:低位的5bit数据:EDCBA(设其十进制数值为X)和高位的3bit数据:HGF(设其十进制数值为Y),则该8bit数据可以记为D.X.Y。另外,8B/10B编码中还用 到12个控制字符,可以作为传输中帧起始、帧结束、传输空闲等状态标识,与数据字符的记法类似,控制字符一般记为K.X.Y。8B/10B编码中将K28.1、K28.5和K28.7作为控制码。The traditional QSGMII scheme takes the transmitting end as an example. The transmitting end has 4 (one) channels, and each channel uses QSGMII to transmit 8 bits of data (that is, 8 bits of bit width data), and the 8 bit width data to be transmitted of each channel GMII is to be transmitted. , 8 bytes/10 bytes (B, Byte)/10B encoding in the order of channels 0, 1, 2, 3, that is, encoding 8 bit width data into 10 bit width data for transmission, wherein the input port The raw data per 8 bits can be divided into two parts: the lower 5 bits of data: EDCBA (set its decimal value is X) and the upper 3 bits of data: HGF (set its decimal value to Y), then the 8 bit data can be recorded as DXY. In addition, 8B/10B encoding is also used Up to 12 control characters can be used as the status indicator of the start of the frame in the transmission, the end of the frame, the idleness of the transmission, etc. Similar to the notation of the data characters, the control characters are generally recorded as K.X.Y. In the 8B/10B encoding, K28.1, K28.5, and K28.7 are used as control codes.
然而,当4通道中每个通道需要通过GMII发送32bit位宽数据(本文中也称为32bit数据)时,对每个通道GMII的4个端口来说,需要将32bit数据按0,1,2,3的端口号的顺序,对每个端口待发送的8bit位宽数据实施8B/10B编码的方法,这样导致每个端口的处理频率较高,影响系统的稳定性和可靠性。However, when each channel of the 4 channels needs to transmit 32-bit bit width data (also referred to as 32-bit data in this paper) through the GMII, it is necessary to press the 32-bit data to 0, 1, 2 for the 4 ports of each channel GMII. The order of the port numbers of 3 implements the 8B/10B encoding method for the 8-bit bit width data to be sent by each port, which results in a high processing frequency of each port, which affects the stability and reliability of the system.
发明内容Summary of the invention
有鉴于此,本发明实施例期望提供一种数据编码方法、数据解码方法和装置、存储介质,降低4通道GMII的32bit数据进行8B/10B编码时每个端口的处理频率。In view of this, embodiments of the present invention are directed to providing a data encoding method, a data decoding method and apparatus, and a storage medium, which reduce the processing frequency of each port when the 8-bit GMII 32-bit data is 8B/10B encoded.
为达到上述目的,本发明实施例的技术方案是这样实现的:To achieve the above objective, the technical solution of the embodiment of the present invention is implemented as follows:
第一方面,本发明实施例提供了一种数据编码方法,包括:接收来自QSGMII的4端口的待编码数据;确定所述4端口中各端口的disparity值;根据各端口的disparity值,分别对所述各端口待编码数据进行编码,并将所述各端口的编码后数据进行并串转换处理。In a first aspect, an embodiment of the present invention provides a data encoding method, including: receiving 4-port data to be encoded from a QSGMII; determining a disparity value of each port in the 4-port; and determining, according to a disparity value of each port, respectively The data to be encoded of each port is encoded, and the encoded data of each port is subjected to parallel-to-serial conversion processing.
在上述方案中,所述确定所述4端口中各端口的disparity值,包括:根据与所述各端口对应的前一端口的disparity值,确定所述各端口的disparity值;将与所述各端口的disparity值输出至所述各端口的下一端口。In the above solution, the determining the disparity value of each port in the four ports includes: determining a disparity value of each port according to a disparity value of a previous port corresponding to each port; The disparity value of the port is output to the next port of each port.
在上述方案中,在接收来自QSGMII的4端口待编码数据之后,在确定所述4端口中各端口的disparity值之前,所述方法还包括:将所述4端口中端口0的控制码由K28.5替换为K28.1。In the above solution, after receiving the 4-port to-be-coded data from the QSGMII, before determining the disparity value of each port in the 4-port, the method further includes: setting the control code of the port 0 in the 4-port by K28 Replace .5 with K28.1.
第二方面,本发明实施例提供了一种数据解码方法,包括:接收编码后数据,对所述编码后数据进行串并转换,将串并转换后得出的4路并行 数据,对应发送至QSGMII的4个端口;确定所述4端口中各端口的disparity值;根据所述各端口的disparity值,分别对所述编码后数据进行解码,得到所述各端口的解码后数据。In a second aspect, an embodiment of the present invention provides a data decoding method, including: receiving encoded data, performing serial-to-parallel conversion on the encoded data, and converting the parallel-converted 4-way parallel Data, corresponding to the four ports sent to the QSGMII; determining the disparity value of each port in the four ports; decoding the encoded data according to the disparity value of each port, and obtaining the decoded of each port data.
在上述方案中,所述确定所述4端口中各端口的disparity值,包括:根据与所述各端口对应的前一端口的disparity值,确定所述各端口的disparity值;将与所述各端口的disparity值输出至所述各端口的下一端口。In the above solution, the determining the disparity value of each port in the four ports includes: determining a disparity value of each port according to a disparity value of a previous port corresponding to each port; The disparity value of the port is output to the next port of each port.
在上述方案中,在接收编码后数据,对所述编码后数据进行串并转换,将串并转换后得出的4路并行数据分别发送至QSGMII的4个端口之后,在确定所述4端口中各端口的disparity值之前,所述方法还包括:当所述各端口的编码后数据中至少有一个不存在于预设的编码表中时,将所述各端口的编码后数据朝预设方向移动一位,直至所述各端口的编码后数据均存在于所述预设的编码表中。In the above solution, after the encoded data is received, the encoded data is serial-to-parallel converted, and the four parallel data obtained after the serial-to-parallel conversion are respectively sent to the four ports of the QSGMII, and the four ports are determined. Before the disparity value of each port, the method further includes: when at least one of the encoded data of each port does not exist in the preset encoding table, the encoded data of each port is preset The direction is shifted by one bit until the encoded data of each port exists in the preset coding table.
在上述方案中,在确定所述4端口中各端口的disparity值之后,根据所述各端口的disparity值,分别对发送到所述各端口的编码后数据进行解码,得到所述各端口的解码后数据之前,所述方法还包括:In the above solution, after determining the disparity value of each port in the four ports, decoding the encoded data sent to the ports according to the disparity value of each port to obtain decoding of each port. Before the data, the method further includes:
当所述各端口的disparity值中至少有一个不存在于预设值中时,将所述各端口编码后数据向预设方向进行移位操作,直至所述各端口的disparity值均存在于所述预设值中。When at least one of the disparity values of the ports does not exist in the preset value, the coded data of each port is shifted to a preset direction until the disparity values of the ports exist in the In the preset value.
在上述方案中,在根据所述各端口的disparity值,分别对发送到所述各端口的编码后数据进行解码,得到所述各端口解码后数据之后,所述方法还包括:In the above solution, after the encoded data sent to the ports is decoded according to the disparity value of each port, and the decoded data of each port is obtained, the method further includes:
将所述端口0的控制码由K28.1替换为K28.5;The control code of the port 0 is replaced by K28.1 to K28.5;
所述4端口中端口1、2、3的控制码中至少有一个不为K28.1时,或者,所述各端口解码后数据中至少有一个不存在于预设的编码表中时,返回执行将所述各端口编码后数据向预设方向进行移位操作的步骤。 If at least one of the control codes of the ports 1, 2, and 3 in the 4-port is not K28.1, or if at least one of the decoded data of each port does not exist in the preset coding table, return Performing a step of shifting the encoded data of each port to a preset direction.
第三方面,本发明实施例提供了一种数据编码装置,包括:第一接收模块,配置为接收来自QSGMII的4端口待编码数据;第一确定模块,配置为确定所述4端口中各端口的disparity值;编码模块,配置为根据各端口的disparity值,分别对所述各端口待编码数据进行编码,并将所述各端口编码后数据进行并串转换处理。In a third aspect, the embodiment of the present invention provides a data encoding apparatus, including: a first receiving module configured to receive 4-port to-be-coded data from the QSGMII; and a first determining module configured to determine each port in the 4-port The encoding module is configured to encode the data to be encoded of each port according to the disparity value of each port, and perform parallel-to-serial conversion processing on the encoded data of each port.
在上述方案中,所述第一确定模块,具体配置为根据与所述各端口对应的前一端口的disparity值,确定所述各端口的disparity值;将与所述各端口的disparity值输出至所述各端口的下一端口。In the foregoing solution, the first determining module is configured to determine a disparity value of each port according to a disparity value of a previous port corresponding to each port, and output the disparity value of each port to The next port of each port.
在上述方案中,所述装置还包括:第一替换模块,配置为在接收来自QSGMII的4端口待编码数据之后,在确定所述4端口中各端口的disparity值之前,将所述4端口中端口0的控制码由K28.5替换为K28.1。In the above solution, the apparatus further includes: a first replacement module configured to: after receiving the 4-port to-be-coded data from the QSGMII, before determining the disparity value of each port in the 4-port, in the 4-port The control code for port 0 is replaced by K28.5 to K28.1.
第四方面,本发明实施例提供了一种数据解码装置,包括:第二接收模块,配置为接收编码后数据,对所述编码后数据进行串并转换,将串并转换后得出的4路并行数据,对应发送至QSGMII的4个端口;第二确定模块,配置为确定所述4端口中各端口的disparity值;解码模块,配置为根据所述各端口的disparity值,分别对发送到所述各端口的编码后数据进行解码,得到所述各端口解码后数据。In a fourth aspect, an embodiment of the present invention provides a data decoding apparatus, including: a second receiving module, configured to receive encoded data, perform serial-to-parallel conversion on the encoded data, and convert the serialized and converted data. The parallel data is corresponding to the four ports sent to the QSGMII; the second determining module is configured to determine the disparity value of each port in the four ports; and the decoding module is configured to send to the disparity value of each port according to the disparity value of each port The encoded data of each port is decoded to obtain the decoded data of each port.
在上述方案中,所述第二确定模块,具体配置为根据与所述各端口对应的前一端口的disparity值,确定所述各端口的disparity值;将与所述各端口的disparity值输出至所述各端口的下一端口。In the above solution, the second determining module is configured to determine a disparity value of each port according to a disparity value of a previous port corresponding to each port, and output the disparity value of each port to The next port of each port.
在上述方案中,所述装置还包括:第一移动模块,配置为在接收编码后数据,对所述编码后数据进行串并转换,将串并转换后得出的4路并行数据分别发送至QSGMII的4个端口之后,当确定所述4端口中各端口的disparity值之前,当所述各端口编码后数据中至少有一个不存在于预设的编码表中时,将所述各端口编码后数据向预设方向进行移位操作,直至所述 各端口编码后数据均存在于所述预设的编码表中。In the above solution, the device further includes: a first mobile module configured to receive the encoded data, perform serial-to-parallel conversion on the encoded data, and send the four parallel data obtained by the serial-to-parallel conversion to the After determining the disparity value of each port in the 4 port, the port is encoded when at least one of the encoded data of each port does not exist in the preset encoding table before the 4 ports of the QSGMII are determined. After the data is shifted to the preset direction until the Each port encoded data is present in the preset encoding table.
在上述方案中,所述装置还包括:第二移动模块,配置为在确定所述4端口中各端口的disparity值之后,在根据所述各端口的disparity值,分别对发送到所述各端口的编码后数据进行解码,得到所述各端口解码后数据之前,当所述各端口的disparity值中至少有一个不存在于预设值中时,将所述各端口编码后数据向预设方向进行移位操作,直至所述各端口的disparity值均存在于所述预设值中。In the above solution, the device further includes: a second mobility module, configured to send to each port according to the disparity value of each port after determining a disparity value of each port in the four ports After the encoded data is decoded, before the decoded data of each port is obtained, when at least one of the disparity values of the ports does not exist in the preset value, the encoded data of each port is forwarded to a preset direction. A shift operation is performed until the disparity values of the respective ports are present in the preset value.
在上述方案中,所述装置还包括:第二替换模块,配置为在根据所述各端口的disparity值,分别发送到所述各端口的编码后数据进行解码,得到所述各端口解码后数据之后,将所述端口0的控制码由K28.1替换为K28.5,并触发同步检测模块;所述同步检测模块,配置为在受到触发后,当所述4端口中端口1、2、3的控制码中至少有一个不为K28.1时,或者,所述各端口解码后数据中至少有一个不存在于预设的编码表中时,触发所述第一移动模块执行将所述各端口编码后数据向预设方向进行移位操作。In the above solution, the device further includes: a second replacement module, configured to perform decoding on the encoded data respectively sent to the ports according to the disparity value of each port, to obtain the decoded data of each port After that, the control code of the port 0 is replaced by K28.1 to K28.5, and the synchronization detection module is triggered; the synchronization detection module is configured to be the port 1 and 2 in the 4 port after being triggered. When at least one of the control codes of 3 is not K28.1, or when at least one of the decoded data of each port does not exist in the preset coding table, triggering the first mobile module to execute After each port is encoded, the data is shifted to a preset direction.
第五方面,本发明实施例提供了一种数据编码装置,包括:In a fifth aspect, an embodiment of the present invention provides a data encoding apparatus, including:
存储器,用于存储可执行程序;a memory for storing an executable program;
处理器,配置为执行所述存储器存储的所述可执行程序时,实现本发明实施例提供的数据编码方法。The data encoding method provided by the embodiment of the present invention is implemented when the processor is configured to execute the executable program stored in the memory.
第六方面,本发明实施例提供了一种数据编码装置,包括:In a sixth aspect, an embodiment of the present invention provides a data encoding apparatus, including:
存储器,用于存储可执行程序;a memory for storing an executable program;
处理器,配置为执行所述存储器存储的所述可执行程序时,实现本发明实施例提供的数据解码方法。The data decoding method provided by the embodiment of the present invention is implemented when the processor is configured to execute the executable program stored in the memory.
第七方面,本发明实施例提供一种存储介质,存储有可执行程序,所述可执行程序被处理器执行时实现本发明实施例提供的数据编码方法。In a seventh aspect, an embodiment of the present invention provides a storage medium, where an executable program is stored, and when the executable program is executed by a processor, the data encoding method provided by the embodiment of the present invention is implemented.
第八方面,本发明实施例提供一种存储介质,存储有可执行程序,所 述可执行程序被处理器执行时实现本发明实施例提供的数据解码方法。An eighth aspect of the present invention provides a storage medium storing an executable program. The data decoding method provided by the embodiment of the present invention is implemented when the executable program is executed by the processor.
本发明实施例中,在接收到QSGMII的4端口待编码数据之后,首先,确定4端口中各端口的disparity值,在确定出各端口的disparity值之后,根据各端口的disparity值分别对各端口待编码数据进行编码,得到各端口编码后数据,也就是说,对接收到的4端口待编码数据,先计算出各端口的disparity值,这样,在已知各端口的disparity值的情况下,利用各端口的disparity值可以同时对各端口的待编码数据进行编码,实现对4端口的待编码数据并行编码的过程,提升了对待编码数据进行编码的速度,从而,降低了4通道GMII的32bit数据每个端口进行8B/10B编码的处理频率,提高了编码效率,进而提高了系统的稳定性和可靠性。In the embodiment of the present invention, after receiving the 4-port to-be-coded data of the QSGMII, first, determine the disparity value of each port in the 4-port. After determining the disparity value of each port, each port is respectively determined according to the disparity value of each port. The coded data is encoded to obtain the encoded data of each port. That is, the received port 4 to be encoded data first calculates the disparity value of each port, so that, in the case where the disparity value of each port is known, By using the disparity value of each port, the data to be encoded of each port can be encoded at the same time, thereby realizing the process of parallel encoding of the data to be encoded by the 4-port, and improving the encoding speed of the data to be encoded, thereby reducing the 32-bit of the 4-channel GMII. The processing frequency of 8B/10B encoding is performed on each port of the data, which improves the coding efficiency, thereby improving the stability and reliability of the system.
附图说明DRAWINGS
图1为本发明实施例中数据编码方法的流程示意图;1 is a schematic flowchart of a data encoding method according to an embodiment of the present invention;
图2为本发明实施例中40bit数据进行编码的一种可选的流程框图;2 is an optional flow chart of encoding 40-bit data in an embodiment of the present invention;
图3为本发明实施例中数据解码方法的流程示意图;3 is a schematic flowchart of a data decoding method according to an embodiment of the present invention;
图4为本发明实施例中40bit数据进行解码的一种可选的流程框图;4 is an optional flow chart of decoding 40-bit data in an embodiment of the present invention;
图5为本发明实施例中40bit数据进行编码和解码的一种可选的流程框图;5 is an optional flow chart of encoding and decoding 40-bit data according to an embodiment of the present invention;
图6-1为本发明实施例中40bit数据进行编码的一种可选的流程示意图;6-1 is a schematic flowchart of an optional 40-bit data encoding according to an embodiment of the present invention;
图6-2为本发明实施例中40bit数据进行解码的一种可选的流程示意图;FIG. 6-2 is an optional schematic flowchart of decoding 40-bit data according to an embodiment of the present invention;
图7-1为本发明实施例中数据编码装置的一种可选的结构示意图;7-1 is a schematic structural diagram of an optional data encoding apparatus according to an embodiment of the present invention;
图7-2为本发明实施例中数据编码装置的一种可选的结构示意图;7-2 is a schematic structural diagram of an optional data encoding apparatus according to an embodiment of the present invention;
图8-1为本发明实施例中数据解码装置的一种可选的结构示意图;8-1 is a schematic structural diagram of an optional data decoding apparatus according to an embodiment of the present invention;
图8-2是本发明另一实施例的数据解码装置的结构示意图。 FIG. 8-2 is a schematic structural diagram of a data decoding apparatus according to another embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present invention will be clearly and completely described in the following with reference to the accompanying drawings.
本发明实施例提供一种数据编码方法,该方法可以应用在现场可编程门阵列(FPGA,Field Programmable Gate Array)和逻辑电路(IC,Logical Circuit)等逻辑器件实现,还可以应用于中央处理器(CPU,Central Processing Unit)和数字信号处理(DSP,Digital Signal Processing)中实现,这里,本发明不做具体限定。The embodiment of the invention provides a data encoding method, which can be applied to logic devices such as Field Programmable Gate Array (FPGA) and logic circuit (IC), and can also be applied to a central processing unit. (CPU, Central Processing Unit) and digital signal processing (DSP, Digital Signal Processing) are implemented, and the present invention is not specifically limited herein.
图1为本发明实施例中数据编码方法的流程示意图,在图1中示出的通道的流量为125兆(M)字节,即数量为125M的8位组(octets),向通道输入数据进行编码处理的流程中,0通道的控制字符为K28.5时,交换为K28.1;对于每8bit的数据,经过8B/10B编码输出编码后的10bit数据,物理介质接入(PMA,Physical Media)服务接口将每通道的4个端口输出10bit位宽的数据,共计数量为500兆的编码组合(每个编码组合是一个10位的位组)的数据发送出去,数据按照从低位至高位的顺序发送,即bit 0最先发送。FIG. 1 is a schematic flowchart of a data encoding method according to an embodiment of the present invention. The traffic of the channel shown in FIG. 1 is 125 megabytes (M) bytes, that is, an octets of 125 M, and data is input to the channel. In the process of encoding processing, when the control character of channel 0 is K28.5, the exchange is K28.1; for every 8 bits of data, the encoded data of 10 bits is output after 8B/10B encoding, physical medium access (PMA, Physical) The Media) service interface outputs 10 bits of data per channel, and a total of 500 megabytes of code combination (each code combination is a 10-bit block). The data is sent from low to high. The order is sent, that is, bit 0 is sent first.
其中,0通道的10bit控制码K28.5被替换为K28.1,以使接收端能在串行码流上,根据K28.1判断端口0的数据位置,然后将10bit编码数据转为串行码流发送给接收端,接收端的解码过程与发送端的编码过程的逆处理过程。The 0-channel 10 bit control code K28.5 is replaced with K28.1, so that the receiving end can determine the data position of port 0 according to K28.1 on the serial stream, and then convert the 10-bit encoded data into serial. The code stream is sent to the receiving end, the decoding process of the receiving end and the inverse process of the encoding process of the transmitting end.
如图1所示,该方法包括:As shown in Figure 1, the method includes:
S101:接收来自QSGMII的4端口待编码数据;S101: Receive 4-port to-be-coded data from the QSGMII.
其中,以FPGA为例,位于FPGA中的发送端在上电重启时,发送配置码,空闲时发送空闲(idle)码或低功耗空闲lpidle码,GMII有数据时发送待编码数据;该待编码数据包括数据码和控制码,其中,当发送数据码 时,关键(key)信号为0;当发送控制码时,key信号为1。需要说明的是,上述4端口中,端口0-3的控制码均为K28.5。Wherein, taking the FPGA as an example, the transmitting end located in the FPGA sends a configuration code when the power is restarted, and sends an idle (idle) code or a low power idle lpidle code when idle, and sends the data to be encoded when the GMII has data; The encoded data includes a data code and a control code, wherein when the data code is transmitted The key signal is 0; when the control code is sent, the key signal is 1. It should be noted that, among the above four ports, the control codes of the ports 0-3 are all K28.5.
举例来说,图2为本发明实施例中40bit数据进行编码的一种可选的流程框图;如图2所示,端口(Port)0接收GMII的8bit数据TXD<7:0>,Port1接收GMII的8bit数据TXD<7:0>,Port2接收GMII的8bit数据TXD<7:0>,Port3接收GMII的8bit数据TXD<7:0>。For example, FIG. 2 is an optional flow chart of encoding 40-bit data according to an embodiment of the present invention; as shown in FIG. 2, port 0 receives 8-bit data TXD<7:0> of GMII, and Port1 receives GMII's 8-bit data TXD<7:0>, Port2 receives GMII's 8-bit data TXD<7:0>, and Port3 receives GMII's 8-bit data TXD<7:0>.
为了对待编码数据进行定位,在一种可选的实施例中,S101之后,S102之前,该方法可以包括:In order to locate the coded data, in an optional embodiment, after S101, before S102, the method may include:
将4端口中端口0的控制码由K28.5替换为K28.1。Change the control code of port 0 in port 4 from K28.5 to K28.1.
在图2中,发送端的各端口在接收到8bit的待编码数据之后,输入编码处理流程,将每个端口的8bit的待编码数据的第7位至第0位依次标记为HGFEDCBA,然后将端口0的控制码K28.5替换为K28.1,这样,在4端口中,端口0的控制码为K28.1,端口1-3的控制码为K28.5,那么,接收端通过控制码K28.5可以找到端口0对应的数据。In FIG. 2, after receiving the 8 bits of data to be encoded, each port of the transmitting end inputs an encoding process, and marks the 7th to the 0th bits of the 8-bit data to be encoded of each port as HGFEDCBA in turn, and then ports the port. The control code K28.5 of 0 is replaced by K28.1. Thus, in the 4-port, the control code of port 0 is K28.1, and the control code of port 1-3 is K28.5. Then, the receiving end passes the control code K28. .5 can find the data corresponding to port 0.
S102:确定4端口中各端口的disparity值;S102: Determine a disparity value of each port in the four ports.
上述各端口的disparity值可以包括:+2,-2,0;每个disparity值对应有一个10bit的编码后数据,所以,为了得到10bit的编码后数据,必须先确定出各端口的disparity值;The disparity value of each port may include: +2, -2, 0; each disparity value corresponds to a 10-bit encoded data. Therefore, in order to obtain 10-bit encoded data, the disparity value of each port must be determined first;
为了确定出各端口的disparity值,在一种可选的实施例中,S102可以包括:In order to determine the disparity value of each port, in an optional embodiment, S102 may include:
将与4端口中每个端口对应的前一端口的disparity值输出至每个端口;根据与每个端口对应的前一端口的disparity值,确定每个端口的disparity值。The disparity value of the previous port corresponding to each port of the four ports is output to each port; the disparity value of each port is determined according to the disparity value of the previous port corresponding to each port.
这里,每个端口的前一端口为:与该端口的序号相邻、且序号在该端口之前的端口。 Here, the previous port of each port is: a port adjacent to the serial number of the port and having a serial number before the port.
例如,在4端口中,当输入端口0的32bit的待编码数据为首次编码的数据(即待编码的数据中首次输入到4端口的32bit数据)时,端口0的disparity值可以为+2或者0,将端口0的disparity值输出至端口1;For example, in the 4-port, when the 32-bit data to be encoded of the input port 0 is the first-encoded data (that is, the 32-bit data input to the 4-port for the first time in the data to be encoded), the disparity value of the port 0 may be +2 or 0, output the disparity value of port 0 to port 1.
当输入端口0的32bit的待编码数据不是首次编码的数据时,端口0的对应的前一端口为端口3,将端口3中上一组待编码数据的disparity值输出至端口0;根据端口3的disparity值,来确定端口0的disparity值,将端口0的disparity值输出至端口1;When the 32-bit data to be encoded of port 0 is not the first-encoded data, the corresponding previous port of port 0 is port 3, and the disparity value of the previous group of data to be encoded in port 3 is output to port 0; according to port 3 The disparity value is used to determine the disparity value of port 0, and the disparity value of port 0 is output to port 1;
根据端口0的disparity值,来确定端口1的disparity值,将端口1的disparity值输出至端口2,根据端口1的disparity值,来确定端口2的disparity值,将端口2的disparity值输出至端口3,根据端口2的disparity值,来确定端口3的disparity值;例如,以端口1为例,端口0的disparity值为-2,那么为了达到直流平衡的目的,端口1的disparity值为在对应有+2,-2,0的情况下,确定出端口1的disparity值为+2,并将端口1的disparity值输出值端口2。According to the disparity value of port 0, determine the disparity value of port 1, output the disparity value of port 1 to port 2, determine the disparity value of port 2 according to the disparity value of port 1, and output the disparity value of port 2 to the port. 3. Determine the disparity value of port 3 according to the disparity value of port 2. For example, if port 1 is used as the example and the disparity value of port 0 is -2, the disparity value of port 1 is corresponding to the purpose of DC balance. In the case of +2, -2, 0, it is determined that the disparity value of port 1 is +2, and the disparity value of port 1 is output to port 2.
这样,便确定出了各端口的disparity值。In this way, the disparity value of each port is determined.
S103:根据各端口的disparity值,分别对各端口待编码数据进行编码,并将各端口编码后数据进行并串转换处理。S103: Code the data to be encoded of each port according to the disparity value of each port, and perform parallel-to-serial conversion processing on the data encoded by each port.
其中,在上述图2中,进行8B/10B编码的过程中,根据每个端口的disparity值,从预设的编码表中查找8bit的待编码数据,与该端口的disparity值对应的10bit的编码后数据在图2中表示为abcdeifghj,这样,就得到了每个端口的编码后数据,输出10bit的编码后数据,串行/解串器(SERDES,SERializer/DESerializer)将40bit的并行编码后数据转换成串行数据,按照端口0、1、2、3的顺序通过数据物理媒体附加(PMA,Physical Medium Attachment)服务接口将5G位的数据发送至接收端;至此,便完成了数据编码。 In the foregoing FIG. 2, in the process of performing 8B/10B encoding, according to the disparity value of each port, 8 bit of data to be encoded is searched from a preset encoding table, and a 10-bit encoding corresponding to the disparity value of the port is obtained. The post data is represented as abcdeifghj in Figure 2, thus obtaining the encoded data of each port, outputting 10 bits of encoded data, and the serial/deserializer (SERDES, SERializer/DESerializer) will encode 40 bits of parallel encoded data. The data is converted into serial data, and 5G bits of data are transmitted to the receiving end through the PMA (Physical Medium Attachment) service interface in the order of ports 0, 1, 2, and 3. Thus, the data encoding is completed.
本发明实施例所提供的数据编码方法,数据编码装置在接收到QSGMII的4端口待编码数据之后,首先,确定4端口中各端口的disparity值,在确定出各端口的disparity值之后,根据各端口的disparity值分别对各端口待编码数据进行编码,得到各端口编码后数据,也就是说,数据编码装置对接收到的4端口待编码数据,先计算出各端口的disparity值,这样,在知晓各端口的disparity值的情况下,利用各端口的disparity值可以同时对各端口的待编码数据进行编码,实现对4端口待编码数据并行编码的过程,降低了每个端口待编码数据进行编码的速度,那么,降低了4通道GMII的32bit数据每个端口进行8B/10B编码的处理频率,提高了编码效率,进而提高了系统的稳定性和可靠性。In the data encoding method provided by the embodiment of the present invention, after receiving the 4-port to-be-coded data of the QSGMII, the data encoding apparatus first determines the disparity value of each port in the 4-port, and after determining the disparity value of each port, according to each The disparity value of the port encodes the data to be encoded of each port to obtain the encoded data of each port. That is, the data encoding device calculates the disparity value of each port for the received 4-port data to be encoded, so that Knowing the disparity value of each port, the disparity value of each port can be used to encode the data to be encoded of each port at the same time, thereby implementing the process of parallel encoding of the 4-port data to be encoded, and reducing the coding of the data to be encoded for each port. The speed, then, reduces the processing frequency of 8B/10B encoding for each port of the 4-channel GMII 32-bit data, which improves the coding efficiency and thus improves the stability and reliability of the system.
基于同一发明构思,本发明实施例还提供一种数据解码方法,图3为本发明实施例中数据解码方法的流程示意图,如图3所示,该方法包括:Based on the same inventive concept, the embodiment of the present invention further provides a data decoding method, and FIG. 3 is a schematic flowchart of a data decoding method according to an embodiment of the present invention. As shown in FIG. 3, the method includes:
S301:接收编码后数据,对编码后数据进行串并转换,将串并转换后得出的4路并行数据对应发送至QSGMII的4个端口;S301: Receive encoded data, perform serial-to-parallel conversion on the encoded data, and send 4-way parallel data obtained by serial-to-parallel conversion to 4 ports of QSGMII;
接收端接收到发送端的编码后数据,将串行的40bit的编码后数据进行串并转换得到4路并行数据分别发送至QSGMII的4个端口,其中,每个端口接收10bit的编码后数据;The receiving end receives the encoded data of the transmitting end, serially converts the serial 40-bit encoded data, and obtains 4 parallel data to be sent to 4 ports of the QSGMII, wherein each port receives 10 bits of encoded data;
举例来说,图4为本发明实施例中40bit数据进行解码的一种可选的流程框图,如图4所示,PMA接口以5Gbps的速度接收编码后数据并发送至4端口,每个端口接收编码后的10bit数据,其中,Port0为端口0,接收GMII的10bit数据0 1 2 3 4 5 6 7 8 9,Port1为端口1,接收GMII的10bit数据10 11 12 13 14 15 16 17 18 19,Port2为端口2,接收GMII的10bit数据20 21 22 23 24 25 26 27 28 29,Port3为端口3,接收GMII的10bit数据30 31 32 33 34 35 36 37 38 39;For example, FIG. 4 is an optional flow chart of decoding 40-bit data in the embodiment of the present invention. As shown in FIG. 4, the PMA interface receives the encoded data at a speed of 5 Gbps and sends the data to the 4-port, each port. Receive the encoded 10bit data, where Port0 is port 0, receive 10bit data of GMII 0 1 2 3 4 5 6 7 8 9, Port1 is port 1, receive 10bit data of GMII 10 11 12 13 14 15 16 17 18 19 Port2 is port 2, receives 10 bits of data of GMII 20 21 22 23 24 25 26 27 28 29, Port 3 is port 3, receives 10 bits of data of GMII 30 31 32 33 34 35 36 37 38 39;
为了将40bit的编码后数据与各端口对齐,在一种可选的实施例中,S301 之后,S302之前,该方法可以包括:各端口编码后数据中至少有一个不存在于预设的编码表中时,将各端口编码后数据向预设方向进行移位操作,直至各端口编码后数据均存在于预设的编码表中。In order to align the 40-bit encoded data with the ports, in an alternative embodiment, S301 Then, before S302, the method may include: when at least one of the encoded data of each port does not exist in the preset encoding table, the data encoded by each port is shifted to a preset direction until each port is encoded. The data is stored in the preset encoding table.
在图4中,在各端口接收到10bit的编码后数据之后,在可能的位置对齐逗号序列,这里,检测各端口的10bit的编码后数据是否都存在于预设的编码表中,如果都存在,说明40bit的编码后数据的位置已经与各端口对齐,如果有至少一个10bit的编码后数据不存在于预设的编码表中时,说明40bit的编码后数据的位置与各端口没有对齐,此时将40bit的编码后数据向预设方向进行移位操作,然后继续检测各端口的10bit的编码后数据是否都存在于预设的编码表中,直至各端口编码后数据均存在于预设的编码表中;在确定出40bit的编码后数据的位置已经与各端口对齐的情况下,将10bit数据0 1 2 3 4 5 6 7 8 9与端口0对齐,将10bit数据10 11 12 13 14 15 16 17 18 19与端口1对齐,将10bit数据20 21 22 23 24 25 26 27 28 29与端口2对齐,将10bit数据30 31 32 33 34 35 36 37 38 39与端口3对齐。In FIG. 4, after each port receives 10 bits of encoded data, the comma sequence is aligned at a possible position. Here, it is detected whether the 10-bit encoded data of each port exists in the preset coding table, if all exist. The position of the 40-bit encoded data has been aligned with each port. If at least one 10-bit encoded data does not exist in the preset encoding table, the position of the encoded data after 40 bits is not aligned with each port. The 40-bit encoded data is shifted to the preset direction, and then continues to detect whether the 10-bit encoded data of each port exists in the preset encoding table until the data of each port is encoded in the preset In the coding table; in the case where it is determined that the position of the 40-bit encoded data has been aligned with each port, the 10-bit data 0 1 2 3 4 5 6 7 8 9 is aligned with the port 0, and the 10-bit data is 10 11 12 13 14 15 16 17 18 19 Align with port 1, align 10bit data 20 21 22 23 24 25 26 27 28 29 with port 2, and 10 bit data 30 31 32 33 34 35 36 37 38 39 with Port 3 is aligned.
其中,上述预设方向可以为朝左也可以朝右。Wherein, the preset direction may be leftward or rightward.
S302:确定4端口中各端口的disparity值;S302: Determine a disparity value of each port in the four ports.
接收端为了确定出各端口的disparity值,在一种可选的实施例中,S302可以包括:In order to determine the disparity value of each port, in an optional embodiment, S302 may include:
将与4端口中每个端口对应的前一端口的disparity值输出至每个端口;根据与每个端口对应的前一端口的disparity值,确定每个端口的disparity值。The disparity value of the previous port corresponding to each port of the four ports is output to each port; the disparity value of each port is determined according to the disparity value of the previous port corresponding to each port.
例如,在4端口中,当40bit的编码后数据为首次待解码数据(即首次接收到的40bit数据)时,端口0的disparity值可以为+2或者0,将端口0的disparity值输出至端口1;当40bit的待编码数据不是首次待解码数据时,端口0的对应的前一端口为端口3,将端口3中上一组解码后数据的disparity 值输出至端口0;根据端口3的disparity值,来确定端口0的disparity值,将端口0的disparity值输出至端口1;根据端口0的disparity值,来确定端口1的disparity值,将端口1的disparity值输出至端口2,根据端口1的disparity值,来确定端口2的disparity值,将端口2的disparity值输出至端口3,根据端口2的disparity值,来确定端口3的disparity值;例如,仍然以端口1为例,端口0的disparity值为-2,那么为了达到直流平衡的目的,端口1的disparity值为在对应有+2,-2,0的情况下,确定出端口1的disparity值为+2,并将端口1的disparity值输出值端口2。For example, in the 4-port, when the 40-bit encoded data is the first data to be decoded (that is, the first received 40-bit data), the disparity value of port 0 can be +2 or 0, and the disparity value of port 0 is output to the port. 1; When the 40-bit data to be encoded is not the first data to be decoded, the corresponding previous port of port 0 is port 3, and the disparity of the decoded data of the previous group in port 3 is The value is output to port 0. According to the disparity value of port 3, the disparity value of port 0 is determined, and the disparity value of port 0 is output to port 1. According to the disparity value of port 0, the disparity value of port 1 is determined, and port 1 is determined. The disparity value is output to port 2. According to the disparity value of port 1, the disparity value of port 2 is determined, the disparity value of port 2 is output to port 3, and the disparity value of port 3 is determined according to the disparity value of port 2; for example For example, port 1 is used as the example, and the disparity value of port 0 is -2. Therefore, for the purpose of DC balance, the disparity value of port 1 is determined to be port 1 in the case of +2, -2, 0. The disparity value is +2, and the disparity value of port 1 is output to port 2.
这样,便确定出了各端口的disparity值。In this way, the disparity value of each port is determined.
在确定出各端口的disparity值,为了进一步确定40bit的编码后数据的位置是否与各端口已经对齐,在一种可选的实施例中,S302之后,S303之前,该方法可以包括:各端口的disparity值中至少有一个不存在于预设值中时,将各端口编码后数据向预设方向进行移位操作,直至各端口的disparity值均存在于预设值中。After determining the disparity value of each port, in order to further determine whether the position of the 40-bit encoded data is aligned with each port, in an optional embodiment, after S302, before S303, the method may include: If at least one of the disparity values does not exist in the preset value, the data encoded by each port is shifted to a preset direction until the disparity value of each port exists in the preset value.
上述预设值可以包括:+2,-2,0;判断确定出的各端口的disparity值是否都在预设值中,当各端口的disparity值都存在于上述预设值中时,说明40bit的编码后数据的位置已经与各端口对齐,如果有至少一个端口的disparity值不存在于预设的编码表中时,说明40bit的编码后数据的位置与各端口没有对齐,那么,此时将40bit的编码后数据向预设方向进行移位操作,然后继续检测各端口的disparity值是否都存在于预设值中,直至各端口的disparity值都存在于预设值中;The preset value may include: +2, -2, 0; determining whether the determined disparity value of each port is in a preset value, and when the disparity value of each port exists in the preset value, the 40 bit is specified. The position of the encoded data has been aligned with each port. If the disparity value of at least one port does not exist in the preset encoding table, it indicates that the position of the encoded data after 40 bits is not aligned with each port, then The 40-bit encoded data is shifted in the preset direction, and then continues to detect whether the disparity values of the ports exist in the preset values until the disparity values of the ports exist in the preset values;
在确定出40bit的编码后数据的位置已经与各端口对齐的情况下,将10bit数据0 1 2 3 4 5 6 7 8 9与端口0对齐,将10bit数据10 11 12 13 14 15 16 17 18 19与端口1对齐,将10bit数据20 21 22 23 24 25 26 27 28 29与端口2对齐,将10bit数据30 31 32 33 34 35 36 37 38 39与端口3对齐。 After determining that the position of the 40-bit encoded data has been aligned with each port, the 10-bit data 0 1 2 3 4 5 6 7 8 9 is aligned with the port 0, and the 10-bit data is 10 11 12 13 14 15 16 17 18 19 Align with port 1, align 10bit data 20 21 22 23 24 25 26 27 28 29 with port 2, and align 10 bit data 30 31 32 33 34 35 36 37 38 39 with port 3.
S303:根据各端口的disparity值,分别对编码后数据进行解码,得到各端口解码后数据。S303: Decode the encoded data according to the disparity value of each port, and obtain the decoded data of each port.
其中,在上述图4中,接收端的物理解码子层(PCS,Physical Coding Sublayer)进行8B/10B解码的过程中,根据每个端口的disparity值,从预设的编码表中查找10bit的编码后数据,与该端口的disparity值对应的8bit的解码后数据在图4中用HGFEDCBA来表示,这样,就得到了每个端口的解码后数据,并对8bit的解码后数据进行载波检测处理,得到8bit解码后数据+控制字+载波检测,并将得到的解码后数据(图4中的7 6 5 4 3 2 1 0)发送至GMII接口的Port0、Port1、Port2、Port3,使得GMII接口可以接收到4个RXD<7:0>。In the above FIG. 4, the physical decoding sublayer (PCS, Physical Coding Sublayer) of the receiving end performs the 8B/10B decoding process, and searches for the 10-bit encoding from the preset encoding table according to the disparity value of each port. Data, the 8-bit decoded data corresponding to the disparity value of the port is represented by HGFEDCBA in FIG. 4, so that the decoded data of each port is obtained, and the 8-bit decoded data is subjected to carrier detection processing. 8bit decoded data + control word + carrier detection, and the obtained decoded data (7 6 5 4 3 2 1 0 in Figure 4) is sent to Port0, Port1, Port2, Port3 of the GMII interface, so that the GMII interface can receive Up to 4 RXD<7:0>.
在将解码后数据组成帧格式之前,需要确定解码后的8bit数据的正确性,为了确定解码后的8bit数据的正确性,对解码后数据继续进行同步检测,在一种可选的实施例中,S303之后,该方法可以包括:Before the decoded data is formed into a frame format, it is necessary to determine the correctness of the decoded 8-bit data. In order to determine the correctness of the decoded 8-bit data, the decoded data is continuously detected synchronously. In an optional embodiment, After S303, the method may include:
将端口0的控制码由K28.1替换为K28.5;Replace the control code of port 0 with K28.1 to K28.5;
4端口中端口1、2、3的控制码中至少有一个不为K28.1时,或者,各端口解码后数据中至少有一个不存在于预设的编码表中时,返回执行将各端口编码后数据向预设方向进行移位操作的步骤。When at least one of the control codes of the ports 1, 2, and 3 in the 4-port is not K28.1, or when at least one of the decoded data of each port does not exist in the preset coding table, the execution returns each port. The step of shifting the encoded data to a preset direction.
在上述数据编码方法中,在确定各端口的disparity值之后,为了确定端口0的数据,将端口0的控制码由K28.1替换为K28.5,那么在解码的过程中,通过控制码可以找到端口0对应的10bit编码后数据后,对4个10bit编码后数据分别进行解码,解码完成之后,将端口0的控制码由K28.5替换为K28.1,然后对端口1-3进行检测,如果检测到端口1、2、3的控制码中至少有一个不为K28.1时,或者,检测到各端口解码后数据中至少有一个不存在于预设的编码表中时,说明解码错误,需要重新返回执行将各端口编码后数据向预设方向进行移位操作的步骤,重新将各端口的数据位进 行对齐,然后再进行解码,从而保障数据解码的正确性。In the above data encoding method, after determining the disparity value of each port, in order to determine the data of port 0, the control code of port 0 is replaced by K28.1 to K28.5, then in the process of decoding, the control code can be After finding the 10-bit encoded data corresponding to port 0, the four 10-bit encoded data are decoded separately. After the decoding is completed, the control code of port 0 is replaced by K28.5 to K28.1, and then the port 1-3 is detected. If it is detected that at least one of the control codes of the ports 1, 2, and 3 is not K28.1, or if at least one of the decoded data of each port is not present in the preset coding table, the decoding is performed. In case of error, it is necessary to return to the step of performing the shift operation of the data encoded by each port in the preset direction, and re-input the data bits of each port. The lines are aligned and then decoded to ensure the correctness of the data decoding.
本发明实施例所提供的数据解码方法,数据解码装置在接收到QSGMII的4端口编码后数据之后,首先,确定4端口中各端口的disparity值,在确定出各端口的disparity值之后,根据各端口的disparity值分别对各端口编码后数据进行解码,得到各端口解码后数据,也就是说,数据解码装置对接收到的4端口待编码数据,先计算出各端口的disparity值,这样,在知晓各端口的disparity值的情况下,利用各端口的disparity值可以同时对各端口的编码后数据进行解码,实现对4端口编码后数据并行解码的过程,那么,降低了4通道GMII的32bit数据每个端口进行8B/10B解码的处理频率,提高了解码效率,进而提高了系统的稳定性和可靠性。In the data decoding method provided by the embodiment of the present invention, after receiving the 4-port encoded data of the QSGMII, the data decoding device first determines the disparity value of each port in the 4-port, and after determining the disparity value of each port, according to each The disparity value of the port decodes the encoded data of each port to obtain the decoded data of each port. That is, the data decoding device calculates the disparity value of each port for the received 4-port data to be encoded, so that Knowing the disparity value of each port, the disparity value of each port can be used to decode the encoded data of each port at the same time, thereby realizing the process of parallel decoding of the data after 4-port encoding, and then reducing the 32-bit data of the 4-channel GMII. The processing frequency of 8B/10B decoding is performed on each port, which improves the decoding efficiency, thereby improving the stability and reliability of the system.
下面举实例来对上述数据编解码方法中的一个或多个实施例进行说明;The following examples are provided to illustrate one or more embodiments of the above data encoding and decoding methods;
图5为本发明实施例中40bit数据进行编码和解码的一种可选的流程框图;如图5所示,在发送端(记为send),将4个并行端口Port0接收到的来自GMII的8bit待编码数据分发至编码器中的Port0、Port1、Port2、Port3,将编码得到4个10bit的编码后数据通过SERDES进行并串转换得到40bit的编码后数据,在发送至接收端之前,通过SERDES进行串并转换得到4个10bit的编码后数据,分发至解码器中的Port0、Port1、Port2、Port3。FIG. 5 is an optional flow chart of encoding and decoding 40-bit data according to an embodiment of the present invention; as shown in FIG. 5, at the transmitting end (recorded as send), four parallel ports Port0 are received from GMII. The 8bit data to be encoded is distributed to Port0, Port1, Port2, and Port3 in the encoder, and the encoded data is encoded into four 10-bit data and serially converted by SERDES to obtain 40-bit encoded data. Before being sent to the receiving end, the SERDES is passed. The serial-to-parallel conversion is performed to obtain four 10-bit encoded data, which are distributed to Port0, Port1, Port2, and Port3 in the decoder.
图6-1为本发明实施例中40bit数据进行编码的一种可选的流程示意图,如图6-1所示,基于上述图5,上述数据编码方法可以包括:6-1 is an optional flowchart of encoding 40-bit data in the embodiment of the present invention. As shown in FIG. 6-1, the data encoding method may include:
S601:根据GMII收包及链路状态,发送控制码或数据。S601: Send a control code or data according to the GMII receiving and link status.
发送端上电重启时,发送配置码,空闲时发送idle码或lpidle码,GMII有数据时发送数据编码,当发送数据码时,key信号为0,当发送控制码时,key信号为1;When the sender is powered on and restarts, the configuration code is sent. When idle, the idle code or lpidle code is sent. When the GMII has data, the data code is sent. When the data code is sent, the key signal is 0. When the control code is sent, the key signal is 1.
S602:发送端判断当前端口是否是Port0,如果是Port0则到S603处理, 当前如果是其它端口,则到S604处理;S602: The sending end determines whether the current port is Port0, and if it is Port0, it processes to S603. If it is another port, it is processed to S604;
S603:发送端将控制码K28.5替换为K28.1;S603: The sender replaces the control code K28.5 with K28.1;
S604:发送端根据前一端口disparity值,计算本端口的disparity值,并将本端口的disparity值输出给下一端口,进行8B/10B编码;S604: The transmitting end calculates the disparity value of the local port according to the disparity value of the previous port, and outputs the disparity value of the local port to the next port to perform 8B/10B encoding.
S605:发送端将4端口的10bit的编码后数据组合成40bit的编码后数据;S605: The transmitting end combines the 4-bit 10-bit encoded data into 40-bit encoded data.
S606:发送端将40bit编码通过并串转换成5G SERDES差分信号发送给接收端。S606: The transmitting end transmits the 40-bit code to the receiving end by parallel-to-serial conversion into a 5G SERDES differential signal.
图6-2为本发明实施例中40bit数据进行解码的一种可选的流程示意图,如图6-2所示,基于上述图5,上述数据解码方法可以包括:FIG. 6-2 is an optional flowchart of decoding 40-bit data according to an embodiment of the present invention. As shown in FIG. 6-2, the data decoding method may include:
S607:接收端将5G SERDES线路收到差分信号,串并转换为40bit数据;S607: The receiving end receives the differential signal from the 5G SERDES line, and converts the serial to 40-bit data.
S608:接收端判读编码后数据是否为非法码流(编码后数据不存在于预设的编码表中即为非法码流),如果为是,则进行1位的移位操作,如果为否,则转至S610;S608: The receiving end judges whether the encoded data is an illegal code stream (the encoded data does not exist in the preset code table, that is, the illegal code stream), and if yes, performs a 1-bit shift operation, if not, Then go to S610;
S609:接收端将40bit的编码后数据移动(右移)1位。S609: The receiving end moves the 40-bit encoded data (right shift) by one bit.
S610:接收端将40bit数据按顺序将10bit分发给4个端口。S610: The receiving end distributes 10 bits of data to 4 ports in order.
S611:接收端根据前一端口的disparity值,计算本端口的disparity值。并将计算出的disparity值发送给下一端口;Port0计算的disparity值发送给Port1,Port1计算的disparity值发送给Port2,Port2计算的disparity值发送给Port3,Port3计算的disparity值发送给Port0,进行8B/10B解码;S611: The receiving end calculates the disparity value of the port according to the disparity value of the previous port. The calculated disparity value is sent to the next port; the disparity value calculated by Port0 is sent to Port1, the disparity value calculated by Port1 is sent to Port2, the disparity value calculated by Port2 is sent to Port3, and the disparity value calculated by Port3 is sent to Port0. 8B/10B decoding;
S612:接收端判读8bit码流是否非法,或者disparity值是否有错。如果码流非法或者disparity值有错,转至S608,否则,执行S613;S612: The receiving end interprets whether the 8-bit code stream is illegal, or whether the disparity value is wrong. If the code stream is illegal or the disparity value is wrong, go to S608, otherwise, execute S613;
S613:接收端判断当前端口,如果是Port0,则到S614处理,当前端口如果是其它端口,则到S615处理。 S613: The receiving end determines the current port. If it is Port0, it goes to S614 for processing. If the current port is another port, it goes to S615 for processing.
S614:接收端将控制码K28.1替换为K28.5;S614: The receiving end replaces the control code K28.1 with K28.5;
S615:接收端进行同步状态检测,并将收到的数据组成帧格式。S615: The receiving end performs synchronization state detection, and forms the received data into a frame format.
S616:接收端判断如果当前未与发送端同步,或检测到控制码K28.1,则到S612处理;否则执行S617。S616: The receiving end determines that if it is not synchronized with the transmitting end, or detects the control code K28.1, it proceeds to S612; otherwise, S617 is executed.
S617:将接收到的数据帧发送给GMII接口。S617: Send the received data frame to the GMII interface.
基于同一发明构思,本发明实施例提供了一种数据编码装置,图7-1为本发明实施例中数据编码装置的一种可选的结构示意图,如图7-1所示,该装置包括:第一接收模块71、第一确定模块72和编码模块73;Based on the same inventive concept, an embodiment of the present invention provides a data encoding apparatus, and FIG. 7-1 is an optional structural diagram of a data encoding apparatus according to an embodiment of the present invention. As shown in FIG. 7-1, the apparatus includes : a first receiving module 71, a first determining module 72 and an encoding module 73;
其中,第一接收模块71,配置为接收来自4QSGMII的4端口待编码数据;第一确定模块72,配置为确定4端口中各端口的disparity值;编码模块73,配置为根据各端口的disparity值,分别对各端口的待编码数据进行编码,并将各端口的编码后数据进行并串转换处理。The first receiving module 71 is configured to receive the 4-port to-be-coded data from the 4QSGMII. The first determining module 72 is configured to determine the disparity value of each port in the 4-port. The encoding module 73 is configured to be based on the disparity value of each port. And encoding the data to be encoded of each port separately, and performing parallel-to-serial conversion processing on the encoded data of each port.
为了确定出各端口的disparity值,为了在一种可选的实施例中,上述第一确定模块71,具体配置为将与4端口中每个端口对应的前一端口的disparity值输出至各端口;根据与每个端口对应的前一端口的disparity值,确定每个端口的disparity值。In order to determine the disparity value of each port, in an optional embodiment, the first determining module 71 is configured to output the disparity value of the previous port corresponding to each port of the four ports to each port. Determine the disparity value of each port based on the disparity value of the previous port corresponding to each port.
为了对待编码的数据进行定位,在一种可选的实施例中,上述装置还包括:第一替换模块,配置为在接收来自QSGMII的4端口待编码数据之后,在确定4端口中各端口的disparity值之前,将4端口中端口0的控制码由K28.5替换为K28.1。In order to locate the data to be encoded, in an optional embodiment, the apparatus further includes: a first replacement module configured to determine each port of the 4 port after receiving the 4-port to-be-coded data from the QSGMII Before the disparity value, replace the control code of port 0 in port 4 from K28.5 to K28.1.
在实际应用中,第一接收模块71、第一确定模块72和编码模块73均可由位于发送端设备的中央处理器(CPU,Central Processing Unit)、微处理器(MPU,Microprocessor Unit)、专用集成电路(ASIC,Application Specific Integrated Circuit)或FPGA等实现。In a practical application, the first receiving module 71, the first determining module 72, and the encoding module 73 can be configured by a central processing unit (CPU), a microprocessor (MPU, a microprocessor unit), and a dedicated integrated device located at the transmitting end device. ASIC (Application Specific Integrated Circuit) or FPGA implementation.
举例来说,图7-2为本发明实施例中数据编码装置的一种可选的结构示 意图,如图7-2所示,包括:至少一个处理器74、存储器76、至少一个存储器76和网络接口77。数据编码装置中的各个组件通过总线系统75耦合在一起。可理解,总线系统75用于实现这些组件之间的连接通信。总线系统75除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图7-2中将各种总线都标为总线系统75。For example, FIG. 7-2 is an optional structural diagram of a data encoding apparatus according to an embodiment of the present invention. The intent, as shown in Figure 7-2, includes at least one processor 74, memory 76, at least one memory 76, and a network interface 77. The various components in the data encoding device are coupled together by a bus system 75. It will be appreciated that the bus system 75 is used to implement connection communication between these components. In addition to the data bus, the bus system 75 includes a power bus, a control bus, and a status signal bus. However, for clarity of description, various buses are labeled as bus system 75 in Figure 7-2.
可以理解,存储器76可以是易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)。本发明实施例描述的存储器76旨在包括但不限于这些和任意其它适合类型的存储器。It will be appreciated that memory 76 can be either volatile memory or non-volatile memory, and can include both volatile and nonvolatile memory. The non-volatile memory may be a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), or an Erasable Programmable Read (EPROM). Only Memory), Electrically Erasable Programmable Read-Only Memory (EEPROM). The memory 76 described in the embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.
本发明实施例中的存储器76用于存储各种类型的数据以支持数据编码装置的操作。实现本发明实施例数据编码方法的程序可以包含在应用程序761中。The memory 76 in the embodiment of the present invention is used to store various types of data to support the operation of the data encoding apparatus. A program implementing the data encoding method of the embodiment of the present invention may be included in the application 761.
上述本发明实施例揭示的方法可以应用于处理器74中,或者由处理器74实现。处理器74可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器74中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器74可以是通用处理器、DSP,或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。处理器74可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本发明实施例所公开的方法的步骤,可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于存储介质中,该存储介质位于存储器76,处理器74读取存储器76中的信 息,结合其硬件完成前述方法的步骤。The method disclosed in the above embodiments of the present invention may be applied to the processor 74 or implemented by the processor 74. Processor 74 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 74 or an instruction in the form of software. The processor 74 described above can be a general purpose processor, a DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, or the like. The processor 74 can implement or perform the various methods, steps, and logic blocks disclosed in the embodiments of the present invention. A general purpose processor can be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiment of the present invention may be directly implemented as a hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium located in memory 76, and processor 74 reads the letter in memory 76. And complete the steps of the foregoing method in combination with its hardware.
在示例性实施例中,数据编码装置可以被一个或多个ASIC,Application Specific Integrated Circuit)、DSP、可编程逻辑器件(PLD,Programmable Logic Device)、复杂可编程逻辑器件(CPLD,Complex Programmable Logic Device)、FPGA、通用处理器、控制器、微控制器(MCU,Micro Controller Unit)、微处理器(Microprocessor)、或其他电子元件实现,用于执行前述数据编码方法。In an exemplary embodiment, the data encoding device may be an ASIC (Application Specific Integrated Circuit), a DSP, a Programmable Logic Device (PLD), or a Complex Programmable Logic Device (CPLD). ), an FPGA, a general purpose processor, a controller, a microcontroller (Micro Controller Unit), a microprocessor, or other electronic component implementation for performing the aforementioned data encoding method.
基于同一发明构思,本发明实施例提供了一种数据解码装置,图8-1为本发明实施例中数据解码装置的一种可选的结构示意图,如图8-1所示,该装置包括:第二接收模块81、第二确定模块82和解码模块83;Based on the same inventive concept, an embodiment of the present invention provides a data decoding apparatus, and FIG. 8-1 is an optional structural diagram of a data decoding apparatus according to an embodiment of the present invention. As shown in FIG. 8-1, the apparatus includes : a second receiving module 81, a second determining module 82 and a decoding module 83;
其中,第二接收模块81,配置为接收编码后数据,对编码后数据进行串并转换,将串并转换后得出的4路并行数据分别发送至4QSGMII的4个端口;第二确定模块82,配置为确定4端口中各端口的不均等性disparity值;解码模块83,配置为根据各端口的disparity值,分别对编码后数据进行解码,得到各端口解码后数据。The second receiving module 81 is configured to receive the encoded data, perform serial-to-parallel conversion on the encoded data, and send the four parallel data obtained by the serial-to-parallel conversion to the four ports of the 4QSGMII, respectively; the second determining module 82 The decoding module 83 is configured to decode the encoded data according to the disparity value of each port to obtain the decoded data of each port.
接收端为了确定出各端口的disparity值,在一种可选的实施例中,上述第二确定模块82,具体配置为将与4端口中每个端口对应的前一端口的disparity值输出至每个端口;根据与每个端口对应的前一端口的disparity值,确定每个端口的disparity值。In an optional embodiment, the second determining module 82 is configured to output the disparity value of the previous port corresponding to each port of the four ports to each of the ports. Ports; determine the disparity value of each port based on the disparity value of the previous port corresponding to each port.
为了将40bit的编码后数据与各端口对齐,在一种可选的实施例中,上述装置还包括:第一移动模块,配置为在接收编码后数据,对编码后数据进行串并转换,将串并转换后得出的4路并行数据分别发送至QSGMII的4个端口之后,在确定4端口中各端口的disparity值之前,在各端口编码后数据中至少有一个不存在于预设的编码表中时,将各端口编码后数据向预设方向进行移位操作,直至各端口编码后数据均存在于预设的编码表中。 In an optional embodiment, the apparatus further includes: a first mobile module configured to receive the encoded data and perform serial-to-parallel conversion on the encoded data, After the four parallel data obtained by the serial-to-parallel conversion are respectively sent to the four ports of the QSGMII, before determining the disparity value of each port in the four ports, at least one of the encoded data of each port does not exist in the preset encoding. In the table, the data encoded by each port is shifted to a preset direction until the data encoded by each port exists in the preset coding table.
在确定出各端口的disparity值,为了进一步确定40bit的编码后数据的位置是否与各端口已经对齐,在一种可选的实施例中,上述装置还包括:第二移动模块,配置为在确定4端口中各端口的disparity值之后,在根据各端口的disparity值,分别对编码后数据进行解码,得到各端口解码后数据之前,在各端口的disparity值中至少有一个不存在于预设值中时,将各端口编码后数据向预设方向进行移位操作,直至各端口的disparity值均存在于预设值中。After determining the disparity value of each port, in order to further determine whether the position of the 40-bit encoded data is aligned with each port, in an optional embodiment, the apparatus further includes: a second mobile module configured to determine After the disparity value of each port in the four ports, the encoded data is decoded according to the disparity value of each port, and at least one of the disparity values of each port does not exist in the preset value before the decoded data of each port is obtained. In the middle, the data encoded by each port is shifted to a preset direction until the disparity value of each port exists in the preset value.
在将解码后数据组成帧格式之前,需要确定解码后的8bit数据的正确性,为了确定解码后的8bit数据的正确性,对解码后数据继续进行同步检测,在一种可选的实施例中,上述装置还包括:第二替换模块和同步检测模块;Before the decoded data is formed into a frame format, it is necessary to determine the correctness of the decoded 8-bit data. In order to determine the correctness of the decoded 8-bit data, the decoded data is continuously detected synchronously. In an optional embodiment, The device further includes: a second replacement module and a synchronization detection module;
其中,第二替换模块,配置为在根据各端口的disparity值,分别对编码后数据进行解码,得到各端口解码后数据之后,将端口0的控制码由K28.5替换为K28.1,并触发同步检测模块;同步检测模块,配置为在受到触发后在4端口中端口1、2、3的控制码中至少有一个不为K28.1时,或者,各端口解码后数据中至少有一个不存在于预设的编码表中时,触发第一移动模块执行将各端口编码后数据向预设方向进行移位操作。The second replacement module is configured to decode the encoded data according to the disparity value of each port, and obtain the decoded data of each port, and then replace the control code of port 0 with K28.5 to K28.1, and The synchronization detection module is triggered, and the synchronization detection module is configured to: at least one of the control codes of the ports 1, 2, and 3 in the 4-port is not K28.1 after being triggered, or at least one of the decoded data of each port When it does not exist in the preset coding table, the first mobile module is triggered to perform a shift operation of the data encoded by each port in a preset direction.
在实际应用中,第二接收模块81、第二确定模块82和解码模块83均可由位于接收端的CPU、MPU、ASIC或FPGA等实现。In practical applications, the second receiving module 81, the second determining module 82, and the decoding module 83 can all be implemented by a CPU, an MPU, an ASIC, or an FPGA located at the receiving end.
举例来说,参见图8-2,图8-2是本发明另一实施例的数据解码装置的结构示意图,数据解码装置。图8-2所示的数据解码装置包括:至少一个处理器84、存储器86和网络接口87。数据解码装置中的各个组件通过总线系统85耦合在一起。可理解,总线系统85用于实现这些组件之间的连接通信。总线系统85除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图8-2中将各种总线都标为总线系 统85。For example, referring to FIG. 8-2, FIG. 8-2 is a schematic structural diagram of a data decoding apparatus according to another embodiment of the present invention, and a data decoding apparatus. The data decoding apparatus shown in FIG. 8-2 includes at least one processor 84, a memory 86, and a network interface 87. The various components in the data decoding device are coupled together by a bus system 85. As can be appreciated, bus system 85 is used to implement connection communication between these components. The bus system 85 includes a power bus, a control bus, and a status signal bus in addition to the data bus. However, for the sake of clarity, the various buses are labeled as the bus system in Figure 8-2. System 85.
本发明实施例中的存储器86用于存储各种类型的数据以支持数据解码装置的操作。实现本发明实施例数据解码方法的程序可以包含在应用程序861中。The memory 86 in the embodiment of the present invention is used to store various types of data to support the operation of the data decoding apparatus. A program for implementing the data decoding method of the embodiment of the present invention may be included in the application 861.
上述本发明实施例揭示的方法可以应用于处理器84中,或者由处理器84实现。处理器84可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器84中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器84可以是通用处理器、DSP,或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。The method disclosed in the above embodiments of the present invention may be applied to the processor 84 or implemented by the processor 84. Processor 84 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 84 or an instruction in the form of software. The processor 84 described above can be a general purpose processor, a DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, or the like.
本实施例记载一种计算机可读介质,可以为ROM(例如,只读存储器、FLASH存储器、转移装置等)、磁存储介质(例如,磁带、磁盘驱动器等)、光学存储介质(例如,CD-ROM、DVD-ROM、纸卡、纸带等)以及其他熟知类型的程序存储器;计算机可读介质中存储有计算机可执行指令,当执行指令时,引起至少一个处理器执行前述如图1示出的数据编码方法或如图3示出的数据解码方法。This embodiment describes a computer readable medium, which may be a ROM (eg, a read only memory, a FLASH memory, a transfer device, etc.), a magnetic storage medium (eg, a magnetic tape, a disk drive, etc.), an optical storage medium (eg, a CD- ROM, DVD-ROM, paper card, paper tape, etc.) and other well-known types of program memory; computer-readable medium storing computer-executable instructions that, when executed, cause at least one processor to perform the foregoing as shown in FIG. The data encoding method or the data decoding method shown in FIG.
本发明实施例中,在接收到QSGMII的4端口待编码数据之后,首先,确定4端口中各端口的disparity值,在确定出各端口的disparity值之后,根据各端口的disparity值分别对各端口待编码数据进行编码,得到各端口编码后数据,也就是说,数据编码装置对接收到的4端口待编码数据,先计算出各端口的disparity值,这样,在知晓各端口的disparity值的情况下,利用各端口的disparity值可以同时对各端口的待编码数据进行编码,实现对4端口待编码数据并行编码的过程,降低了每个端口待编码数据进行编码的速度,那么,降低了4通道GMII的32bit数据每个端口进行8B/10B编码的处理频率,提高了编码效率,进而提高了系统的稳定性和可靠性。In the embodiment of the present invention, after receiving the 4-port to-be-coded data of the QSGMII, first, determine the disparity value of each port in the 4-port. After determining the disparity value of each port, each port is respectively determined according to the disparity value of each port. The data to be encoded is encoded to obtain the encoded data of each port. That is to say, the data encoding device first calculates the disparity value of each port for the received 4-port data to be encoded, so that the discardity value of each port is known. Then, the disparity value of each port can be used to encode the data to be encoded of each port at the same time, thereby implementing the process of parallel encoding of the 4-port data to be encoded, and reducing the encoding speed of the data to be encoded by each port, then reducing the speed of 4 The 32-bit data of the channel GMII performs the processing frequency of 8B/10B encoding for each port, which improves the coding efficiency, thereby improving the stability and reliability of the system.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局 限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not It is to be understood that those skilled in the art are susceptible to variations and substitutions within the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the appended claims.
工业实用性Industrial applicability
本发明实施例公开了一种数据编解码方法,包括:接收来自QSGMII的4端口待编码数据;确定所述4端口中各端口的disparity值;根据各端口的disparity值,分别对所述各端口待编码数据进行编码,并将所述各端口编码后数据进行并串转换处理。本发明实施例还同时公开了一种数据编解码装置及存储介质。本发明实施例能够降低4通道GMII的32bit数据进行8B/10B编码时每个端口的处理频率,提供系统的稳定性和可靠性。 The embodiment of the present invention discloses a data encoding and decoding method, including: receiving 4-port to-be-coded data from the QSGMII; determining a disparity value of each port in the 4-port; and respectively performing the port according to the disparity value of each port. The data to be encoded is encoded, and the data encoded by each port is subjected to parallel-to-serial conversion processing. The embodiment of the invention also discloses a data encoding and decoding device and a storage medium. The embodiment of the invention can reduce the processing frequency of each port when the 32-bit data of the 4-channel GMII is 8B/10B, and provides stability and reliability of the system.

Claims (20)

  1. 一种数据编码方法,包括:A data encoding method comprising:
    接收来自4串行千兆媒体独立接口QSGMII的对应4端口的待编码数据;Receiving data to be encoded corresponding to 4 ports of the 4 serial Gigabit media independent interface QSGMII;
    确定所述4端口中各端口的不均等性disparity值;Determining an inequality disparity value of each port in the four ports;
    根据各端口的disparity值,分别对所述各端口的待编码数据进行编码,并将所述各端口的编码后数据进行并串转换处理。The data to be encoded of each port is encoded according to the disparity value of each port, and the encoded data of each port is subjected to parallel-to-serial conversion processing.
  2. 根据权利要求1所述的方法,其中,所述确定所述4端口中各端口的disparity值,包括:The method of claim 1, wherein the determining a disparity value of each of the four ports comprises:
    根据与所述各端口对应的前一端口的disparity值,确定所述各端口的disparity值;Determining a disparity value of each port according to a disparity value of a previous port corresponding to each port;
    将与所述各端口的disparity值输出至所述各端口的下一端口。And outputting the disparity value of each port to the next port of each port.
  3. 根据权利要求1所述的方法,其中,在接收来自QSGMII的4端口待编码数据之后,在确定所述4端口中各端口的disparity值之前,所述方法包括:The method of claim 1, wherein after receiving the 4-port to-be-encoded data from the QSGMII, before determining the disparity value of each of the four ports, the method comprises:
    将所述4端口中端口0的控制码由K28.5替换为K28.1。The control code of port 0 in the 4-port is replaced by K28.5 to K28.1.
  4. 一种数据解码方法,包括:A data decoding method includes:
    接收编码后数据,对所述编码后数据进行串并转换,将串并转换后得出的4路并行数据,对应发送至4串行千兆媒体独立接口QSGMII的4个端口;Receiving the encoded data, performing serial-to-parallel conversion on the encoded data, and converting the 4-way parallel data obtained by serial-to-parallel conversion to four ports of the 4 serial Gigabit media independent interface QSGMII;
    确定所述4端口中各端口的不均等性disparity值;Determining an inequality disparity value of each port in the four ports;
    根据所述各端口的disparity值,分别对发送到所述各端口的编码后数据进行解码,得到所述各端口的解码后数据。Decoding the encoded data sent to each port according to the disparity value of each port to obtain decoded data of each port.
  5. 根据权利要求4所述的方法,其中,所述确定所述4端口中各端口的disparity值,包括: The method of claim 4, wherein the determining a disparity value of each of the four ports comprises:
    根据与所述各端口对应的前一端口的disparity值,确定所述各端口的disparity值;Determining a disparity value of each port according to a disparity value of a previous port corresponding to each port;
    将与所述各端口的disparity值输出至所述各端口的下一端口。And outputting the disparity value of each port to the next port of each port.
  6. 根据权利要求4所述的方法,其中,在确定所述4端口中各端口的disparity值之前,所述方法还包括:The method of claim 4, wherein before determining the disparity value of each of the four ports, the method further comprises:
    当所述各端口的编码后数据中至少有一个不存在于预设的编码表中时,将所述各端口的编码后数据朝预设方向移动一位,直至所述各端口的编码后数据均存在于所述预设的编码表中。When at least one of the encoded data of each port does not exist in the preset encoding table, the encoded data of each port is moved by one bit in a preset direction until the encoded data of each port Both exist in the preset coding table.
  7. 根据权利要求4所述的方法,其中,在确定所述4端口中各端口的disparity值之后,根据所述各端口的disparity值,分别对发送到所述各端口的编码后数据进行解码,得到所述各端口的解码后数据之前,所述方法还包括:The method according to claim 4, after determining the disparity value of each port in the four ports, decoding the encoded data sent to the ports according to the disparity value of each port, and obtaining Before the decoded data of each port, the method further includes:
    当所述各端口的disparity值中至少有一个不存在于预设值中时,将所述各端口编码后数据向预设方向进行移位操作,直至所述各端口的disparity值均存在于所述预设值中。When at least one of the disparity values of the ports does not exist in the preset value, the coded data of each port is shifted to a preset direction until the disparity values of the ports exist in the In the preset value.
  8. 根据权利要求6所述的方法,其中,在根据所述各端口的disparity值,分别对发送到所述各端口的编码后数据进行解码,得到所述各端口解码后数据之后,所述方法还包括:The method according to claim 6, wherein the method further comprises: after decoding the encoded data sent to the ports according to the disparity value of each port, and obtaining the decoded data of each port, the method further include:
    将所述端口0的控制码由K28.1替换为K28.5;The control code of the port 0 is replaced by K28.1 to K28.5;
    所述4端口中端口1、2、3的控制码中至少有一个不为K28.1时,或者,所述各端口解码后数据中至少有一个不存在于预设的编码表中时,返回执行将所述各端口编码后数据向预设方向进行移位操作的步骤。If at least one of the control codes of the ports 1, 2, and 3 in the 4-port is not K28.1, or if at least one of the decoded data of each port does not exist in the preset coding table, return Performing a step of shifting the encoded data of each port to a preset direction.
  9. 一种数据编码装置,包括:A data encoding device comprising:
    第一接收模块,配置为接收来自4串行千兆媒体独立接口QSGMII的4端口的待编码数据; a first receiving module configured to receive 4-port data to be encoded from a 4-serial Gigabit Media Independent Interface QSGMII;
    第一确定模块,配置为确定所述4端口中各端口的不均等性disparity值;a first determining module, configured to determine an inequality disparity value of each port in the four ports;
    编码模块,配置为根据各端口的disparity值,分别对所述各端口的待编码数据进行编码,并将所述各端口的编码后数据进行并串转换处理。The encoding module is configured to encode the data to be encoded of each port according to the disparity value of each port, and perform parallel-to-serial conversion processing on the encoded data of each port.
  10. 根据权利要求9所述的装置,其中,The apparatus according to claim 9, wherein
    所述第一确定模块,具体配置为根据与所述各端口对应的前一端口的disparity值,确定所述各端口的disparity值;将与所述各端口的disparity值输出至所述各端口的下一端口。The first determining module is configured to determine a disparity value of each port according to a disparity value of a previous port corresponding to each port, and output a disparity value of each port to the port Next port.
  11. 根据权利要求9所述的装置,其中,所述装置还包括:The apparatus of claim 9 wherein said apparatus further comprises:
    第一替换模块,配置为在接收来自QSGMII的4端口待编码数据之后,在确定所述4端口中各端口的disparity值之前,将所述4端口中端口0的控制码由K28.5替换为K28.1。a first replacement module, configured to: after receiving the 4-port to-be-coded data from the QSGMII, replace the control code of the port 0 in the 4-port by K28.5 before determining the disparity value of each port in the 4-port K28.1.
  12. 一种数据解码装置,包括:A data decoding device comprising:
    第二接收模块,配置为接收编码后数据,对所述编码后数据进行串并转换,将串并转换后得出的4路并行数据,对应发送至4串行千兆媒体独立接口QSGMII的4个端口;The second receiving module is configured to receive the encoded data, perform serial-to-parallel conversion on the encoded data, and convert the 4-way parallel data obtained by serial-to-parallel conversion to the 4 serial Gigabit media independent interface QSGMII 4 Port
    第二确定模块,配置为确定所述4端口中各端口的不均等性disparity值;a second determining module, configured to determine an inequality disparity value of each port in the four ports;
    解码模块,配置为根据所述各端口的disparity值,分别对发送到所述各端口的编码后数据进行解码,得到所述各端口解码后数据。The decoding module is configured to decode the encoded data sent to each port according to the disparity value of each port, and obtain the decoded data of each port.
  13. 根据权利要求12所述的装置,其中,所述第二确定模块,具体配置为根据与所述各端口对应的前一端口的disparity值,确定所述各端口的disparity值;将与所述各端口的disparity值输出至所述各端口的下一端口。The device according to claim 12, wherein the second determining module is configured to determine a disparity value of each port according to a disparity value of a previous port corresponding to each port; The disparity value of the port is output to the next port of each port.
  14. 根据权利要求12所述的装置,其中,所述装置还包括:The device of claim 12, wherein the device further comprises:
    第一移动模块,配置为在接收编码后数据,对所述编码后数据进行串 并转换,将串并转换后得出的4路并行数据分别发送至QSGMII的4个端口之后,在确定所述4端口中各端口的disparity值之前,当所述各端口编码后数据中至少有一个不存在于预设的编码表中时,将所述各端口编码后数据向预设方向进行移位操作,直至所述各端口编码后数据均存在于所述预设的编码表中。a first mobile module configured to receive encoded data and perform stringing on the encoded data And converting, after the four parallel data obtained by the serial-to-parallel conversion are respectively sent to the four ports of the QSGMII, before determining the disparity value of each port in the four ports, at least the encoded data of each port is When not existing in the preset coding table, the data encoded by each port is shifted to a preset direction until the data encoded by each port exists in the preset coding table.
  15. 根据权利要求12所述的装置,其中,所述装置还包括:The device of claim 12, wherein the device further comprises:
    第二移动模块,配置为在确定所述各端口的disparity值之后,在根据所述各端口的disparity值,分别对发送到所述各端口的编码后数据进行解码,得到所述各端口解码后数据之前,当所述各端口的disparity值中至少有一个不存在于预设值中时,将所述各端口的编码后数据向预设方向进行移位操作,直至所述各端口的disparity值均存在于所述预设值中。a second mobile module, configured to: after determining the disparity value of each port, decoding the encoded data sent to each port according to the disparity value of each port, and obtaining the decoded by each port Before the data, when at least one of the disparity values of the ports does not exist in the preset value, the encoded data of each port is shifted to a preset direction until the disparity value of each port is Both exist in the preset value.
  16. 根据权利要求14所述的装置,其中,所述装置还包括:The apparatus of claim 14 wherein said apparatus further comprises:
    第二替换模块,配置为在根据所述各端口的disparity值,分别对所述编码后数据进行解码,得到所述各端口解码后数据之后,将所述端口0的控制码由K28.1替换为K28.5,并触发同步检测模块;The second replacement module is configured to decode the encoded data according to the disparity value of each port, and obtain the control code of the port 0 by using the K28.1 after obtaining the decoded data of each port. K28.5, and trigger the synchronization detection module;
    所述同步检测模块,配置为在受到触发后,当所述4端口中端口1、2、3的控制码中至少有一个不为K28.1时,或者,所述各端口解码后数据中至少有一个不存在于预设的编码表中时,触发所述第一移动模块将所述各端口的编码后数据向预设方向进行移位操作。The synchronization detecting module is configured to, when triggered, when at least one of the control codes of the ports 1, 2, and 3 in the 4-port is not K28.1, or at least the decoded data of each port When there is a code table that does not exist in the preset, the first mobile module is triggered to perform the shift operation on the encoded data of each port in a preset direction.
  17. 一种数据编码装置,包括:A data encoding device comprising:
    存储器,用于存储可执行程序;a memory for storing an executable program;
    处理器,配置为执行所述存储器存储的所述可执行程序时,实现权利要求1至3任一项所述的数据编码方法。The processor, configured to execute the executable program stored in the memory, implements the data encoding method of any one of claims 1 to 3.
  18. 一种数据编码装置,包括:A data encoding device comprising:
    存储器,用于存储可执行程序; a memory for storing an executable program;
    处理器,配置为执行所述存储器存储的所述可执行程序时,实现权利要求4至8任一项所述的数据解码方法。The data decoding method according to any one of claims 4 to 8 is implemented when the processor is configured to execute the executable program stored in the memory.
  19. 一种存储介质,存储有可执行程序,所述可执行程序被处理器执行时实现权利要求1至3任一项所述的数据编码方法。A storage medium storing an executable program, the executable program being executed by a processor to implement the data encoding method according to any one of claims 1 to 3.
  20. 一种存储介质,存储有可执行程序,所述可执行程序被处理器执行时实现权利要求4至8任一项所述的数据解码方法。 A storage medium storing an executable program, the executable program being executed by a processor to implement the data decoding method according to any one of claims 4 to 8.
PCT/CN2017/095344 2016-08-31 2017-07-31 Data encoding method, data decoding method, devices, and data storage medium WO2018040824A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610793617.2 2016-08-31
CN201610793617.2A CN107783922A (en) 2016-08-31 2016-08-31 A kind of data decoding method and device

Publications (1)

Publication Number Publication Date
WO2018040824A1 true WO2018040824A1 (en) 2018-03-08

Family

ID=61301354

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/095344 WO2018040824A1 (en) 2016-08-31 2017-07-31 Data encoding method, data decoding method, devices, and data storage medium

Country Status (2)

Country Link
CN (1) CN107783922A (en)
WO (1) WO2018040824A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108965031A (en) * 2018-08-21 2018-12-07 北京东土科技股份有限公司 Interchanger mistake packet restorative procedure, device, interchanger and storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108540489A (en) * 2018-04-24 2018-09-14 天津芯海创科技有限公司 PCS protocol multiplexings chip and method
CN108667824A (en) * 2018-04-24 2018-10-16 天津芯海创科技有限公司 PCS protocol multiplexings chip and method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040083419A1 (en) * 2002-10-24 2004-04-29 Mitsubishi Denki Kabushiki Kaisha Detection circuit and decoding circuit
CN101674089A (en) * 2009-10-19 2010-03-17 中国科学院声学研究所 High-speed 8B/10B coder, decoder and processing method thereof for error input
CN103138889A (en) * 2012-12-05 2013-06-05 无锡华大国奇科技有限公司 High-speed 8B/10B encoding device and coder
CN104221351A (en) * 2012-03-23 2014-12-17 高通股份有限公司 Multi-port serial media independent interface
CN104579583A (en) * 2015-02-09 2015-04-29 浪潮电子信息产业股份有限公司 Improved method for 8b/10b coding scheme
CN106656872A (en) * 2015-07-17 2017-05-10 深圳市中兴微电子技术有限公司 Mixed physical coding sublayer and data transmitting and receiving method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9319348B2 (en) * 2011-05-24 2016-04-19 Cisco Technology, Inc. Octal serial gigabit media-independent interface
EP2828975A4 (en) * 2012-03-23 2015-11-25 Qualcomm Inc Configurable multi-mode media independent interface

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040083419A1 (en) * 2002-10-24 2004-04-29 Mitsubishi Denki Kabushiki Kaisha Detection circuit and decoding circuit
CN101674089A (en) * 2009-10-19 2010-03-17 中国科学院声学研究所 High-speed 8B/10B coder, decoder and processing method thereof for error input
CN104221351A (en) * 2012-03-23 2014-12-17 高通股份有限公司 Multi-port serial media independent interface
CN103138889A (en) * 2012-12-05 2013-06-05 无锡华大国奇科技有限公司 High-speed 8B/10B encoding device and coder
CN104579583A (en) * 2015-02-09 2015-04-29 浪潮电子信息产业股份有限公司 Improved method for 8b/10b coding scheme
CN106656872A (en) * 2015-07-17 2017-05-10 深圳市中兴微电子技术有限公司 Mixed physical coding sublayer and data transmitting and receiving method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108965031A (en) * 2018-08-21 2018-12-07 北京东土科技股份有限公司 Interchanger mistake packet restorative procedure, device, interchanger and storage medium
CN108965031B (en) * 2018-08-21 2021-10-22 北京东土科技股份有限公司 Method and device for repairing switch error packet, switch and storage medium

Also Published As

Publication number Publication date
CN107783922A (en) 2018-03-09

Similar Documents

Publication Publication Date Title
WO2018040824A1 (en) Data encoding method, data decoding method, devices, and data storage medium
CN103141066B (en) Transmission circuit, reception circuit, transmission method, reception method, communication system and communication method therefor
US8259760B2 (en) Apparatus and method for transmitting and recovering multi-lane encoded data streams using a reduced number of lanes
US8990653B2 (en) Apparatus and method for transmitting and recovering encoded data streams across multiple physical medium attachments
US8255779B2 (en) System and method for accelerated forward error correction (FEC) synchronization
US6768429B2 (en) Multiplexing an additional bit stream with a primary bit stream with conversion between qB/rB and xB/yB encoded bit streams
WO2011003329A1 (en) 64b/66b coding and decoding device and method for realizing 64b/66b coding and decoding
US9479277B2 (en) Mechanism for channel synchronization
WO2015027755A1 (en) Physical layer coding/decoding method and apparatus thereof
US6911922B2 (en) Method to overlay a secondary communication channel onto an encoded primary communication channel
WO2017012517A1 (en) Hybrid physical coding sub-layer and method for transmitting and receiving data, and storage medium
WO2011137790A1 (en) Method and apparatus for sending/receiving common public radio interface service
US10700847B2 (en) Codeword synchronization for fiber channel protocol
CN1639982A (en) Multiplexing an additional bit stream with a primary bit stream
US9294418B2 (en) 64B/66B codec for ethernet applications
CN113949388B (en) Coder-decoder and coding-decoding method for serializer/deserializer system
CN112313891A (en) Apparatus and method for transmitting side-channel bits over Ethernet cable
WO2007036128A1 (en) A bts-bsc interface and a method for detecting the interface
CN103023610A (en) Data transmission method and apparatus of 485 interface
JP4419867B2 (en) Data processing device
JPH08265370A (en) Error detection device of packet exchanger
TW201626246A (en) System and method for transcoding data
WO2006097574A1 (en) Method and testing arrangement for testing a device using 8b/10b encoding and an 8b/10b encoder and decoder
EP4340232A1 (en) Encoding method, decoding method, and optical module
WO2023137666A1 (en) Data transmission method and data transmission apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17845126

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17845126

Country of ref document: EP

Kind code of ref document: A1