CN111130560A - High-speed serial-parallel conversion interface word synchronization method and circuit for FPGA chip - Google Patents

High-speed serial-parallel conversion interface word synchronization method and circuit for FPGA chip Download PDF

Info

Publication number
CN111130560A
CN111130560A CN201911398757.XA CN201911398757A CN111130560A CN 111130560 A CN111130560 A CN 111130560A CN 201911398757 A CN201911398757 A CN 201911398757A CN 111130560 A CN111130560 A CN 111130560A
Authority
CN
China
Prior art keywords
signal
serial
word synchronization
parallel
parallel data
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.)
Pending
Application number
CN201911398757.XA
Other languages
Chinese (zh)
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.)
XI'AN INTELLIGENCE SILICON TECHNOLOGY Inc
Original Assignee
XI'AN INTELLIGENCE SILICON TECHNOLOGY Inc
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 XI'AN INTELLIGENCE SILICON TECHNOLOGY Inc filed Critical XI'AN INTELLIGENCE SILICON TECHNOLOGY Inc
Priority to CN201911398757.XA priority Critical patent/CN111130560A/en
Publication of CN111130560A publication Critical patent/CN111130560A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M9/00Parallel/series conversion or vice versa

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The invention discloses a high-speed serial-parallel conversion interface word synchronization method and circuit for an FPGA chip, wherein the method comprises the following steps: converting the received serial data signals into parallel data signals by using a serial-to-parallel conversion module; comparing the parallel data signal with a preset word synchronization character to obtain a word synchronization control signal; according to the word synchronization control signal, repeating word synchronization operation in the serial-parallel conversion process until the parallel data signal is consistent with preset word synchronization characters; and obtaining the correct boundary of the serial data signal, and outputting the parallel data signal which completes word synchronization. The method and the circuit can check and adjust the output parallel data in the serial-parallel conversion process, and output the parallel data after completing word synchronization to the next-stage circuit, thereby avoiding outputting wrong data.

Description

