Single channel communication encoding method, decoding method, encoding circuit and decoding circuit

文档序号:1834481 发布日期:2021-11-12 浏览:11次 中文

阅读说明:本技术 单通道通信编码方法、解码方法、编码电路及解码电路 (Single channel communication encoding method, decoding method, encoding circuit and decoding circuit ) 是由 黄家赓 盛云 林建烽 于 2021-10-15 设计创作,主要内容包括:本发明涉及一种单通道通信编码方法、解码方法、编码电路及解码电路,单通道通信编码方法包括:将时钟信号和数据信号合成一路长短码信号;长短码信号包括长码信号和短码信号,长码信号的脉宽与时钟信号一致,短码信号的脉宽与时钟信号一致;长码信号与短码信号的占空比不同,本编码方法同时编码时钟信号和数据信号,能降低电路复杂度,以及减少芯片封装打线。(The invention relates to a single-channel communication encoding method, a decoding method, an encoding circuit and a decoding circuit, wherein the single-channel communication encoding method comprises the following steps: synthesizing the clock signal and the data signal into a long and short code signal; the long and short code signals comprise long code signals and short code signals, the pulse width of the long code signals is consistent with that of the clock signals, and the pulse width of the short code signals is consistent with that of the clock signals; the duty ratio of the long code signal is different from that of the short code signal, and the coding method simultaneously codes the clock signal and the data signal, so that the circuit complexity can be reduced, and the chip packaging and routing can be reduced.)

1. A single channel communication encoding method, comprising:

synthesizing the clock signal and the data signal into a long and short code signal;

the long code signal and the short code signal comprise a long code signal and a short code signal, the pulse width of the long code signal is consistent with that of the clock signal, and the pulse width of the short code signal is consistent with that of the clock signal;

the duty cycle of the long code signal is different from the duty cycle of the short code signal.

2. The single channel communication encoding method of claim 1, wherein the duty cycle of the long and short code signals satisfies the relation: tclk = TS + TL, where Tclk is a clock period, TS is a high level time of the short code signal, TL is a high level time of the long code signal, and TS is not equal to TL.

3. The single channel communication encoding method of claim 2, wherein synthesizing the clock signal and the data signal into a long and short code signal comprises:

generating a first delayed clock signal according to the clock signal;

generating a pulse signal according to the first delayed clock signal;

generating a high level of a long code signal and a high level of a short code signal according to the pulse signal;

generating a second delayed clock signal according to the first delayed clock signal;

generating a low level of a short code signal according to the second delayed clock signal;

generating a low level of the long code signal according to the clock signal;

generating a data delay signal according to the first delay clock signal and a data signal;

and selecting the long code signal or the short code signal according to the data signal and generating the long and short code signal.

4. The single-channel communication encoding method of claim 3, wherein the first delayed clock signal is delayed with respect to the clock signal by a time TS; the second delay clock signal has a delay time TS relative to the first delay clock signal; the data delay signal is delayed by a time TS with respect to the data signal.

5. The single channel communication encoding method of claim 2, wherein synthesizing the clock signal and the data signal into a long-short code signal further comprises:

generating a first pulse signal according to a clock signal;

generating a first delayed clock signal according to the clock signal;

generating a second delayed clock signal according to the first delayed clock signal;

generating a second pulse signal according to the second delayed clock signal;

generating a third pulse signal according to the first delayed clock signal;

generating a high level of a long code signal or a high level of a short code signal according to the third pulse signal;

generating a data delay signal according to the data signal and the first delay clock signal;

selecting a first pulse signal or a second pulse signal according to the data delay signal;

generating a low level of the short code signal according to the selected second pulse signal;

and generating a low level of the long code signal according to the selected first pulse signal.

6. A single channel communication encoding circuit, comprising:

a first delay circuit for generating a first delayed clock signal according to the clock signal;

a pulse generator for generating a pulse signal according to the first delayed clock signal;

the reset end of the long code trigger receives the pulse signal and outputs the high level of the long code signal, the clock end of the long code trigger receives the clock signal, and the clock signal triggers and outputs the low level of the long code signal;

a short code trigger, the reset end of which receives the pulse signal and outputs the high level of the short code signal;

a second delay circuit for generating a second delayed clock signal from the first delayed clock signal;

the clock end of the short code trigger receives the second delay clock signal and outputs the low level of the short code signal;

the selection trigger has a clock end for receiving the first delay clock signal, a data end connected with the data signal and an output end for outputting the data delay signal;

the first input end of the data selector is connected with the output end of the long code trigger, and the second input end of the data selector is connected with the output end of the short code trigger; the selection end is connected with the output end of the selection trigger, and the data selector selects and outputs the long code signal or the short code signal according to the data delay signal and forms a long code signal and a short code signal.

7. A single channel communication encoding circuit, comprising:

a first delay circuit for generating a first delayed clock signal according to the clock signal;

a second delay circuit for generating a second delayed clock signal according to the first delayed signal;

a first pulse generator for generating a first pulse signal according to the first delayed clock signal;

a second pulse generator for generating a second pulse signal according to the second delayed clock signal;

a third pulse generator for generating a third pulse signal from the first delayed clock signal;

