[go: up one dir, main page]

CN112416848B - Source chip, destination chip, data transmission method and processor system - Google Patents

Source chip, destination chip, data transmission method and processor system Download PDF

Info

Publication number
CN112416848B
CN112416848B CN202011296358.5A CN202011296358A CN112416848B CN 112416848 B CN112416848 B CN 112416848B CN 202011296358 A CN202011296358 A CN 202011296358A CN 112416848 B CN112416848 B CN 112416848B
Authority
CN
China
Prior art keywords
data
level
waveform
encoded data
encoded
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011296358.5A
Other languages
Chinese (zh)
Other versions
CN112416848A (en
Inventor
梁岩
王文根
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hygon Information Technology Co Ltd
Original Assignee
Hygon Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hygon Information Technology Co Ltd filed Critical Hygon Information Technology Co Ltd
Priority to CN202011296358.5A priority Critical patent/CN112416848B/en
Publication of CN112416848A publication Critical patent/CN112416848A/en
Application granted granted Critical
Publication of CN112416848B publication Critical patent/CN112416848B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Dc Digital Transmission (AREA)

Abstract

The application provides a source chip, a destination chip, a data transmission method and a processor system, which comprise a data coding module and a driver, wherein the data coding module is connected with the driver; the data coding module is used for receiving serial data, coding the serial data to obtain coded data and transmitting the coded data to the driver, wherein jump delay exists between any two adjacent data of the coded data; the driver is used for receiving the coded data and transmitting the coded data to a target chip of the opposite terminal, so that the target chip of the opposite terminal recovers the coded data into serial data according to the coded data with jump delay between any two adjacent data. By encoding the serial data, the encoded data carries a clock signal through the change of the jump delay, and compared with the chip self-adaptive clock which does not carry the clock signal in the prior art and needs an opposite terminal, the difficulty of clock recovery is reduced, and the delay of data transmission is reduced.

Description

源芯片、目的芯片、数据传输方法及处理器系统Source chip, destination chip, data transmission method and processor system

技术领域Technical field

本申请涉及计算机领域,具体而言,涉及一种源芯片、目的芯片、数据传输方法及处理器系统。The present application relates to the field of computers, specifically, to a source chip, a destination chip, a data transmission method and a processor system.

背景技术Background technique

现有技术中,在两个芯片裸片(die)之间进行数据传输时,源芯片往往会将数据以及数据对应的时钟信号均传输到目的芯片,目的芯片可以根据接收到的时钟信号对接收到的数据进行采集。然而,由于传输时需要同时传输数据和时钟信号,需要传输的数据量较大。In the existing technology, when data is transmitted between two chip dies, the source chip often transmits both the data and the clock signal corresponding to the data to the destination chip. The destination chip can receive the data according to the received clock signal. The data is collected. However, since data and clock signals need to be transmitted simultaneously during transmission, the amount of data that needs to be transmitted is large.

现有技术的另一种方式中,源芯片可以只传输数据到目的芯片,目的芯片可以通过反馈电路来调节自身时钟信号的频率,使得时钟的频率能够适应源芯片传输过来的数据,目的芯片根据调节后的时钟的频率对接收到的数据进行采集。然而,由于上述方式需要反馈电路调节自身的时钟,使得时钟恢复电路较为复杂,数据传输延迟较大。In another method of the prior art, the source chip can only transmit data to the destination chip. The destination chip can adjust the frequency of its own clock signal through the feedback circuit so that the frequency of the clock can adapt to the data transmitted from the source chip. The destination chip can adjust the frequency of the clock signal according to the feedback circuit. The frequency of the adjusted clock is used to collect the received data. However, since the above method requires a feedback circuit to adjust its own clock, the clock recovery circuit is more complex and the data transmission delay is large.

发明内容Contents of the invention

本申请实施例的目的在于提供一种源芯片、目的芯片、数据传输方法及处理器系统,用以改善现有技术中芯片裸片之间进行数据传输延迟较大的问题。The purpose of the embodiments of the present application is to provide a source chip, a destination chip, a data transmission method and a processor system to improve the problem of large data transmission delay between chip dies in the prior art.

第一方面,本申请实施例提供了一种源芯片,包括数据编码模块以及驱动器,所述数据编码模块与所述驱动器连接;所述数据编码模块用于接收串行数据,对所述串行数据进行编码得到编码数据,并将所述编码数据传输至所述驱动器,其中,所述编码数据的任意相邻两个数据之间均有跳变延;所述驱动器用于接收所述编码数据,并将所述编码数据发往对端的目的芯片,以使所述对端的目的芯片根据任意相邻两个数据之间均有跳变延的所述编码数据,将所述编码数据恢复成所述串行数据。In a first aspect, embodiments of the present application provide a source chip, which includes a data encoding module and a driver. The data encoding module is connected to the driver; the data encoding module is used to receive serial data and perform processing on the serial data. The data is encoded to obtain encoded data, and the encoded data is transmitted to the driver, wherein there is a jump delay between any two adjacent data of the encoded data; the driver is used to receive the encoded data , and sends the encoded data to the destination chip of the opposite end, so that the destination chip of the opposite end restores the encoded data to the encoded data according to the encoded data that has a jump delay between any two adjacent data. Described serial data.

在上述的实施方式中,数据编码模块可以对串行数据进行编码,得到编码数据,以实现编码数据的任意相邻两个数据之间均有跳变延。由于任意相邻两个数据之间均有跳变延,使得对端的芯片在每接收到一个数据时,均能通过跳变延的变化得知,即每个跳变延的变化均对应一个接收到的数据,从而相当于利用编码数据实现了时钟信号的传递。通过对串行数据的编码,使得编码数据通过跳变延的变化携带有时钟信号,与现有技术中不携带时钟信号,需对端的芯片自适应时钟相比,降低了恢复时钟的难度,减小了数据传输的延迟。In the above embodiment, the data encoding module can encode the serial data to obtain encoded data, so as to achieve a jump delay between any two adjacent data of the encoded data. Since there is a transition delay between any two adjacent pieces of data, each time the chip at the opposite end receives a piece of data, it can be informed by the change in the transition delay. That is, each change in transition delay corresponds to a receiving data. The received data is equivalent to using encoded data to realize the transmission of clock signals. By encoding the serial data, the encoded data carries the clock signal through the change of transition delay. Compared with the existing technology that does not carry the clock signal and requires an adaptive clock on the opposite end chip, the difficulty of recovering the clock is reduced and the time is reduced. Reduces data transmission delay.

在一个可能的设计中,所述数据编码模块用于接收串行数据,对所述串行数据进行编码得到编码数据,具体包括:接收当前数据;判断所述当前数据对应的电平状态与所述当前数据的前一数据对应的电平状态是否一致;若是,将所述当前数据编码为中间电平;若否,将所述当前数据编码为与所述当前数据相一致的电平状态。In a possible design, the data encoding module is used to receive serial data and encode the serial data to obtain encoded data, which specifically includes: receiving current data; determining whether the level state corresponding to the current data is consistent with the required level. Whether the level state corresponding to the previous data of the current data is consistent; if so, encode the current data to an intermediate level; if not, encode the current data to a level state consistent with the current data.

在上述的实施方式中,可以将当前数据的电平状态与前一数据的电平状态进行比较,判断两者的电平状态是否一致,若一致,则以中间电平表示当前数据的电平状态,若不一致在保留当前数据原本的电平状态。通过中间电平的引入,可以在相邻两个数据处于相同电平时,改变相邻两个数据中后一数据的电平状态,从而实现令相邻两个数据中不会出现相同电平的情况。In the above embodiment, the level state of the current data can be compared with the level state of the previous data to determine whether the level states of the two are consistent. If they are consistent, the level of the current data is represented by the intermediate level. status, if inconsistent, the original level status of the current data is retained. Through the introduction of intermediate levels, when two adjacent data are at the same level, the level state of the latter data in the two adjacent data can be changed, so that the same level will not appear in the two adjacent data. Condition.

在一个可能的设计中,所述数据编码模块包括第一数字触发器、第二数字触发器、同或运算器以及选择器;所述第一数字触发器的CLK端与传输时钟信号的时钟信号线连接,第一数字触发器的输入端与传输串行数据的串行数据线连接,所述第一数字触发器的输出端与所述同或运算器的第一输入端连接;所述同或运算器的第二输入端与所述串行数据线连接,所述同或运算器的输出端与所述选择器的第一输入端连接;所述选择器的输出端与所述第二数字触发器的输入端连接;所述第二数字触发器的输出端与所述选择器的第二输入端连接,所述第二数字触发器的CLK端与所述时钟信号线连接。In a possible design, the data encoding module includes a first digital flip-flop, a second digital flip-flop, an exclusive OR operator and a selector; the CLK terminal of the first digital flip-flop is connected to a clock signal that transmits a clock signal The input terminal of the first digital flip-flop is connected to the serial data line for transmitting serial data, and the output terminal of the first digital flip-flop is connected to the first input terminal of the exclusive OR operator; The second input end of the OR operator is connected to the serial data line, the output end of the XOR operator is connected to the first input end of the selector; the output end of the selector is connected to the second The input end of the digital flip-flop is connected; the output end of the second digital flip-flop is connected to the second input end of the selector, and the CLK end of the second digital flip-flop is connected to the clock signal line.

在上述的实施方式中,第一数字触发器可以将串行数据延迟一个时钟周期,串行数据以及延迟了一个时钟周期的串行数据进行同或运算,得到运算结果。根据具体的运算结果以及上一位数据的电平状态,可以决定该位数据的电平状态。In the above embodiment, the first digital flip-flop can delay the serial data by one clock cycle, and perform an exclusive OR operation on the serial data and the serial data delayed by one clock cycle to obtain the operation result. According to the specific operation result and the level state of the previous bit of data, the level state of the bit of data can be determined.

在一个可能的设计中,所述数据编码模块用于接收所述串行数据,对所述串行数据进行编码得到编码数据,具体包括:利用所述同或运算器将所述串行数据与经所述第一数字触发器延迟一个时钟周期的串行数据进行位与位之间的同或运算,得到运算结果;若所述运算结果为0,则利用所述选择的器确定所述串行数据的与所述运算结果对应的位在所述编码数据的对应位的电平为原电平;若所述运算结果为1,根据所述第二数字触发器的输出结果,判断所述串行数据的上一位数据对应的编码数据的电平状态是否为中间电平;若所述上一位数据对应的编码数据的电平状态是中间电平,则确定所述串行数据的与所述运算结果对应的位在所述编码数据的对应位的电平为原电平;若所述上一位数据对应的编码数据的电平状态不是中间电平,则确定所述串行数据的与所述运算结果对应的位在所述编码数据的对应位的电平为中间电平。In a possible design, the data encoding module is used to receive the serial data and encode the serial data to obtain encoded data, which specifically includes: using the exclusive OR operator to combine the serial data with The serial data delayed by one clock cycle through the first digital flip-flop performs an exclusive OR operation between bits to obtain an operation result; if the operation result is 0, the selected device is used to determine the serial data The level of the corresponding bit of the row data corresponding to the operation result and the corresponding bit of the encoded data is the original level; if the operation result is 1, the judgment is made based on the output result of the second digital flip-flop. Whether the level state of the encoded data corresponding to the previous bit of serial data is an intermediate level; if the level state of the encoded data corresponding to the previous bit of data is an intermediate level, determine the level of the serial data The level of the bit corresponding to the operation result in the corresponding bit of the encoded data is the original level; if the level state of the encoded data corresponding to the previous bit of data is not an intermediate level, then it is determined that the serial The level of the bit of the data corresponding to the operation result and the corresponding bit of the encoded data is an intermediate level.

在上述的实施方式中,若运算结果为0,则表示当前位数据的电平状态与上一位数据的电平状态不同,则可以直接输出该位数据原本的电平。若运算结果为1,则表示当前位数据的电平状态与上一位数据的实际电平状态相同,需进一步判断:上一位数据的电平状态是否被改为中间电平。若上一位数据的电平状态被改为中间电平,则当前位数据的电平状态不需再进行修改,可以直接输出原本的电平,以与上一位数据的电平状态区分;若上一位数据的电平状态未被改为中间电平,则当前位数据的电平状态需要进行修改为中间电平,以与上一位数据的电平状态区分。In the above embodiment, if the operation result is 0, it means that the level state of the current bit data is different from the level state of the previous bit data, and the original level of the bit data can be directly output. If the operation result is 1, it means that the level state of the current bit data is the same as the actual level state of the previous bit data. It needs to be further determined: whether the level state of the previous bit data has been changed to an intermediate level. If the level state of the previous bit of data is changed to the middle level, the level state of the current bit of data does not need to be modified, and the original level can be output directly to distinguish it from the level state of the previous bit of data; If the level state of the previous bit of data has not been changed to the middle level, the level state of the current bit of data needs to be modified to the middle level to distinguish it from the level state of the previous bit of data.

第二方面,本申请实施例提供了一种目的芯片,与第一方面或第一方面的任一种可能的设计的源芯片相配合,包括第一比较器、第二比较器、时钟恢复电路以及数据恢复电路;所述第一比较器用于接收对端的源芯片发送的编码数据,并将所述编码数据与第一参考电平进行比较,将所述编码数据中高于所述第一参考电平的输出为高电平,低于所述第一参考电平的输出为低电平,得到第一波形,其中,所述第一参考电平在中间电平与高电平之间;所述第二比较器用于接收所述编码数据,并将所述编码数据与第二参考电平进行比较,将所述编码数据中高于所述第二参考电平的输出为高电平,低于所述第二参考电平的输出为低电平,得到第二波形,其中,所述第二参考电平在所述中间电平与低电平之间;所述时钟恢复电路用于获取第一波形的波形翻转的脉冲以及第二波形的波形翻转的脉冲,并对获取到的脉冲进行并处理,获得时钟恢复信号;所述数据恢复电路用于根据所述时钟恢复信号采集所述编码数据,并将所述编码数据恢复成串行数据。In the second aspect, embodiments of the present application provide a destination chip that cooperates with the source chip of the first aspect or any possible design of the first aspect, including a first comparator, a second comparator, and a clock recovery circuit. And a data recovery circuit; the first comparator is used to receive the encoded data sent by the source chip of the opposite end, and compare the encoded data with the first reference level, and compare the encoded data with the higher than the first reference level. The output that is flat is high level, and the output that is lower than the first reference level is low level, and the first waveform is obtained, wherein the first reference level is between the middle level and the high level; so The second comparator is used to receive the encoded data and compare the encoded data with a second reference level, and output the encoded data higher than the second reference level as a high level, and the encoded data lower than the second reference level. The output of the second reference level is low level to obtain a second waveform, wherein the second reference level is between the intermediate level and the low level; the clock recovery circuit is used to obtain the first waveform. The waveform inversion pulse of one waveform and the waveform inversion pulse of the second waveform are combined and processed to obtain a clock recovery signal; the data recovery circuit is used to collect the encoded data according to the clock recovery signal , and restore the encoded data into serial data.

在上述的实施方式中,第一比较器可以通过自身的参考电平将中间电平恢复为低电平,得到第一波形;第二比较器可以通过自身的参考电平将中间电平恢复为高电平,得到第二波形。然后时钟恢复电路可以分别获得第一波形波形翻转位置对应的脉冲,以及第二波形波形翻转位置对应的脉冲,然后对两个脉冲进行并处理,便可以得到时钟恢复信号。数据恢复电路可以根据上述的时钟恢复信号采集编码数据,并将编码数据恢复为串行数据。通过第一比较器、第二比较器以及时钟恢复电路的配合,便可以从编码数据中恢复出时钟信号,与现有技术相比,恢复时钟信号的电路结构简单,降低了恢复时钟的难度,减小了数据传输的延迟。In the above embodiment, the first comparator can restore the middle level to a low level through its own reference level to obtain the first waveform; the second comparator can restore the middle level to a low level through its own reference level. High level, get the second waveform. Then the clock recovery circuit can respectively obtain the pulse corresponding to the waveform flip position of the first waveform and the pulse corresponding to the waveform flip position of the second waveform, and then process the two pulses together to obtain the clock recovery signal. The data recovery circuit can collect the encoded data based on the above-mentioned clock recovery signal and restore the encoded data to serial data. Through the cooperation of the first comparator, the second comparator and the clock recovery circuit, the clock signal can be recovered from the encoded data. Compared with the existing technology, the circuit structure of the clock signal recovery is simple, which reduces the difficulty of recovering the clock. Reduces data transmission delay.

在一个可能的设计中,所述时钟恢复电路包括至少一个第一延时器、第一异或运算器、至少一个第二延时器、第二异或运算器以及或运算器;所述至少一个第一延时器用于对所述第一波形进行延迟;所述第一异或运算器用于对所述第一波形、经过所述至少一个第一延时器延迟的第一波形进行异或运算,得到第一脉冲波形;所述至少一个第二延时器用于对所述第二波形进行延迟;所述第二异或运算器用于对所述第二波形、经过所述至少一个第二延时器延迟的第二波形进行异或运算,得到第二脉冲波形;所述或运算器用于对所述第一脉冲波形和第二脉冲波形进行或处理,得到脉冲融合波形,所述脉冲融合波形为所述时钟恢复信号。In a possible design, the clock recovery circuit includes at least a first delayer, a first XOR operator, at least a second delayer, a second XOR operator and an OR operator; the at least A first delayer is used to delay the first waveform; the first XOR operator is used to XOR the first waveform and the first waveform delayed by the at least one first delayer. operation to obtain the first pulse waveform; the at least one second delayer is used to delay the second waveform; the second XOR operator is used to delay the second waveform through the at least one second The second waveform delayed by the delay device is subjected to an XOR operation to obtain a second pulse waveform; the OR operator is used to perform OR processing on the first pulse waveform and the second pulse waveform to obtain a pulse fusion waveform. The pulse fusion The waveform is the clock recovery signal.

在上述的实施方式中,时钟恢复电路包括第一延时器、第一异或运算器、第二延时器、第二异或运算器以及或运算器。第一延时器用于将第一波形进行延迟,第一异或运算器将进行过延迟的第一波形与第一波形进行异或处理,可以得到第一波形在翻转位置的脉冲信号所组成的波形,该波形可以记为第一脉冲波形。第二异或运算器将进行过延迟的第二波形与第二波形进行异或处理,可以得到第二波形在翻转位置的脉冲信号所组成的波形,该波形记为第二脉冲波形。取第一脉冲波形与第二脉冲波形的或集,得到脉冲融合波形,该脉冲融合波形的相邻两个脉冲之间的时间间隔与编码数据中相邻两个数据之间的时间间隔相同,因此,该脉冲融合波形便是时钟恢复信号。In the above embodiment, the clock recovery circuit includes a first delayer, a first XOR operator, a second delayer, a second XOR operator and an OR operator. The first delayer is used to delay the first waveform, and the first XOR operator performs XOR processing on the delayed first waveform and the first waveform to obtain a pulse signal composed of the first waveform at the flip position. waveform, which can be recorded as the first pulse waveform. The second XOR operator performs XOR processing on the delayed second waveform and the second waveform, and can obtain a waveform composed of the pulse signal of the second waveform at the flip position, and this waveform is recorded as the second pulse waveform. Take the OR set of the first pulse waveform and the second pulse waveform to obtain the pulse fusion waveform. The time interval between two adjacent pulses of the pulse fusion waveform is the same as the time interval between two adjacent data in the encoded data. Therefore, this pulse fusion waveform is the clock recovery signal.

在一个可能的设计中,所述时钟恢复电路还包括二分频器,所述二分频器的CLK端与所述或运算器的输出端连接;所述二分频器用于对所述时钟恢复信号进行二分频处理,得到占空比为50%的时钟恢复信号。In a possible design, the clock recovery circuit further includes a frequency divider, the CLK terminal of the frequency divider is connected to the output terminal of the OR operator; the frequency divider is used to convert the clock The recovered signal is divided by two to obtain a clock recovery signal with a duty cycle of 50%.

在上述的实施方式中,在获得时钟恢复信号之后,还可以通过二分频器对时钟恢复信号进行二分频处理,得到占空比为50%的时钟恢复信号。经过二分频处理的时钟恢复信号更加稳定。In the above embodiment, after obtaining the clock recovery signal, the clock recovery signal can also be divided by two using a frequency divider to obtain a clock recovery signal with a duty cycle of 50%. The clock recovery signal processed by dividing by two is more stable.

在一个可能的设计中,所述数据恢复电路用于根据所述时钟恢复信号采集所述编码数据,并将所述编码数据恢复成串行数据,具体包括:确定接收的当前数据为中间电平状态;获取所述当前数据的上一数据的电平状态,将所述上一数据的电平状态作为所述当前数据的电平状态。In a possible design, the data recovery circuit is used to collect the encoded data according to the clock recovery signal and restore the encoded data into serial data, specifically including: determining that the current data received is an intermediate level. Status; obtain the level status of the previous data of the current data, and use the level status of the previous data as the level status of the current data.

在上述的实施方式中,数据恢复电路在将编码数据恢复成串行数据时,可以根据时钟恢复信号的频率采集编码数据,并根据第一比较器与第二比较器的比较结果,判断接收的当前数据是否为中间电平状态,若不是,则高电平就恢复成高电平对应的1,低电平就恢复成低电平对应的0。若当前数据是中间电平状态,则获取上一数据的电平状态,并根据上一数据的电平状态确定当前数据对应的数值,该恢复过程简单运算量小。In the above embodiment, when the data recovery circuit recovers the encoded data into serial data, it can collect the encoded data according to the frequency of the clock recovery signal, and determine the received data based on the comparison results of the first comparator and the second comparator. Whether the current data is in the intermediate level state, if not, the high level will return to 1 corresponding to the high level, and the low level will return to 0 corresponding to the low level. If the current data is in an intermediate level state, the level state of the previous data is obtained, and the value corresponding to the current data is determined based on the level state of the previous data. This recovery process is simple and requires little calculation.

第三方面,本申请提供一种数据传输方法,应用于源芯片,所述方法包括:所述源芯片的数据编码模块接收串行数据,对所述串行数据进行编码得到编码数据,并将所述编码数据传输至所述源芯片的驱动器,其中,所述编码数据的任意相邻两个数据之间均有跳变延;所述驱动器接收所述编码数据,并将所述编码数据发往对端的目的芯片,以使所述对端的目的芯片对所述编码数据进行处理。In a third aspect, the present application provides a data transmission method, applied to a source chip. The method includes: the data encoding module of the source chip receives serial data, encodes the serial data to obtain encoded data, and The encoded data is transmitted to the driver of the source chip, where there is a jump delay between any two adjacent data of the encoded data; the driver receives the encoded data and sends the encoded data to the destination chip at the opposite end, so that the destination chip at the opposite end processes the encoded data.

在上述的实施方式中,数据编码模块可以对串行数据进行编码,得到编码数据,以实现编码数据的任意相邻两个数据之间均有跳变延。由于任意相邻两个数据之间均有跳变延,使得对端的芯片在每接收到一个数据时,均能通过跳变延的变化得知,即每个跳变延的变化均对应一个接收到的数据,从而相当于利用编码数据实现了时钟信号的传递。通过对串行数据的编码,使得编码数据通过跳变延的变化携带有时钟信号,与现有技术中不携带时钟信号,需对端的芯片自适应时钟相比,降低了恢复时钟的难度,减小了数据传输的延迟。In the above embodiment, the data encoding module can encode the serial data to obtain encoded data, so as to achieve a jump delay between any two adjacent data of the encoded data. Since there is a transition delay between any two adjacent pieces of data, each time the chip at the opposite end receives a piece of data, it can be informed by the change in the transition delay. That is, each change in transition delay corresponds to a receiving data. The received data is equivalent to using encoded data to realize the transmission of clock signals. By encoding the serial data, the encoded data carries the clock signal through the change of transition delay. Compared with the existing technology that does not carry the clock signal and requires an adaptive clock on the opposite end chip, the difficulty of recovering the clock is reduced and the time is reduced. Reduces data transmission delay.

在一个可能的设计中,所述数据编码模块接收串行数据,对所述串行数据进行编码得到编码数据,包括:接收当前数据;判断所述当前数据对应的电平状态与所述当前数据的前一数据对应的电平状态是否一致;若是,将所述当前数据编码为中间电平;若否,保留所述当前数据对应的电平状态。In a possible design, the data encoding module receives serial data, encodes the serial data to obtain encoded data, including: receiving current data; judging the level state corresponding to the current data and the current data Whether the level state corresponding to the previous data is consistent; if so, the current data is encoded as an intermediate level; if not, the level state corresponding to the current data is retained.

在上述的实施方式中,可以将当前数据的电平状态与前一数据的电平状态进行比较,判断两者的电平状态是否一致,若一致,则以中间电平表示当前数据的电平状态,若不一致在保留当前数据原本的电平状态。通过中间电平的引入,可以在相邻两个数据处于相同电平时,改变相邻两个数据中后一数据的电平状态,从而实现令相邻两个数据中不会出现相同电平的情况。In the above embodiment, the level state of the current data can be compared with the level state of the previous data to determine whether the level states of the two are consistent. If they are consistent, the level of the current data is represented by the intermediate level. status, if inconsistent, the original level status of the current data is retained. Through the introduction of intermediate levels, when two adjacent data are at the same level, the level state of the latter data in the two adjacent data can be changed, so that the same level will not appear in the two adjacent data. Condition.

在一个可能的设计中,所述数据编码模块包括第一数字触发器、第二数字触发器、同或运算器以及选择器;所述第一数字触发器的CLK端接收时钟信号,第一数字触发器的输入端用于接收所述串行数据,所述第一数字触发器的输出端与所述同或运算器的第一输入端连接;所述同或运算器的第二输入端用于接收所述串行数据,所述同或运算器的输出端与所述选择器的第一输入端连接;所述选择器的输出端与所述第二数字触发器的输入端连接;所述第二数字触发器的输出端与所述选择器的第二输入端连接,所述第二数字触发器的CLK端用于接收所述时钟信号;所述数据编码模块接收所述串行数据,对所述串行数据进行编码得到编码数据,包括:将所述串行数据与已经延迟一个时钟周期的串行数据进行位与位之间的同或运算,得到运算结果;若所述运算结果为0,则确定所述串行数据的对应位的数据的电平为原电平;若所述运算结果为1,判断上一位数据的电平状态是否为中间电平;若上一位数据的电平状态是中间电平,则确定所述串行数据的对应位的数据的电平为原电平;若上一位数据的电平状态不是中间电平,则确定所述串行数据的对应位的数据的电平为中间电平。In a possible design, the data encoding module includes a first digital flip-flop, a second digital flip-flop, an exclusive OR operator and a selector; the CLK terminal of the first digital flip-flop receives a clock signal, and the first digital flip-flop The input end of the flip-flop is used to receive the serial data, the output end of the first digital flip-flop is connected to the first input end of the XOR operator; the second input end of the XOR operator is When receiving the serial data, the output terminal of the XOR operator is connected to the first input terminal of the selector; the output terminal of the selector is connected to the input terminal of the second digital flip-flop; the The output end of the second digital flip-flop is connected to the second input end of the selector, and the CLK end of the second digital flip-flop is used to receive the clock signal; the data encoding module receives the serial data , encoding the serial data to obtain encoded data, including: performing an exclusive OR operation between bits on the serial data and the serial data that has been delayed by one clock cycle to obtain the operation result; if the operation If the result is 0, it is determined that the data level of the corresponding bit of the serial data is the original level; if the operation result is 1, it is determined whether the level state of the previous bit of data is the middle level; if the previous If the level state of the bit data is an intermediate level, it is determined that the level of the corresponding bit data of the serial data is the original level; if the level state of the previous bit data is not an intermediate level, it is determined that the serial data level is not an intermediate level. The data level of the corresponding bit of the row data is the middle level.

在上述的实施方式中,第一数字触发器可以将串行数据延迟一个时钟周期,串行数据以及延迟了一个时钟周期的串行数据进行同或运算,得到运算结果。根据具体的运算结果以及上一位数据的电平状态,可以决定该位数据的电平状态。若运算结果为0,则表示当前位数据的电平状态与上一位数据的电平状态不同,则可以直接输出该位数据原本的电平。若运算结果为1,则表示当前位数据的电平状态与上一位数据的实际电平状态相同,需进一步判断:上一位数据的电平状态是否被改为中间电平。若上一位数据的电平状态被改为中间电平,则当前位数据的电平状态不需再进行修改,可以直接输出原本的电平,以与上一位数据的电平状态区分;若上一位数据的电平状态未被改为中间电平,则当前位数据的电平状态需要进行修改为中间电平,以与上一位数据的电平状态区分。In the above embodiment, the first digital flip-flop can delay the serial data by one clock cycle, and perform an exclusive OR operation on the serial data and the serial data delayed by one clock cycle to obtain the operation result. According to the specific operation result and the level state of the previous bit of data, the level state of the bit of data can be determined. If the operation result is 0, it means that the level state of the current bit data is different from the level state of the previous bit data, and the original level of the bit data can be directly output. If the operation result is 1, it means that the level state of the current bit data is the same as the actual level state of the previous bit data. It needs to be further determined: whether the level state of the previous bit data has been changed to an intermediate level. If the level state of the previous bit of data is changed to the middle level, the level state of the current bit of data does not need to be modified, and the original level can be output directly to distinguish it from the level state of the previous bit of data; If the level state of the previous bit of data has not been changed to the middle level, the level state of the current bit of data needs to be modified to the middle level to distinguish it from the level state of the previous bit of data.

第四方面,本申请提供一种数据传输方法,应用于目的芯片,所述方法包括:所述目的芯片的第一比较器接收对端的源芯片发送的编码数据,并将所述编码数据与第一参考电平进行比较,将所述编码数据中高于所述第一参考电平的输出为高电平,低于所述第一参考电平的输出为低电平,得到第一波形,并将所述第一波形传输给所述目的芯片的时钟恢复电路,其中,所述第一参考电平在中间电平与高电平之间;所述目的芯片的第二比较器接收所述编码数据,并将所述编码数据与第二参考电平进行比较,将所述编码数据中高于所述第二参考电平的输出为高电平,低于所述第二参考电平的输出为低电平,得到第二波形,并将所述第二波形传输给所述目的芯片的时钟恢复电路,其中,所述第二参考电平在所述中间电平与低电平之间;所述时钟恢复电路获取所述第一波形的波形翻转的脉冲以及所述第二波形的波形翻转的脉冲,并对获取到的脉冲进行并处理,获得时钟恢复信号,并将所述时钟恢复信号传输给所述目的芯片的数据恢复电路;所述数据恢复电路根据所述时钟恢复信号采集所述编码数据,并将所述编码数据恢复成串行数据。In a fourth aspect, the present application provides a data transmission method, applied to a destination chip. The method includes: the first comparator of the destination chip receives the encoded data sent by the source chip of the opposite end, and compares the encoded data with the first comparator of the destination chip. A reference level is compared, the output of the encoded data higher than the first reference level is high level, and the output lower than the first reference level is low level to obtain the first waveform, and The first waveform is transmitted to the clock recovery circuit of the destination chip, wherein the first reference level is between the intermediate level and the high level; the second comparator of the destination chip receives the code data, and compare the encoded data with the second reference level, output the encoded data higher than the second reference level as high level, and output the encoded data lower than the second reference level as low level, obtain a second waveform, and transmit the second waveform to the clock recovery circuit of the destination chip, wherein the second reference level is between the intermediate level and the low level; The clock recovery circuit acquires the waveform inversion pulse of the first waveform and the waveform inversion pulse of the second waveform, and processes the acquired pulses to obtain a clock recovery signal, and transmits the clock recovery signal To the data recovery circuit of the destination chip; the data recovery circuit collects the encoded data according to the clock recovery signal and restores the encoded data into serial data.

在上述的实施方式中,第一比较器可以通过自身的参考电平将中间电平恢复为低电平,得到第一波形;第二比较器可以通过自身的参考电平将中间电平恢复为高电平,得到第二波形。然后时钟恢复电路可以分别获得第一波形波形翻转位置对应的脉冲,以及第二波形波形翻转位置对应的脉冲,然后对两个脉冲进行并处理,便可以得到时钟恢复信号。数据恢复电路可以根据上述的时钟恢复信号采集编码数据,并将编码数据恢复为串行数据。通过第一比较器、第二比较器以及时钟恢复电路的配合,便可以从编码数据中恢复出时钟信号,与现有技术相比,恢复时钟信号的电路结构简单,降低了恢复时钟的难度,减小了数据传输的延迟。In the above embodiment, the first comparator can restore the middle level to a low level through its own reference level to obtain the first waveform; the second comparator can restore the middle level to a low level through its own reference level. High level, get the second waveform. Then the clock recovery circuit can respectively obtain the pulse corresponding to the waveform flip position of the first waveform and the pulse corresponding to the waveform flip position of the second waveform, and then process the two pulses together to obtain the clock recovery signal. The data recovery circuit can collect the encoded data based on the above-mentioned clock recovery signal and restore the encoded data to serial data. Through the cooperation of the first comparator, the second comparator and the clock recovery circuit, the clock signal can be recovered from the encoded data. Compared with the existing technology, the circuit structure of the clock signal recovery is simple, which reduces the difficulty of recovering the clock. Reduces data transmission delay.

在一个可能的设计中,所述时钟恢复电路包括至少一个第一延时器、第一异或运算器、至少一个第二延时器、第二异或运算器以及或运算器;所述时钟恢复电路获取第一波形的波形翻转的脉冲以及第二波形的波形翻转的脉冲,并对获取到的脉冲进行并处理,获得时钟恢复信号,包括:所述至少一个第一延时器对所述第一波形进行延迟;所述第一异或运算器对所述第一波形、经过延迟的第一波形进行异或运算,得到第一脉冲波形,其中,所述第一脉冲波形为所述第一波形的波形翻转对应的脉冲信号所在的波形;所述至少一个第二延时器对所述第二波形进行延迟;所述第二异或运算器对所述第二波形、经过延迟的第二波形进行异或运算,得到第二脉冲波形,其中,所述第二脉冲波形为所述第二波形的波形翻转对应的脉冲信号所在的波形;所述或运算器对所述第一脉冲波形和第二脉冲波形进行或处理,得到脉冲融合波形,所述脉冲融合波形为所述时钟恢复信号。In a possible design, the clock recovery circuit includes at least a first delayer, a first XOR operator, at least a second delayer, a second XOR operator and an OR operator; the clock The recovery circuit acquires the waveform inversion pulse of the first waveform and the waveform inversion pulse of the second waveform, and processes the acquired pulses to obtain a clock recovery signal, including: the at least one first delayer The first waveform is delayed; the first XOR operator performs an XOR operation on the first waveform and the delayed first waveform to obtain a first pulse waveform, wherein the first pulse waveform is the The waveform of a waveform inverts the waveform of the corresponding pulse signal; the at least one second delayer delays the second waveform; the second XOR operator delays the second waveform and the delayed third waveform. Exclusive OR operation is performed on the two waveforms to obtain a second pulse waveform, wherein the second pulse waveform is the waveform in which the pulse signal corresponding to the waveform inversion of the second waveform is located; the OR operator performs the operation on the first pulse waveform Perform OR processing with the second pulse waveform to obtain a pulse fusion waveform, and the pulse fusion waveform is the clock recovery signal.

在上述的实施方式中,时钟恢复电路包括第一延时器、第一异或运算器、第二延时器、第二异或运算器以及或运算器。第一延时器用于将第一波形进行延迟,第一异或运算器将进行过延迟的第一波形与第一波形进行异或处理,可以得到第一波形在翻转位置的脉冲信号所组成的波形,该波形可以记为第一脉冲波形。第二异或运算器将进行过延迟的第二波形与第二波形进行异或处理,可以得到第二波形在翻转位置的脉冲信号所组成的波形,该波形记为第二脉冲波形。取第一脉冲波形与第二脉冲波形的或集,得到脉冲融合波形,该脉冲融合波形的相邻两个脉冲之间的时间间隔与编码数据中相邻两个数据之间的时间间隔相同,因此,该脉冲融合波形便是时钟恢复信号。In the above embodiment, the clock recovery circuit includes a first delayer, a first XOR operator, a second delayer, a second XOR operator and an OR operator. The first delayer is used to delay the first waveform, and the first XOR operator performs XOR processing on the delayed first waveform and the first waveform to obtain a pulse signal composed of the first waveform at the flip position. waveform, which can be recorded as the first pulse waveform. The second XOR operator performs XOR processing on the delayed second waveform and the second waveform, and can obtain a waveform composed of the pulse signal of the second waveform at the flip position, and this waveform is recorded as the second pulse waveform. Take the OR set of the first pulse waveform and the second pulse waveform to obtain the pulse fusion waveform. The time interval between two adjacent pulses of the pulse fusion waveform is the same as the time interval between two adjacent data in the encoded data. Therefore, this pulse fusion waveform is the clock recovery signal.

在一个可能的设计中,所述时钟恢复电路还包括二分频器,所述二分频器的CLK端与所述或运算器的输出端连接;在所述或运算器对所述第一脉冲波形和第二脉冲波形进行或处理,得到脉冲融合波形之后,所述方法还包括:所述二分频器对所述时钟恢复信号进行二分频处理,得到占空比为50%的时钟恢复信号。In a possible design, the clock recovery circuit further includes a two-frequency divider, the CLK terminal of the two-frequency divider is connected to the output terminal of the OR operator; in the OR operator, the first After performing OR processing on the pulse waveform and the second pulse waveform to obtain the pulse fusion waveform, the method further includes: the frequency divider performs frequency division processing on the clock recovery signal to obtain a clock with a duty cycle of 50%. Restore signal.

在上述的实施方式中,在获得时钟恢复信号之后,还可以通过二分频器对时钟恢复信号进行二分频处理,得到占空比为50%的时钟恢复信号。经过二分频处理的时钟恢复信号更加稳定。In the above embodiment, after obtaining the clock recovery signal, the clock recovery signal can also be divided by two using a frequency divider to obtain a clock recovery signal with a duty cycle of 50%. The clock recovery signal processed by dividing by two is more stable.

在一个可能的设计中,所述数据恢复电路根据所述时钟恢复信号采集所述编码数据,并将所述编码数据恢复成串行数据,包括:确定接收的当前数据为中间电平状态;获取所述当前数据的上一数据的电平状态,将所述上一数据的电平状态作为所述当前数据的电平状态。In a possible design, the data recovery circuit collects the encoded data according to the clock recovery signal, and restores the encoded data into serial data, including: determining that the current data received is an intermediate level state; obtaining The level state of the previous data of the current data is taken as the level state of the current data.

在上述的实施方式中,数据恢复电路在将编码数据恢复成串行数据时,可以根据时钟恢复信号的频率采集编码数据,并根据第一比较器与第二比较器的比较结果,判断接收的当前数据是否为中间电平状态,若不是,则高电平就恢复成高电平对应的1,低电平就恢复成低电平对应的0。若当前数据是中间电平状态,则获取上一数据的电平状态,并根据上一数据的电平状态确定当前数据对应的数值,该恢复过程简单运算量小。In the above embodiment, when the data recovery circuit recovers the encoded data into serial data, it can collect the encoded data according to the frequency of the clock recovery signal, and determine the received data based on the comparison results of the first comparator and the second comparator. Whether the current data is in the intermediate level state, if not, the high level will return to 1 corresponding to the high level, and the low level will return to 0 corresponding to the low level. If the current data is in an intermediate level state, the level state of the previous data is obtained, and the value corresponding to the current data is determined based on the level state of the previous data. This recovery process is simple and requires little calculation.

第五方面,本申请提供一种处理器系统,包括第一方面或第一方面的任一种可能的设计的芯片,以及第二方面或第二方面的任一种可能的设计的芯片。In a fifth aspect, this application provides a processor system, including a chip of the first aspect or any possible design of the first aspect, and a chip of the second aspect or any possible design of the second aspect.

为使本申请实施例所要实现的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above objects, features and advantages achieved by the embodiments of the present application more obvious and easy to understand, preferred embodiments are cited below and described in detail with reference to the attached drawings.

附图说明Description of the drawings

为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application, therefore This should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without exerting creative efforts.

图1示出了现有技术中在芯片裸片之间进行数据传输的应用场景图;Figure 1 shows an application scenario diagram for data transmission between chip dies in the prior art;

图2示出了本申请实施例提供的处理器系统的结构示意图;Figure 2 shows a schematic structural diagram of a processor system provided by an embodiment of the present application;

图3示出了数据编码模块的结构示意图;Figure 3 shows a schematic structural diagram of the data encoding module;

图4示出了数据编码模块工作过程中对应的波形图;Figure 4 shows the corresponding waveform diagram during the working process of the data encoding module;

图5a示出了驱动器输出高电平状态的结构示意图;Figure 5a shows a schematic structural diagram of the driver outputting a high level state;

图5b示出了驱动器输出中间电平状态的结构示意图;Figure 5b shows a schematic structural diagram of the driver output intermediate level state;

图5c示出了驱动器输出低电平状态的结构示意图;Figure 5c shows a schematic structural diagram of the driver outputting a low level state;

图6示出了将串行数据编码为编码数据的一种具体实施方式的波形图;Figure 6 shows a waveform diagram of a specific implementation of encoding serial data into encoded data;

图7示出了时钟恢复电路工作时产生的波形图;Figure 7 shows the waveform diagram generated when the clock recovery circuit is working;

图8示出了时钟恢复电路的结构示意图;Figure 8 shows a schematic structural diagram of the clock recovery circuit;

图9示出了本申请实施例提供的数据传输方法的流程示意图;Figure 9 shows a schematic flow chart of the data transmission method provided by the embodiment of the present application;

图10示出了本申请另一实施例提供的数据传输方法的流程示意图;Figure 10 shows a schematic flowchart of a data transmission method provided by another embodiment of the present application;

图11示出了图10中步骤S230的具体步骤的流程示意图。FIG. 11 shows a schematic flowchart of the specific steps of step S230 in FIG. 10 .

具体实施方式Detailed ways

请参见图1,图1示出了对照实施例中芯片裸片之间进行数据传输的方式,下面以将源芯片100的数据传输向目的芯片200进行说明。在本申请实施例中,文中所提到的芯片在不做特定说明的情况下,均为die。Please refer to FIG. 1 . FIG. 1 shows the method of data transmission between chip dies in the comparative embodiment. The following description will be based on data transmission from the source chip 100 to the destination chip 200 . In the embodiments of this application, the chips mentioned in the text are all die unless otherwise specified.

传输的数据可以是不归零(Non Return Zero,简称NRZ)码,也可以是脉冲幅度调制(Pulse Amplitude Modulation,简称PAM)码。其中,NRZ通过低电平和高电平分别传输数据0和1,PAM码则用多个电平经过编码传输多个数据。The transmitted data can be a Non Return Zero (NRZ) code or a Pulse Amplitude Modulation (PAM) code. Among them, NRZ transmits data 0 and 1 respectively through low level and high level, and PAM code uses multiple levels to encode and transmit multiple data.

在源芯片100中,并串转换模块101将四路并行数据转换成一路串行数据,并通过驱动器102将串行数据发出。In the source chip 100, the parallel-to-serial conversion module 101 converts four channels of parallel data into one channel of serial data, and sends the serial data through the driver 102.

在目的芯片200中,通过第一接收器201和第二接收器202分别在不同的时钟跳变延采集数据。例如,不妨设第一接收器201在时钟的上升沿采集数据,第二接收器202在时钟的下降沿采集数据。上述的时钟可以是预先设置的时钟。In the destination chip 200, data is collected at different clock transition delays through the first receiver 201 and the second receiver 202 respectively. For example, it may be assumed that the first receiver 201 collects data on the rising edge of the clock, and the second receiver 202 collects data on the falling edge of the clock. The above clock may be a preset clock.

第一接收器201和第二接收器202根据预先设置的时钟进行数据采集,并把采集到的数据传输到串并转换模块203进行串并转换,串并转换模块203将采集到的两路数据重新转换为四路并行数据,并把四路并行数据传输到逻辑模块204。The first receiver 201 and the second receiver 202 collect data according to the preset clock, and transmit the collected data to the serial-to-parallel conversion module 203 for serial-to-parallel conversion. The serial-to-parallel conversion module 203 converts the two collected data Re-convert the four-channel parallel data into four-channel parallel data, and transmit the four-channel parallel data to the logic module 204.

逻辑模块204可以根据接收到的四路并行数据判断数据是超前时钟还是落后时钟。若数据超前时钟,则逻辑模块204可以调节相位内插(Phase Interpolator,简称PI)模块205,使时钟提前;若数据落后时钟,则逻辑模块204可以调节PI模块205,使时钟延后。The logic module 204 can determine whether the data is ahead of the clock or behind the clock based on the received four-channel parallel data. If the data is ahead of the clock, the logic module 204 can adjust the phase interpolator (PI) module 205 to advance the clock; if the data lags behind the clock, the logic module 204 can adjust the PI module 205 to delay the clock.

其中,PI模块205可以从锁相环(Phase Locked Loop,简称PLL)206获取时钟信号,并根据逻辑模块204的指令,对时钟信号进行调节。Among them, the PI module 205 can obtain the clock signal from the phase locked loop (Phase Locked Loop, PLL for short) 206, and adjust the clock signal according to the instructions of the logic module 204.

上述的进行数据传输的方式中,需要逻辑模块204根据时钟与数据之间的相位关系对时钟进行调节,导致数据传输延迟较大。In the above-mentioned method of data transmission, the logic module 204 is required to adjust the clock according to the phase relationship between the clock and the data, resulting in a large data transmission delay.

为了解决该问题,本申请通过对串行数据进行编码得到编码数据,使得编码数据的任意相邻两个数据之间均有跳变延,编码数据通过跳变延的变化携带有时钟信号,从而降低恢复时钟的难度。In order to solve this problem, this application obtains encoded data by encoding the serial data, so that there is a jump delay between any two adjacent data of the encoded data, and the encoded data carries the clock signal through the change of the jump delay, so that Reduce the difficulty of recovering the clock.

请参见图2,图2示出了本申请实施例提供的处理器系统,该处理器系统包括源芯片100以及目的芯片200,源芯片100与目的芯片200之间相互通信。Please refer to Figure 2. Figure 2 shows a processor system provided by an embodiment of the present application. The processor system includes a source chip 100 and a destination chip 200. The source chip 100 and the destination chip 200 communicate with each other.

源芯片100包括并串转换模块101、数据编码模块110以及驱动器102,并串转换模块101、数据编码模块110以及驱动器102三者顺次连接。The source chip 100 includes a parallel-to-serial conversion module 101, a data encoding module 110, and a driver 102. The parallel-to-serial conversion module 101, the data encoding module 110, and the driver 102 are connected in sequence.

并串转换模块101用于将四路并行数据转换成一路串行数据,并将串行数据传输给数据编码模块110。The parallel-to-serial conversion module 101 is used to convert four channels of parallel data into one channel of serial data, and transmit the serial data to the data encoding module 110 .

数据编码模块110用于接收串行数据,对串行数据进行编码得到编码数据,并将编码数据传输至驱动器102,其中,编码数据的任意相邻两个数据之间均有跳变延。The data encoding module 110 is used to receive serial data, encode the serial data to obtain encoded data, and transmit the encoded data to the driver 102, where there is a transition delay between any two adjacent data of the encoded data.

可选地,数据编码模块110具体用于:接收当前数据;判断当前数据对应的电平状态与当前数据的前一数据对应的电平状态是否一致;若是,将所述当前数据编码为中间电平;若否,保留当前数据对应的电平状态。Optionally, the data encoding module 110 is specifically configured to: receive the current data; determine whether the level state corresponding to the current data is consistent with the level state corresponding to the previous data of the current data; if so, encode the current data into an intermediate level state. If not, retain the level state corresponding to the current data.

请参见图6,图6示出了将串行数据编码为编码数据的一种具体实施方式,对于串行数据:010 011 000 111,并串转换模块101可以按照时钟信号CLK进行数据的传输:每逢CLK的跳变延,均可以传输一个数据到数据编码模块110,即在CLK的上升沿以及下降沿均可以传输一个数据到数据编码模块110。Please refer to Figure 6. Figure 6 shows a specific implementation manner of encoding serial data into encoded data. For serial data: 010 011 000 111, the parallel-to-serial conversion module 101 can transmit data according to the clock signal CLK: Each time CLK transitions, one piece of data can be transmitted to the data encoding module 110, that is, one piece of data can be transmitted to the data encoding module 110 on both the rising edge and the falling edge of CLK.

数据编码模块110可以将数据0转换为低电平状态L,将数据1转换为高电平状态H,并且在当前数据的电平状态与前一数据的电平状态一致时,将当前数据的电平状态确定为中间电平状态M。The data encoding module 110 can convert data 0 to a low-level state L, convert data 1 to a high-level state H, and when the level state of the current data is consistent with the level state of the previous data, convert the current data to the low-level state L. The level state is determined to be the intermediate level state M.

将串行数据中的连续三个相同的数据转换为编码数据的过程,可以采用如下方式进行:The process of converting three consecutive identical data in serial data into encoded data can be carried out as follows:

不妨以串行数据:010 011 000 111中的三个连续的0为例。第一个0与前一数据1的电平状态不相同,则第一个0对应的电平状态为L。Let's take the three consecutive 0s in serial data: 010 011 000 111 as an example. The level state of the first 0 is different from the previous data 1, so the level state corresponding to the first 0 is L.

第二个0原本对应的电平状态为L,但由于第二个0原本对应的电平状态与第一个0对应的电平状态相同,均为L,因此,可以将第二个0对应的电平状态确定为中间电平状态M。The level state corresponding to the second 0 is originally L, but since the level state corresponding to the second 0 is the same as the level state corresponding to the first 0, both are L, so the second 0 can be corresponding to The level state of is determined as the intermediate level state M.

第三个0原本对应的电平状态为L,由于第二个0对应的电平状态被确定为中间电平状态M,与第三个0原本对应的电平状态不一致,因此,对于第三个0,可以输出原本对应的电平状态L。The level state originally corresponding to the third 0 is L. Since the level state corresponding to the second 0 is determined to be the intermediate level state M, it is inconsistent with the level state originally corresponding to the third 0. Therefore, for the third 0 0, the original corresponding level state L can be output.

综上,串行数据000对应的编码数据为LML。In summary, the encoded data corresponding to serial data 000 is LML.

通过上述处理方式,可以得到串行数据:010 011 000 111对应的编码数据:LHLMHM LML HMH,显然,经编码后的编码数据的相邻两个数据之间均有跳变延。Through the above processing method, the encoded data corresponding to the serial data: 010 011 000 111 can be obtained: LHLMHM LML HMH. Obviously, there is a jump delay between two adjacent data of the encoded encoded data.

可选地,在一种具体实施方式中,数据编码模块110也可以将数据0转换为高电平状态H,将数据1转换为低电平状态L,并且在当前数据的电平状态与前一数据的电平状态一致时,将当前数据的电平状态确定为中间电平状态M。数据值与电平状态的对应关系不应该理解为是对本申请的限制。Optionally, in a specific implementation, the data encoding module 110 can also convert data 0 to a high level state H, convert data 1 to a low level state L, and compare the level state of the current data with the previous one. When the level states of one data are consistent, the level state of the current data is determined as the intermediate level state M. The correspondence between data values and level states should not be understood as a limitation of the present application.

请参见图3,在一种具体实施方式中,数据编码模块110包括第一数字触发器111、第二数字触发器112、同或运算器113以及选择器114。Referring to FIG. 3 , in a specific implementation, the data encoding module 110 includes a first digital flip-flop 111 , a second digital flip-flop 112 , an exclusive OR operator 113 and a selector 114 .

第一数字触发器111的CLK端用于接收时钟信号,第一数字触发器111的输入端用于接收串行数据,第一数字触发器111的输出端与同或运算器113的第一输入端连接。The CLK terminal of the first digital flip-flop 111 is used to receive a clock signal, the input terminal of the first digital flip-flop 111 is used to receive serial data, and the output terminal of the first digital flip-flop 111 is connected to the first input of the XOR operator 113 end connection.

同或运算器113的第二输入端用于接收串行数据,同或运算器113的输出端与所述选择器114的第一输入端连接。The second input terminal of the exclusive NOR operator 113 is used to receive serial data, and the output terminal of the exclusive NOR operator 113 is connected to the first input terminal of the selector 114 .

选择器114的输出端与第二数字触发器112的输入端连接;第二数字触发器112的输出端与选择器114的第二输入端连接,第二数字触发器112的CLK端用于接收所述时钟信号。The output terminal of the selector 114 is connected to the input terminal of the second digital flip-flop 112; the output terminal of the second digital flip-flop 112 is connected to the second input terminal of the selector 114, and the CLK terminal of the second digital flip-flop 112 is used to receive the clock signal.

第一数字触发器111用于将串行数据TxDat延迟一个时钟周期,同或运算器113用于进行串行数据TxDat与已经延迟一个时钟周期的串行数据TxDat_d的同或运算,获得运算结果。The first digital flip-flop 111 is used to delay the serial data TxDat by one clock cycle, and the exclusive-OR operator 113 is used to perform an exclusive-OR operation between the serial data TxDat and the serial data TxDat_d that has been delayed by one clock cycle to obtain the operation result.

选择器114用于根据上述的运算结果以及上一时钟周期选择器114输出的选择结果Txweak_d,确定本次时钟周期选择器114输出的选择结果Txweak。The selector 114 is used to determine the selection result Txweak output by the current clock cycle selector 114 based on the above operation result and the selection result Txweak_d output by the previous clock cycle selector 114.

可选地,请参见图4,在TxDat与TxDat_d同或处理结果为0时,确定本次时钟周期选择器114输出的选择结果Txweak为0。Optionally, please refer to Figure 4. When TxDat and TxDat_d are the same or the processing result is 0, it is determined that the selection result Txweak output by the selector 114 of this clock cycle is 0.

在TxDat与TxDat_d同或处理结果为1,且上一时钟周期选择器114输出的选择结果Txweak_d为0时,确定本次时钟周期选择器114输出的选择结果Txweak为1。When the OR processing result of TxDat and TxDat_d is 1, and the selection result Txweak_d output by the previous clock cycle selector 114 is 0, it is determined that the selection result Txweak output by the clock cycle selector 114 this time is 1.

在TxDat与TxDat_d同或处理结果为1,且上一时钟周期选择器114输出的选择结果Txweak_d为1时,确定本次时钟周期选择器114输出的选择结果Txweak为0。When the OR processing result of TxDat and TxDat_d is 1, and the selection result Txweak_d output by the previous clock cycle selector 114 is 1, it is determined that the selection result Txweak output by the clock cycle selector 114 this time is 0.

其中,Txweak为1,驱动器102输出中间电平;Txweak为0,驱动器102输出串行数据原本对应的电平信号。Among them, Txweak is 1, and the driver 102 outputs an intermediate level; Txweak is 0, and the driver 102 outputs a level signal originally corresponding to the serial data.

若运算结果为0,则表示当前位数据的电平状态与上一位数据的电平状态不同,则可以直接输出该位数据原本的电平。若运算结果为1,则表示当前位数据的电平状态与上一位数据的实际电平状态相同,需进一步判断:上一位数据的电平状态是否被改为中间电平。If the operation result is 0, it means that the level state of the current bit data is different from the level state of the previous bit data, and the original level of the bit data can be directly output. If the operation result is 1, it means that the level state of the current bit data is the same as the actual level state of the previous bit data. It needs to be further determined: whether the level state of the previous bit data has been changed to an intermediate level.

若上一位数据的电平状态被改为中间电平,即上一位数据的电平状态对应的上一时钟周期选择器114输出的选择结果Txweak_d为1,则当前位数据的电平状态不需再进行修改,可以直接输出原本的电平(即本次时钟周期选择器114输出的选择结果Txweak为0),以与上一位数据的电平状态区分;若上一位数据的电平状态未被改为中间电平,即上一位数据的电平状态对应的上一时钟周期选择器114输出的选择结果Txweak_d为0,则当前位数据的电平状态需要进行修改为中间电平(即本次时钟周期选择器114输出的选择结果Txweak为1),以与上一位数据的电平状态区分。If the level state of the previous bit of data is changed to the middle level, that is, the selection result Txweak_d output by the selector 114 of the previous clock cycle corresponding to the level state of the previous bit of data is 1, then the level state of the current bit of data No further modification is needed, and the original level can be directly output (that is, the selection result Txweak output by the clock cycle selector 114 this time is 0) to distinguish it from the level state of the previous bit of data; if the level of the previous bit of data is The flat state has not been changed to the intermediate level, that is, the selection result Txweak_d output by the selector 114 of the previous clock cycle corresponding to the level state of the previous bit data is 0, then the level state of the current bit data needs to be modified to the intermediate level. flat (that is, the selection result Txweak output by the selector 114 of this clock cycle is 1), to distinguish it from the level state of the previous bit of data.

驱动器102用于接收编码数据,并将编码数据发往对端的芯片,以使对端的芯片对所述编码数据进行处理。The driver 102 is used to receive the encoded data and send the encoded data to the opposite end chip, so that the opposite end chip processes the encoded data.

请参见图5a至图5c,图5a、图5b、以及图5c共同示出了驱动器102的一种具体实施方式的电路图,驱动器102包括第一电阻R1、第二电阻R2、第一开关k1、第二开关k2,其中,电源依次经第一电阻R1、第一开关k1、第二开关k2、第二电阻R2接地。传输线的一端连接于第一开关k1与第二开关k2之间,传输线的另一端与对端芯片的接地电阻R3连接。Please refer to Figure 5a to Figure 5c. Figure 5a, Figure 5b, and Figure 5c together show a circuit diagram of a specific implementation of the driver 102. The driver 102 includes a first resistor R1, a second resistor R2, a first switch k1, The second switch k2, in which the power supply is connected to the ground through the first resistor R1, the first switch k1, the second switch k2, and the second resistor R2 in sequence. One end of the transmission line is connected between the first switch k1 and the second switch k2, and the other end of the transmission line is connected to the ground resistor R3 of the opposite end chip.

若第一开关k1闭合、第二开关k2断开,则传输线传输的为高电平VDD/2,详情请参见图5a;若第一开关k1、第二开关k2均闭合,则传输线传输的为中间电平VDD/4,详情请参见图5b;若第一开关k1断开、第二开关k2闭合,则传输线传输的为低电平0,详情请参见图5c。其中,高电平VDD/2可以与数据1对应,低电平0可以与数据0对应。If the first switch k1 is closed and the second switch k2 is open, the transmission line transmits high level VDD/2. Please see Figure 5a for details; if the first switch k1 and the second switch k2 are both closed, the transmission line transmits Intermediate level VDD/4, please see Figure 5b for details; if the first switch k1 is open and the second switch k2 is closed, the transmission line transmits a low level 0, please see Figure 5c for details. Among them, the high level VDD/2 can correspond to data 1, and the low level 0 can correspond to data 0.

源芯片100可以通过控制第一开关k1或第二开关k2的闭合或关断来控制驱动器102输出的电平状态。The source chip 100 can control the level state of the output of the driver 102 by controlling the closing or closing of the first switch k1 or the second switch k2.

对于本申请实施例提供的源芯片100,数据编码模块110可以对串行数据进行编码,得到编码数据,以实现编码数据的任意相邻两个数据之间均有跳变延。由于任意相邻两个数据之间均有跳变延,使得对端的芯片在每接收到一个数据时,均能通过跳变延的变化得知,即每个跳变延的变化均对应一个接收到的数据,相当于利用编码数据实现了时钟信号的传递。通过对串行数据的编码,使得编码数据通过跳变延的变化携带有时钟信号,与现有技术中不携带时钟信号,需对端的芯片自适应时钟相比,降低了恢复时钟的难度,减小了数据传输的延迟。For the source chip 100 provided in the embodiment of the present application, the data encoding module 110 can encode the serial data to obtain encoded data, so as to achieve a jump delay between any two adjacent data of the encoded data. Since there is a transition delay between any two adjacent pieces of data, each time the chip at the opposite end receives a piece of data, it can be informed by the change in the transition delay. That is, each change in transition delay corresponds to a receiving data. The received data is equivalent to using encoded data to realize the transmission of clock signals. By encoding the serial data, the encoded data carries the clock signal through the change of transition delay. Compared with the existing technology that does not carry the clock signal and requires an adaptive clock on the opposite end chip, the difficulty of recovering the clock is reduced and the time is reduced. Reduces data transmission delay.

目的芯片200可以与上述源芯片100配合。目的芯片200包括第一比较器210、第二比较器220、时钟恢复电路230、数据恢复电路240以及串并转换模块203。The destination chip 200 may cooperate with the above-mentioned source chip 100. The target chip 200 includes a first comparator 210 , a second comparator 220 , a clock recovery circuit 230 , a data recovery circuit 240 and a serial-to-parallel conversion module 203 .

第一比较器210用于接收对端的芯片发送的编码数据,并将编码数据与第一参考电平进行比较,将编码数据中高于第一参考电平的输出为高电平,低于第一参考电平的输出为低电平,得到第一波形。其中,第一参考电平在中间电平与高电平之间。The first comparator 210 is used to receive the encoded data sent by the chip of the opposite end, compare the encoded data with the first reference level, and output the encoded data higher than the first reference level as a high level, and output the encoded data lower than the first reference level as a high level. The output of the reference level is low level, and the first waveform is obtained. Wherein, the first reference level is between the middle level and the high level.

第二比较器220用于接收编码数据,并将编码数据与第二参考电平进行比较,将编码数据中高于第二参考电平的输出为高电平,低于第二参考电平的输出为低电平,得到第二波形。其中,第二参考电平在中间电平与低电平之间。The second comparator 220 is used to receive the encoded data, compare the encoded data with the second reference level, and output the encoded data higher than the second reference level as a high level, and output the encoded data lower than the second reference level. is low level, the second waveform is obtained. Wherein, the second reference level is between the middle level and the low level.

请参见图6,第一参考电平可以为图6中编码数据位置的D1表示的虚线,第二参考电平可以为图6中编码数据位置的D2表示的虚线。图7示出了第一比较器210对编码数据进行处理得到的第一波形amp_h,以及第二比较器220对编码数据进行处理得到的第二波形amp_l。Referring to FIG. 6 , the first reference level may be a dotted line represented by D1 of the encoded data position in FIG. 6 , and the second reference level may be a dotted line represented by D2 of the encoded data position in FIG. 6 . FIG. 7 shows the first waveform amp_h obtained by processing the encoded data by the first comparator 210, and the second waveform amp_l obtained by processing the encoded data by the second comparator 220.

接下来对第一比较器210根据编码数据得到第一波形的方式进行详细说明:Next, the method in which the first comparator 210 obtains the first waveform according to the encoded data is described in detail:

不妨以编码数据的前四位数LHLM为例,请参见图6:Let’s take the first four digits of the LHLM encoded data as an example, see Figure 6:

第一位数L低于第一比较器210的第一参考电平D1,则输出为0;The first digit L is lower than the first reference level D1 of the first comparator 210, then the output is 0;

第二位数H高于第一比较器210的第一参考电平D1,则输出为1;The second digit H is higher than the first reference level D1 of the first comparator 210, then the output is 1;

第三位数L低于第一比较器210的第一参考电平D1,则输出为0;The third digit L is lower than the first reference level D1 of the first comparator 210, then the output is 0;

第四位数M低于第一比较器210的第一参考电平D1,则输出为0;If the fourth digit M is lower than the first reference level D1 of the first comparator 210, the output is 0;

因此,编码数据的前四位数LHLM对应的第一波形为0100。Therefore, the first waveform corresponding to the first four digits of LHLM of the encoded data is 0100.

可以根据对编码数据的每个数均进行判断,从而得到完整的编码数据对应的完整的第一波形amp_h。Each number of the encoded data can be judged to obtain the complete first waveform amp_h corresponding to the complete encoded data.

接下来对第二比较器220根据编码数据得到第二波形的方式进行详细说明:Next, the method in which the second comparator 220 obtains the second waveform according to the encoded data is described in detail:

不妨也以编码数据的前四位数LHLM为例,请参见图6:Let’s also take the first four digits of the encoded data LHLM as an example, see Figure 6:

第一位数L低于第二比较器220的第二参考电平D2,则输出为0;The first digit L is lower than the second reference level D2 of the second comparator 220, then the output is 0;

第二位数H高于第二比较器220的第二参考电平D2,则输出为1;The second digit H is higher than the second reference level D2 of the second comparator 220, then the output is 1;

第三位数L低于第二比较器220的第二参考电平D2,则输出为0;The third digit L is lower than the second reference level D2 of the second comparator 220, then the output is 0;

第四位数M高于第二比较器220的第二参考电平D2,则输出为1;If the fourth digit M is higher than the second reference level D2 of the second comparator 220, the output is 1;

因此,编码数据的前四位数LHLM对应的第二波形为0101。Therefore, the second waveform corresponding to the first four digits of LHLM of the encoded data is 0101.

可以根据对编码数据的每个数均进行判断,从而得到完整的编码数据对应的完整的第二波形amp_l。The complete second waveform amp_l corresponding to the complete coded data can be obtained by judging each number of the coded data.

时钟恢复电路230用于获取第一波形的波形翻转的脉冲以及第二波形的波形翻转的脉冲,并对获取到的脉冲进行并处理,获得时钟恢复信号RXCLK。The clock recovery circuit 230 is configured to acquire the waveform inversion pulse of the first waveform and the waveform inversion pulse of the second waveform, and perform a combined processing on the acquired pulses to obtain the clock recovery signal RXCLK.

请参见图7,时钟恢复电路230包括至少一个第一延时器231、第一异或运算器232、至少一个第二延时器233、第二异或运算器234、或运算器235以及二分频器236。Referring to FIG. 7 , the clock recovery circuit 230 includes at least a first delayer 231 , a first XOR operator 232 , at least a second delayer 233 , a second XOR operator 234 , an OR operator 235 and two Divider 236.

至少一个第一延时器231顺次连接,用于对第一波形amp_h进行延迟,并将经过延迟的第一波形传输到第一异或运算器232。其中,至少一个第一延时器231对第一波形的延迟时间大于第一波形的上升沿的变化时间与第一波形的下降沿的变化时间之和。At least one first delayer 231 is connected in sequence for delaying the first waveform amp_h and transmitting the delayed first waveform to the first XOR operator 232 . Wherein, the delay time of the at least one first delayer 231 for the first waveform is greater than the sum of the change time of the rising edge of the first waveform and the change time of the falling edge of the first waveform.

第一异或运算器232用于对第一波形、经过延迟的第一波形进行异或运算,得到第一脉冲波形edge_h。第一延时器231用于将第一波形进行延迟,第一异或运算器232将进行过延迟的第一波形与第一波形进行异或处理,可以得到第一波形在翻转位置的脉冲信号所组成的波形,该波形可以记为第一脉冲波形。The first XOR operator 232 is used to perform an XOR operation on the first waveform and the delayed first waveform to obtain the first pulse waveform edge_h. The first delayer 231 is used to delay the first waveform, and the first XOR operator 232 performs XOR processing on the delayed first waveform and the first waveform to obtain a pulse signal of the first waveform at the flip position. The resulting waveform can be recorded as the first pulse waveform.

至少一个第二延时器233顺次连接,用于对第二波形amp_l进行延迟,并将经过延迟的第二波形传输到第二异或运算器234。其中,至少一个第二延时器233对第二波形的延迟时间大于第二波形的上升沿的变化时间与第二波形的下降沿的变化时间之和。At least one second delayer 233 is connected in sequence for delaying the second waveform amp_1, and transmitting the delayed second waveform to the second XOR operator 234. Wherein, the delay time of at least one second delayer 233 for the second waveform is greater than the sum of the change time of the rising edge of the second waveform and the change time of the falling edge of the second waveform.

第二异或运算器234用于对第二波形、经过延迟的第二波形进行异或运算,得到第二脉冲波形edge_l。第二异或运算器234将进行过延迟的第二波形与第二波形进行异或处理,可以得到第二波形在翻转位置的脉冲信号所组成的波形,该波形记为第二脉冲波形。The second XOR operator 234 is used to perform an XOR operation on the second waveform and the delayed second waveform to obtain the second pulse waveform edge_l. The second XOR operator 234 performs XOR processing on the delayed second waveform and the second waveform to obtain a waveform composed of the pulse signal of the second waveform at the flip position, and this waveform is recorded as the second pulse waveform.

或运算器235用于对第一脉冲波形和第二脉冲波形进行或处理,得到脉冲融合波形,脉冲融合波形为时钟恢复信号edge_h|edge_l。The OR operator 235 is used to perform OR processing on the first pulse waveform and the second pulse waveform to obtain a pulse fusion waveform, where the pulse fusion waveform is the clock recovery signal edge_h|edge_l.

取第一脉冲波形与第二脉冲波形的或集,得到脉冲融合波形edge_h|edge_l,该脉冲融合波形edge_h|edge_l的相邻两个脉冲之间的时间间隔与编码数据中相邻两个数据之间的时间间隔相同,因此,该脉冲融合波形便是时钟恢复信号。Take the OR set of the first pulse waveform and the second pulse waveform to obtain the pulse fusion waveform edge_h|edge_l. The time interval between two adjacent pulses of the pulse fusion waveform edge_h|edge_l is equal to the time interval between two adjacent data in the encoded data. The time interval between them is the same, so the pulse fusion waveform is the clock recovery signal.

二分频器236用于对所述时钟恢复信号进行二分频处理,得到占空比为50%的时钟恢复信号RXCLK。The frequency divider 236 is used to divide the clock recovery signal by two to obtain the clock recovery signal RXCLK with a duty cycle of 50%.

时钟恢复信号RXCLK的上升沿与下降沿均可以触发信号采集,由于时钟是从编码数据中恢复出来的,时钟的Jitter特性和编码数据保持一致,并且还降低了数据恢复的难度。Both the rising and falling edges of the clock recovery signal RXCLK can trigger signal acquisition. Since the clock is recovered from the encoded data, the jitter characteristics of the clock are consistent with the encoded data, and the difficulty of data recovery is also reduced.

在获得时钟恢复信号之后,还可以通过二分频器236对时钟恢复信号进行二分频处理,得到占空比为50%的时钟恢复信号。经过二分频处理的时钟恢复信号更加稳定。After obtaining the clock recovery signal, the clock recovery signal can also be divided by two through the frequency divider 236 to obtain a clock recovery signal with a duty cycle of 50%. The clock recovery signal processed by dividing by two is more stable.

数据恢复电路240用于根据时钟恢复信号采集编码数据,并将编码数据恢复成串行数据。The data recovery circuit 240 is used to collect encoded data according to the clock recovery signal and restore the encoded data into serial data.

数据恢复电路240具体用于:确定接收的当前数据为中间电平状态;获取所述当前数据的上一数据的电平状态,将所述上一数据的电平状态作为所述当前数据的电平状态。The data recovery circuit 240 is specifically used to: determine that the current data received is an intermediate level state; obtain the level state of the previous data of the current data, and use the level state of the previous data as the level state of the current data. flat state.

数据恢复电路240在将编码数据恢复成串行数据时,可以根据时钟恢复信号的频率采集编码数据,并根据第一比较器210与第二比较器220的比较结果,判断接收的当前数据是否为中间电平状态,若不是,则高电平就恢复成高电平对应的1,低电平就恢复成低电平对应的0。若当前数据是中间电平状态,则获取上一数据的电平状态,并根据上一数据的电平状态确定当前数据对应的数值,该恢复过程简单运算量小。When the data recovery circuit 240 recovers the encoded data into serial data, it can collect the encoded data according to the frequency of the clock recovery signal, and determine whether the current data received is based on the comparison results of the first comparator 210 and the second comparator 220. In the intermediate level state, if not, the high level will return to 1 corresponding to the high level, and the low level will return to 0 corresponding to the low level. If the current data is in an intermediate level state, the level state of the previous data is obtained, and the value corresponding to the current data is determined based on the level state of the previous data. This recovery process is simple and requires little calculation.

串并转换模块203用于将数据恢复电路240恢复出的串行数据转换为四路并行数据。The serial-to-parallel conversion module 203 is used to convert the serial data recovered by the data recovery circuit 240 into four channels of parallel data.

通过第一比较器210、第二比较器220以及时钟恢复电路230的配合,便可以从编码数据中恢复出时钟信号,与现有技术相比,恢复时钟信号的电路结构简单,降低了恢复时钟的难度,减小了数据传输的延迟。Through the cooperation of the first comparator 210, the second comparator 220 and the clock recovery circuit 230, the clock signal can be recovered from the encoded data. Compared with the existing technology, the circuit structure of the recovered clock signal is simple and reduces the cost of recovering the clock signal. The difficulty reduces the delay of data transmission.

请参见图9,图9示出了本申请实施例提供的一种数据传输方法,该方法应用于上述的源芯片100,具体包括如下步骤S110至步骤S120:Please refer to Figure 9. Figure 9 shows a data transmission method provided by an embodiment of the present application. The method is applied to the above-mentioned source chip 100, and specifically includes the following steps S110 to step S120:

步骤S110,源芯片的数据编码模块接收串行数据,对所述串行数据进行编码得到编码数据,并将所述编码数据传输至所述源芯片的驱动器,其中,所述编码数据的任意相邻两个数据之间均有跳变延。Step S110: The data encoding module of the source chip receives serial data, encodes the serial data to obtain encoded data, and transmits the encoded data to the driver of the source chip, wherein any phase of the encoded data There is a transition delay between two adjacent data.

步骤S120,驱动器接收所述编码数据,并将所述编码数据发往对端的目的芯片,以使所述对端的目的芯片对所述编码数据进行处理。In step S120, the driver receives the encoded data and sends the encoded data to the destination chip of the opposite end, so that the destination chip of the opposite end processes the encoded data.

数据编码模块110可以对串行数据进行编码,得到编码数据,以实现编码数据的任意相邻两个数据之间均有跳变延。由于任意相邻两个数据之间均有跳变延,使得对端的芯片在每接收到一个数据时,均能通过跳变延的变化得知,即每个跳变延的变化均对应一个接收到的数据,从而相当于利用编码数据实现了时钟信号的传递。通过对串行数据的编码,使得编码数据通过跳变延的变化携带有时钟信号,与现有技术中不携带时钟信号,需对端的芯片自适应时钟相比,降低了恢复时钟的难度,减小了数据传输的延迟。The data encoding module 110 can encode the serial data to obtain encoded data, so as to achieve a jump delay between any two adjacent data of the encoded data. Since there is a transition delay between any two adjacent pieces of data, each time the chip at the opposite end receives a piece of data, it can be informed by the change in the transition delay. That is, each change in transition delay corresponds to a receiving data. The received data is equivalent to using encoded data to realize the transmission of clock signals. By encoding the serial data, the encoded data carries the clock signal through the change of transition delay. Compared with the existing technology that does not carry the clock signal and requires an adaptive clock on the opposite end chip, the difficulty of recovering the clock is reduced and the time is reduced. Reduces data transmission delay.

可选地,在一种具体实施方式中,步骤S110具体包括如下步骤:接收当前数据;判断所述当前数据对应的电平状态与所述当前数据的前一数据对应的电平状态是否一致;若是,将所述当前数据编码为中间电平;若否,保留所述当前数据对应的电平状态。Optionally, in a specific implementation, step S110 specifically includes the following steps: receiving current data; determining whether the level state corresponding to the current data is consistent with the level state corresponding to the previous data of the current data; If yes, encode the current data to an intermediate level; if not, retain the level state corresponding to the current data.

可以将当前数据的电平状态与前一数据的电平状态进行比较,判断两者的电平状态是否一致,若一致,则以中间电平表示当前数据的电平状态,若不一致在保留当前数据原本的电平状态。通过中间电平的引入,可以在相邻两个数据处于相同电平时,改变相邻两个数据中后一数据的电平状态,从而实现令相邻两个数据中不会出现相同电平的情况。The level state of the current data can be compared with the level state of the previous data to determine whether the level states of the two are consistent. If they are consistent, the level state of the current data will be represented by the middle level. If they are inconsistent, the current level state will be retained. The original level state of the data. Through the introduction of intermediate levels, when two adjacent data are at the same level, the level state of the latter data in the two adjacent data can be changed, so that the same level will not appear in the two adjacent data. Condition.

可选地,在另一种具体实施方式中,步骤S110具体包括如下步骤:将所述串行数据与已经延迟一个时钟周期的串行数据进行位与位之间的同或运算,得到运算结果;若所述运算结果为0,则确定所述串行数据的对应位的数据的电平为原电平;若所述运算结果为1,判断上一位数据的电平状态是否为中间电平;若上一位数据的电平状态是中间电平,则确定所述串行数据的对应位的数据的电平为原电平;若上一位数据的电平状态不是中间电平,则确定所述串行数据的对应位的数据的电平为中间电平。Optionally, in another specific implementation, step S110 specifically includes the following steps: performing a bit-to-bit exclusive OR operation on the serial data and the serial data that has been delayed by one clock cycle to obtain the operation result. ; If the operation result is 0, it is determined that the level of the data of the corresponding bit of the serial data is the original level; if the operation result is 1, it is determined whether the level state of the previous bit of data is the intermediate level. If the level state of the previous bit of data is the middle level, then it is determined that the level of the data of the corresponding bit of the serial data is the original level; if the level state of the previous bit of data is not the middle level, Then it is determined that the data level of the corresponding bit of the serial data is the middle level.

第一数字触发器111可以将串行数据延迟一个时钟周期,串行数据以及延迟了一个时钟周期的串行数据进行同或运算,得到运算结果。根据具体的运算结果以及上一位数据的电平状态,可以决定该位数据的电平状态。若运算结果为0,则表示当前位数据的电平状态与上一位数据的电平状态不同,则可以直接输出该位数据原本的电平。若运算结果为1,则表示当前位数据的电平状态与上一位数据的实际电平状态相同,需进一步判断:上一位数据的电平状态是否被改为中间电平。若上一位数据的电平状态被改为中间电平,则当前位数据的电平状态不需再进行修改,可以直接输出原本的电平,以与上一位数据的电平状态区分;若上一位数据的电平状态未被改为中间电平,则当前位数据的电平状态需要进行修改为中间电平,以与上一位数据的电平状态区分。The first digital flip-flop 111 can delay the serial data by one clock cycle, perform an exclusive OR operation on the serial data and the serial data delayed by one clock cycle, and obtain the operation result. According to the specific operation result and the level state of the previous bit of data, the level state of the bit of data can be determined. If the operation result is 0, it means that the level state of the current bit data is different from the level state of the previous bit data, and the original level of the bit data can be directly output. If the operation result is 1, it means that the level state of the current bit data is the same as the actual level state of the previous bit data. It needs to be further determined: whether the level state of the previous bit data has been changed to an intermediate level. If the level state of the previous bit of data is changed to the middle level, the level state of the current bit of data does not need to be modified, and the original level can be output directly to distinguish it from the level state of the previous bit of data; If the level state of the previous bit of data has not been changed to the middle level, the level state of the current bit of data needs to be modified to the middle level to distinguish it from the level state of the previous bit of data.

请参见图10,图10示出了本申请实施例提供的一种数据传输方法,该方法应用于上述的目的芯片200,具体包括如下步骤S210至步骤S240:Please refer to Figure 10. Figure 10 shows a data transmission method provided by an embodiment of the present application. The method is applied to the above-mentioned destination chip 200, and specifically includes the following steps S210 to step S240:

步骤S210,目的芯片的第一比较器接收对端的源芯片发送的编码数据,并将所述编码数据与第一参考电平进行比较,将所述编码数据中高于所述第一参考电平的输出为高电平,低于所述第一参考电平的输出为低电平,得到第一波形,并将所述第一波形传输给所述目的芯片的时钟恢复电路。Step S210: The first comparator of the destination chip receives the encoded data sent by the source chip of the opposite end, compares the encoded data with the first reference level, and compares the encoded data that is higher than the first reference level. The output is high level, and the output lower than the first reference level is low level, a first waveform is obtained, and the first waveform is transmitted to the clock recovery circuit of the target chip.

其中,所述第一参考电平在中间电平与高电平之间。Wherein, the first reference level is between an intermediate level and a high level.

步骤S220,目的芯片的第二比较器接收所述编码数据,并将所述编码数据与第二参考电平进行比较,将所述编码数据中高于所述第二参考电平的输出为高电平,低于所述第二参考电平的输出为低电平,得到第二波形,并将所述第二波形传输给所述目的芯片的时钟恢复电路。Step S220: The second comparator of the destination chip receives the encoded data, compares the encoded data with the second reference level, and outputs the encoded data that is higher than the second reference level as a high level. level, the output lower than the second reference level is low level, a second waveform is obtained, and the second waveform is transmitted to the clock recovery circuit of the destination chip.

其中,所述第二参考电平在所述中间电平与低电平之间。Wherein, the second reference level is between the intermediate level and the low level.

步骤S230,时钟恢复电路获取所述第一波形的波形翻转的脉冲以及所述第二波形的波形翻转的脉冲,并对获取到的脉冲进行并处理,获得时钟恢复信号,并将所述时钟恢复信号传输给所述目的芯片的数据恢复电路。Step S230: The clock recovery circuit obtains the waveform inversion pulse of the first waveform and the waveform inversion pulse of the second waveform, performs a union process on the obtained pulses, obtains a clock recovery signal, and restores the clock. The signal is transmitted to the data recovery circuit of the destination chip.

可选地,请参见图11,在一种具体实施方式中,步骤S230可以包括如下步骤S231至步骤S236:Optionally, please refer to Figure 11. In a specific implementation, step S230 may include the following steps S231 to step S236:

步骤S231,至少一个第一延时器231对所述第一波形进行延迟。Step S231: At least one first delayer 231 delays the first waveform.

步骤S232,第一异或运算器232对所述第一波形、经过延迟的第一波形进行异或运算,得到第一脉冲波形,其中,所述第一脉冲波形为所述第一波形的波形翻转对应的脉冲信号所在的波形。Step S232, the first XOR operator 232 performs an XOR operation on the first waveform and the delayed first waveform to obtain a first pulse waveform, wherein the first pulse waveform is the waveform of the first waveform. Flip the waveform of the corresponding pulse signal.

步骤S233,至少一个第二延时器233对所述第二波形进行延迟。Step S233, at least one second delayer 233 delays the second waveform.

步骤S234,第二异或运算器234对所述第二波形、经过延迟的第二波形进行异或运算,得到第二脉冲波形,其中,所述第二脉冲波形为所述第二波形的波形翻转对应的脉冲信号所在的波形。Step S234, the second XOR operator 234 performs an XOR operation on the second waveform and the delayed second waveform to obtain a second pulse waveform, wherein the second pulse waveform is the waveform of the second waveform. Flip the waveform of the corresponding pulse signal.

步骤S235,或运算器235对所述第一脉冲波形和第二脉冲波形进行或处理,得到脉冲融合波形,所述脉冲融合波形为所述时钟恢复信号。In step S235, the OR operator 235 performs OR processing on the first pulse waveform and the second pulse waveform to obtain a pulse fusion waveform, and the pulse fusion waveform is the clock recovery signal.

第一异或运算器232将进行过延迟的第一波形与第一波形进行异或处理,可以得到第一波形在翻转位置的脉冲信号所组成的波形,该波形可以记为第一脉冲波形。第二异或运算器234将进行过延迟的第二波形与第二波形进行异或处理,可以得到第二波形在翻转位置的脉冲信号所组成的波形,该波形记为第二脉冲波形。取第一脉冲波形与第二脉冲波形的或集,得到脉冲融合波形,该脉冲融合波形的相邻两个脉冲之间的时间间隔与编码数据中相邻两个数据之间的时间间隔相同,因此,该脉冲融合波形便是时钟恢复信号。The first XOR operator 232 performs XOR processing on the delayed first waveform and the first waveform, and can obtain a waveform composed of the pulse signal of the first waveform at the flip position, which waveform can be recorded as the first pulse waveform. The second XOR operator 234 performs XOR processing on the delayed second waveform and the second waveform to obtain a waveform composed of the pulse signal of the second waveform at the flip position, and this waveform is recorded as the second pulse waveform. Take the OR set of the first pulse waveform and the second pulse waveform to obtain the pulse fusion waveform. The time interval between two adjacent pulses of the pulse fusion waveform is the same as the time interval between two adjacent data in the encoded data. Therefore, this pulse fusion waveform is the clock recovery signal.

步骤S236,二分频器236对所述时钟恢复信号进行二分频处理,得到占空比为50%的时钟恢复信号。In step S236, the frequency divider 236 divides the clock recovery signal by two to obtain a clock recovery signal with a duty cycle of 50%.

通过二分频器236对时钟恢复信号进行二分频处理,得到占空比为50%的时钟恢复信号。经过二分频处理的时钟恢复信号更加稳定。The clock recovery signal is divided by two through the frequency divider 236 to obtain a clock recovery signal with a duty cycle of 50%. The clock recovery signal processed by dividing by two is more stable.

步骤S240,数据恢复电路根据所述时钟恢复信号采集所述编码数据,并将所述编码数据恢复成串行数据。Step S240: The data recovery circuit collects the encoded data according to the clock recovery signal and recovers the encoded data into serial data.

可选地,步骤S240具体包括如下步骤:确定接收的当前数据为中间电平状态;获取所述当前数据的上一数据的电平状态,将所述上一数据的电平状态作为所述当前数据的电平状态。Optionally, step S240 specifically includes the following steps: determining that the current data received is an intermediate level state; obtaining the level state of the previous data of the current data, and using the level state of the previous data as the current level state. The level status of the data.

数据恢复电路240在将编码数据恢复成串行数据时,可以根据时钟恢复信号的频率采集编码数据,并根据第一比较器与第二比较器的比较结果,判断接收的当前数据是否为中间电平状态,若不是,则高电平就恢复成高电平对应的1,低电平就恢复成低电平对应的0。若当前数据是中间电平状态,则获取上一数据的电平状态,并根据上一数据的电平状态确定当前数据对应的数值,该恢复过程简单运算量小。When recovering the encoded data into serial data, the data recovery circuit 240 can collect the encoded data according to the frequency of the clock recovery signal, and determine whether the current data received is an intermediate circuit based on the comparison results of the first comparator and the second comparator. If not, the high level will return to 1 corresponding to the high level, and the low level will return to 0 corresponding to the low level. If the current data is in an intermediate level state, the level state of the previous data is obtained, and the value corresponding to the current data is determined based on the level state of the previous data. This recovery process is simple and requires little calculation.

在本申请所提供的实施例中,应该理解到,所揭露设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,又例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些通信接口,设备或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the coupling or direct coupling or communication connection between each other shown or discussed may be through some communication interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.

另外,作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。In addition, units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

再者,在本申请各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。Furthermore, each functional module in each embodiment of the present application can be integrated together to form an independent part, each module can exist alone, or two or more modules can be integrated to form an independent part.

在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。In this document, relational terms such as first, second, etc. are used merely to distinguish one entity or operation from another entity or operation and do not necessarily require or imply the existence of any such entity or operation between these entities or operations. Actual relationship or sequence.

以上所述仅为本申请的实施例而已,并不用于限制本申请的保护范围,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above descriptions are only examples of the present application and are not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this application shall be included in the protection scope of this application.

Claims (11)

1.一种源芯片,其特征在于,包括数据编码模块以及驱动器,所述数据编码模块与所述驱动器连接;1. A source chip, characterized in that it includes a data encoding module and a driver, and the data encoding module is connected to the driver; 所述数据编码模块用于接收串行数据,对所述串行数据进行编码得到编码数据,并将所述编码数据传输至所述驱动器,其中,所述编码数据的任意相邻两个数据之间均有跳变延;The data encoding module is used to receive serial data, encode the serial data to obtain encoded data, and transmit the encoded data to the driver, wherein any two adjacent data of the encoded data There is a jump delay between them; 所述驱动器用于接收所述编码数据,并将所述编码数据发往对端的目的芯片,以使所述对端的目的芯片根据任意相邻两个数据之间均有跳变延的所述编码数据,将所述编码数据恢复成所述串行数据;The driver is used to receive the encoded data and send the encoded data to the destination chip of the opposite end, so that the destination chip of the opposite end can adjust the encoding according to the jump delay between any two adjacent data. data, restoring the encoded data to the serial data; 其中,对所述串行数据进行编码得到编码数据,包括:Wherein, the serial data is encoded to obtain encoded data, including: 将所述串行数据与已经延迟一个时钟周期的串行数据进行位与位之间的同或运算,得到运算结果;Perform a bit-to-bit exclusive OR operation on the serial data and the serial data that has been delayed by one clock cycle to obtain the operation result; 若所述运算结果为0,则确定所述串行数据的对应位的数据的电平为原电平;If the operation result is 0, then it is determined that the data level of the corresponding bit of the serial data is the original level; 若所述运算结果为1,判断所述串行数据的上一位数据的电平状态是否为中间电平;If the operation result is 1, determine whether the level state of the previous bit of data in the serial data is an intermediate level; 若所述上一位数据的电平状态是中间电平,则确定所述串行数据的对应位的数据的电平为原电平;If the level state of the previous bit of data is an intermediate level, then it is determined that the level of the data of the corresponding bit of the serial data is the original level; 若所述上一位数据的电平状态不是中间电平,则确定所述串行数据的对应位的数据的电平为中间电平。If the level state of the previous bit of data is not an intermediate level, it is determined that the level of the data of the corresponding bit of the serial data is an intermediate level. 2.根据权利要求1所述的源芯片,其特征在于,所述数据编码模块用于接收串行数据,对所述串行数据进行编码得到编码数据,具体包括:2. The source chip according to claim 1, characterized in that the data encoding module is used to receive serial data and encode the serial data to obtain encoded data, specifically including: 接收当前数据;Receive current data; 判断所述当前数据对应的电平状态与所述当前数据的前一数据对应的电平状态是否一致;Determine whether the level state corresponding to the current data is consistent with the level state corresponding to the previous data of the current data; 若是,将所述当前数据编码为中间电平;If so, encode the current data into an intermediate level; 若否,将所述当前数据编码为与所述当前数据相一致的电平状态。If not, the current data is encoded into a level state consistent with the current data. 3.根据权利要求1所述的源芯片,其特征在于,所述数据编码模块包括第一数字触发器、第二数字触发器、同或运算器以及选择器;3. The source chip according to claim 1, characterized in that the data encoding module includes a first digital flip-flop, a second digital flip-flop, an exclusive OR operator and a selector; 所述第一数字触发器的CLK端与传输时钟信号的时钟信号线连接,第一数字触发器的输入端与传输串行数据的串行数据线连接,所述第一数字触发器的输出端与所述同或运算器的第一输入端连接;The CLK end of the first digital flip-flop is connected to a clock signal line that transmits a clock signal, the input end of the first digital flip-flop is connected to a serial data line that transmits serial data, and the output end of the first digital flip-flop is Connected to the first input end of the XOR operator; 所述同或运算器的第二输入端与所述串行数据线连接,所述同或运算器的输出端与所述选择器的第一输入端连接;The second input end of the XOR operator is connected to the serial data line, and the output end of the XOR operator is connected to the first input end of the selector; 所述选择器的输出端与所述第二数字触发器的输入端连接;The output end of the selector is connected to the input end of the second digital flip-flop; 所述第二数字触发器的输出端与所述选择器的第二输入端连接,所述第二数字触发器的CLK端与所述时钟信号线连接。The output terminal of the second digital flip-flop is connected to the second input terminal of the selector, and the CLK terminal of the second digital flip-flop is connected to the clock signal line. 4.根据权利要求3所述的源芯片,其特征在于,利用所述同或运算器将所述串行数据与经所述第一数字触发器延迟一个时钟周期的串行数据进行位与位之间的同或运算,得到运算结果;4. The source chip according to claim 3, characterized in that the XOR operator is used to perform bit-AND operation on the serial data and the serial data delayed by one clock cycle through the first digital flip-flop. The same-or operation between them obtains the operation result; 若所述运算结果为0,则利用所述选择器确定所述串行数据的与所述运算结果对应的位在所述编码数据的对应位的电平为原电平;If the operation result is 0, use the selector to determine that the level of the bit in the serial data corresponding to the operation result in the corresponding bit in the encoded data is the original level; 若所述运算结果为1,根据所述第二数字触发器的输出结果,判断所述串行数据的上一位数据对应的编码数据的电平状态是否为中间电平。If the operation result is 1, based on the output result of the second digital flip-flop, it is determined whether the level state of the encoded data corresponding to the previous bit of the serial data is an intermediate level. 5.一种目的芯片,其特征在于,与权利要求1-4任一项所述的源芯片相配合,包括第一比较器、第二比较器、时钟恢复电路以及数据恢复电路;5. A destination chip, characterized in that, in cooperation with the source chip according to any one of claims 1-4, it includes a first comparator, a second comparator, a clock recovery circuit and a data recovery circuit; 所述第一比较器用于接收对端的源芯片发送的编码数据,并将所述编码数据与第一参考电平进行比较,将所述编码数据中高于所述第一参考电平的输出为高电平,低于所述第一参考电平的输出为低电平,得到第一波形,其中,所述第一参考电平在中间电平与高电平之间;The first comparator is used to receive the encoded data sent by the source chip of the opposite end, compare the encoded data with the first reference level, and output the encoded data higher than the first reference level as high level, the output lower than the first reference level is low level, and the first waveform is obtained, wherein the first reference level is between the middle level and the high level; 所述第二比较器用于接收所述编码数据,并将所述编码数据与第二参考电平进行比较,将所述编码数据中高于所述第二参考电平的输出为高电平,低于所述第二参考电平的输出为低电平,得到第二波形,其中,所述第二参考电平在所述中间电平与低电平之间;The second comparator is used to receive the encoded data, compare the encoded data with a second reference level, and output the encoded data that is higher than the second reference level as high level and low level. When the output of the second reference level is low level, a second waveform is obtained, wherein the second reference level is between the intermediate level and the low level; 所述时钟恢复电路用于获取第一波形的波形翻转的脉冲以及第二波形的波形翻转的脉冲,并对获取到的脉冲进行并处理,获得时钟恢复信号;The clock recovery circuit is used to obtain the waveform inversion pulse of the first waveform and the waveform inversion pulse of the second waveform, and perform a combined processing on the obtained pulses to obtain a clock recovery signal; 所述数据恢复电路用于根据所述时钟恢复信号采集所述编码数据,并将所述编码数据恢复成串行数据。The data recovery circuit is used to collect the encoded data according to the clock recovery signal and restore the encoded data into serial data. 6.根据权利要求5所述的目的芯片,其特征在于,所述时钟恢复电路包括至少一个第一延时器、第一异或运算器、至少一个第二延时器、第二异或运算器以及或运算器;6. The target chip according to claim 5, characterized in that the clock recovery circuit includes at least a first delayer, a first XOR operator, at least a second delayer, a second XOR operator operator and OR operator; 所述至少一个第一延时器用于对所述第一波形进行延迟;The at least one first delayer is used to delay the first waveform; 所述第一异或运算器用于对所述第一波形、经过所述至少一个第一延时器延迟的第一波形进行异或运算,得到第一脉冲波形;The first XOR operator is used to perform an XOR operation on the first waveform and the first waveform delayed by the at least one first delayer to obtain a first pulse waveform; 所述至少一个第二延时器用于对所述第二波形进行延迟;The at least one second delayer is used to delay the second waveform; 所述第二异或运算器用于对所述第二波形、经过所述至少一个第二延时器延迟的第二波形进行异或运算,得到第二脉冲波形;The second XOR operator is used to perform an XOR operation on the second waveform and the second waveform delayed by the at least one second delayer to obtain a second pulse waveform; 所述或运算器用于对所述第一脉冲波形和第二脉冲波形进行或处理,得到脉冲融合波形,所述脉冲融合波形为所述时钟恢复信号。The OR operator is used to perform OR processing on the first pulse waveform and the second pulse waveform to obtain a pulse fusion waveform, and the pulse fusion waveform is the clock recovery signal. 7.根据权利要求6所述的目的芯片,其特征在于,所述时钟恢复电路还包括二分频器,所述二分频器的CLK端与所述或运算器的输出端连接;7. The target chip according to claim 6, characterized in that the clock recovery circuit further includes a two-frequency divider, and the CLK terminal of the two-frequency divider is connected to the output terminal of the OR operator; 所述二分频器用于对所述时钟恢复信号进行二分频处理,得到占空比为50%的时钟恢复信号。The frequency divider is used to divide the clock recovery signal by two to obtain a clock recovery signal with a duty cycle of 50%. 8.根据权利要求5所述的目的芯片,其特征在于,所述数据恢复电路用于根据所述时钟恢复信号采集所述编码数据,并将所述编码数据恢复成串行数据,具体包括:8. The target chip according to claim 5, characterized in that the data recovery circuit is used to collect the encoded data according to the clock recovery signal and restore the encoded data into serial data, specifically including: 确定接收的当前数据为中间电平状态;Determine that the current data received is in the intermediate level state; 获取所述当前数据的上一数据的电平状态,将所述上一数据的电平状态作为所述当前数据的电平状态。Obtain the level state of the previous data of the current data, and use the level state of the previous data as the level state of the current data. 9.一种数据传输方法,其特征在于,应用于源芯片,所述方法包括:9. A data transmission method, characterized in that it is applied to the source chip, and the method includes: 所述源芯片的数据编码模块接收串行数据,对所述串行数据进行编码得到编码数据,并将所述编码数据传输至所述源芯片的驱动器,其中,所述编码数据的任意相邻两个数据之间均有跳变延;The data encoding module of the source chip receives serial data, encodes the serial data to obtain encoded data, and transmits the encoded data to the driver of the source chip, wherein any adjacent part of the encoded data There is a transition delay between the two data; 所述驱动器接收所述编码数据,并将所述编码数据发往对端的目的芯片,以使所述对端的目的芯片对所述编码数据进行处理;The driver receives the encoded data and sends the encoded data to the destination chip of the opposite end, so that the destination chip of the opposite end processes the encoded data; 其中,对所述串行数据进行编码得到编码数据,包括:Wherein, the serial data is encoded to obtain encoded data, including: 将所述串行数据与已经延迟一个时钟周期的串行数据进行位与位之间的同或运算,得到运算结果;Perform a bit-to-bit exclusive OR operation on the serial data and the serial data that has been delayed by one clock cycle to obtain the operation result; 若所述运算结果为0,则确定所述串行数据的对应位的数据的电平为原电平;If the operation result is 0, then it is determined that the data level of the corresponding bit of the serial data is the original level; 若所述运算结果为1,判断所述串行数据的上一位数据的电平状态是否为中间电平;If the operation result is 1, determine whether the level state of the previous bit of data in the serial data is an intermediate level; 若所述上一位数据的电平状态是中间电平,则确定所述串行数据的对应位的数据的电平为原电平;If the level state of the previous bit of data is an intermediate level, then it is determined that the level of the data of the corresponding bit of the serial data is the original level; 若所述上一位数据的电平状态不是中间电平,则确定所述串行数据的对应位的数据的电平为中间电平。If the level state of the previous bit of data is not an intermediate level, it is determined that the level of the data of the corresponding bit of the serial data is an intermediate level. 10.一种数据传输方法,其特征在于,应用于目的芯片,所述方法包括:10. A data transmission method, characterized in that it is applied to a destination chip, and the method includes: 所述目的芯片的第一比较器接收对端的源芯片发送的编码数据,并将所述编码数据与第一参考电平进行比较,将所述编码数据中高于所述第一参考电平的输出为高电平,低于所述第一参考电平的输出为低电平,得到第一波形,并将所述第一波形传输给所述目的芯片的时钟恢复电路,其中,所述第一参考电平在中间电平与高电平之间;The first comparator of the destination chip receives the encoded data sent by the source chip of the opposite end, compares the encoded data with the first reference level, and outputs the encoded data that is higher than the first reference level. is a high level, and the output lower than the first reference level is a low level, a first waveform is obtained, and the first waveform is transmitted to the clock recovery circuit of the target chip, wherein the first The reference level is between mid-level and high level; 所述目的芯片的第二比较器接收所述编码数据,并将所述编码数据与第二参考电平进行比较,将所述编码数据中高于所述第二参考电平的输出为高电平,低于所述第二参考电平的输出为低电平,得到第二波形,并将所述第二波形传输给所述目的芯片的时钟恢复电路,其中,所述第二参考电平在所述中间电平与低电平之间;The second comparator of the destination chip receives the encoded data, compares the encoded data with a second reference level, and outputs the encoded data that is higher than the second reference level as a high level. , the output lower than the second reference level is low level, a second waveform is obtained, and the second waveform is transmitted to the clock recovery circuit of the destination chip, wherein the second reference level is Between the middle level and the low level; 所述时钟恢复电路获取所述第一波形的波形翻转的脉冲以及所述第二波形的波形翻转的脉冲,并对获取到的脉冲进行并处理,获得时钟恢复信号,并将所述时钟恢复信号传输给所述目的芯片的数据恢复电路;The clock recovery circuit acquires the waveform inversion pulse of the first waveform and the waveform inversion pulse of the second waveform, and processes the acquired pulses to obtain a clock recovery signal, and converts the clock recovery signal Transmitted to the data recovery circuit of the destination chip; 所述数据恢复电路根据所述时钟恢复信号采集所述编码数据,并将所述编码数据恢复成串行数据。The data recovery circuit collects the encoded data according to the clock recovery signal and recovers the encoded data into serial data. 11.一种处理器系统,其特征在于,包括权利要求1-4任一项所述的源芯片以及权利要求5-8任一项所述的目的芯片。11. A processor system, characterized by comprising the source chip according to any one of claims 1-4 and the destination chip according to any one of claims 5-8.
CN202011296358.5A 2020-11-18 2020-11-18 Source chip, destination chip, data transmission method and processor system Active CN112416848B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011296358.5A CN112416848B (en) 2020-11-18 2020-11-18 Source chip, destination chip, data transmission method and processor system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011296358.5A CN112416848B (en) 2020-11-18 2020-11-18 Source chip, destination chip, data transmission method and processor system

Publications (2)

Publication Number Publication Date
CN112416848A CN112416848A (en) 2021-02-26
CN112416848B true CN112416848B (en) 2023-10-20

Family

ID=74772953

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011296358.5A Active CN112416848B (en) 2020-11-18 2020-11-18 Source chip, destination chip, data transmission method and processor system

Country Status (1)

Country Link
CN (1) CN112416848B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115037419B (en) * 2022-08-11 2023-01-31 德州鲲程电子科技有限公司 Method for serial transmission of variable-length coded data in chip testing process

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1404231A (en) * 2001-06-27 2003-03-19 三星电子株式会社 Antinoise and burst mode receiving equipment and method for recovering clock signal and its data
CN102063401A (en) * 2011-01-13 2011-05-18 四川大学 TDMOW serial bus structure of distributed oscillograph and encoding method
CN103378923A (en) * 2012-04-18 2013-10-30 北京鼎合远传技术有限公司 FM (frequency modulation)-based baseband transmission encoding method and apparatus thereof
CN104617926A (en) * 2015-02-02 2015-05-13 苏州迅芯微电子有限公司 Pulse swallowing type clock synchronization circuit
CN107231192A (en) * 2017-02-28 2017-10-03 华南师范大学 The data transmission method and LED visible light communication system of double level pulse widths codings

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1404231A (en) * 2001-06-27 2003-03-19 三星电子株式会社 Antinoise and burst mode receiving equipment and method for recovering clock signal and its data
CN102063401A (en) * 2011-01-13 2011-05-18 四川大学 TDMOW serial bus structure of distributed oscillograph and encoding method
CN103378923A (en) * 2012-04-18 2013-10-30 北京鼎合远传技术有限公司 FM (frequency modulation)-based baseband transmission encoding method and apparatus thereof
CN104617926A (en) * 2015-02-02 2015-05-13 苏州迅芯微电子有限公司 Pulse swallowing type clock synchronization circuit
CN107231192A (en) * 2017-02-28 2017-10-03 华南师范大学 The data transmission method and LED visible light communication system of double level pulse widths codings

Also Published As

Publication number Publication date
CN112416848A (en) 2021-02-26

Similar Documents

Publication Publication Date Title
US6463092B1 (en) System and method for sending and receiving data signals over a clock signal line
KR101173942B1 (en) Data transmission device, data receiving device, data transmitting system and method for transmitting data
EP0040632B1 (en) Data processing system with serial data transmission between subsystems
US20060198463A1 (en) Device for converting a transmitted signal into a digital signal
US6947493B2 (en) Dual phase pulse modulation decoder circuit
CN102497249B (en) Encoding method, encoding device, decoding method, decoding device, data transmission device, and data reception device
IE45458B1 (en) Miller-encoded message decoder
CN108063661A (en) Sample circuit and receiving circuit based on Manchester's code
CN112416848B (en) Source chip, destination chip, data transmission method and processor system
US4905257A (en) Manchester decoder using gated delay line oscillator
EP1673914A2 (en) Dual phase pulse modulation encoder circuit
KR102449951B1 (en) Clock and data decoding circuit for high-speed PAM-4 receiver through statistical learning
US4752942A (en) Method and circuitry for extracting clock signal from received biphase modulated signal
US7342520B1 (en) Method and system for multilevel serializer/deserializer
US7283011B2 (en) Method for performing dual phase pulse modulation
US20100226419A1 (en) Receivers for cycle encoded signals
CA2396948A1 (en) A system and method for sending and receiving data signals over a clock signal line
US4928289A (en) Apparatus and method for binary data transmission
US3937881A (en) Method of and system for transcoding binary signals with reduced changeover rate
EP2164215B1 (en) Method and device for serial transmission of digital data
JP4230381B2 (en) LVDS system, transmission side circuit thereof, and reception side circuit thereof
JP2818432B2 (en) Signal transmission method
JPS6212241A (en) Digital transmission system
KR910002324B1 (en) Circuits for detecting clock pulses of conditioned diphase modulation encoding
JPS6268336A (en) CMI code decoding 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
CB02 Change of applicant information

Address after: Industrial incubation-3-8, North 2-204, No. 18, Haitai West Road, Huayuan Industrial Zone, Binhai New Area, Tianjin 300450

Applicant after: Haiguang Information Technology Co.,Ltd.

Address before: 100082 industrial incubation-3-8, North 2-204, 18 Haitai West Road, Huayuan Industrial Zone, Haidian District, Beijing

Applicant before: Haiguang Information Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant