Bidirectional serial communication system and method
By using differential interface and enable channel control module in the bidirectional serial communication system, the transmission channel and data processing unit are configured, and the problem of fixed transmission channel and uncustomizable data format of the TMDS interface is solved, and flexible bidirectional communication and high efficiency are achieved. Data transmission.
Patent Information
- Application Number
- CN202410880058.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-11-15
AI Technical Summary
The number of transmission channels of the existing TMDS interface is fixed, and bidirectional transmission cannot be achieved. The data format and size cannot be customized, resulting in poor communication diversity and flexibility.
Design a two-way serial communication system, connect two data transceiver modules through a differential interface, configure the transmission channel using the enable channel control module, realize the flexibility of data transmission direction, and generate data frames, parallel to serial, single-ended rotation Differential, differential to single-ended, serial to parallel, and data analysis units carry out data packaging and analysis, and customize data transmission format and size.
Two-way communication is realized, the flexibility and diversity of data transmission is improved, and it is suitable for the needs of different users and enhances data transmission efficiency.
Smart Images

Figure CN118972203A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of serial communication, and in particular to a bidirectional serial communication system and method. Background Art
[0002] In the prior art, the TMDS interface of traditional applications includes four fixed transmission channels, and the number of transmission channels is fixed. All transmission channels can only realize unidirectional data transmission at the same time, and the transmission data format is fixed to 10 bits and cannot be changed. Special encoding and decoding of the signal is required, resulting in the inability to customize the data transmission format and size, and poor communication diversity and flexibility. Summary of the invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention provides a bidirectional serial communication system and method, which can customize the data transmission format and improve the diversity and flexibility of communication.
[0004] In a first aspect, an embodiment of the present invention provides a bidirectional serial communication system, including:
[0005] A first data transceiver module;
[0006] a second data transceiver module, wherein the second data transceiver module is connected to the first data transceiver module through a differential interface, a transmission channel is provided between the second data transceiver module and the first data transceiver module, and the first data transceiver module and the second data transceiver module perform data transmission through the transmission channel;
[0007] The first data transceiver module is provided with a first enabling channel control module, and the second data transceiver module is provided with a second enabling channel control module. The first enabling channel control module and the second enabling channel control module are used to configure the transmission channel according to configuration parameters to determine the direction of data transmission.
[0008] In some embodiments of the present invention, the transmission channel includes:
[0009] A data frame generation unit, used for packaging transmission data;
[0010] A parallel-to-serial unit, used for converting the packaged transmission data into first single-ended serial data;
[0011] A single-ended to differential conversion unit, used for converting the first single-ended serial data into differential data;
[0012] A differential to single-ended unit, configured to receive the differential data through the differential interface and convert the differential data into second single-ended serial data;
[0013] A serial-to-parallel unit, used for converting the second single-ended serial data into parallel data;
[0014] The data parsing unit is used to parse the parallel data to obtain a data parsing result, and determine the validity of the transmission data according to the parsing result.
[0015] In some embodiments of the present invention, the data frame generation unit, the parallel-to-serial unit, and the single-ended-to-differential unit are arranged in the first data transceiver module, and the differential-to-single-ended unit, the serial-to-parallel unit and the data parsing unit are arranged in the second data transceiver module; or, the data frame generation unit, the parallel-to-serial unit, the single-ended-to-differential unit are arranged in the second data transceiver module, and the differential-to-single-ended unit, the serial-to-parallel unit and the data parsing unit are arranged in the first data transceiver module.
[0016] In some embodiments of the present invention, the data frame generation unit and the parallel-to-serial unit are arranged in the first data transceiver module, the input end of the single-ended to differential unit is electrically connected to the output end of the first data transceiver module, the output end of the single-ended to differential unit is electrically connected to the input end of the differential to single-ended unit, the output end of the differential to single-ended unit is electrically connected to the input end of the second data transceiver module, and the serial-to-parallel unit and the data parsing unit are arranged in the second data transceiver module; or, the data frame generation unit and the parallel-to-serial unit are arranged in the second data transceiver module, the input end of the single-ended to differential unit is electrically connected to the output end of the second data transceiver module, the output end of the single-ended to differential unit is electrically connected to the input end of the differential to single-ended unit, the output end of the differential to single-ended unit is electrically connected to the input end of the first data transceiver module, and the serial-to-parallel unit and the data parsing unit are arranged in the first data transceiver module.
[0017] In a second aspect, an embodiment of the present invention provides a bidirectional serial communication system, including:
[0018] A first data transceiver module;
[0019] a second data transceiver module, wherein the second data transceiver module is connected to the first data transceiver module through a differential interface, a transmission channel is provided between the second data transceiver module and the first data transceiver module, and the first data transceiver module and the second data transceiver module perform data transmission through the transmission channel;
[0020] The first data transceiver module is provided with a first input-output control module, and the second data transceiver module is provided with a second input-output control module, and the first input-output control module and the second input-output control module are used to configure the transmission channel according to the configuration parameters to determine the direction of data transmission;
[0021] The first data transceiver module includes a first data frame generation unit, a first parallel-to-serial unit, a first differential-to-single-ended / single-ended-to-differential unit, a first serial-to-parallel unit, and a first data parsing unit connected in sequence; the second data transceiver module includes a second data frame generation unit, a second parallel-to-serial unit, a second single-ended-to-differential / differential-to-single-ended unit, a second serial-to-parallel unit, and a second data parsing unit connected in sequence; the first single-ended-to-differential / differential-to-single-ended unit is electrically connected to the second single-ended-to-differential / differential-to-single-ended unit through the differential interface, the first enabling channel control module is used to switch the first single-ended-to-differential / differential-to-single-ended unit to a single-ended-to-differential state or a differential-to-single-ended state, and the second enabling channel control module is used to switch the second single-ended-to-differential / differential-to-single-ended unit to a differential-to-single-ended state or a single-ended-to-differential state.
[0022] In a third aspect, an embodiment of the present invention provides a serial communication method, which is applied to the bidirectional serial communication system described in the first aspect, including:
[0023] The first enabling channel control module and the second enabling channel control module configure the transmission channel according to the configuration parameters to determine the direction of data transmission;
[0024] When the direction of the data transmission is the first direction, the first data transceiver module converts the transmission data into serial output data, and sends the output data to the second data transceiver module through the differential interface;
[0025] The second data transceiver module analyzes the output data to determine the validity of the output data;
[0026] Alternatively, when the direction of the data transmission is the second direction, the second data transceiver module converts the transmission data into serial output data, and sends the output data to the first data transceiver module through the differential interface;
[0027] The first data transceiver module analyzes the output data to determine the validity of the output data.
[0028] In some embodiments of the present invention, the first data transceiver module converts the transmission data into serial output data, and sends the output data to the second data transceiver module through a differential interface, including:
[0029] The data frame generation unit performs packaging processing on the transmission data;
[0030] Converting the packaged transmission data into first serial single-ended data;
[0031] The serial single-ended data is converted into differential data, and the differential data is sent to the second data transceiver module through the differential interface.
[0032] In some embodiments of the present invention, the second data transceiver module parses the output data to determine the validity of the output data, including:
[0033] Converting the differential data into second serial single-ended data;
[0034] converting the second serial single-ended data into parallel data;
[0035] The parallel data is parsed to obtain a data parsing result, and the validity of the output data is determined according to the parsing result.
[0036] In some embodiments of the present invention, the data frame generation unit performs packaging processing on the transmission data, including:
[0037] Adding a start frame and an end frame to the transmission data, and determining check data of the transmission data;
[0038] The transmission data is packaged according to the start frame, the end frame, and the verification data.
[0039] In some embodiments of the present invention, parsing the parallel data to obtain a data parsing result, and determining the validity of the output data according to the parsing result includes:
[0040] Determine whether the parallel data has the start frame and the end frame;
[0041] When the parallel data has the start frame and the end frame, decoding the parallel data to obtain valid data;
[0042] Performing calculation verification on the valid data to obtain calculation verification data;
[0043] When the calculated verification data is consistent with the verification data, the valid data is correct.
[0044] The bidirectional serial communication method and system according to the embodiments of the present invention have at least the following beneficial effects:
[0045] A first data transceiver module; a second data transceiver module, the second data transceiver module is connected to the first data transceiver module through a differential interface, a transmission channel is set between the second data transceiver module and the first data transceiver module, and the first data transceiver module and the second data transceiver module transmit data through the transmission channel; the first data transceiver module is provided with a first enabling channel control module, and the second data transceiver module is provided with a second enabling channel control module, and the first enabling channel control module and the second enabling channel control module are used to configure the transmission channel according to the configuration parameters to determine the direction of data transmission. According to the technical solution of the present invention, by abandoning the traditional TMDS interface, multiple enabling channels and transmission channels are configured and changed through the enabling channel control module, so as to realize two-way communication, and the data transmission format and size can be customized, which is suitable for the diversity and flexibility of different users and improves the data transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 is an overall structural block diagram of a bidirectional serial communication system provided by an embodiment of the present invention;
[0047] Figure 2 It is a structural block diagram of a bidirectional serial communication system provided by an embodiment of the present invention and provided with a differential chip;
[0048] Figure 3 is a structural block diagram of a bidirectional serial communication system switching input and output links provided by another embodiment of the present invention;
[0049] Figure 4 is a flow chart of a bidirectional serial communication method provided by an embodiment of the present invention;
[0050] Figure 5 is a flow chart of sending output data to a second data transceiver module through a differential interface provided by an embodiment of the present invention;
[0051] Figure 6 It is a flow chart of a second data transceiver module provided by an embodiment of the present invention parsing output data to determine the validity of the output data;
[0052] Figure 7 It is a flow chart of a data frame generation unit providing a data frame according to an embodiment of the present invention performing packaging processing on transmission data;
[0053] Figure 8 It is a flowchart of determining the validity of output data according to the analysis results provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0054] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0055] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0056] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0057] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0058] Reference Figure 1 The embodiment of the present invention provides a bidirectional serial communication system, including a first data transceiver module 100; a second data transceiver module 200, the second data transceiver module 200 is connected to the first data transceiver module 100 through a differential interface, a transmission channel 300 is provided between the second data transceiver module 200 and the first data transceiver module 100, and the first data transceiver module 100 and the second data transceiver module 200 perform data transmission through the transmission channel 300; the first data transceiver module 100 is provided with a first enabling channel control module 110, and the second data transceiver module 200 is provided with a second enabling channel control module 210, and the first enabling channel control module 110 and the second enabling channel control module 210 are used to configure the transmission channel 300 according to the configuration parameters to determine the direction of data transmission. According to the technical solution of the present invention, the traditional TMDS interface is abandoned, and multiple enabling channels and the transmission channel 300 are configured and changed through the enabling channel control module, so as to realize bidirectional communication, and the data transmission format and size can be customized, which is suitable for the diversity and flexibility of different users and improves the data transmission efficiency.
[0059] The transmission channel 300 includes a data frame generation unit 310, which is used to package the transmission data; a parallel-to-serial unit 320, which is used to convert the packaged transmission data into first single-ended data; a single-ended-to-differential unit 330, which is used to convert the first serial single-ended data into differential data; a differential-to-single-ended unit 340, which is used to receive differential data through a differential interface and convert the differential data into second single-ended serial data; a serial-to-parallel unit 350, which is used to convert the second single-ended signal into parallel data; and a data parsing unit 360, which parses the parallel data to obtain a data parsing result, and determines the validity of the transmission data according to the parsing result.
[0060] It should be noted that the data frame generation unit 310 is used to package the data DATA_A / B to be transmitted, wherein the data frame generation unit 310 packages the input data and inputs it to the parallel-to-serial unit 320, and the parallel-to-serial unit 320 converts the transmission data into the first single-ended serial data, wherein the first single-ended serial data is 1-bit DDR serial data, and the single-ended to differential signal converts the first single-ended serial data into differential data. Specifically, when the input signal is A, A is directly output as the output signal Q+, and A is inverted once and output as the output signal Q-, and the differential to single-ended unit 340 converts the differential data into the second single-ended serial signal, the input signals are A+ and A-, and the output signal is Y. Specifically, when A+ is positive and A- is negative, the output signal Y is 1; when A+ is negative and A- is positive, the output signal Y is 0. In this embodiment, a programmable logic device FPGA or PLD is used to implement it. The serial-to-parallel unit 350 is used to convert the second serial data into parallel data and output the parallel data to the input end of the data parsing unit 360 ; the data parsing module parses the parallel data output by the serial-to-parallel unit 350 .
[0061] Furthermore, the first enabling channel control module 110 and the second enabling channel control module 210 send enabling configuration signals to each transmission channel 300 and enabling channel according to the configuration parameters, and control Enable and Disable signals of each transmission channel 300, so that the transmission channel 300 is configurable and modifiable.
[0062] Furthermore, the first data transceiver module 100 and the second data transceiver module 200 connect each unit according to the transmission and reception sequence of the transmission data. The transmission data DATA_A sent by the first data transceiver module 100 can be data of any length and any format.
[0063] The data frame generation unit 310, the parallel-to-serial unit 320, and the single-ended-to-differential unit 330 are arranged in the first data transceiver module 100, and the differential-to-single-ended unit 340, the serial-to-parallel unit 350 and the data parsing unit 360 are arranged in the second data transceiver module 200; or, the data frame generation unit 310, the parallel-to-serial unit 320, the single-ended-to-differential unit 330 are arranged in the second data transceiver module 200, and the differential-to-single-ended unit 340, the serial-to-parallel unit 350 and the data parsing unit 360 are arranged in the first data transceiver module 100.
[0064] It should be noted that, by performing different unit configurations in the first data transceiver module 100 and the second data transceiver module, when the first data transceiver module 100 and the second data transceiver module 200 are connected to each other, the transmission data from different sources are converted through the data frame generation unit 310, the parallel-to-serial unit 320, the single-ended-to-differential unit 330, the differential-to-single-ended unit 340, the serial-to-parallel unit 350 and the data parsing unit 360, thereby completing the bidirectional serial communication of the transmission data. During the data transmission process, the first channel enable control module 110 and the second channel enable control module 210 send an enable configuration signal to each transmission channel 300, so as to configure and change the transmission channel 300.
[0065] Reference Figure 1 , when the first data transceiver module transmits data to the second data transceiver module, the specific process is as follows:
[0066] The input end of the data frame generation unit 310 receives the first data DATA_A to be transmitted by the user, and the data frame generation unit 310 adds a start frame SOF, an end frame EOF, and calculates the check data (CHS) to the data DATA_A to form a data packet. The output end of the data frame generation unit 310 is connected to the input end of the parallel-to-serial unit 320, and the parallel-to-serial unit 320 converts the transmission data into the first single-ended serial data, wherein the first single-ended serial data is 1-bit DDR data. The output end of the parallel-to-serial unit 320 is connected to the input end of the single-ended to differential unit 330, and the single-ended to differential unit 330 converts the first single-ended serial data into a phase-complementary differential signal. The single-ended to differential unit 330 outputs differential signals Channel lX+ and Channel lX- (X is 1 to N). Among them, the first differential signal Channel lX+ and the second differential signal Channel lX- can be transmitted using TMDS differential cables, thereby effectively suppressing the noise interference of the ground plane and achieving lower bit error rate data transmission.
[0067] The first differential signal Channel lX+ and the second differential signal Channel lX- are input to the input end of the second differential to single-ended unit 340 of the second data transceiver module 200 and connected. The second differential to single-ended unit 340 converts the first differential signal and the second differential signal with complementary phases into second single-ended serial data, wherein the second single-ended serial data is 1-bit DDR serial data. The output end of the differential to single-ended unit 340 is connected to the input end of the serial-to-parallel unit 350. The serial-to-parallel unit 350 converts the second serial data into parallel data by shifting. The output end of the serial-to-parallel unit 350 is connected to the input end of the data parsing unit 360. The data parsing unit 360 parses the input parallel data, firstly judging whether the parallel data is a start frame SOF or an end frame EOF. If it is a start frame SOF, data decoding is performed to obtain valid data. If it is an end frame EOD, it indicates the end of valid data. Then, the check data (CHS) is calculated according to the obtained valid data. If the calculated check data is consistent with the check data in the transmission data packet, it indicates that the obtained valid data is correct, and the data is output. The output data DATA_AA of the data parsing unit 360 is the valid data DATA_A sent by the first data transmission module.
[0068] The specific process when the second data transceiver module 200 transmits data to the first transceiver module is as follows:
[0069] The input end of the data frame generation unit 310 is connected to the second data DATA_B to be transmitted by the user. The data frame generation unit 310 adds a start frame SOF, an end frame EOF and calculates the check data (CHS) to the data DATA_B to form a data packet. The output end of the data frame generation unit 310 is connected to the input end of the parallel-to-serial unit 320. The parallel-to-serial unit 320 converts the transmission data into a first single-ended serial data, wherein the first single-ended serial data is 1-bit DDR data. The output end of the parallel-to-serial unit 320 is connected to the input end of the single-ended to differential unit 330. The single-ended to differential unit 330 converts the first single-ended serial data into a phase-complementary differential signal. The single-ended to differential unit 330 outputs differential signals Channel lX+ and Channel lX- (X is 1 to N). The first differential signal Channel l X+ and the second differential signal Channel l X- are transmitted using TMDS differential cables, which effectively suppresses the noise interference of the ground plane and achieves data transmission with a lower bit error rate.
[0070] The first differential signal Channel lX+ and the second differential signal Channel lX- are input to the input end of the differential-to-single-ended unit 340 of the second data transceiver module 200 and connected. The differential-to-single-ended unit 340 converts the first differential signal and the second differential signal with complementary phases into second single-ended serial data, wherein the second single-ended serial data is 1-bit DDR serial data. The output end of the differential-to-single-ended unit 340 is connected to the input end of the serial-to-parallel unit 350. The serial-to-parallel unit 350 converts the second serial data into parallel data by shifting. The output end of the serial-to-parallel unit 350 is connected to the input end of the second data parsing unit 360. The data parsing unit 360 parses the input parallel data, firstly determines whether the parallel data is a start frame SOF or an end frame EOF. If it is a start frame SOF, data decoding is performed to obtain valid data. If it is an end frame EOD, it indicates the end of valid data. Then, the check data (CHS) is calculated according to the obtained valid data. If the calculated check data is consistent with the check data in the transmission data packet, it indicates that the obtained valid data is correct, and the data is output. The output data DATA_BB of the data parsing unit 360 is the valid data DATA_B sent by the first data transceiver module 100 .
[0071] Reference Figure 2 , the data frame generation unit 310 and the parallel-to-serial unit 320 are arranged in the first data transceiver module 100, the input end of the single-ended to differential unit 330 is electrically connected to the output end of the first data transceiver module 100, the output end of the single-ended to differential unit 330 is electrically connected to the input end of the differential-to-single-ended unit 340, the output end of the differential-to-single-ended unit 340 is electrically connected to the input end of the second data transceiver module 200, and the serial-to-parallel unit 350 and the data parsing unit 360 are arranged in the second data transceiver module 200; or The data frame generation unit 310 and the parallel-to-serial unit 320 are arranged in the second data transceiver module 200, the input end of the single-ended to differential unit 330 is electrically connected to the output end of the second data transceiver module 200, the output end of the single-ended to differential unit 330 is electrically connected to the input end of the differential to single-ended unit 340, the output end of the differential to single-ended unit 340 is electrically connected to the input end of the first data transceiver module 100, and the serial-to-parallel unit 350 and the data parsing unit 360 are arranged in the first data transceiver module 100.
[0072] It should be noted that when the data frame generation unit 310 and the parallel-to-serial unit 320 are arranged in the first data transceiver module 100, the serial-to-parallel unit 350 and the data parsing unit 360 are arranged in the second data transceiver module 200, or the data frame generation unit 310 and the parallel-to-serial unit 320 are arranged in the second data transceiver module 200, and the serial-to-parallel unit 350 and the data parsing unit 360 are arranged in the first data transceiver module 100, the specific process of the first data transceiver module 100 and the second data transmission module communicating is as follows:
[0073] The input end of the data frame generation unit 310 receives the first data DATA_A to be transmitted by the user, and the data frame generation unit 310 adds a start frame SOF, an end frame EOF, and calculates the check data (CHS) to the data DATA_A to form a data packet. The output end of the data frame generation unit 310 is connected to the input end of the parallel-to-serial unit 320, and the parallel-to-serial unit 320 converts the transmission data into a first single-ended serial data, wherein the first single-ended serial data is 1-bit DDR data. The first single-ended to differential chip is connected to the output end of the parallel-to-serial unit 320, and the chip model is DS90LV011ATMF. The first single-ended signal is converted into a differential signal through the first single-ended to differential chip. Among them, the first differential signal Channel lX+ and the second differential signal Channel lX- can be transmitted using a TMDS differential cable, thereby effectively suppressing the noise interference of the ground plane and achieving a lower bit error rate transmission data.
[0074] The input end of the serial-to-parallel unit 350 is connected to the second differential-to-single-ended chip, the chip model is DS90LV0122ATMF, and the differential signal is converted into the second single-ended serial data through the second single-ended-to-differential chip, wherein the second single-ended serial data is 1-bit DDR serial data, and the serial-to-parallel unit 350 converts the second serial data into parallel data by shifting, and the output end of the serial-to-parallel unit 350 is connected to the input end of the data parsing unit 360, and the data parsing unit 360 parses the input parallel data, firstly judging whether the parallel data is a start frame SOF or an end frame EOF, if it is a start frame SOF, then the data is decoded to obtain valid data, if it is an end frame EOD, then it indicates that the valid data ends, and then the check data (CHS) is calculated according to the obtained valid data, if the calculated check data is consistent with the check data in the transmission data packet, then it indicates that the obtained valid data is correct, and the data is output. The output end data DATA_AA of the data parsing unit 360 is the valid data DATA_A sent by the first data transmission module.
[0075] The specific process when the second data transceiver module 200 transmits data to the first transceiver module is as follows:
[0076] The input end of the data frame generation unit 310 receives the first data DATA_B to be transmitted by the user, and the data frame generation unit 310 adds a start frame SOF, an end frame EOF, and calculates the check data (CHS) to the data DATA_A to form a data packet. The output end of the data frame generation unit 310 is connected to the input end of the parallel-to-serial unit 320, and the parallel-to-serial unit 320 converts the transmission data into a first single-ended serial data, wherein the first single-ended serial data is 1-bit DDR data. The first single-ended to differential chip is connected to the output end of the parallel-to-serial unit 320, and the chip model is DS90LV011ATMF. The first single-ended signal is converted into a differential signal through the first single-ended to differential chip. Among them, the first differential signal Channel lX+ and the second differential signal Channel lX- can be transmitted using a TMDS differential cable, thereby effectively suppressing the noise interference of the ground plane and achieving a lower bit error rate transmission data.
[0077] The input end of the serial-to-parallel unit 350 is connected to the second differential-to-single-ended chip, the chip model is DS90LV0122ATMF, and the differential signal is converted into the second single-ended serial data through the second single-ended-to-differential chip, wherein the second single-ended serial data is 1-bit DDR serial data, and the serial-to-parallel unit 350 converts the second serial data into parallel data by shifting, and the output end of the serial-to-parallel unit 350 is connected to the input end of the data parsing unit 360, and the data parsing unit 360 parses the input parallel data, firstly judging whether the parallel data is a start frame SOF or an end frame EOF, if it is a start frame SOF, then the data is decoded to obtain valid data, if it is an end frame EOD, then it indicates that the valid data ends, and then the check data (CHS) is calculated according to the obtained valid data, if the calculated check data is consistent with the check data in the transmission data packet, then it indicates that the obtained valid data is correct, and the data is output. The output end data DATA_BB of the data parsing unit 360 is the valid data DATA_B sent by the first data transceiver module 100100.
[0078] Second, refer to Figure 3The present embodiment provides a serial communication system, including a first data transceiver module 100; a second data transceiver module 200, the second data transceiver module 200 is connected to the first data transceiver module 100 through a differential interface, a transmission channel 300 is provided between the second data transceiver module 200 and the first data transceiver module 100, and the first data transceiver module 100 and the second data transceiver module 200 transmit data through the transmission channel 300; the first data transceiver module 100 is provided with a first enabling channel control module 110, and the second data transceiver module 200 is provided with a second enabling channel control module 210, the first enabling channel control module 110 and the second enabling channel control module 210 are used to configure the transmission channel 300 according to the configuration parameters to determine the direction of data transmission; the first data transceiver module 100 includes a first data frame generation unit connected in sequence 310, a first parallel-to-serial unit 320, a first single-ended-to-differential / differential-to-single-ended unit 340, a first serial-to-parallel unit 350, and a first data parsing unit 360; the second data transceiver module 200 includes a second data frame generating unit 310, a second parallel-to-serial unit 320, a second single-ended-to-differential / differential-to-single-ended unit 340, a second serial-to-parallel unit 350, and a second data parsing unit 360 connected in sequence; the first single-ended-to-differential / differential-to-single-ended unit 340 is electrically connected to the second single-ended-to-differential / differential-to-single-ended unit 340 through a differential interface, the first enabling channel control module 110 is used to switch the first single-ended-to-differential / differential-to-single-ended unit 340 in a single-ended-to-differential state or a differential-to-single-ended state, and the second enabling channel control module 210 is used to switch the second single-ended-to-differential / differential-to-single-ended unit 340 in a differential-to-single-ended state or a single-ended-to-differential state.
[0079] It should be noted that the specific process when the first data transceiver module 100 transmits data to the second transceiver module is as follows:
[0080] When the first data transceiver module 100 needs to send data, the first data transceiver module 100 sets the input first output control module 120 to switch the corresponding data channel 300 to the first output link 410, and the second data transceiver module 200 controls the second input output module 220 to switch the corresponding transmission channel 300 to the first input link 420.
[0081] The input end of the first data frame generation unit 510 receives the first data DATA_A to be transmitted by the user, and the first data frame generation unit 510 adds a start frame SOF, an end frame EOF, and calculates the check data (CHS) to the data DATA_A to form a data packet. The output end of the first data frame generation unit 510 is connected to the input end of the first parallel-to-serial unit 520, and the first parallel-to-serial unit 520 converts the transmission data into a first single-ended serial data, wherein the first single-ended serial data is 1-bit DDR data. The output end of the first parallel-to-serial unit 520 is connected to the input end of the first single-ended to differential unit 530, and the first single-ended to differential unit 530 converts the first single-ended serial data into a phase-complementary differential signal. The first single-ended to differential unit outputs differential signals Channel lX+ and Channel lX- (X is 1 to N). Among them, the first differential signal Channel lX+ and the second differential signal Channel lX- can be transmitted using a TMDS differential cable, thereby effectively suppressing the noise interference of the ground plane and achieving a lower bit error rate transmission data.
[0082] The first differential signal Channel lX+ and the second differential signal Channel lX- is input to the input end of the second differential-to-single-ended unit 630 of the second data transceiver module 200, and the second differential-to-single-ended unit 630 converts the first differential signal and the second differential signal with complementary phases into second single-ended serial data, wherein the second single-ended serial data is 1-bit DDR serial data, and the output end of the second differential-to-single-ended unit 630 is connected to the input end of the second serial-to-parallel unit 640, and the second serial-to-parallel unit 640 converts the second serial data into parallel data by shifting, and the output end of the second serial-to-parallel unit 640 is connected to the input end of the second data parsing unit, and the second data parsing unit 650 parses the input parallel data, firstly judging whether the parallel data is a start frame SOF or an end frame EOF, if it is a start frame SOF, then data decoding is performed to obtain valid data, if it is an end frame EOD, then it indicates that the valid data ends, and then the check data (CHS) is calculated according to the obtained valid data, and if the calculated check data is consistent with the check data in the transmission data packet, then it indicates that the obtained valid data is correct, and the data is output. The output data DATA_AA of the data parsing unit 360 is the valid data DATA_A sent by the first data transmission module.
[0083] When the first data transceiver module 100 needs to receive data, the second data transceiver module 200 is set with a second input-output control module 220 to switch the corresponding transmission channel 300 to the second input link 430 , and the first data transceiver module 100 controls the first input-output module 120 to switch the corresponding transmission channel 300 to the second output link 440 .
[0084] The input end of the second data frame generation unit 610 receives the second data DATA_B to be transmitted by the user, and the second data frame generation unit adds a start frame SOF, an end frame EOF, and calculates the check data (CHS) to the data DATA_B to form a data packet. The output end of the second data frame generation unit 610 is connected to the input end of the second parallel-to-serial unit 620, and the second parallel-to-serial unit 620 converts the transmission data into the first single-ended serial data, wherein the first single-ended serial data is 1-bit DDR data. The output end of the second parallel-to-serial unit 620 is connected to the input end of the second single-ended to differential unit 630, and the second single-ended to differential unit 630 converts the first single-ended serial data into a phase-complementary differential signal. The second single-ended to differential unit 330 outputs differential signals Channel lX+ and Channel lX- (X is 1 to N). The first differential signal Channel l X+ and the second differential signal Channel l X- are transmitted using TMDS differential cables, which effectively suppresses the noise interference of the ground plane and realizes data transmission with a lower bit error rate.
[0085] The first differential signal Channel lX+ and the second differential signal Channel lX- is input to the input end of the first differential-to-single-ended unit 530 of the first data transceiver module. The first differential-to-single-ended unit 530 converts the first differential signal and the second differential signal with complementary phases into second single-ended serial data, wherein the second single-ended serial data is 1-bit DDR serial data. The output end of the first differential-to-single-ended unit 530 is connected to the input end of the first serial-to-parallel unit 540. The first serial-to-parallel unit 540 converts the second serial data into parallel data by shifting. The output end of the first serial-to-parallel unit 540 is connected to the input end of the first data parsing unit 550. The first data parsing unit 550 parses the input parallel data, firstly judging whether the parallel data is a start frame SOF or an end frame EOF. If it is a start frame SOF, data decoding is performed to obtain valid data. If it is an end frame EOD, it indicates the end of valid data. Then, the check data (CHS) is calculated according to the obtained valid data. If the calculated check data is consistent with the check data in the transmission data packet, it indicates that the obtained valid data is correct, and the data is output. The output data DATA_BB of the first data parsing unit 360 is the valid data DATA_B sent by the second data transceiver module 200 .
[0086] The control method of the embodiment of the present invention is further described below based on the accompanying drawings.
[0087] Reference Figure 4 , Figure 4 A flowchart of a bidirectional serial communication method provided by an embodiment of the present invention, the bidirectional serial communication method includes but is not limited to the following steps:
[0088] Step S11, the first enabling channel control module 110 and the second enabling channel control module 210 configure the transmission channel 300 according to the configuration parameters to determine the direction of data transmission;
[0089] It should be noted that the first enabling channel control module 110 and the second enabling channel control module 210 send an enabling configuration signal to each transmission channel 300 according to the configuration parameters, and the enabling configuration signal controls the Enable signal and Disab le signal of each transmission channel 300, thereby achieving the configuration and modification of the transmission channel 300.
[0090] Step S12, when the direction of data transmission is the first direction, the first data transceiver module 100 converts the transmission data into serial output data, and sends the output data to the second data transceiver module 200 through the differential interface;
[0091] It should be noted that when the direction of data transmission is the first direction, that is, the transmission data is sent to the second data transmission module through the first data transceiver module 100, the first data transceiver module 100 converts the transmission data into first serial data through the parallel-to-serial unit 320, and then converts the first serial data into differential data through the single-ended to differential unit 330, receives the differential data through the differential interface, and converts the differential data into second single-ended serial data.
[0092] Step S13, the second data transceiver module 200 analyzes the output data to determine the validity of the output data;
[0093] It should be noted that the serial-to-parallel unit 350 of the second data transceiver module 200 converts the second single-ended serial data into parallel data, and the data parsing unit 360 parses the parallel data to obtain a data parsing result, and determines the validity of the transmission data according to the data parsing result.
[0094] Step S14, or, when the direction of data transmission is the second direction, the second data transceiver module 200 converts the transmission data into serial output data, and sends the output data to the first data transceiver module 100 through the differential interface;
[0095] It should be noted that when the direction of data transmission is the second direction, that is, the transmission data is sent to the first data transmission module through the second data transceiver module 200, the second data transceiver module 200 converts the transmission data into first serial data through the parallel-to-serial unit 320, and then converts the first serial data into differential data through the single-ended to differential unit 330, receives the differential data through the differential interface, and converts the differential data into second single-ended serial data, and sends the output data to the first data transceiver module 100 through the differential interface.
[0096] Step S15: the first data transceiver module 100 analyzes the output data to determine the validity of the output data.
[0097] It should be noted that the serial-to-parallel unit 350 of the first data transceiver module 100 converts the second single-ended serial data into parallel data, and the data parsing unit 360 parses the parallel data to obtain a data parsing result, and determines the validity of the transmission data according to the data parsing result.
[0098] It should be noted that in this embodiment, the traditional TMDS interface is abandoned, and multiple enabling channels and transmission channels 300 are set between the first data transceiver module 100 and the second data transceiver module 200. The multiple enabling channels and transmission channels 300 are configured and changed through the enabling channel control module to achieve two-way communication, and the data transmission format and size can be customized, which is suitable for the diversity and flexibility of different users and improves data transmission efficiency.
[0099] In addition, in one embodiment, referring to Figure 5 ,exist Figure 4 Step S11 of the illustrated embodiment also includes but is not limited to the following steps:
[0100] Step S21, packaging the transmission data;
[0101] Step S22, converting the packaged transmission data into first serial single-ended data;
[0102] Step S23, converting the serial single-ended data into differential data, and sending the differential data to the second data transceiver module 200 through the differential interface.
[0103] It should be noted that the transmission data between the first data transceiver module 100 and the second data transceiver module 200 can be data of any length format, the data frame generation unit 310 forms a data packet by adding a start frame, an end frame and calculating check data to the transmission data, and the serial conversion unit 320 converts the packaged transmission data into first serial single-ended data, the single-ended to differential unit 330 converts the first serial single-ended data into phase-complementary differential data, and the single-ended to differential unit 330 outputs the differential data as a first differential signal Channel lX+ and a second differential signal Channel lX- (X is 1 to N), and sends the differential data to the second data transceiver module 200 through a differential interface. Among them, the first differential signal and the second differential signal can be transmitted using a differential cable, thereby effectively suppressing the noise interference of the ground plane, thereby achieving lower bit error rate transmission data.
[0104] In addition, in one embodiment, referring to Figure 6 ,exist Figure 5 Step S23 of the illustrated embodiment also includes but is not limited to the following steps:
[0105] Step S31, converting the differential data into a second single-ended signal;
[0106] Step S32, converting the second single-ended signal into parallel data;
[0107] Step S33, parsing the parallel data to obtain a data parsing result, and determining the validity of the transmitted data according to the parsing result.
[0108] It should be noted that the phase-complementary differential data is converted into a second single-ended signal by the differential-to-single-ended unit 340, the second serial-to-parallel unit 350 converts the second single-ended signal into parallel data by shifting, and the data parsing unit 360 parses the parallel data to determine the validity of the transmitted data. Furthermore, the use of parallel data in serial communication can speed up the transmission of data, and after the data transmission is completed, the integrity and accuracy of the transmitted data can be ensured by parsing and verifying the data, thereby enhancing the ability of the bidirectional serial communication system to judge the validity of the transmitted data.
[0109] In addition, in one embodiment, referring to Figure 7 ,exist Figure 5 In step S21 of the illustrated embodiment, the following steps are also included but not limited to:
[0110] Step S41, adding a start frame and an end frame to the transmission data, and determining verification data of the transmission data;
[0111] Step S42, packaging the transmission data according to the start frame, the end frame, and the check data.
[0112] It should be noted that by adding a start frame and an end frame to the transmission data, the first data transceiver module 100 and the second data transceiver module 200 can accurately identify and intercept valid data, thereby avoiding misinterpretation or loss of data transmission; the verification data can detect whether errors or loss occur in the transmission data during the transmission process, thereby further improving the reliability and stability of data transmission.
[0113] In addition, in one embodiment, referring to Figure 8 ,exist Figure 6 Step S33 of the illustrated embodiment also includes but is not limited to the following steps:
[0114] Step S41, determining whether the parallel data has a start frame and an end frame;
[0115] Step S42, when the parallel data has a start frame and an end frame, decode the parallel data to obtain valid data;
[0116] Step S43, performing calculation verification on the valid data to obtain calculation verification data;
[0117] Step S44: When the calculated verification data is consistent with the verification data, the valid data is correct.
[0118] It should be noted that after the transmission data is input into the data parsing unit 360, the input parallel data is parsed. First, it is determined whether there is a start frame SOF or an end frame EOF in the parallel data. If the parallel data is a start frame SOF, data decoding is performed to obtain valid data. If it is an end frame EOF, it indicates the end of the valid data. Then, the check data (CHS) is calculated based on the obtained valid data. If the calculated check data is consistent with the check data in the transmission data packet, it indicates that the obtained valid data is correct and the data is output.
[0119] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above-mentioned implementation mode. Technical personnel familiar with the field can also make various equivalent deformations or substitutions under the shared conditions without violating the spirit of the present invention. These equivalent deformations or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A bidirectional serial communication system, characterized in that: include: A first data transceiver module; a second data transceiver module, wherein the second data transceiver module is connected to the first data transceiver module through a differential interface, a transmission channel is provided between the second data transceiver module and the first data transceiver module, and the first data transceiver module and the second data transceiver module perform data transmission through the transmission channel; The first data transceiver module is provided with a first enabling channel control module, and the second data transceiver module is provided with a second enabling channel control module. The first enabling channel control module and the second enabling channel control module are used to configure the transmission channel according to configuration parameters to determine the direction of data transmission.
2. The bidirectional serial communication system according to claim 1, characterized in that: The transmission channel comprises: A data frame generation unit, used for packaging transmission data; A parallel-to-serial unit, used for converting the packaged transmission data into first single-ended serial data; A single-ended to differential conversion unit, used for converting the first single-ended serial data into differential data; A differential to single-ended unit, configured to receive the differential data through the differential interface and convert the differential data into second single-ended serial data; A serial-to-parallel unit, used for converting the second single-ended serial data into parallel data; The data parsing unit is used to parse the parallel data to obtain a data parsing result, and determine the validity of the transmission data according to the parsing result.
3. The bidirectional serial communication system according to claim 2, characterized in that: The data frame generation unit, the parallel-to-serial unit, and the single-ended-to-differential unit are arranged in the first data transceiver module, and the differential-to-single-ended unit, the serial-to-parallel unit, and the data parsing unit are arranged in the second data transceiver module; or, the data frame generation unit, the parallel-to-serial unit, and the single-ended-to-differential unit are arranged in the second data transceiver module, and the differential-to-single-ended unit, the serial-to-parallel unit, and the data parsing unit are arranged in the first data transceiver module.
4. The bidirectional serial communication system according to claim 2, characterized in that: The data frame generation unit and the parallel-to-serial unit are arranged in the first data transceiver module, the input end of the single-ended to differential unit is electrically connected to the output end of the first data transceiver module, the output end of the single-ended to differential unit is electrically connected to the input end of the differential to single-ended unit, the output end of the differential to single-ended unit is electrically connected to the input end of the second data transceiver module, and the serial-to-parallel unit and the data parsing unit are arranged in the second data transceiver module; or, the data frame generation unit and the parallel-to-serial unit are arranged in the second data transceiver module, the input end of the single-ended to differential unit is electrically connected to the output end of the second data transceiver module, the output end of the single-ended to differential unit is electrically connected to the input end of the differential to single-ended unit, the output end of the differential to single-ended unit is electrically connected to the input end of the first data transceiver module, and the serial-to-parallel unit and the data parsing unit are arranged in the first data transceiver module.
5. A bidirectional serial communication system, characterized in that: include: A first data transceiver module; a second data transceiver module, wherein the second data transceiver module is connected to the first data transceiver module through a differential interface, a transmission channel is provided between the second data transceiver module and the first data transceiver module, and the first data transceiver module and the second data transceiver module perform data transmission through the transmission channel; The first data transceiver module is provided with a first input-output control module, and the second data transceiver module is provided with a second input-output control module, and the first input-output control module and the second input-output control module are used to configure the transmission channel according to the configuration parameters to determine the direction of data transmission; The first data transceiver module includes a first data frame generation unit, a first parallel-to-serial unit, a first differential-to-single-ended / single-ended-to-differential unit, a first serial-to-parallel unit, and a first data parsing unit connected in sequence; the second data transceiver module includes a second data frame generation unit, a second parallel-to-serial unit, a second single-ended-to-differential / differential-to-single-ended unit, a second serial-to-parallel unit, and a second data parsing unit connected in sequence; the first single-ended-to-differential / differential-to-single-ended unit is electrically connected to the second single-ended-to-differential / differential-to-single-ended unit through the differential interface, the first enabling channel control module is used to switch the first single-ended-to-differential / differential-to-single-ended unit to a single-ended-to-differential state or a differential-to-single-ended state, and the second enabling channel control module is used to switch the second single-ended-to-differential / differential-to-single-ended unit to a differential-to-single-ended state or a single-ended-to-differential state.
6. A bidirectional serial communication method, applied to the bidirectional serial communication system according to any one of claims 1 to 4, characterized in that: include: The first enabling channel control module and the second enabling channel control module configure the transmission channel according to the configuration parameters to determine the direction of data transmission; When the direction of the data transmission is the first direction, the first data transceiver module converts the transmission data into serial output data, and sends the output data to the second data transceiver module through the differential interface; The second data transceiver module analyzes the output data to determine the validity of the output data; Alternatively, when the direction of the data transmission is the second direction, the second data transceiver module converts the transmission data into serial output data, and sends the output data to the first data transceiver module through the differential interface; The first data transceiver module analyzes the output data to determine the validity of the output data.
7. The bidirectional serial communication method according to claim 6, characterized in that: The first data transceiver module converts the transmission data into serial output data, and sends the output data to the second data transceiver module through a differential interface, including: The data frame generation unit performs packaging processing on the transmission data; Converting the packaged transmission data into first serial single-ended data; The first serial single-ended data is converted into differential data, and the differential data is sent to the second data transceiver module through the differential interface.
8. The bidirectional serial communication method according to claim 7, characterized in that: The second data transceiver module analyzes the output data to determine the validity of the output data, including: Converting the differential data into second serial single-ended data; converting the second serial single-ended data into parallel data; The parallel data is parsed to obtain a data parsing result, and the validity of the output data is determined according to the parsing result.
9. The bidirectional serial communication method according to claim 8, characterized in that: The data frame generation unit performs packaging processing on the transmission data, including: Adding a start frame and an end frame to the transmission data, and determining check data of the transmission data; The transmission data is packaged according to the start frame, the end frame, and the verification data.
10. The bidirectional serial communication method according to claim 9, characterized in that: The step of parsing the parallel data to obtain a data parsing result, and determining the validity of the output data according to the parsing result includes: Determine whether the parallel data has the start frame and the end frame; When the parallel data has the start frame and the end frame, decoding the parallel data to obtain valid data; Performing calculation verification on the valid data to obtain calculation verification data; When the calculated verification data is consistent with the verification data, the valid data is correct.