the selection trigger has a clock end for receiving the first delay clock signal, a data end connected with the data signal and an output end for outputting the data delay signal;

a data selector, a first input end of which is connected with the first pulse generator, and a second input end of which is connected with the second pulse generator; the selection end of the data selector is connected with a data delay signal and selects a first pulse signal or a second pulse signal according to the data delay signal;

the reset end of the output trigger is connected with the third pulse generator, and the clock end of the output trigger is connected with the output end of the data selector; the output trigger generates a high level of a long code signal or a high level of a short code signal according to the third pulse signal, and the clock end receives the first pulse signal and generates a low level of the long code signal; and the clock end receives the second pulse signal and generates the low level of the short code signal.

8. A single channel communication decoding method, comprising:

generating a low level of a clock signal according to a high level of the long and short code signal;

generating a delay pulse signal according to the long and short code signals, wherein the delay time of the delay pulse signal is half a clock period;

generating a high level of a clock signal according to the delayed pulse signal;

and generating a digital signal according to the clock signal and the long and short code signal.

9. The single channel communication decoding method of claim 8, wherein:

the generating the delay pulse signal according to the long and short code signal further comprises: and generating long and short code delay signals according to the long and short code signals, and controlling the delay time of the long and short code signals according to the phase difference between the long and short code delay signals and the long and short code signals.

10. The single channel communication decoding method of claim 9, wherein:

controlling the delay time of the long and short code signals according to the phase difference between the long and short code delay signals and the long and short code signals further comprises: and converting the phase difference signal into a voltage signal, and controlling the delay time of the long code delay signal and the short code delay signal according to the voltage signal.

11. A single channel communication decoding circuit, comprising:

the delay pulse circuit is used for delaying the long and short code signals by half a clock period and generating long and short code delay signals;

the pulse generator is used for generating a delay pulse signal according to the long and short code delay signal;

the clock trigger is connected with the long and short code signals at a clock end and generates the low level of the clock signal according to the long and short code signals, the reset end is connected with the output end of the pulse generator, and the clock trigger generates the high level of the clock signal according to the delay pulse signal;

and a clock end of the digital signal trigger is connected with an output end of the clock trigger, a data end of the digital signal trigger is connected with the long and short code signal, and the digital signal trigger generates a digital high level or a digital low level according to a clock signal.

12. The single channel communication decoding circuit of claim 11, wherein:

the delay pulse circuit includes a delay circuit and a pulse circuit, the delay circuit including:

the delay circuit intermediate stage is used for converting the long and short code signals into long and short code delay signals;

the phase frequency detector is used for detecting the phase difference between the long code delay signal and the short code delay signal;

a charge pump for converting the phase difference into a current signal;

a low pass filter for converting the current signal to a voltage signal;

the intermediate stage of the delay circuit is connected with the low-pass filter and is used for receiving the voltage signal and controlling the delay time of the long code delay signal and the short code delay signal.

13. The single channel communication decoding circuit of claim 11 or 12, wherein the decoding circuit further comprises a toggle detector, an oscillator, and a data selector;

when not communicating, the rollover detector outputs a low level, the data selector accesses the output of the oscillator into a delay locked loop, and establishes a voltage signal;

when communication is carried out, the turnover detector outputs high level, and the data selector accesses the long and short code signals into the delay pulse circuit.

Technical Field

The invention belongs to the field of analog-digital hybrid circuits, and particularly relates to a single-channel communication encoding method, a single-channel communication decoding method, a single-channel communication encoding circuit and a single-channel communication decoding circuit.

Background

The digital isolator is used for communication and comprises a source side and a secondary side, wherein the secondary side receives signals transmitted by the source side.

Fig. 1 is a common data and clock isolated transmission mode, where data and clock at a source side respectively use an isolation channel to transmit signals to an isolated secondary side, and this mode needs to occupy two isolation channels, and has large power consumption during operation, high wafer cost, and more routing is needed during chip packaging, and the packaging cost is high.

Fig. 2 is a single-channel isolated communication based on a clock data recovery technique, where a data signal synchronized with a clock at a source side is transmitted to an isolated secondary side in a serial manner by a transmitter, the secondary side extracts the clock from the received data signal by a clock data recovery circuit, and then resamples the data by the extracted clock, thereby finally obtaining a recovered clock and a recovered data signal.

Fig. 3 is a common clock data recovery circuit and timing based on a phase locked loop circuit.

The circuits shown in fig. 2 and 3 both have the following technical disadvantages:

(1) inability to communicate a long series of "0" or "1" signals;

(2) the data code rate and the phase of the transmission signal have deviations with the frequency and the phase of a voltage-controlled oscillator in a clock data recovery circuit of a receiving end, and the frequency and the phase need to be locked in a longer time, so that the communication needs to be established in a longer time;

(3) the clock data recovery circuit needs to lock frequency and then phase, so that more control loops are needed, the design complexity is higher, and the implementation cost is higher.

Disclosure of Invention

The invention aims to design a high-efficiency communication method, which can simultaneously encode a clock signal and a data signal, reduce the circuit complexity and reduce the chip packaging and routing.

To achieve one of the above objects, an embodiment of the present invention provides a single channel communication encoding method, including:

