CN112968753B - Data boundary alignment method and system for high-speed serial transceiver - Google Patents

Data boundary alignment method and system for high-speed serial transceiver Download PDF

Info

Publication number
CN112968753B
CN112968753B CN202110125384.XA CN202110125384A CN112968753B CN 112968753 B CN112968753 B CN 112968753B CN 202110125384 A CN202110125384 A CN 202110125384A CN 112968753 B CN112968753 B CN 112968753B
Authority
CN
China
Prior art keywords
data
boundary
comma
detected
receiving
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202110125384.XA
Other languages
Chinese (zh)
Other versions
CN112968753A (en
Inventor
黄三
温长清
张勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Pango Microsystems Co Ltd
Original Assignee
Shenzhen Pango Microsystems Co Ltd
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 Shenzhen Pango Microsystems Co Ltd filed Critical Shenzhen Pango Microsystems Co Ltd
Priority to CN202110125384.XA priority Critical patent/CN112968753B/en
Publication of CN112968753A publication Critical patent/CN112968753A/en
Application granted granted Critical
Publication of CN112968753B publication Critical patent/CN112968753B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0078Avoidance of errors by organising the transmitted data in a format specifically designed to deal with errors, e.g. location
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0078Avoidance of errors by organising the transmitted data in a format specifically designed to deal with errors, e.g. location
    • H04L1/0091Avoidance of errors by organising the transmitted data in a format specifically designed to deal with errors, e.g. location arrangements specific to receivers, e.g. format detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)

Abstract

The invention provides a data boundary alignment method for a high-speed serial transceiver, which comprises the following steps: when the comma character is detected in the data to be detected, re-determining the boundary of the data byte, and outputting the data with the aligned byte boundary; receiving the data with the aligned byte boundaries, decoding and restoring the data, and outputting decoded data, feedback signals and indication signals; receiving said indication signal and the configured comma position value, adjusting the comma character to a specified position, or adjusting the comma character to a default byte0 position, and receiving said decoded data and outputting boundary-aligned data. The data boundary alignment method of the invention, it through detecting the comma character, confirm the boundary of the data byte again, output the data after the byte boundary alignment, and further adjust the position of the comma character and output the data that the boundary aligns, thus solve the indeterminate position of the comma character in the received data, and the problem that the byte order of the received data is disorderly.

Description