High-speed serial-parallel conversion interface word synchronization method and circuit for FPGA chip
Technical Field
The invention belongs to the technical field of FPGA (field programmable gate array), and particularly relates to a high-speed serial-parallel conversion interface word synchronization method and circuit for an FPGA chip.
Background
Data is typically transferred serially between integrated circuits at high data rates. An integrated circuit receives a serial data signal from another integrated circuit. The receiving integrated circuit may convert serial data in the serial data signal to parallel data to allow digital logic to operate at a slower speed. For example, a receiving integrated circuit may convert an incoming serial data signal into successive bytes or words of parallel data while requiring a conversion from a faster clock domain to a slower byte clock domain.
In the data processing of serial signal input, a receiving end needs to perform various word synchronizations after receiving data for subsequent circuits, for example, the receiving end receives serial data which may be continuous data with 8 bits as a byte, but the receiving end does not know where each byte starts and ends, the receiving end needs to perform serial-to-parallel conversion on the received data, the converted parallel data is used as input data of a later stage, and if the receiving end does not perform word synchronizations, the serial-to-parallel conversion circuit may send an incorrect byte start to other circuits to generate an incorrect input.
Disclosure of Invention
In order to solve the above problems in the prior art, the present invention provides a high-speed serial-parallel conversion interface word synchronization method and circuit for an FPGA chip. The technical problem to be solved by the invention is realized by the following technical scheme:
one aspect of the present invention provides a high-speed serial-parallel conversion interface word synchronization method for an FPGA chip, including:
s1: converting the received serial data signals into parallel data signals by using a serial-to-parallel conversion module;
s2: comparing the parallel data signal with a preset word synchronization character to obtain a word synchronization control signal;
s3: according to the word synchronization control signal, repeating word synchronization operation in the serial-parallel conversion process until the parallel data signal is consistent with preset word synchronization characters;
s4: and obtaining the correct boundary of the serial data signal, and outputting the parallel data signal which completes word synchronization.
In an embodiment of the present invention, the S1 includes:
s11: presetting and storing word synchronization characters;
s12: inputting a double-edge serial data signal, and performing rising edge sampling and falling edge sampling on the double-edge serial data signal to obtain a rising edge sampling signal and a falling edge sampling signal;
s13: and simultaneously carrying out serial-to-parallel conversion on the rising edge sampling signal and the falling edge sampling signal to obtain a group of parallel data signals.
In an embodiment of the present invention, the S13 includes:
s131: shifting the rising edge sampling signal and the falling edge sampling signal for multiple times by using a plurality of shift registers respectively to obtain a plurality of shift data signals;
s132: responding to a selection signal, selecting the plurality of shift data by using a plurality of data selectors, and obtaining a plurality of selection data signals;
s133: responding to an updating signal, performing sampling updating on the plurality of selection data signals and acquiring a plurality of updating data signals;
s134: transmitting the plurality of update data signals as a set of parallel data signals into a comparison module in response to a clock transition signal.
In an embodiment of the present invention, the S2 includes:
comparing whether the parallel data signal is the same as a preset word synchronous character or not, if so, the word synchronous control signal is always at a low level; if not, the word synchronous control signal is pulled up for one clock period.
In an embodiment of the present invention, the S3 includes:
if the parallel data signal is consistent with the word synchronous character, taking the current parallel data signal as a final parallel data signal and outputting the final parallel data signal; if the parallel data signal is not consistent with the word synchronization character, generating a selection signal and an update signal according to the word synchronization control signal, and acquiring another set of parallel data signals of the serial data signal in response to the selection signal and the update signal and repeating the steps S2 and S3.
In an embodiment of the present invention, the S3 further includes:
if the parallel data signal is not consistent with the word synchronization character, the word synchronization control signal is sent to a control module from a comparison module, the control module generates a selection signal and an updating signal according to the word synchronization control signal, controls the current parallel data signal to move to the right by at least one bit, and moves at least one lowest bit of the next group of parallel data to at least one highest bit of the current parallel data to form a second parallel data signal and output the second parallel data signal; comparing whether the second parallel data signal is consistent with the word sync character, repeating steps S2 and S3 until the parallel data signal is consistent with the word sync character.
Another aspect of the present invention provides a high-speed serial-to-parallel conversion interface word synchronization circuit for an FPGA chip, for performing the method of any one of the above embodiments, the circuit comprising a sampling module, a serial-to-parallel conversion module, a comparison module, and a control module, wherein,
the sampling module is used for carrying out rising edge sampling and falling edge sampling on the received double-edge serial data signal to obtain a rising edge sampling signal and a falling edge sampling signal;
the serial-parallel conversion module is connected with the sampling module and the control module, and is used for performing serial-parallel conversion on the rising edge sampling signal and the falling edge sampling signal to obtain a parallel data signal and performing a word synchronization process in the serial-parallel conversion according to a control signal generated by the control module;
the comparison module is connected with the serial-parallel conversion module and used for comparing whether the parallel data signals are consistent with preset word synchronization characters or not and generating word synchronization control signals according to comparison results;
the control module is used for generating a selection signal and an updating signal according to the word synchronization control signal and controlling the serial-parallel conversion module to finally output a parallel data signal consistent with the word synchronization character in a parallel data signal shifting mode.
In one embodiment of the invention, the sampling module comprises a rising edge flip-flop and a falling edge flip-flop, wherein a first input end of the rising edge flip-flop inputs the double-edge serial data signal, a second input end of the rising edge flip-flop inputs a serial clock signal, and an output end of the rising edge flip-flop is connected to the serial-to-parallel conversion module, and the rising edge flip-flop is used for performing rising edge sampling on the double-edge serial data signal;
the first input end of the falling edge trigger inputs the double-edge serial data signal, the second input end of the falling edge trigger inputs a serial clock signal, the output end of the falling edge trigger is connected to the serial-parallel conversion module, and the falling edge trigger is used for carrying out falling edge sampling on the double-edge serial data signal.
In one embodiment of the present invention, the serial-to-parallel conversion module includes a shift register unit, a data selector unit, an update register unit, and a clock domain conversion register unit, which are connected in sequence, wherein,
the shift register unit is used for shifting the rising edge sampling signal and the falling edge sampling signal for multiple times respectively to obtain multiple shift data signals;
the data selector unit is connected with the control module and used for selecting the plurality of shift data signals according to the selection signal from the control module to obtain a plurality of selection data signals;
the updating register unit is connected with the control module and is used for sampling and updating the plurality of selection data signals according to the updating signals from the control module to obtain a plurality of updating data signals;
the clock domain conversion register unit is connected with the control module and used for transmitting the plurality of updating data signals to the comparison module or outputting the updating data signals as parallel data signals according to the frequency division clock signals.
In one embodiment of the present invention, when the parallel data signals are not consistent with the word synchronization character, the comparing module sends a word synchronization control signal to the control module, and the control module generates a selection signal and an update signal according to the word synchronization control signal, controls the current parallel data signal to move to the right by at least one bit, and moves at least one least bit of the next set of parallel data signals to at least one most bit of the current parallel data signals to form a next set of parallel data signals.
Compared with the prior art, the invention has the beneficial effects that:
1. the high-speed serial-parallel conversion interface word synchronization method and circuit for the FPGA chip can check and adjust the output parallel data signals, output the parallel data signals after word synchronization to the next-stage circuit, and avoid outputting wrong data.
2. The high-speed serial-parallel conversion interface word synchronization method and the circuit for the FPGA chip can obtain accurately aligned parallel data through a few slip operations in the serial-parallel conversion process, thereby saving the word synchronization time and improving the word synchronization efficiency.
3. The high-speed serial-parallel conversion interface word synchronization method and circuit for the FPGA chip can be realized simultaneously in the serial-parallel conversion process, do not need a special module to realize word synchronization, and have simple circuit structure.
The present invention will be described in further detail with reference to the accompanying drawings and examples.
Drawings
FIG. 1 is a flow chart of a high-speed serial-to-parallel conversion interface word synchronization method for an FPGA chip according to an embodiment of the present invention;
FIG. 2 is a block diagram of a high speed serial to parallel conversion interface word synchronization circuit for an FPGA chip according to an embodiment of the present invention;
FIG. 3 is another block diagram of a high speed serial to parallel conversion interface word synchronization circuit for an FPGA chip according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a serial-to-parallel conversion module according to an embodiment of the present invention;
fig. 5 is a diagram 1: schematic diagram of parallel data shift process when encountering odd number of slip pulses in mode 10;
FIG. 6 is a diagram illustrating a parallel data shifting process when encountering even number of slip pulses in 1:10 mode according to an embodiment of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description will be made on a high-speed serial-to-parallel conversion interface word synchronization method and circuit for an FPGA chip according to the present invention with reference to the accompanying drawings and the detailed description.
The foregoing and other technical matters, features and effects of the present invention will be apparent from the following detailed description of the embodiments, which is to be read in connection with the accompanying drawings. The technical means and effects of the present invention adopted to achieve the predetermined purpose can be more deeply and specifically understood through the description of the specific embodiments, however, the attached drawings are provided for reference and description only and are not used for limiting the technical scheme of the present invention.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that an article or device that comprises a list of elements does not include only those elements but may include other elements not expressly listed. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of additional like elements in the article or device comprising the element.
Example one
Referring to fig. 1, fig. 1 is a flowchart of a high-speed serial-to-parallel conversion interface word synchronization method for an FPGA chip according to an embodiment of the present invention.
It should be noted that, in order to implement word synchronization, the sending end needs to send a long period of word synchronization characters (the same as the word synchronization character data stored in the comparison module, but serial data at this time) before sending valid data, so that the receiving end has a long enough time to implement word synchronization.
The high-speed serial-parallel conversion interface word synchronization method for the FPGA chip of the embodiment comprises the following steps:
s1: converting the received serial data signals into parallel data signals by using a serial-to-parallel conversion module;
s2: comparing the parallel data signal with a preset word synchronization character to obtain a word synchronization control signal;
s3: according to the word synchronization control signal, repeating word synchronization operation in the serial-parallel conversion process until the parallel data signal is consistent with preset word synchronization characters;
s4: and obtaining the correct boundary of the serial data signal, and outputting the parallel data signal which completes word synchronization.
In the serial-to-parallel conversion process of this embodiment, the receiving end and the sending end add word synchronization characters in order to ensure the integrity of code groups, so as to complete correct segmentation of character strings, that is, the sending end sends the word synchronization characters before sending an effective data packet, if the parallel data output by the receiving end is inconsistent with the word synchronization characters, the receiving end performs word synchronization operation, and the process is circulated until the parallel data output by the receiving end is consistent with the word synchronization characters. The word sync character represents the exact parallel signal that is expected to be obtained after serial-to-parallel conversion of the serial data signal.
Further, the S1 includes:
s11: presetting and storing word synchronization characters;
specifically, a word synchronization character is transmitted before a valid data packet is transmitted at a transmitting end, and the word synchronization character is stored.
S12: inputting a double-edge serial data signal, and performing rising edge sampling and falling edge sampling on the double-edge serial data signal to obtain a rising edge sampling signal and a falling edge sampling signal;
the embodiment performs rising edge sampling and falling edge sampling by the rising edge flip-flop and the falling edge flip-flop, respectively. Specifically, a first input end of the rising edge flip-flop inputs a double-edge serial data signal di, a second input end of the rising edge flip-flop inputs a serial clock signal, and the rising edge flip-flop is configured to perform rising edge sampling on the double-edge serial data signal to obtain a rising edge sampling signal di _ p; the first input end of the falling edge trigger inputs the double-edge serial data signal di, the second input end of the falling edge trigger inputs a serial clock signal, and the falling edge trigger is used for performing falling edge sampling on the double-edge serial data signal to obtain a falling edge sampling signal di _ n.
S13: and simultaneously carrying out serial-to-parallel conversion on the rising edge sampling signal and the falling edge sampling signal to obtain a group of parallel data signals.
Further, the S13 includes:
s131: shifting the rising edge sampling signal and the falling edge sampling signal for multiple times by using a plurality of shift registers respectively to obtain a plurality of shift data signals;
in this embodiment, the plurality of shift registers connected in sequence are used to shift the rising edge sampling signal and the falling edge sampling signal for a plurality of times, that is, each time a sampling signal passes through one shift register, the signal is delayed by one clock cycle. Taking a 1:8 serial-to-parallel conversion (i.e., every 8-bit serial signal is 1 group of parallel data) as an example, 8 shift registers need to be adopted, wherein four shift registers are connected with each other to shift the rising edge sampling signal to obtain four rising edge shift signals, and the four rising edge shift signals respectively have a difference of one clock cycle; and the other four shift registers are connected with each other to shift the falling edge sampling signals to obtain four falling edge shift signals, and the four falling edge shift signals respectively have a difference of one clock period, so that eight shift signals are obtained. It should be noted that the shifting operation of the data by the shift register is a conventional operation, and the specific implementation manner is not described in detail here.
S132: responding to a selection signal, selecting the plurality of shift data by using a plurality of data selectors, and obtaining a plurality of selection data signals;
in this step, the plurality of shift signals obtained in the previous step are transmitted to corresponding data selectors, and the data selectors selectively output the plurality of shift signals.
S133: responding to an updating signal, performing sampling updating on the plurality of selection data signals and acquiring a plurality of updating data signals;
s134: transmitting the plurality of update data signals as a set of parallel data signals into a comparison module in response to a clock transition signal.
Further, the S2 includes:
comparing whether the parallel data signal is the same as a preset word synchronous character or not, if so, the word synchronous control signal is always at a low level; if not, the word synchronous control signal is pulled up for one clock period.
Further, the S3 includes:
if the parallel data signal is consistent with the word synchronous character, taking the current parallel data signal as a final parallel data signal and outputting the final parallel data signal; if the parallel data signal is not consistent with the word synchronization character, generating a selection signal and an update signal according to the word synchronization control signal, and acquiring another set of parallel data signals of the serial data signal in response to the selection signal and the update signal and repeating the steps S2 and S3.
Further, the S3 further includes:
if the parallel data signal is not consistent with the word synchronization character, the word synchronization control signal is sent to a control module from a comparison module, the control module generates a selection signal and an updating signal according to the word synchronization control signal, controls the current parallel data signal to move to the right by at least one bit, and moves at least one lowest bit of the next group of parallel data to at least one highest bit of the current parallel data to form a second parallel data signal and output the second parallel data signal; comparing whether the second parallel data signal is consistent with the word sync character, repeating steps S2 and S3 until the parallel data signal is consistent with the word sync character.
Further, the correct boundary for the conversion of the serial character string to the parallel character is found at this time, and then the word-synchronized parallel data signal is output.
The high-speed serial-parallel conversion interface word synchronization method for the FPGA chip can check and adjust the output parallel data signals, output the parallel data signals after word synchronization to a next-stage circuit and avoid outputting wrong data.
Example two
On the basis of the above embodiments, the present embodiment provides a high-speed serial-to-parallel conversion interface word synchronization circuit for an FPGA chip, which is used to execute the method in the first embodiment.
Referring to fig. 2, fig. 2 is a block diagram of a high-speed serial-to-parallel conversion interface word synchronization circuit for an FPGA chip according to an embodiment of the present invention. The high-speed serial-parallel conversion interface word synchronization circuit comprises a sampling module 101, a serial-parallel conversion module 102, a comparison module 103 and a control module 104, wherein the sampling module 101 is used for performing rising edge sampling and falling edge sampling on a received double-edge serial data signal to obtain a rising edge sampling signal and a falling edge sampling signal; the serial-to-parallel conversion module 102 is connected to the sampling module 101 and the control module 104, and the serial-to-parallel conversion module 102 is configured to perform serial-to-parallel conversion on the rising edge sampling signal and the falling edge sampling signal to obtain a parallel data signal, and perform a word synchronization process in the serial-to-parallel conversion according to a control signal generated by the control module 104; the comparison module 103 is connected to the serial-to-parallel conversion module 102, and configured to compare whether the parallel data signal is consistent with a preset word synchronization character, and generate a word synchronization control signal according to a comparison result; the control module 104 is configured to generate a selection signal and an update signal according to the word synchronization control signal, and control the serial-to-parallel conversion module 102 to finally output a parallel data signal consistent with the word synchronization character in a parallel data signal shifting manner. Preferably, the circuit of this embodiment further comprises a storage module (not shown in the drawings), which is connected to the comparison module 103 and is used for storing the word synchronization character input in advance.
Further, referring to fig. 3, fig. 3 is another block diagram of a high-speed serial-to-parallel conversion interface word synchronization circuit for an FPGA chip according to an embodiment of the present invention. The sampling module 101 comprises a rising edge flip-flop 1011 and a falling edge flip-flop 1012, wherein a first input end of the rising edge flip-flop 1011 inputs a double-edge serial data signal, a second input end of the rising edge flip-flop 1011 inputs a serial clock signal, an output end of the rising edge flip-flop is connected to the serial-to-parallel conversion module 102, and the rising edge flip-flop 1011 is used for performing rising edge sampling on the double-edge serial data signal; the falling edge flip-flop 1012 has a first input terminal for inputting the double-edge serial data signal, a second input terminal for inputting the serial clock signal, and an output terminal connected to the serial-to-parallel conversion module 102, and the falling edge flip-flop 1012 is used for performing falling edge sampling on the double-edge serial data signal.
The embodiment performs rising edge sampling and falling edge sampling by the rising edge flip-flop and the falling edge flip-flop, respectively. Specifically, a first input end of the rising edge flip-flop inputs a double-edge serial data signal di, a second input end of the rising edge flip-flop inputs a serial clock signal, and the rising edge flip-flop is configured to perform rising edge sampling on the double-edge serial data signal to obtain a rising edge sampling signal di _ p; the first input end of the falling edge trigger inputs the double-edge serial data signal di, the second input end of the falling edge trigger inputs a serial clock signal, and the falling edge trigger is used for performing falling edge sampling on the double-edge serial data signal to obtain a falling edge sampling signal di _ n.
Further, please refer to fig. 4, where fig. 4 is a schematic structural diagram of a serial-to-parallel conversion module according to an embodiment of the present invention. The serial-to-parallel conversion module 102 of the present embodiment includes a shift register unit 1021, a data selector unit 1022, an update register unit 1023, and a clock domain conversion register unit 1024, which are connected in sequence.
The shift register unit 1021 is configured to shift the rising edge sampling signal and the falling edge sampling signal for multiple times, respectively, to obtain multiple shifted data signals. In this embodiment, the shift register unit 1021 includes a plurality of shift registers (not shown in the drawings) connected in sequence, and shifts the rising edge sampling signal and the falling edge sampling signal for a plurality of times, respectively, that is, each time a sampling signal passes through one shift register, the signal is delayed by one clock cycle. Taking a 1:10 serial-to-parallel conversion (i.e., each 10-bit serial signal is 1 group of parallel signals), 10 shift registers need to be adopted, wherein five shift registers are connected to shift the rising edge sampling signal to obtain five rising edge shift signals, and the five rising edge shift signals respectively have a difference of one clock cycle; the remaining five shift registers are connected to shift the falling edge sampling signal to obtain five falling edge shift signals, and the five falling edge shift signals are different by one clock cycle each to obtain ten shift signals.
Further, the data selector unit 1022 is connected to the control module 104, and is configured to select the plurality of shift data signals according to a selection signal from the control module 104, so as to obtain a plurality of selection data signals. The data selector unit 1022 of the present example includes a plurality of data selectors, and 10 data selectors are required in the case of serial-to-parallel conversion of 1: 10. Specifically, as shown in fig. 4, the shift register unit 1021 includes 10 shift registers (not shown in the drawing) connected in sequence, and is assumed to be named as a first shift register, a second shift register, a … … ninth shift register and a tenth shift register from top to bottom in the drawing in sequence, where a data input end of the fifth shift register is a rising edge sampling signal, a fourth shift register input end is a fifth shift register output signal, a third shift register input end is a fourth shift register output signal, a second shift register input end is a third shift register output signal, and a first shift register input end is a second shift register output signal, and is used to shift the rising edge sampling signal multiple times; the input end of the sixth shift register is a falling edge sampling signal, the input end of the seventh shift register is a sixth shift register output signal, the input end of the eighth shift register is a seventh shift register output signal, the input end of the ninth shift register is an eighth shift register output signal, and the input end of the tenth shift register is a ninth shift register output signal, which is used for shifting the falling edge sampling signal for multiple times; and the clock inputs of all shift registers are connected to the serial clock signal eclk. Further, the data selector unit 1022 of the present embodiment includes 10 data selectors, which are named as a first data selector, a second data selector …. As shown in the figure, the first input terminal of the first data selector is connected to the output terminal of the first shift register, the first input terminal of the second data selector is connected to the output terminal of the second shift register, the first input terminal of the third data selector is connected to the output terminal of the third shift register, and so on, the first input terminal of the tenth data selector is connected to the output terminal of the tenth shift register; furthermore, a second input terminal of the first data selector is connected to the output terminal of the tenth shift register, a second input terminal of the second data selector is connected to the output terminal of the ninth shift register, a second input terminal of the third data selector is connected to the output terminal of the eighth shift register, a second input terminal of the fourth data selector is connected to the output terminal of the seventh shift register, a second input terminal of the fifth data selector is connected to the output terminal of the sixth shift register, a second input end of the sixth data selector is connected to the output end of the rising edge sampling signal, a second input end of the seventh data selector is connected to the output end of the fifth shift register, a second input end of the eighth data selector is connected to the output end of the fourth shift register, a second input end of the ninth data selector is connected to the output end of the third shift register, and a second input end of the tenth data selector is connected to the output end of the second shift register; the control signal input terminals of all the data selectors are connected to the selection signal output terminal of the control module 104, and are used for receiving a selection signal sel from the control module 104, when the selection signal sel is at a high level, each data selector outputs the data signal input by the second input terminal, and when the selection signal sel is at a low level, each data selector outputs the data signal input by the first input terminal, so that the selected output of the signals is realized.
The update register unit 1023 is connected to the control module 104 and is configured to sample and update the plurality of selection data signals according to the update signal from the control module 104, so as to obtain a plurality of update data signals.
The parallel data signals may be updated at the same time by an update signal update from the control module 104 and transferred to the clock domain conversion register unit 1024. Specifically, when the update signal update is high, and at a clock rising edge, a plurality of data from the data selector unit 1022 are sampled.
The clock domain conversion register unit 1024 is connected to the control module 104, and is configured to sample a plurality of update data signals according to the frequency-divided clock signal sclk and transmit the sampled update data signals as parallel data signals to the comparison module 104 or output the parallel data signals. Specifically, the divided clock signal sclk is a divided clock of the serial clock signal eclk, for example, if 1:4 serial-to-parallel conversion is implemented, 2 division is required, 4 division is required for 1:8, 5 division is required for 1:10, eclk is a clock required for serial data, and sclk is a clock required for parallel data.
Further, the comparing module 103 compares whether the parallel data signal output by the clock domain conversion register unit 1024 is the same as a preset word synchronization character, and if so, it indicates that the current parallel data signal is correct, and transmits the current parallel data signal to a subsequent circuit; if not, the comparing module 103 sends a word synchronization control signal to the control module 104, and the control module 104 generates a selection signal and an update signal according to the word synchronization control signal, controls the current parallel data signal to move to the right by at least one bit, and moves at least one least bit of the next group of parallel data signals to at least one most bit of the current parallel data signals to form a next group of parallel data signal word synchronization characters.
Specifically, if the current parallel data signal is not consistent with the word synchronization character, the comparing module 103 sends a word synchronization control signal slip pulse to the control module 104, and the control module 104 generates a selection signal sel and an update signal update according to the slip pulse, controls the current parallel data signal to move to the right by at least one bit, and moves at least one least bit of the next set of parallel data to at least one most bit of the current parallel data to form a second parallel data signal and output the second parallel data signal; the comparing module 103 continues to compare whether the second parallel data signal is consistent with the word synchronization character, and repeats the above steps until the obtained parallel data signal is consistent with the word synchronization character.
According to different serial-parallel conversion modes, the embodiment is divided into two ways to realize word synchronization:
for the 1:4, 1:8, 1:10 modes: every time a slip pulse is encountered, the output parallel data is shifted to the right by one bit, and the lowest bit of the next group of data is shifted to the highest bit of the current data. Specifically, referring to fig. 5, fig. 5 is a block diagram 1: in the 10 mode, a schematic diagram of a parallel data shift process when encountering odd number of slip pulses takes a 1:10 mode as an example, and the following is a specific implementation manner: when the skip pulse is encountered for odd times, the sel signal is pulled high, the output parallel data is shifted to the right by one bit, and the lowest bit of the next group of data is shifted to the highest bit of the current data; referring to fig. 6, fig. 6 is a schematic diagram of a parallel data shifting process when encountering even number of slip pulses in the 1:10 mode according to the embodiment of the present invention. When even-number slip pulses are encountered, the sel signal is 0, the counter controlling the update signal stops counting for one clock period, the update signal is updated one clock period later, the shift register does not stop, therefore, two-bit data overflow occurs, the lower two bits of the next group of data are complemented, and the sel signal is 0, so that the slip pulses are shifted to the right by one bit compared with odd-number slip pulses.
For the 1:7 mode: every time a slip pulse is encountered, the output parallel data is shifted to the right by two bits, and the lower two bits of the next group of data are shifted to the upper two bits of the current data. When a slip pulse is encountered, the counter controlling the update signal stops counting for one clock cycle, the update signal is updated one clock cycle later, and the shift register does not stop, so that two bits of data overflow, and the lower two bits of the next group of data complement.
Next, taking the 1:7 mode as an example, comparing the serial-to-parallel conversion method of the present embodiment with the serial-to-parallel conversion method of the prior art, please refer to table 1 and table 2, where table 1 is a list of parallel data loop numbers for implementing word synchronization in the prior 1:7 mode, and table 2 is a list of parallel data loop numbers for implementing word synchronization in the embodiment 1:7 mode of the present invention. As can be seen from comparison between table 1 and table 2, for the serial-to-parallel conversion method in the prior art, 9 slip operations are required at most when 1:7 is implemented, and only 7 slip operations are required at most when 1:7 is implemented in the embodiment of the present invention, which indicates that the circuit and the method in the embodiment of the present invention can save serial-to-parallel conversion time and improve serial-to-parallel conversion efficiency.
TABLE 1 parallel data cycle number List with existing 1:7 mode for word synchronization
Operation performed by slip Output mode (1:7)
Initial [6][5][4][3][2][1][0]
1 [0][6][5][4][3][2][1]
2 [4][3][2][1][0][6][5]
3 [5][4][3][2][1][0][6]
4 [2][1][0][6][5][4][3]
5 [3][2][1][0][6][5][4]
6 [0][6][5][4][3][2][1]
7 [1][0][6][5][4][3][2]
8 [5][4][3][2][1][0][6]
9 [6][5][4][3][2][1][0]
Table 2 list of parallel data loop numbers for word synchronization according to embodiment 1:7 of the present invention
Operation performed by slip Output mode (1:7)
Initial [6][5][4][3][2][1][0]
1 [1][0][6][5][4][3][2]
2 [3][2][1][0][6][5][4]
3 [5][4][3][2][1][0][6]
4 [0][6][5][4][3][2][1]
5 [2][1][0][6][5][4][3]
6 [4][3][2][1][0][6][5]
7 [6][5][4][3][2][1][0]
In summary, the high-speed serial-parallel conversion interface word synchronization method and circuit for the FPGA chip of the embodiment can obtain accurately aligned parallel data through a few slip operations in the serial-parallel conversion process, so that the word synchronization efficiency can be improved. The high-speed serial-parallel conversion interface word synchronization method for the FPGA chip can be simultaneously realized in the serial-parallel conversion process, does not need a special module to realize word synchronization, has a simple circuit structure, and can improve the word synchronization efficiency.
The foregoing is a more detailed description of the invention in connection with specific preferred embodiments and it is not intended that the invention be limited to these specific details. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (10)