synthesizing the clock signal and the data signal into a long and short code signal;

the long code signal and the short code signal comprise a long code signal and a short code signal, the pulse width of the long code signal is consistent with that of the clock signal, and the pulse width of the short code signal is consistent with that of the clock signal;

the duty cycle of the long code signal is different from the duty cycle of the short code signal.

As a further improvement of an embodiment of the present invention, the duty ratio of the long and short code signals satisfies the relation: tclk = TS + TL, where Tclk is a clock period, TS is a high level time of the short code signal, TL is a high level time of the long code signal, and TS is not equal to TL.

As a further improvement of an embodiment of the present invention, synthesizing a clock signal and a data signal into a long and short code signal includes:

generating a first delayed clock signal according to the clock signal;

generating a pulse signal according to the first delayed clock signal;

generating a high level of a long code signal and a high level of a short code signal according to the pulse signal;

generating a second delayed clock signal according to the first delayed clock signal;

generating a low level of a short code signal according to the second delayed clock signal;

generating a low level of the long code signal according to the clock signal;

generating a data delay signal according to the first delay clock signal and a data signal;

and selecting the long code signal or the short code signal according to the data signal and generating the long and short code signal.

As a further improvement of an embodiment of the present invention, the first delayed clock signal has a delay time TS with respect to the clock signal; the second delay clock signal has a delay time TS relative to the first delay clock signal; the data delay signal is delayed by a time TS with respect to the data signal.

As a further improvement of an embodiment of the present invention, synthesizing the clock signal and the data signal into a long and short code signal further includes:

generating a first pulse signal according to a clock signal;

generating a first delayed clock signal according to the clock signal;

generating a second delayed clock signal according to the first delayed clock signal;

generating a second pulse signal according to the second delayed clock signal;

generating a third pulse signal according to the first delayed clock signal;

generating a high level of a long code signal or a high level of a short code signal according to the third pulse signal;

generating a data delay signal according to the data signal and the first delay clock signal;

selecting a first pulse signal or a second pulse signal according to the data delay signal;

generating a low level of the short code signal according to the selected second pulse signal;

and generating a low level of the long code signal according to the selected first pulse signal.

To achieve one of the above objects, an embodiment of the present invention provides a single channel communication encoding circuit, including:

a first delay circuit for generating a first delayed clock signal according to the clock signal;

a pulse generator for generating a pulse signal according to the first delayed clock signal;

the reset end of the long code trigger receives the pulse signal and outputs the high level of the long code signal, the clock end of the long code trigger receives the clock signal, and the clock signal triggers and outputs the low level of the long code signal;

a short code trigger, the reset end of which receives the pulse signal and outputs the high level of the short code signal;

a second delay circuit for generating a second delayed clock signal from the first delayed clock signal;

the clock end of the short code trigger receives the second delay clock signal and outputs the low level of the short code signal;

the selection trigger has a clock end for receiving the first delay clock signal, a data end connected with the data signal and an output end for outputting the data delay signal;

the first input end of the data selector is connected with the output end of the long code trigger, and the second input end of the data selector is connected with the output end of the short code trigger; the selection end is connected with the output end of the selection trigger, and the data selector selects and outputs the long code signal or the short code signal according to the data delay signal and forms a long code signal and a short code signal.

To achieve one of the above objects, an embodiment of the present invention provides a single channel communication encoding circuit, including:

a first delay circuit for generating a first delayed clock signal according to the clock signal;

a second delay circuit for generating a second delayed clock signal according to the first delayed signal;

a first pulse generator for generating a first pulse signal according to the first delayed clock signal;

a second pulse generator for generating a second pulse signal according to the second delayed clock signal;

a third pulse generator for generating a third pulse signal from the first delayed clock signal;

the selection trigger has a clock end for receiving the first delay clock signal, a data end connected with the data signal and an output end for outputting the data delay signal;

a data selector, a first input end of which is connected with the first pulse generator, and a second input end of which is connected with the second pulse generator; the selection end of the data selector is connected with a data delay signal and selects a first pulse signal or a second pulse signal according to the data delay signal;

the reset end of the output trigger is connected with the third pulse generator, and the clock end of the output trigger is connected with the output end of the data selector; the output trigger generates a high level of a long code signal or a high level of a short code signal according to the third pulse signal, and the clock end receives the first pulse signal and generates a low level of the long code signal; and the clock end receives the second pulse signal and generates the low level of the short code signal.

To achieve one of the above objects, an embodiment of the present invention provides a single channel communication decoding method, including: generating a low level of a clock signal according to a high level of the long and short code signal;

generating a delay pulse signal according to the long and short code signals, wherein the delay time of the delay pulse signal is half a clock period;

generating a high level of a clock signal according to the delayed pulse signal;

and generating a digital signal according to the clock signal and the long and short code signal.

As a further improvement of an embodiment of the present invention, the generating the delay pulse signal according to the long and short code signal further includes: and generating long and short code delay signals according to the long and short code signals, and controlling the delay time of the long and short code signals according to the phase difference between the long and short code delay signals and the long and short code signals.

As a further improvement of an embodiment of the present invention, controlling the delay time of the long and short code signals according to the phase difference between the long and short code delay signals and the long and short code signals further includes: and converting the phase difference signal into a voltage signal, and controlling the delay time of the long code delay signal and the short code delay signal according to the voltage signal.