Data boundary alignment method and system for high-speed serial transceiver
[ technical field ] A method for producing a semiconductor device
The invention relates to the technical field of integrated circuit chips, in particular to a data boundary alignment method and a data boundary alignment system for a high-speed serial transceiver.
[ background of the invention ]
High speed serial transceivers in a chip, such as: the HSST in the FPGA chip can be used as a high-speed communication interface independently, and can also be used as a physical layer of protocols such as PCIE, SATA, XAUI and the like in an auxiliary manner. After data is converted through PMA parallel-serial and serial-parallel, the boundary relation of the data is disturbed, which causes that the received data is inconsistent with the transmitted data, the data needs to be aligned and recombined at a PCS receiving end, and the boundary of the received data is usually found by detecting comma characters in a data stream.
The traditional PCS can only realize a simple character boundary alignment function, and only a byte boundary is found, but not a data boundary (data is usually composed of a plurality of bytes), so that problems of uncertain positions of comma characters, misplacement of data bytes and the like often occur, and a user needs to additionally write a large number of programs for byte order adjustment and reorganization.
[ summary of the invention ]
The invention aims to provide a data boundary alignment method for a high-speed serial transceiver, which solves the problem that the position of a comma character in received data is uncertain.
To achieve the above object, the present invention provides a data boundary alignment method for a high-speed serial transceiver, the data boundary alignment method comprising:
when the comma character is detected in the data to be detected, re-determining the boundary of the data byte, and outputting the data with the aligned byte boundary;
receiving the data with the aligned byte boundaries, decoding and restoring the data, and outputting decoded data, feedback signals and indication signals;
receiving said indication signal and configured K object values, adjusting the position of the comma characters, and receiving said decoded data and outputting boundary aligned data; alternatively, the comma character is adjusted to the byte0 position, and the decoded data is received and the boundary aligned data is output.
Preferably, said step of re-determining the data byte boundary when the comma character is matched in the data to be detected, and outputting the data after byte boundary alignment further comprises,
and receiving input data, and splicing to form data to be detected.
Preferably, when the comma character is detected in the data to be detected,
and detecting the comma characters in the data to be detected, returning to the step of receiving input data and splicing to form the data to be detected if the comma characters are not detected, re-determining the boundaries of the data bytes if the comma characters are detected, and outputting the data with aligned byte boundaries.
Preferably, the detecting the comma characters in the data to be detected comprises,
and detecting characters completely consistent with the comma characters from the data to be detected according to a bit-by-bit comparison mode.
Preferably, the data boundary alignment method further includes:
and receiving the feedback signal, and when the feedback signal is an invalid data indication signal or a data polarity error indication signal, controlling mode jump and executing the step of re-determining the boundary of the data byte and outputting the data with the byte boundary aligned.
Preferably, the data boundary alignment method further includes:
and receiving and caching the data with the aligned boundary, and outputting the data to a user interface.
The present invention also provides a data boundary alignment system for a high-speed serial transceiver, the data boundary alignment system comprising:
the comma detection and character alignment module is used for re-determining the boundary of the data bytes and outputting the data with the byte boundaries aligned when the comma characters are detected in the data to be detected;
the 8B10B decoder is used for receiving the data after byte boundary alignment, decoding and restoring the data, and outputting decoded data, a feedback signal and an indication signal;
a comma character position adjusting module for receiving said indication signal and configured K object value, adjusting the position of comma character, and receiving said decoded data and outputting boundary aligned data;
and the data boundary alignment module is used for adjusting the comma character to the byte0 position, receiving the decoded data and outputting the boundary-aligned data.
Preferably, the data boundary alignment system further comprises:
and the data processing module is used for receiving the input data and splicing the input data to form the data to be detected.
Preferably, the data boundary alignment system further includes:
and the byte alignment control state machine is used for receiving the feedback signal, and when the feedback signal is an invalid data indication signal or a data polarity error indication signal, controlling mode jump and executing the step of re-determining the boundary of the data byte and outputting the data after byte boundary alignment.
Preferably, the data boundary alignment system further includes:
and the output buffer is used for receiving and buffering the data aligned with the boundary and outputting the data to a user interface.
The invention has the beneficial effects that: a data boundary alignment method is provided, which solves the problems of indeterminate positions of the comma characters in the received data and disordered byte order of the received data by detecting the comma characters, re-determining the boundaries of the data bytes, outputting the data after byte boundary alignment, and further adjusting the positions of the comma characters and outputting the data after boundary alignment.
[ description of the drawings ]
Fig. 1 is a flowchart of a data boundary alignment method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a data boundary alignment method according to a second embodiment of the present invention;
fig. 3 is a flowchart of a data boundary alignment method according to a third embodiment of the present invention;
fig. 4 is a data diagram before data boundary alignment in a scenario one according to a third embodiment of the present invention;
fig. 5 is a data diagram after data boundaries are aligned in a scenario one according to a third embodiment of the present invention;
fig. 6 is a data diagram before data boundary alignment in a scenario two according to a third embodiment of the present invention;
fig. 7 is a data diagram after data boundaries are aligned in a second scenario according to a third embodiment of the present invention;
fig. 8 is a schematic diagram of a data boundary alignment system according to a fifth embodiment of the present invention.
[ detailed description ] embodiments
In order to make the objects, technical solutions and advantages of the present disclosure more clear, the technical solutions of the present disclosure will be clearly and completely described below with reference to the specific embodiments of the present disclosure and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present disclosure, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present specification without any creative effort belong to the protection scope of the present specification. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
The terms "first," "second," and "third," etc. in the description and claims of the present invention and the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "comprises" and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
As shown in fig. 1, an embodiment of the present invention provides a data boundary alignment method for a high-speed serial transceiver, where the data boundary alignment method includes:
s120, when comma characters are detected in the data to be detected, re-determining the boundaries of the data bytes, and outputting the data with the aligned byte boundaries;
s140, receiving the data with the aligned byte boundaries, decoding and restoring the data, and outputting decoded data, feedback signals and indication signals;
s160, receiving the indication signal and the configured comma position value, adjusting the position of the comma character, receiving the decoded data and outputting the data with aligned boundaries; alternatively, the comma character is adjusted to the byte0 position, and the decoded data is received and the boundary aligned data is output.
The data boundary alignment method of the embodiment of the invention, by detecting the comma character, re-determining the boundary of the data bytes, outputting the data after the byte boundary alignment, and further adjusting the position of the comma character and outputting the data with the boundary alignment, solves the problems of uncertain position of the comma character in the received data and disordered byte sequence of the received data.
In this embodiment, since K28.1, K28.5, and K28.7 are used as control characters of the K code in the 8B/10B encoding, they are called "comma"; in any data combination, the comma only appears as a control character and does not appear in the data payload section, so the comma character is used to indicate the start and end flags of the frame.
In one embodiment, in step S120, when the detected comma character in the data to be detected includes the comma character in the data to be detected, the boundary of the data byte is determined again if the comma character is detected, and the data with the aligned byte boundary is output.
Further, the detecting the comma characters in the data to be detected includes detecting characters completely consistent with the comma characters from the data to be detected according to a bit-by-bit comparison mode. Wherein, the positive and negative values of the comma character to be detected are set through the first parameter cfg _ comma _ reg0 and the second parameter cfg _ comma _ reg 1. The first parameter cfg _ comma _ reg0 and the second parameter cfg _ comma _ reg1 represent the same K character (comma character), differing only in polarity.
During bit-by-bit comparison, each bit of the first parameter cfg _ comma _ reg0 and the second parameter cfg _ comma _ reg1 is compared with a bit corresponding to data to be detected simultaneously, the comparison sequence is bit 0-bit 9, after comparison of all bits is finished, if the comparison of 10 bits is consistent, an indication signal is pulled high, and the fact that the comma character detection is successful is indicated; otherwise, if the comparison of 1 or more than one of the 10 bits is inconsistent, the indication signal is pulled down to indicate that the detection of the comma character is unsuccessful, and the next group of data is detected continuously.
In an embodiment, the step S140, after receiving the data after byte boundary alignment, decoding and restoring, and outputting decoded data, a feedback signal, and an indication signal;
s150, receiving the feedback signal, and when the feedback signal is an invalid data indication signal or a data polarity error indication signal, controlling mode jump and executing the step of re-determining the boundary of the data byte and outputting the data with the byte boundary aligned.
In one embodiment, step S160, receiving the indication signal and the configured comma position value, adjusting the position of the comma character, and receiving the decoded data and outputting the boundary-aligned data; alternatively, adjusting the comma character to the byte0 position, and after receiving the decoded data and outputting the boundary-aligned data further comprises:
and S180, receiving the data aligned with the boundary, caching the data, and outputting the data to a user interface.
As shown in fig. 2, a second embodiment of the present invention provides a data boundary alignment method for a high-speed serial transceiver, where the data boundary alignment method includes:
s200, receiving input data, and splicing to form data to be detected;
s220, when the comma character is detected in the data to be detected, re-determining the boundary of the data byte, and outputting the data with the byte boundaries aligned;
s240, receiving the data after the byte boundaries are aligned, decoding and restoring the data, and outputting decoded data, feedback signals and indication signals;
s260, receiving the indication signal and the configured comma position value, adjusting the position of the comma character, receiving the decoding data and outputting the data with aligned boundaries; alternatively, the comma character is adjusted to the byte0 position, and the decoded data is received and the boundary aligned data is output.
In an embodiment, in step S220, when the detected comma character in the data to be detected includes detecting the comma character in the data to be detected, if the comma character is not detected, returning to step S200, receiving input data and splicing the input data to form the data to be detected, and if the comma character is detected, re-determining the boundary of the data byte, and outputting the data with the byte boundary aligned.
Further, the detecting the comma characters in the data to be detected includes detecting characters completely consistent with the comma characters from the data to be detected according to a bit-by-bit comparison mode. Wherein the positive and negative values of the comma characters to be detected are set by the first parameter cfg _ comma _ reg0 and the second parameter cfg _ comma _ reg 1.
During bit-by-bit comparison, each bit of the first parameter cfg _ comma _ reg0 and the second parameter cfg _ comma _ reg1 is compared with a bit corresponding to data to be detected simultaneously, the comparison sequence is bit 0-bit 9, after comparison of all bits is finished, if the comparison of 10 bits is consistent, an indication signal is pulled high, and the fact that the comma character detection is successful is indicated; otherwise, if the comparison of 1 or more than one of the 10 bits is inconsistent, the indication signal is pulled down to indicate that the detection of the comma character is unsuccessful, and the next group of data is detected continuously.
In an embodiment, the step S240 further includes receiving the data after the byte boundary alignment, decoding and restoring, and outputting the decoded data, the feedback signal, and the indication signal;
and S250, receiving the feedback signal, and when the feedback signal is an invalid data indication signal or a data polarity error indication signal, controlling mode jump and executing the step of re-determining the boundary of the data byte and outputting the data with the byte boundary aligned.
In one embodiment, step S260, receiving the indication signal and the configured comma position value, adjusting the position of the comma character, and receiving the decoded data and outputting the boundary-aligned data; alternatively, adjusting the comma character to the byte0 position, and after receiving the decoded data and outputting the boundary-aligned data further comprises:
and S280, receiving the data aligned with the boundary, caching the data, and outputting the data to a user interface.
As shown in fig. 3, a third embodiment of the present invention provides a data boundary alignment method for a high-speed serial transceiver, where the data boundary alignment method includes:
s300, receiving input data, and splicing to form data to be detected.
In an embodiment, the step S300 of receiving input data and splicing to form data to be detected includes: and receiving input data, beating one beat, and splicing to form data to be detected. Specifically, the external input data _ in [39:0] is received and delayed by one beat, and the input data _ in [39:0] is delayed by one clock cycle by one beat, so as to ensure that the time sequence of the input and output interface is correct.
In an embodiment, in step S300, the data to be detected is formed by splicing according to the configured bit width value. Preferably, the configured bit width value includes two modes of 20bit and 40 bit.
For example, when the configured bit width value is 20-bit mode, the 20-bit input data of the current beat is used as high-bit and high-9-bit input data of the last beat is used as low-bit to form 29-bit data to be detected, and the data to be detected is divided into 10 groups of 20-bit data according to bit segments, which are data _ in [19:0], data _ in [20:1], … and data _ in [28:9] in sequence.
S320, when the comma character is detected in the data to be detected, re-determining the boundary of the data byte, and outputting the data with the byte boundaries aligned; when the comma character is not detected in the data to be detected, step S300 is executed again.
In one embodiment, the detection in step S320 is to detect a character completely consistent with a comma character from the data to be detected according to a bit-by-bit comparison method. Wherein, the positive and negative values of the comma characters to be detected are set by the first parameter cfg _ comma _ reg0 and the second parameter cfg _ comma _ reg 1. Further, during bit-by-bit comparison, each bit of the first parameter cfg _ comma _ reg0 and the second parameter cfg _ comma _ reg1 is simultaneously and respectively compared with a bit corresponding to the data to be detected, the comparison sequence is bit 0-bit 9, after comparison of all bits is finished, if the comparison of 10 bits is consistent, an indication signal is pulled up, and the fact that the comma character detection is successful is indicated; otherwise, if the comparison of 1 or more than one of the 10 bits is inconsistent, the indication signal is pulled down to indicate that the detection of the comma character is unsuccessful, and the next group of data is detected continuously.
In one embodiment, the data after byte boundary alignment output in step S320 is to output the position information of the comma character, the comma character detection success indication signal, and the data _ out after byte boundary alignment together.
And S340, receiving the data with the aligned byte boundaries, decoding and restoring, and outputting decoded data, a feedback signal and an indication signal.
Specifically, in decoding recovery, the 8B10B decoder will recognize the validity of data, including data valid and data invalid, the polarity of data, including comma code and data code, and the type of data, including data polarity correct and data polarity error.
The 8B10B decoder has a function of identifying whether the data is correct or incorrect, and the 8B10B codec is a standard protocol and is not described herein again.
The feedback signal includes a code violation code _ visibility signal and a code type code _ type signal; the code violation code _ isolation signal is used to indicate the validity of the data and the polarity of the data, and the code type code _ type signal is used to indicate the type of the data.
The indication signals comprise a first indication signal RXK, a second indication signal RDECE and a third indication signal RDISPE; the first indication signal RXK is used to indicate that the current data is a comma code, the second indication signal RDECE is used to indicate that a decoding error (data invalid) occurs, and the third indication signal RDISPE is used to indicate that a data polarity error occurs.
In one embodiment, the step S340 of receiving the data after byte boundary alignment, performing decoding reduction, and outputting decoded data, a feedback signal, and an indication signal further includes;
and S350, receiving the feedback signal, and when the feedback signal is an invalid data indication signal or a data polarity error indication signal, controlling mode jump and executing the step of re-determining the boundaries of the data bytes and outputting the data with the byte boundaries aligned in the S320.
Wherein, the control mode jump includes 1gb, 10gb, rapid IO and outside.
Further, before outputting the data _ out after the byte boundary alignment, the method further includes, after performing delay waiting, outputting the data after the byte boundary alignment according to the instruction.
Specifically, the delay waiting is determined by 1gb, 10gb, rapid IO and outside state machines, wherein the time difference of each state machine is determined by the state machine according to an upper layer protocol, and the state machine skips according to a comma detection success indication signal and a control signal.
In one embodiment, the method further includes step S355 of detecting a synchronization status signal, and if the synchronization is completed, step S360 is executed, otherwise, step S355 is repeatedly executed.
After the control mode is jumped, a synchronous state signal lsm _ synchronized is output, and if the synchronization is finished, a high level is output.
S360, receiving the indication signal and the configured comma position value k _ location, adjusting the position of the comma character, receiving the decoded data and outputting the data with aligned boundaries; alternatively, the comma character is adjusted to the byte0 position, and the decoded data is received and the boundary aligned data is output.
In this embodiment, if the input data is 32 bits (4 bytes in total, and bytes 3 to 0 in sequence), RXK [ i ] is 1, which indicates that byte i is a comma character, for example: RXK when 1 is defined as 0, the value of k _ location ranges from 0 to 3, indicating that the comma character can be adjusted to the position of 0 to 3 bytes.
In one embodiment, receiving the indication signal and the configured comma position value, adjusting the position of the comma character, and receiving the decoded data and outputting boundary-aligned data in step S360 includes,
and S361, receiving the decoded data and recording by three beats.
And S362, receiving the indication signal and the configured comma position value k _ location, and identifying the position of the comma character in the current data. Specifically, the location of the comma character in the current data is identified based on the outputted first indicator RXK [3:0 ]; if RXK [ i ] is 1, it indicates that the i byte of the current beat data is a comma character.
Here, the steps S361 and S362 may be performed synchronously.
And S363, calculating the offset byte number of the comma character according to the comma position value. Specifically, the offset byte number of the comma character is calculated according to the comma position value k _ location-i, if the calculation result is positive, the comma character needs to be moved to the high position, otherwise, the comma character needs to be moved to the low position.
And S364, carrying out data recombination and splicing on the registered decoding data according to the number of the offset bytes, and outputting the data with aligned boundaries.
Referring to fig. 4 and fig. 5, to correspond to scenario one, the comma character (comma code) before data reassembly is located at the byte0 position (corresponding to K in the figure, where i is 0), and the configured K _ location is 3, so the comma code needs to be adjusted to the position of byte3, and at the same time, D8, D9, and D10 are moved to the lower three bytes of the next beat of data, and other data are similarly moved and reassembled, such as: d14 of data n +1 is moved to the position of byte3, and D11, D12 and D13 are moved to the lower three bytes of data n + 2.
Referring to fig. 6 and fig. 7, in order to correspond to scenario two, a comma character (comma code) before data reassembly is located at the byte3 position (i is 3 at this time), and the configured k _ location is 0, so the comma code needs to be adjusted to the byte0 position of the next beat of data, and at the same time, D8, D9, and D10 are moved to the upper three bytes of the current beat, and other data are similarly moved and reassembled, such as: d11 of the data n +1 is moved to the byte0 position of the data n +2, and D12, D13 and D14 are moved to the upper three bytes of the data n + 1.
In step S360, the indication signal and the configured comma position value are received to adjust the position of the comma character, or adjust the comma character to the byte0 position, and the mode of adjusting the comma character is selected according to the selected alignment mode signal cfg _ data _ align.
And S380, receiving the data aligned with the boundary, caching and outputting the data to a user interface.
Specifically, since the position of the data character has changed, the positions of the indication signals (the first indication signal RXK, the second indication signal RDECE, and the third indication signal RDISPE) are adjusted accordingly, so that the positions of the indication signals are consistent with the data position, after the adjustment is completed, the data and the indication signals with aligned boundaries are combined, the data _ synchronized signal is pulled up after the alignment is completed, and the data is output.
Based on the same inventive concept, a fourth embodiment of the present invention further provides a data boundary alignment system for a high-speed serial transceiver, as in the following embodiments. Since the principle of solving the problem of the data boundary alignment system for the high-speed serial transceiver is similar to that of the data boundary alignment method for the high-speed serial transceiver, the implementation of the data boundary alignment system for the high-speed serial transceiver can refer to the implementation of the data boundary alignment method for the high-speed serial transceiver, and the repeated parts are not described again. As used hereinafter, the terms "unit" or "sub-module" or "module" may implement a combination of software and/or hardware of predetermined functions. While the system described in the embodiments below is preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
The data boundary alignment system includes: a comma detection and character alignment module, an 8B10B decoder, a comma character position adjustment module and a data boundary alignment module.
The comma detection and character alignment module is used for re-determining the boundary of the data bytes and outputting the data with the byte boundaries aligned when the comma characters are detected in the data to be detected; the 8B10B decoder is used for receiving the data after byte boundary alignment, decoding and restoring the data, and outputting decoded data, a feedback signal and an indication signal; a comma character position adjustment module for receiving said indication signal and configured comma position value, adjusting the position of comma character, and receiving said decoded data and outputting boundary aligned data; and the data boundary alignment module is used for adjusting the comma character to the byte0 position, receiving the decoded data and outputting the boundary-aligned data.
In one embodiment, the data boundary alignment system further comprises: and the data processing module is used for receiving the input data and splicing the input data to form the data to be detected.
In one embodiment, the data boundary alignment system further comprises: and the byte alignment control state machine is used for receiving the feedback signal, and when the feedback signal is an invalid data indication signal or a data polarity error indication signal, controlling mode jump and executing the step of re-determining the boundary of the data byte and outputting the data after byte boundary alignment.
Based on the same inventive concept, as shown in fig. 8, a fifth embodiment of the present invention further provides a data boundary alignment system for a high-speed serial transceiver, including: a data processing module, a comma detection and character alignment module, an 8B10B decoder, a comma character position adjustment module, a data boundary alignment module and a byte alignment control state machine.
The data processing module bit _ slip _20b _40b is used for receiving input data and splicing the input data to form data to be detected; the comma detection and character alignment module is used for re-determining the boundary of the data bytes and outputting the data with the byte boundaries aligned when the comma characters are detected in the data to be detected; the 8B10B decoder is used for receiving the data after byte boundary alignment, decoding and restoring the data, and outputting decoded data, a feedback signal and an indication signal; a comma character position adjustment module for receiving said indication signal and configured comma position value, adjusting the position of comma character, and receiving said decoded data and outputting boundary aligned data; a data boundary alignment module for adjusting the comma character to the byte0 position, receiving the decoded data and outputting the boundary aligned data; and the byte alignment control state machine word align is used for receiving the feedback signal, controlling the mode jump and executing the redetermined data byte boundary when the feedback signal is an invalid data indication signal or a data polarity error indication signal, and outputting the data with the byte boundary aligned.
The required byte alignment control state machine can be selected through a state machine mode control signal cfg _ align _ mode, the total number of the state machines is four, namely 1gb, 10gb, rapid IO and outside, the conditions for realizing character alignment of each state machine are different, and the conditions are determined according to the used protocol.
In one embodiment, receiving input data, splicing to form data to be detected, includes: and receiving input data, beating one beat, and splicing to form data to be detected. Specifically, the external input data _ in [39:0] is received and delayed by one beat, and the input data _ in [39:0] is delayed by one clock cycle by one beat, so as to ensure that the time sequence of the input and output interface is correct.
And the data to be detected is formed by splicing according to the configured bit width value. Preferably, the configured bit width value includes two modes of 20bit and 40 bit.
For example, when the configured bit width value is 20-bit mode, the 20-bit input data of the current beat is used as high-bit and high-9-bit input data of the last beat is used as low-bit to form 29-bit data to be detected, and the data to be detected is divided into 10 groups of 20-bit data according to bit segments, which are data _ in [19:0], data _ in [20:1], … and data _ in [28:9] in sequence.
When the comma character is detected in the data to be detected, re-determining the boundary of the data byte, and outputting the data with the aligned byte boundary; and when the comma character is not detected in the data to be detected, re-executing the reception of the input data, and splicing to form the data to be detected.
In one embodiment, the detection is to detect a character completely consistent with a comma character from the data to be detected according to a bit-by-bit comparison mode. Wherein, the positive and negative values of the comma character to be detected are set through the parameter cfg _ comma _ reg0 and the parameter cfg _ comma _ reg 1. Further, during bit-by-bit comparison, each bit of the first parameter cfg _ comma _ reg0 and the second parameter cfg _ comma _ reg1 is simultaneously and respectively compared with a bit corresponding to the data to be detected, the comparison sequence is bit 0-bit 9, after comparison of all bits is finished, if the comparison of 10 bits is consistent, an indication signal is pulled up, and the fact that the comma character detection is successful is indicated; otherwise, if the comparison of 1 or more than one of the 10 bits is inconsistent, the indication signal is pulled down to indicate that the detection of the comma character is unsuccessful, and the next group of data is detected continuously.
In one embodiment, the data after byte boundary alignment output in step S320 is the data _ out after byte boundary alignment output by integrating the positions of the comma characters and the detection results.
Specifically, the validity of data, including data valid and data invalid, the polarity of data, including a comma code and a data code, and the type of data, including data polarity correct and data polarity error, are identified in the decoding recovery.
The feedback signal includes a code violation code _ visibility signal and a code type code _ type signal; the code violation code _ isolation signal is used to indicate the validity of the data and the polarity of the data, and the code type code _ type signal is used to indicate the type of the data.
The indication signals comprise a first indication signal RXK, a second indication signal RDECE and a third indication signal RDISPE; the first indication signal RXK is used to indicate that the current data is a comma code, the second indication signal RDECE is used to indicate that a decoding error (data invalid) occurs, and the third indication signal RDISPE is used to indicate that a data polarity error occurs.
In an embodiment, the method further includes receiving the data after the byte boundary alignment, decoding and restoring, and outputting decoded data, a feedback signal, and an indication signal;
and receiving the feedback signal, and when the feedback signal is an invalid data indication signal or a data polarity error indication signal, controlling mode jump and executing to re-determine the boundary of the data byte, and outputting the data with the byte boundary aligned.
Wherein, the control mode jump includes 1gb, 10gb, rapid IO and outside.
Further, before outputting the data _ out after the byte boundary alignment, the method further includes, after performing delay waiting, outputting the data after the byte boundary alignment according to the instruction.
In one embodiment, the method further comprises detecting a synchronization status signal, performing either an adjustment of the position of the comma character or an adjustment of the comma character to the byte0 position if synchronization is complete, and receiving said decoded data and outputting boundary aligned data.
After the control mode is jumped, a synchronous state signal lsm _ synchronized is output, and if the synchronization is finished, a high level is output.
Receiving the indication signal and the configured comma position value k _ location, adjusting the position of the comma character, and receiving the decoded data and outputting boundary-aligned data; alternatively, the comma character is adjusted to the byte0 position, and the decoded data is received and the boundary aligned data is output.
In this embodiment, if the input data is 32 bits (4 bytes in total, and bytes 3 to 0 in sequence), RXK [ i ] is 1, which indicates that byte i is a comma character, for example: RXK when 1 is defined as 0, the value of k _ location ranges from 0 to 3, indicating that the comma character can be adjusted to the position of 0 to 3 bytes.
In one embodiment, receiving said indication signal and a configured comma position value, adjusting the position of comma characters, and receiving said decoded data and outputting boundary aligned data comprises,
receiving the decoded data and recording the data by three beats.
And receiving the indication signal and the configured comma position value k _ location, and identifying the position of the comma character in the current data. Specifically, the location of the comma character in the current data is identified based on the outputted first indicator RXK [3:0 ]; if RXK [ i ] is 1, it indicates that the i byte of the current beat data is a comma character.
And calculating the offset byte number of the comma character according to the comma position value. Specifically, the offset byte number of the comma character is calculated according to the comma position value k _ location-i, if the calculation result is positive, the comma character needs to be moved to the high position, otherwise, the comma character needs to be moved to the low position.
And performing data recombination and splicing on the registered decoding data according to the number of the offset bytes, and outputting the data with aligned boundaries.
In a first scenario, a comma character (comma code) before data reassembly is located at a byte0 position (corresponding to K in the figure, where i is 0), and configured K _ location is 3, so that the comma code needs to be adjusted to the byte3 position, and at the same time, D8, D9, and D10 are moved to the lower three bytes of the next beat of data, and other data are similarly moved and reassembled, such as: d14 of data n +1 is moved to the position of byte3, and D11, D12 and D13 are moved to the lower three bytes of data n + 2.
In scenario two, the comma character (comma code) before data reassembly is located at byte3 (i is 3 at this time), and the configured k _ location is 0, so the comma code needs to be adjusted to the byte0 of the next beat of data, and at the same time, D8, D9, and D10 are moved to the upper three bytes of the current beat, and other data are similarly moved and reassembled, such as: d11 of the data n +1 is moved to the byte0 position of the data n +2, and D12, D13 and D14 are moved to the upper three bytes of the data n + 1.
Receiving the indication signal and the configured comma position value, adjusting the position of the comma character, or adjusting the comma character to the position of byte0, and selecting the mode of adjusting the comma character according to the selected alignment mode signal cfg _ data _ align, which is specifically realized by a selector XQ. That is, the selector XQ selects a signal output from the comma character position adjustment block or the data boundary alignment block according to the select alignment mode signal cfg _ data _ align and outputs the selected signal to the output buffer.
And the output buffer is used for receiving and buffering the data aligned with the boundary and outputting the data to a user interface.
Specifically, since the position of the data character has changed, the positions of the indication signals (the first indication signal RXK, the second indication signal RDECE, and the third indication signal RDISPE) are adjusted accordingly, so that the positions of the indication signals are consistent with the data position, after the adjustment is completed, the data and the indication signals with aligned boundaries are combined, the data _ synchronized signal is pulled up after the alignment is completed, and the data is output.
While the foregoing is directed to embodiments of the present invention, it will be understood by those skilled in the art that various changes may be made without departing from the spirit and scope of the invention.