1. A high-speed serial-parallel conversion interface word synchronization method for an FPGA chip is characterized by comprising the following steps:
s1: converting the received serial data signals into parallel data signals by using a serial-to-parallel conversion module;
s2: comparing the parallel data signal with a preset word synchronization character to obtain a word synchronization control signal;
s3: according to the word synchronization control signal, repeating word synchronization operation in the serial-parallel conversion process until the parallel data signal is consistent with preset word synchronization characters;
s4: and obtaining the correct boundary of the serial data signal, and outputting the parallel data signal which completes word synchronization.
2. The high-speed serial-to-parallel conversion interface word synchronization method for the FPGA chip as recited in claim 1, wherein said S1 comprises:
s11: presetting and storing word synchronization characters;
s12: inputting a double-edge serial data signal, and performing rising edge sampling and falling edge sampling on the double-edge serial data signal to obtain a rising edge sampling signal and a falling edge sampling signal;
s13: and simultaneously carrying out serial-to-parallel conversion on the rising edge sampling signal and the falling edge sampling signal to obtain a group of parallel data signals.
3. The high-speed serial-to-parallel conversion interface word synchronization method for the FPGA chip as recited in claim 2, wherein said S13 comprises:
s131: shifting the rising edge sampling signal and the falling edge sampling signal for multiple times by using a plurality of shift registers respectively to obtain a plurality of shift data signals;
s132: responding to a selection signal, selecting the plurality of shift data by using a plurality of data selectors, and obtaining a plurality of selection data signals;
s133: responding to an updating signal, performing sampling updating on the plurality of selection data signals and acquiring a plurality of updating data signals;
s134: transmitting the plurality of update data signals as a set of parallel data signals into a comparison module in response to a clock transition signal.
4. The high-speed serial-to-parallel conversion interface word synchronization method for the FPGA chip as recited in claim 3, wherein the S2 comprises:
comparing whether the parallel data signal is the same as a preset word synchronous character or not, if so, the word synchronous control signal is always at a low level; if not, the word synchronous control signal is pulled up for one clock period.
5. The high-speed serial-to-parallel conversion interface word synchronization method for the FPGA chip as recited in claim 4, wherein the S3 comprises:
if the parallel data signal is consistent with the word synchronous character, taking the current parallel data signal as a final parallel data signal and outputting the final parallel data signal; if the parallel data signal is not consistent with the word synchronization character, generating a selection signal and an update signal according to the word synchronization control signal, and acquiring another set of parallel data signals of the serial data signal in response to the selection signal and the update signal and repeating the steps S2 and S3.
6. The high-speed serial-to-parallel conversion interface word synchronization method for the FPGA chip as recited in claim 5, wherein said S3 further comprises:
if the parallel data signal is not consistent with the word synchronization character, the word synchronization control signal is sent to a control module from a comparison module, the control module generates a selection signal and an updating signal according to the word synchronization control signal, controls the current parallel data signal to move to the right by at least one bit, and moves at least one lowest bit of the next group of parallel data to at least one highest bit of the current parallel data to form a second parallel data signal and output the second parallel data signal; comparing whether the second parallel data signal is consistent with the word sync character, repeating steps S2 and S3 until the parallel data signal is consistent with the word sync character.
7. A high speed serial to parallel conversion interface word synchronization circuit for FPGA chips for performing the method of any of claims 1 to 6, characterized in that the circuit comprises a sampling module (101), a serial to parallel conversion module (102), a comparison module (103) and a control module (104), wherein,
the sampling module (101) is used for carrying out rising edge sampling and falling edge sampling on the received double-edge serial data signal to obtain a rising edge sampling signal and a falling edge sampling signal;
the serial-parallel conversion module (102) is connected with the sampling module (101) and the control module (104), and the serial-parallel conversion module (102) is used for performing serial-parallel conversion on the rising edge sampling signal and the falling edge sampling signal to obtain parallel data signals and performing a word synchronization process in serial-parallel conversion according to a control signal generated by the control module (104);
the comparison module (103) is connected with the serial-parallel conversion module (102) and is used for comparing whether the parallel data signal is consistent with a preset word synchronization character or not and generating a word synchronization control signal according to a comparison result;
the control module (104) is used for generating a selection signal and an updating signal according to the word synchronization control signal, and controlling the serial-parallel conversion module (102) to finally output a parallel data signal consistent with the word synchronization character in a parallel data signal shifting mode.
8. The high-speed serial-to-parallel conversion interface word synchronization circuit for the FPGA chip according to claim 7, wherein the sampling module (101) comprises a rising edge flip-flop (1011) and a falling edge flip-flop (1012), wherein the rising edge flip-flop (1011) has a first input end inputting the double-edge serial data signal, a second input end inputting a serial clock signal, and an output end connected to the serial-to-parallel conversion module (102), and the rising edge flip-flop (1011) is used for sampling the double-edge serial data signal with a rising edge;
the falling edge trigger (1012) has a first input end for inputting the double-edge serial data signal, a second input end for inputting a serial clock signal, and an output end connected to the serial-to-parallel conversion module (102), and the falling edge trigger (1012) is used for performing falling edge sampling on the double-edge serial data signal.
9. The high speed serial to parallel conversion interface word synchronization circuit for FPGA chips of claim 8, characterized in that, the serial to parallel conversion module (102) comprises a shift register unit (1021), a data selector unit (1022), an update register unit (1023) and a clock domain conversion register unit (1024) connected in sequence, wherein,
the shift register unit (1021) is used for shifting the rising edge sampling signal and the falling edge sampling signal for multiple times respectively to obtain multiple shift data signals;
the data selector unit (1022) is connected to the control module (104) and is configured to select the plurality of shift data signals according to a selection signal from the control module (104) to obtain a plurality of selection data signals;
the update register unit (1023) is connected with the control module (104) and is used for sampling and updating the plurality of selection data signals according to the update signals from the control module (104) to obtain a plurality of update data signals;
the clock domain conversion register unit (1024) is connected with the control module (104) and is used for transmitting the plurality of updating data signals to the comparison module (104) or outputting the updating data signals as parallel data signals according to the frequency division clock signal.
10. The high speed serial to parallel conversion interface word synchronization circuit for the FPGA chip according to any one of claims 7 to 9, wherein when the parallel data signal is not consistent with the word synchronization character, the comparison module (103) sends a word synchronization control signal to the control module (104), the control module (104) generates a selection signal and an update signal according to the word synchronization control signal, controls a current parallel data signal to shift to the right by at least one bit, and shifts at least one least bit of a next set of parallel data signals to at least one most bit of the current parallel data signal to form a next set of parallel data signals.
CN201911398757.XA 2019-12-30 2019-12-30 High-speed serial-parallel conversion interface word synchronization method and circuit for FPGA chip Pending CN111130560A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911398757.XA CN111130560A (en) 2019-12-30 2019-12-30 High-speed serial-parallel conversion interface word synchronization method and circuit for FPGA chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911398757.XA CN111130560A (en) 2019-12-30 2019-12-30 High-speed serial-parallel conversion interface word synchronization method and circuit for FPGA chip