To achieve one of the above objects, an embodiment of the present invention provides a single channel communication decoding circuit, including:

the delay pulse circuit is used for delaying the long and short code signals by half a clock period and generating long and short code delay signals;

the pulse generator is used for generating a delay pulse signal according to the long and short code delay signal;

the clock trigger is connected with the long and short code signals at a clock end and generates the low level of the clock signal according to the long and short code signals, the reset end is connected with the output end of the pulse generator, and the clock trigger generates the high level of the clock signal according to the delay pulse signal;

and a clock end of the digital signal trigger is connected with an output end of the clock trigger, a data end of the digital signal trigger is connected with the long and short code signal, and the digital signal trigger generates a digital high level or a digital low level according to a clock signal.

As a further improvement of an embodiment of the present invention, the delay pulse circuit includes a delay circuit and a pulse circuit, the delay circuit includes:

the delay circuit intermediate stage is used for converting the long and short code signals into long and short code delay signals;

the phase frequency detector is used for detecting the phase difference between the long code delay signal and the short code delay signal;

a charge pump for converting the phase difference into a current signal;

a low pass filter for converting the current signal to a voltage signal;

the intermediate stage of the delay circuit is connected with the low-pass filter and is used for receiving the voltage signal and controlling the delay time of the long code delay signal and the short code delay signal.

As a further improvement of an embodiment of the present invention, the decoding circuit further includes a flip detector, an oscillator, and a data selector;

when not communicating, the rollover detector outputs a low level, the data selector accesses the output of the oscillator into a delay locked loop, and establishes a voltage signal;

when communication is carried out, the turnover detector outputs high level, and the data selector accesses the long and short code signals into the delay pulse circuit.

Compared with the prior art, the invention has the following beneficial technical effects:

(1) the data signal and the clock signal are fused and communicated by using a long and short code coding scheme, so that the efficiency is higher, and the power consumption is lower;

(2) chip packaging and routing can be reduced by supporting single-channel communication, and chip manufacturing cost is reduced;

(3) the coding circuit and the decoding circuit have simple structures, and the complexity of circuit design is reduced;

(4) the communication setup time is short.

Drawings

FIG. 1 is a schematic diagram of a prior art communication circuit;

FIG. 2 is a schematic diagram of another prior art communication circuit;

FIG. 3 is a schematic diagram of yet another prior art communication circuit;

FIG. 4 is a schematic diagram of a communication circuit of the present invention;

FIG. 5 is a schematic diagram of the encoding timing sequence of the present invention;

FIG. 6 is a flow chart of the encoding method of the present invention;

FIG. 7 is a schematic diagram of the encoding circuit of the present invention;

FIG. 8 is a timing diagram of an encoding circuit of the present invention;

FIG. 9 is a flow chart of another encoding method of the present invention;

FIG. 10 is a schematic diagram of another circuit configuration of the present invention;

FIG. 11 is a timing diagram of another circuit of the present invention;

FIG. 12 is a flow chart illustrating a decoding method according to the present invention;

FIG. 13 is a block diagram of a decoding circuit according to the present invention;

FIG. 14 is a timing diagram of the decoding circuit of the present invention;

FIG. 15 is a schematic diagram of a decoding circuit according to the present invention including a delay circuit;

FIG. 16 is a schematic diagram of a decoding circuit of the present invention including a circuit for pre-establishing a control voltage.

Detailed Description

The technical solutions of the present invention will be further described in detail below with reference to the accompanying drawings to help those skilled in the art understand the technical solutions of the present invention. The technical solution of the present invention will be described below in the order of encoding and decoding.

Coding method

Fig. 4 is a schematic diagram of a communication circuit structure such as a digital isolation chip or an isolation amplifier chip.

The communication circuit comprises a source side 401 and a secondary side 403, the source side 401 transmitting communication data and the secondary side 403 receiving communication data.

The source side 401 comprises an encoder 402 and a transmitter 404 and the secondary side 403 comprises a receiver 406 and a decoder 408.

The transmitter 404 and the receiver 406 are connected by an isolation capacitor 410.

The input terminals of the encoder 402 are for receiving the data signal TD and the clock signal TCLK, and the output terminal of the decoder 408 outputs the digital signal RD and the clock signal RCLK.

FIG. 5 is a schematic diagram of the coding timing of the data signal TD, the clock signal TCLK and the long and short code signal WNP according to the present invention, in which the clock signal TCLK and the data signal TD are combined into a long and short code signal WNP by a coding method.

The long and short code signals WNP comprise long code signals WP and short code signals NP, the pulse width of the long code signals WP is consistent with that of the clock signal TCLK, and the pulse width of the short code signals NP is consistent with that of the clock signal TCLK; the duty cycle of the long code signal WP is different from that of the short code signal NP.

The duty ratio of the high and low levels of the long code signal WP is greater than that of the short code signal NP. The long code signal WP is used to indicate that the data signal TD is "1", and the short code signal NP is used to indicate that the data signal TD is "0".