Claims (10)

1. A data boundary alignment method for a high-speed serial transceiver, the data boundary alignment method comprising:
when the comma character is detected in the data to be detected, re-determining the boundary of the data byte, and outputting the data with the byte boundaries aligned;
receiving the data with the aligned byte boundaries, decoding and restoring the data, and outputting decoded data, feedback signals and indication signals;
receiving said indication signal and the configured comma position value, adjusting the position of the comma character, and receiving said decoded data and outputting boundary-aligned data; alternatively, the comma character is adjusted to the byte0 position, and the decoded data is received and the boundary aligned data is output.
2. The data boundary alignment method of claim 1, wherein said step of re-determining the boundaries of data bytes when a comma character is matched in the data to be detected, and outputting the data after byte boundary alignment further comprises,
and receiving input data, and splicing to form data to be detected.
3. The data boundary alignment method of claim 2, wherein said detecting a comma character in the data to be detected comprises detecting a comma character in the data to be detected,
and detecting the comma characters in the data to be detected, returning to the step of receiving input data and splicing to form the data to be detected if the comma characters are not detected, re-determining the boundaries of the data bytes if the comma characters are detected, and outputting the data with aligned byte boundaries.
4. The data boundary alignment method of claim 3, wherein said detecting a comma character in said data to be detected comprises,
and detecting characters completely consistent with the comma characters from the data to be detected according to a bit-by-bit comparison mode.
5. The data boundary alignment method of claim 1, further comprising:
and receiving the feedback signal, and when the feedback signal is an invalid data indication signal or a data polarity error indication signal, controlling mode jump and executing the step of re-determining the boundary of the data byte and outputting the data with the byte boundary aligned.
6. The data boundary alignment method of claim 1, further comprising:
and receiving and caching the data with the aligned boundary, and outputting the data to a user interface.
7. A data boundary alignment system for a high speed serial transceiver, the data boundary alignment system comprising:
the comma detection and character alignment module is used for re-determining the boundary of the data bytes and outputting the data with the byte boundaries aligned when the comma characters are detected in the data to be detected;
the 8B10B decoder is used for receiving the data after byte boundary alignment, decoding and restoring the data, and outputting decoded data, a feedback signal and an indication signal;
a comma character position adjustment module for receiving said indication signal and configured comma position value, adjusting the position of comma character, and receiving said decoded data and outputting boundary aligned data;
and the data boundary alignment module is used for adjusting the comma character to the byte0 position, receiving the decoded data and outputting the boundary-aligned data.
8. The data boundary alignment system of claim 7, further comprising:
and the data processing module is used for receiving the input data and splicing the input data to form the data to be detected.
9. The data boundary alignment system of claim 7 further comprising:
and the byte alignment control state machine is used for receiving the feedback signal, controlling mode jump and executing the step of re-determining the boundaries of the data bytes and outputting the data with byte boundary aligned when the feedback signal is an invalid data indication signal or a data polarity error indication signal.
10. The data boundary alignment system of claim 7 further comprising:
and the output buffer is used for receiving and buffering the data aligned with the boundary and outputting the data to a user interface.
CN202110125384.XA 2021-01-29 2021-01-29 Data boundary alignment method and system for high-speed serial transceiver Active CN112968753B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110125384.XA CN112968753B (en) 2021-01-29 2021-01-29 Data boundary alignment method and system for high-speed serial transceiver

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110125384.XA CN112968753B (en) 2021-01-29 2021-01-29 Data boundary alignment method and system for high-speed serial transceiver

Publications (2)

Publication Number Publication Date
CN112968753A CN112968753A (en) 2021-06-15
CN112968753B true CN112968753B (en) 2022-06-10

Family

ID=76273501

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110125384.XA Active CN112968753B (en) 2021-01-29 2021-01-29 Data boundary alignment method and system for high-speed serial transceiver

Country Status (1)

Country Link
CN (1) CN112968753B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113949831B (en) * 2021-10-18 2024-03-29 深圳市视显光电技术有限公司 Method and device for receiving and developing frequency high-speed V-By-One signal based on FPGA

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104333388A (en) * 2014-12-01 2015-02-04 山东华芯半导体有限公司 Serial communication protocol controller, character re-aligning circuit and 8b/10b decoder
CN106933767A (en) * 2017-03-10 2017-07-07 重庆湃芯微电子有限公司 A kind of comma detection and word alignment schemes and system suitable for JESD204B agreements

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW564623B (en) * 2002-02-22 2003-12-01 Via Tech Inc Device and method for comma detection and word alignment in serial transmission
WO2005015864A1 (en) * 2003-08-11 2005-02-17 Koninklijke Philips Electronics, N.V. Auto realignment of multiple serial byte-lanes

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104333388A (en) * 2014-12-01 2015-02-04 山东华芯半导体有限公司 Serial communication protocol controller, character re-aligning circuit and 8b/10b decoder
CN106933767A (en) * 2017-03-10 2017-07-07 重庆湃芯微电子有限公司 A kind of comma detection and word alignment schemes and system suitable for JESD204B agreements

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
示波记录仪中FPGA高速传输接口的设计与应用;贾树林;《中国优秀硕士学位论文全文数据库•信息科技辑》;20200115;全文 *