Publications (1)

Publication Number Publication Date
CN111130560A true CN111130560A (en) 2020-05-08

Family

ID=70505543

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911398757.XA Pending CN111130560A (en) 2019-12-30 2019-12-30 High-speed serial-parallel conversion interface word synchronization method and circuit for FPGA chip

Country Status (1)

Country Link
CN (1) CN111130560A (en)

Similar Documents

Publication Publication Date Title
US5247652A (en) Parallel to serial converter enabling operation at a high bit rate with slow components by latching sets of pulses following sequential delays equal to clock period
US7675439B2 (en) Serial/parallel data conversion apparatus and method thereof
US6768431B2 (en) Serial-to-parallel data converter and method of conversion
EP0313875A2 (en) Serializer deserializer circuit
CN211046907U (en) High-speed serial-parallel conversion interface word synchronous circuit for FPGA chip
CN1449119A (en) Serializer-deserializer circuit possessing enlarged building-up and retention time tolerance
CN101849381A (en) Clockless serialization using delay circuits
EP1096506B1 (en) Shift register allowing direct data insertion
CN111262559B (en) Delay line circuit with correction function and correction method thereof
US7924185B2 (en) Semiconductor integrated circuit device, pattern detection method and serial-parallel conversion method
CN111130560A (en) High-speed serial-parallel conversion interface word synchronization method and circuit for FPGA chip
US6898722B2 (en) Parallel data transfer method and system of DDR divided data with associated transfer clock signal over three signal lines
US7440532B1 (en) Bit slip circuitry for serial data signals
US9246507B2 (en) Analogue to digital conversion device
CN111211774A (en) Bounce removing circuit
US7958279B2 (en) Asynchronous serial data apparatus for transferring data between one transmitter and a plurality of shift registers, avoiding skew during transmission
CN111030695B (en) Delay time configuration method and system based on analog-to-digital conversion
CN112821889B (en) Output control circuit, data transmission method and electronic equipment
US3472956A (en) Synchronizing circuit for a receiving distributor
CN107241101B (en) Data serializing circuit
CN117112030B (en) Register set address automatic accumulation circuit and application method
CN109525241B (en) Gray code counter
US5331668A (en) Communication control device
US11757453B2 (en) Multi-bit gray code generation circuit
JP4945800B2 (en) Demultiplexer circuit

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