The pulse width of the long code signal WP or the short code signal NP is one clock period Tclk, and the duty ratio of the long code signal WNP and the short code signal WNP satisfies the relation: tclk = TS + TL, where Tclk is a clock period, TS is a high level time of the short code signal NP, TL is a high level time of the long code signal WP, and TS is not equal to TL. As shown in the figure, the low level of the long code signal WP is equal to the high level of the short code signal NP in pulse width.

The data signal TD and the clock signal TCLK are communicated in a fusion mode through the long and short code coding scheme, so that the efficiency is high, and the power consumption is low. Meanwhile, chip packaging and routing can be reduced by supporting single-channel communication, and chip manufacturing cost is reduced. And the coding circuit and the decoding circuit have simple structures, and the complexity of circuit design is reduced.

It should be noted that the present invention is essentially different from the conventional OOK method, which uses an oscillation signal (ON) to represent 1 and uses no oscillation signal (OFF) to represent 0. In the present invention, the long and short code signals WNP with different duty cycles are transmitted by OOK, i.e. ON transmits the high level in the long and short code signals WNP, and OFF transmits the low level in the long and short code signals WNP, i.e. ON or OFF indicates the high and low levels, but the content of the data signal TD is indicated by different duty cycles of the long and short code signals WNP.

Coding method 1

Referring to fig. 6, a flowchart of a long and short code encoding method is shown, which includes the following steps after obtaining a "clock signal":

602: generating a first delayed clock signal according to the clock signal;

604: generating a pulse signal according to the first delayed clock signal;

606: generating a high level of the long code signal and a high level of the short code signal according to the pulse signal;

608: generating a second delayed clock signal according to the first delayed clock signal;

610: generating a low level of the short code signal according to the second delayed clock signal;

612: generating a low level of the long code signal according to the clock signal;

614: generating a data delay signal according to the first delay clock signal and the data signal;

616: the long code signal or the short code signal is selected according to the data signal and the long and short code signal is generated.

The steps 602 to 616 are explained in further detail below with reference to the circuit structure shown in fig. 7 and the timing sequence shown in fig. 8.

The delay circuits, pulse generators, flip-flops, data selectors, and the like included in fig. 7 and other drawings are standard devices, and the present invention will not be discussed in detail and can be implemented by those skilled in the art based on the knowledge of the present invention.

The clock signal TCLK is connected to the first Delay circuit (Delay) 702, the output terminal of the first Delay circuit 702 is connected to the pulse generator (One-shot) 706, the pulse generator 706 operates according to the timing shown in the lower right of fig. 7, and the output terminal thereof is connected to the reset terminals S of the long code flip-flop 708 and the short code flip-flop 710; the data terminals D of the long code flip-flop 708 and the short code flip-flop 710 are grounded, and the output terminals Q of the long code flip-flop 708 and the short code flip-flop 710 are respectively connected to the first input terminal (terminal No. 1 of MUX, where MUX is called Multiplexer, and chinese is called data selector) and the second input terminal (terminal No. 0 of MUX) of the data selector 712; the input end of the second Delay circuit (Delay) 704 is connected with the output end of the first Delay circuit 702, and the output end of the second Delay circuit 704 is connected with the clock end of the short code trigger 710; the output terminal of the first delay circuit 702 is connected to the clock terminal of the selection flip-flop 716, the data signal TD is connected to the data terminal D of the selection flip-flop 716, and the output terminal Q of the selection flip-flop 716 is connected to the selection terminal Sel of the data selector 712. The data selector 712 further includes an output terminal for outputting the long and short code information WNP.

Referring to fig. 6 to 8, in step 602, a first delayed clock signal TD1 is generated according to a clock signal TCLK.

The first delay circuit 702 generates a first delayed clock signal TD1 according to the clock signal TCLK, wherein the first delayed clock signal TD1 has a delay time TS relative to the clock signal TCLK.

In step 604, a pulse signal is generated according to the first delayed clock signal TD 1.

The rising edge of the first delayed clock signal TD1 triggers the pulse generator 706, and the pulse generator 706 generates a pulse signal according to the first delayed clock signal TD1, which is fed to the reset terminals S of the long code flip-flop 708 and the short code flip-flop 710.

In step 606, the long code flip-flop 708 and the short code flip-flop 710 generate a high level 8022 of the long code signal WP and a high level 8024 of the short code signal NP according to the pulse signal; and the long code signal WP and the short code signal NP can maintain a high state after the pulse signal disappears.

In steps 608 and 610, a second delayed clock signal TD2 is generated from the first delayed clock signal TD 1.

The second delay circuit 704 generates the second delayed clock signal TD2 according to the first delayed clock signal TD1, and the delay time of the second delayed clock signal TD2 with respect to the first delayed clock signal TD1 is TS.

When the rising edge of the second delayed clock signal TD2 occurs, the clock terminal of the short code flip-flop 710 is at a high level, and the short code flip-flop 710 outputs a low level that the data terminal D is grounded, thereby generating the low level 804 of the short code signal NP.

In step 612, a low level 808 of the long code signal WP is generated from the clock signal.

When the rising edge 806 of the next clock cycle arrives, the clock of the long code flip-flop 708 receives the clock signal to trigger the level of the output data terminal D, which is grounded, and at this time, the output signal forms the low level 808 of the long code signal WP.