Also Published As

Publication number Publication date
CN112968753A (en) 2021-06-15

Similar Documents

Publication Publication Date Title
US7305047B1 (en) Automatic lane assignment for a receiver
US8184026B2 (en) Mobile industry processor interface
US9673961B2 (en) Multi-lane N-factorial (N!) and other multi-wire communication systems
CN112968753B (en) Data boundary alignment method and system for high-speed serial transceiver
KR20150133220A (en) Timestamp correction in a multi-lane communication link with skew
CN102546084B (en) Anti-interference error-correcting and sampling system and method in process of receiving asynchronous serial communication data
CN114416626A (en) Asynchronous serial data recovery method based on 8B/10B coding
CN108462620B (en) Gilbert-level SpaceWire bus system
US20150263823A1 (en) Method for using error correction codes with n factorial or cci extension
CN113946526A (en) Multi-channel data binding system and method of high-speed serial bus
US9094911B2 (en) Data communication system, method of optimizing preamble length, and communication apparatus
EP1860815A1 (en) Data transmission method and transmission circuit thereof
JPH10322404A (en) Serial data communication method and system
CN104009823A (en) Malposition detection and error correction circuit in SerDes technology
US20110302464A1 (en) Digital data transmission system using transmitting unit and receiving unit and transmission method
US20210234554A1 (en) Bit inversion for data transmission
CN104702380A (en) Method and device for processing data frames
US8266347B2 (en) Data transmission method and transmission circuit thereof
CN112104537B (en) Communication controller
CN117254894A (en) Method and device for automatically correcting sampling phase of high-speed serial signal and electronic equipment
CN101034949B (en) Correction method for frame number transmission error
CN114726482B (en) SPI data transmission method
JP2001236303A (en) Universal serial bus control circuit
KR100869567B1 (en) Data communication method of wireless usb system
KR20120077018A (en) Method of deskwing lene to lane in pci express and apparatus for the same

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CB03 Change of inventor or designer information

Inventor after: Wang Peining

Inventor after: Huang San

Inventor after: Wen Changqing

Inventor after: Zhang Yong

Inventor before: Huang San

Inventor before: Wen Changqing

Inventor before: Zhang Yong

CB03 Change of inventor or designer information