In step 614, a data delay signal TDD1 is generated according to the first delayed clock signal TD1 and the data signal TD.

The first delayed clock signal TD1 is delayed by TS compared to the clock signal TCLK or the data signal TD, and the data signal TD and the clock signal TCLK are synchronized, so that the data signal TD is synchronously generated as the data delayed signal TDD1 after the data signal TD is connected to the data terminal of the selection flip-flop 716 with the first delayed clock signal TD1 as the clock source. That is, the data delay signal TDD1 is delayed by the time TS relative to the data signal TD.

In step 616, the long code signal WP or the short code signal NP is selected according to the data signal TD and the long and short code signal WNP is generated.

The data delay signal TDD1 is connected to the select terminal Sel of the data selector 712, and when the data delay signal TDD1 is at a high level, the long code signal WP is selected to be output, corresponding to the input signal at the first input terminal in the diagram; when the data delay signal TDD1 is at low level, the short code signal NP is selected to be output, corresponding to the input signal at the second input terminal in the figure, the data delay signal TDD1 is synchronized with the long code signal WNP, and the long code signal WP or the short code signal NP is selected to be output according to the data delay signal TDD1, thereby forming the long code signal WNP code.

Coding method two

Referring to fig. 9, the present invention provides another single channel communication encoding method. It comprises the following steps after obtaining a 'clock signal':

902: generating a first pulse signal according to a clock signal;

904: generating a first delayed clock signal according to the clock signal;

906: generating a second delayed clock signal according to the first delayed clock signal;

908: generating a second pulse signal according to the second delayed clock signal;

910: generating a third pulse signal according to the first delayed clock signal;

912: generating a high level of the long code signal or a high level of the short code signal according to the third pulse signal;

914: generating a data delay signal according to the data signal and the first delay clock signal;

916: selecting the first pulse signal or the second pulse signal according to the data delay signal;

918: generating a low level of the short code signal according to the selected second pulse signal;

920: and generating a low level of the long code signal according to the selected first pulse signal.

Steps 902 to 920 are explained in further detail below with reference to the circuit structure shown in fig. 10 and the timing diagram shown in fig. 11.

Referring to fig. 10, the encoding circuit includes a first Delay circuit (Delay) 1002, a second Delay circuit (Delay) 1004, a first pulse generator (One-shot 1) 1006, a second pulse generator (One-shot 2) 1008, a third pulse generator (One-shot 3) 1014, a data selector (MUX) 1010, a selection flip-flop 1012, and an output flip-flop 1016.

The clock signal TCLK is connected to the first delay circuit 1002 and the first pulse generator 1006.

The output terminal of the first delay circuit 1002 is connected to the input terminal of the second delay circuit 1004, the output terminal of the second delay circuit 1004 is connected to the input terminal of the second pulse generator 1008, and the output terminal of the second pulse generator 1008 is connected to the second input terminal (terminal 0 of MUX) of the data selector 1010.

The output terminal of the first pulse generator 1006 is connected to the first input terminal (terminal 1 of MUX) of the data selector 1010, the data signal TD is connected to the data input terminal D of the selection flip-flop 1012, the output terminal Q of the selection flip-flop 1012 is connected to the selection terminal Sel of the data selector 1010 (i.e., the selection terminal Sel of the data selector 1010 is connected to the data delay signal TDD 1), the output terminal of the third pulse generator 1014 is connected to the reset terminal S of the output flip-flop 1016, and the clock terminal of the output flip-flop 1016 is connected to the output terminal of the data selector 1010 to form a node a. The output flip-flop 1016 further includes a data terminal D connected to ground and an output terminal Q for outputting the long and short code signal WNP.

Referring to fig. 9 to 11, in step 902, a first pulse signal P1 is generated at node a (node a) according to a clock signal TCLK, a rising edge 1102 of the clock signal triggers a first pulse generator 1006, and the first pulse generator 1006 generates a first pulse signal P1 according to a first delayed clock signal (i.e., the rising edge 1102), wherein the first pulse signal P1 is inputted to a first input terminal of a data selector 1010.

In step 904, a first delayed clock signal TD1 is generated according to the clock signal TCLK.

The first delay circuit 1002 generates a first delayed clock signal TD1 according to the clock signal TCLK, the first delayed clock signal TD1 is used as a basis for the second delayed clock signal TD2, and the delay time of the first delayed clock signal TD1 relative to the clock signal is TS.

In step 906, a second delayed clock signal TD2 is generated according to the first delayed clock signal TD 1.

The second delay circuit 1004 generates the second delayed clock signal TD2 according to the first delayed clock signal TD1, wherein the delay time of the second delayed clock signal TD2 relative to the first delayed clock signal TD1 is TS.

In step 908, a second pulse signal P2 is generated according to the second delayed clock signal TD 2. The second pulse generator 1008 generates a second pulse signal P2 according to the second delayed clock signal TD2, and the second pulse signal P2 is used to cause the output flip-flop 1016 to output a low level.

In step 910, a third pulse signal (not shown in the timing diagram) is generated according to the first delayed clock signal TD 1.

The third pulse generator 1014 generates a third pulse signal according to the first delayed clock signal TD 1.

In step 912, the third pulse signal resets the output flip-flop 1016 to generate the high level 1104 of the long code signal WP or the high level 1106 of the short code signal NP (the long code signal WP and the short code signal NP are shown in the long and short code signal WNP).

In step 914, a data delay signal TDD1 is generated according to the data signal TD and the first delayed clock signal TD 1.

The clock terminal of the selection flip-flop 1012 receives the first delayed clock signal TD1, the data terminal D is connected to the data signal TD, and the output terminal Q outputs the data delayed signal TDD1, wherein the data delayed signal TDD1 is synchronized with the first delayed clock signal TD 1.

In step 916, the first pulse signal P1 or the second pulse signal P2 is selected according to the data delay signal TDD 1.

The data selector 1012 selects the first pulse signal P1 or the second pulse signal P2 according to the data delay signal TDD 1. When the data delay signal TDD1 is at a high level, the data selector 1012 outputs a first pulse signal P1; when the data delay signal TDD1 is low, the data selector 1012 outputs a second pulse signal P2.

In step 920, a low level 1108 of the long code signal WP is generated based on the selected first pulse signal P1.

The rising edge of the first pulse signal P1 is aligned with the rising edge of the clock signal TCLK, so the first pulse signal P1 makes the output flip-flop 1016 generate the low level 1108 of the long-code signal WP, and then the third pulse generator 1014 generates a pulse signal to pull up the output level of the output flip-flop 1016 again to form the high level 1104 of the long-code signal WP, thereby completing one long-code encoding.

In step 918, the low level 1110 of the short code signal NP is generated based on the selected second pulse signal P2.

The rising edge of the second pulse signal P2 is delayed by a delay time TS with respect to the first delayed clock signal TD1, the output level of the output flip-flop 1016 is pulled down by the second pulse signal P2 to form a low level 1110 of the short code signal NP after the high level of the output flip-flop 1016 continues for the delay time TS, and the third pulse generator 1014 generates a pulse signal to pull up the output level of the output flip-flop 1016 again to form a high level 1106 of the short code signal NP after the rising edge of the subsequent first delayed clock signal TD1 occurs, thereby completing one time of short code encoding.

Decoding method

Referring to fig. 12, the decoding method for single channel communication includes the following steps after obtaining a "long and short code signal":

1202: generating a low level of a clock signal according to a high level of the long and short code signal;

1204: generating a delay pulse signal according to the long and short code signals, wherein the delay time of the delay pulse signal is half a clock period;

1206: generating a high level of a clock signal according to the delayed pulse signal;

1208: and generating a digital signal according to the clock signal and the long and short code signal.

Hereinafter, steps 1202 to 1208 will be explained in detail with reference to the circuit structure shown in fig. 13 and the timing chart shown in fig. 14.

Referring to fig. 13, the circuit configuration includes a Delay pulse circuit (Delay 0.5 Tclk) 1302, a pulse generator (One-shot) 1304, a clock flip-flop 1306, and a digital signal flip-flop 1308.

The delay pulse circuit 1302 is connected to the long and short code signal WNP, the output terminal of the delay pulse circuit 1302 is connected to the pulse generator 1304, the data terminal D of the digital signal flip-flop 1308 is connected to the long and short code signal WNP, the clock terminal of the clock flip-flop 1306 is connected to the long and short code signal WNP, the reset terminal S of the clock flip-flop 1306 is connected to the output terminal of the pulse generator 1304 to receive the delay pulse signal SET, and the output terminal Q of the clock flip-flop 1306 is connected to the clock terminal of the digital signal flip-flop 1308 to output the clock signal RCLK. The clock flip-flop 1306 further comprises a data terminal D connected to ground, and the digital signal flip-flop 1308 further comprises an output terminal Q for outputting the digital signal RD.

Referring to fig. 12 to 14, in step 1202, a low level 1402 of the clock signal RCLK is generated according to a high level of the long and short code signal WNP.

When the rising edge 1404 of the long and short code signal WNP is input into the clock flip-flop 1306, the output Q of the clock flip-flop 1306 outputs the low level 1402 (included in the clock signal RCLK) of the data terminal D, i.e., the clock flip-flop 1306 generates the low level of the clock signal RCLK according to the long and short code signal WNP.

In step 1204, a delayed pulse signal SET is generated according to the long and short code signal WNP, wherein the delayed pulse signal SET is delayed by half a clock period (0.5 Tclk).

The delay pulse circuit 1302 delays the long and short code signal WNP by half a clock cycle and generates a long and short code delay signal, and the pulse generator 1304 generates the delay pulse signal SET according to the long and short code delay signal, that is, the length of the rising edge 1408 of the delay pulse signal SET from the rising edge 1404 of the long and short code signal WNP is half a clock cycle.

In step 1206, the delayed pulse signal SET resets the output Q of the clock flip-flop 1306 to a high level, constituting the high level of the clock signal RCLK.

Repeating steps 1202-1206 generates a plurality of clock signals RCLK.

In step 1208, the digital signal RD is generated according to the clock signal RCLK and the long and short code signal WNP.

The digital signal flip-flop 1308 generates a digital high level or a digital low level 1406 included in the digital signal RD according to the clock signal RCLK.

Since the rising edge 1410 of the clock signal RCLK is exactly at the middle position (half cycle) of the data signal, the output signal of the digital signal flip-flop 1308 is the high level of the long code signal WP or the low level of the short code signal NP, so that the output decoded high-low level signal exactly corresponds to the long-short code signal WNP code.

In a further improvement of the above method, the generating the delayed pulse signal SET according to the long and short code signal WNP further includes: the long and short code delay signal is generated according to the long and short code signal WNP, and the delay time of the long and short code signal WNP is controlled according to the phase difference between the long and short code delay signal and the long and short code signal WNP.

Further to the above method improvement, the controlling the delay time of the long and short code signal WNP according to the phase difference between the long and short code delay signal and the long and short code signal WNP further comprises: and converting the phase difference signal corresponding to the phase difference into a voltage signal, and controlling the delay time of the long code delay signal and the short code delay signal according to the voltage signal.

Referring to the decoding circuit for single-channel communication shown in fig. 15, which includes the internal structure of the delay circuit of the delay pulse circuit 1302 in fig. 13, the delay pulse circuit 1302 may further include a pulse circuit.

Specifically, the delay circuit intermediate stage 1502 is included to convert the long and short code signal WNP into a long and short code delay signal WNPD; the phase frequency detector 1504 is used for detecting the phase difference between the long and short code delay signal WNPD and the long and short code signal WNP; a charge pump 1506 for converting the phase difference into a current signal; a low pass filter 1508 for converting the current signal to a voltage signal Vctrl; the delay circuit intermediate stage 1502 is connected to the output of the low pass filter 1508, and the delay circuit intermediate stage 1502 is used for receiving the voltage signal Vctrl and controlling the delay time of the long and short code delay signal WNPD.

The feedback loop from the phase signal to the voltage signal, formed by the phase frequency detector 1504 to the low pass filter 1508, can precisely control the time of the delay circuit, so that the delay time control is more precise, and the accurate clock signal RCLK is restored by combining with other parts of the decoding circuit.

The other parts, like the circuit in fig. 13, include a pulse generator One-shot, a clock flip-flop, and a digital signal flip-flop. The input end of the pulse generator One-shot is connected with a long and short code delay signal WNPD, and the output end of the pulse generator One-shot is connected with a reset end S of the clock trigger and outputs a delay pulse signal Set. The data end D of the clock trigger is grounded, the clock end is connected with the long and short code signal WNP, and the clock signal RCLK is output through the output end Q. The clock end of the digital signal trigger is connected with the output end Q of the clock trigger, the data end D is connected with the long and short code signal WNP, and the output end Q outputs a digital signal RD.

Referring to fig. 16, a circuit for pre-establishing a control voltage is further added on the basis of fig. 15, including a toggle detector 602, an oscillator 604 (with a period of Tosc), and a data selector (MUX) 608. The oscillator 604 is connected to the second input terminal (terminal 0 of MUX) of the data selector 608, the long and short code signal WNP is connected to the first input terminal (terminal 1 of MUX) of the data selector 608 and the input terminal of the flip-flop detector 602, the output terminal of the flip-flop detector 602 is connected to the selection terminal Sel of the data selector 608, and the output terminal of the data selector 608 replaces the WNP input of the circuit in fig. 15.

When not communicating, the roll-over detector 602 outputs a low level and the data selector 608 switches the output of the oscillator 604 into a delay locked loop (including the circuit formed by the back-side delay circuit intermediate stage 1502, phase frequency detector, charge pump, low pass filter) and establishes the voltage signal Vctrl.

When communicating, the flip detector 602 outputs a high level, and the data selector 608 switches the long and short code signal WNP into the delay pulse circuit.

The other parts of the circuit are similar to the circuit in fig. 15, and comprise a pulse generator One-shot, a clock trigger and a digital signal trigger. The input end of the pulse generator One-shot is connected with a long and short code delay signal WNPD, and the output end of the pulse generator One-shot is connected with a reset end S of a clock trigger and outputs a delay pulse signal Set; the data end D of the clock trigger is grounded, the clock end is connected with the long and short code signal WNP, and the clock signal RCLK is output through the output end Q; the clock end of the digital signal trigger is connected with the output end Q of the clock trigger, the data end D is connected with the long and short code signal WNP, and the output end Q outputs a digital signal RD.

Meanwhile, the phase frequency detector is connected with the charge pump through two output ends to output control signals UP and DOWN.

When the communication is not performed, the voltage signal Vctrl of the voltage-controlled delay line (including the intermediate stage 1502 of the delay circuit) is already established by the delay lock loop, and the voltage signal Vctrl is close to a final voltage signal during communication, so that accurate communication can be immediately realized when the long and short code signal WNP arrives, the establishment time required by a common clock data recovery circuit is not needed, and the communication is quickly established.

Since the technical contents and features of the present invention have been disclosed above, those skilled in the art can make various substitutions and modifications without departing from the spirit of the present invention based on the teaching and disclosure of the present invention, and therefore, the scope of the present invention is not limited to the disclosure of the embodiments, but includes various substitutions and modifications without departing from the present invention and covered by the claims of the present patent application.

23页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于链表的报文协议超时重发方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类