Method and device for providing clock signal in data link
By generating reset pulses based on input signals and synchronously outputting signals in a multi-clock domain data link, the problem of large reset signal load and uncertain time delay is solved, and high-precision clock signal transmission and stability are achieved.
Patent Information
- Application Number
- CN202310363652.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2043-03-31
AI Technical Summary
In a multi-clock domain data link, the load of the reset signal is large and the delay is uncertain, which leads to metastability problems when the reset is released and affects the delay accuracy.
By generating a reset pulse signal based on the input synchronization reference signal and clock signal in each clock domain, and synchronously generating the output synchronization reference signal and clock signal after the reset pulse ends, ensuring that these signals are delivered to the next clock domain with the same time delay, Achieve sequential synchronization and reduce delay uncertainty and metastable probability.
It effectively reduces the uncertainty and metastability problems of time delays between different clock domains, ensures the precise transmission of reset signals and time delay accuracy, avoids false beats, and improves the stability of clock signal transmission of data links.
Smart Images

Figure CN118784121A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communications, and in particular, to a method and device for providing a clock signal in a data link. Background Art
[0002] In recent years, 5G communications have developed rapidly. Technologies such as large-scale antenna technology and Global Positioning System Pulse Per Second (GPS PPS) timing have improved system capacity and clock accuracy. This has also put forward higher requirements on the accuracy of data link delays in baseband and RF transceiver systems.
[0003] The traditional method of clock phase initialization under multiple clock domains is to use asynchronous reset and synchronous release to make the reset signal have a clear release timing, which can reduce the metastable problem caused by the release of the reset signal, and can effectively capture the reset. Even if the reset pulse is narrow, the reset function will not be lost. However, there are the following problems: First, if the circuit scale is large and the distance between different clock domains is relatively far, the load of the reset signal will be very large. In order to ensure the signal quality, more buffer circuits are required. In this way, the delay of the reset signal to different clock domains will change greatly with the change of process voltage temperature (PVT), thereby affecting the delay accuracy of the reset signal to each clock domain; second, the uncertainty of the delay of the reset signal between different clock domains; third, there is still a metastable problem when the reset is released, and the metastable state will seriously affect the delay accuracy of the reset signal, thereby affecting the delay accuracy of the reset signal.
[0004] There is no solution yet for the problem of uncertainty in the delay between different clock domains in the related art. Summary of the invention
[0005] The embodiments of the present application provide a method and apparatus for providing a clock signal in a data link, so as to at least solve the problem in the related art that the uncertainty of the delay between different clock domains causes a large load and misbeat of the reset signal, and that a metastable state still exists when the reset is released.
[0006] According to one embodiment of the present application, a method for providing a clock signal in a data link is provided, the method comprising:
[0007] In each of the multiple clock domains of the data link, a reset pulse signal is generated based on an input synchronization reference signal and an input clock signal, an output synchronization reference signal is generated based on the input synchronization reference signal and the input clock signal, and an output clock signal is generated based on the input clock signal;
[0008] The output synchronization reference signal and the output clock signal are reset by the reset pulse signal, and after the reset pulse signal ends, the next rising edge of the input clock signal is synchronized to generate the reset output synchronization reference signal and the reset output clock signal, wherein the reset output synchronization reference signal and the reset output clock signal are transmitted to the next clock domain of the data link after the same time delay, as the input synchronization reference signal and input clock signal of the next clock domain.
[0009] According to another embodiment of the present application, there is also provided a device for providing a clock signal in a data link, the device comprising: a reset pulse signal generating circuit, an output synchronization reference signal generating circuit and an output clock signal generating circuit, wherein:
[0010] The reset pulse signal generating circuit is used to generate a reset pulse signal based on an input synchronization reference signal and an input clock signal in each clock domain of a plurality of clock domains of a data link, generate an output synchronization reference signal based on the input synchronization reference signal and the input clock signal, and generate an output clock signal based on the input clock signal; and input the reset pulse signal into the output synchronization reference signal generating circuit and the output clock signal generating circuit to reset the output synchronization reference signal and the output clock signal;
[0011] The output synchronization reference signal generating circuit is used to synchronously generate a reset output synchronization reference signal at the next rising edge of the input clock signal after the reset pulse signal ends;
[0012] The output clock signal generating circuit is used to synchronously generate a reset output clock signal at the next rising edge of the input clock signal after the reset pulse signal ends, wherein the reset output synchronization reference signal and the reset output clock signal are transmitted to the next clock domain of the data link through the same second time delay as the input synchronization reference signal and input clock signal of the next clock domain.
[0013] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0014] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0015] In the embodiment of the present application, in each clock domain of multiple clock domains of the data link, a reset pulse signal is generated based on the input synchronization reference signal and the input clock signal, an output synchronization reference signal is generated based on the input synchronization reference signal and the input clock signal, and an output clock signal is generated based on the input clock signal; the output synchronization reference signal and the output clock signal are reset by the reset pulse signal, and the next rising edge of the input clock signal after the reset pulse signal is terminated synchronously generates the reset output synchronization reference signal and the reset output clock signal, and the reset output synchronization reference signal and the reset output clock signal are transmitted to the next clock domain after the same time delay, and are used as the input synchronization reference signal and the input clock signal of the next clock domain, which can solve the problem of the large load of the reset signal and the inconsistency of the transmission path in the related art, resulting in the uncertainty of the delay between different clock domains, thereby causing the problem of misbeat and metastable state, and each clock domain adopts a sequential synchronization method, so that each clock domain has clear phase information, reduces the load of the synchronization reference signal, and thus reduces the uncertainty of the delay between different clock domains. Since the clock signal and the synchronization reference signal are transmitted together, the problem of misbeat is avoided and the probability of metastable state is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a system block diagram of a digital-to-analog converter in the related art;
[0017] Figure 2 is a flowchart of a method for providing a clock signal in a data link according to an embodiment of the present application;
[0018] Figure 3 is a timing diagram of high-precision time delay according to the present embodiment;
[0019] Figure 4 The circuit structure of the high-precision time delay according to this embodiment is Figure 1 ;
[0020] Figure 5 is a schematic diagram of clock frequency deviation compensation according to this embodiment Figure 1 ;
[0021] Figure 6 is a circuit structure diagram of a buffer according to this embodiment;
[0022] Figure 7 The circuit structure of the multi-phase clock generation according to this embodiment is Figure 1 ;
[0023] Figure 8 The circuit structure of the multi-phase clock generation according to this embodiment is Figure 2 ;
[0024] Fig. 9The circuit structure of the reset pulse generation according to this embodiment is Figure 1 ;
[0025] Fig.10 The circuit structure of the reset pulse generation according to this embodiment is Figure 2 ,;
[0026] Fig.11 is a schematic diagram of clock frequency deviation compensation according to this embodiment Figure 2 ;
[0027] Fig.12 The circuit structure of the high-precision time delay according to this embodiment is Figure 2 ;
[0028] Fig.13 The circuit structure of the high-precision time delay according to this embodiment is Figure 3 ;
[0029] Fig.14 The invention is a block diagram of an apparatus for providing a clock signal in a data link according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0032] Figure 1 It is a system block diagram of a digital-to-analog converter in the related art, such as Figure 1As shown in FIG. 1 , the digital-to-analog converter includes a data path, a clock path, and a digital-to-analog converter core circuit (DAC Core). The data path includes an interface circuit (Interface), a digital data path (Digital Data Path), a decoder (Decoder), a serializer (Serializer), and a switch driver (Switch Driver), the clock path includes a synchronous pulse circuit (ClockReceiver), a clock divider (Clock Divider), and a driver, etc., and the digital-to-analog converter core circuit includes multiple digital-to-analog converter core units (DAC Core Slices). In the interface circuit, 16 low-speed data channels are transmitted in parallel to the digital data link at the frequency of Fs / 16. The digital data link is mainly composed of four random access memories. The 16 data channels are divided into 4 groups and written into 4 random access memories at the clock of Fs / 16. The 4-phase clock of the frequency of Fs / 4 reads out 4 data channels from the 4 random access memories and inputs them into the decoder; the decoder completes the code conversion, and the merging of 4-phase to 2-phase data is completed in the serializer using double-edge sampling, and then the merging of 2-phase to 1-phase is completed in the switch initiator. In the entire parallel-to-serial conversion process, the modules in different data links work at different clock frequencies, and the clock phases of multiple data channels in the same module are also different. Finally, the data transmission and transmission are completed under the control of multiple clock frequency domains. Therefore, the accuracy of the clock frequency and the accuracy of the clock phase in different clock domains determine the delay accuracy of the data link.
[0033] In this embodiment, a method for providing a clock signal in a data link is provided. Figure 2 is a flow chart of a method for providing a clock signal in a data link according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:
[0034] Step S202, in each of the multiple clock domains of the data link, generating a reset pulse signal based on an input synchronization reference signal and an input clock signal, generating an output synchronization reference signal based on the input synchronization reference signal and the input clock signal, and generating an output clock signal based on the input clock signal;
[0035] The reset pulse signal in this embodiment is a pulse signal with a preset width, and the preset width can be flexibly set according to actual needs.
[0036] Step S204, reset the output synchronization reference signal and the output clock signal through the reset pulse signal, and after the reset pulse signal ends, the next rising edge of the input clock signal synchronously generates the reset output synchronization reference signal and the reset output clock signal, and the reset output synchronization reference signal and the reset output clock signal are transmitted to the next clock domain of the data link after the same time delay, as the input synchronization reference signal and the input clock signal of the next clock domain.
[0037] Through the above steps S202 to S204, the problem of the uncertainty of the delay between different clock domains caused by the large load of the reset signal and the inconsistency of the transmission path in the related art, thereby causing the problem of misbeat and metastable state, can be solved. Since each clock domain adopts a sequential synchronization method, each clock domain has clear phase information, which reduces the load of the synchronization reference signal, thereby reducing the uncertainty of the delay between different clock domains. Since the clock signal and the synchronization reference signal are transmitted together, the problem of misbeat is avoided and the probability of metastable state is reduced.
[0038] In this embodiment, the above step S202 may specifically include: generating a reset pulse signal when the rising edge of the input synchronization reference signal is detected at the rising edge of the input clock signal.
[0039] In one embodiment, the above-mentioned step S204 may specifically include: converting the output synchronization reference signal from a high level to a low level based on the reset pulse signal, and converting the output clock signal from a high level to a low level based on the reset pulse signal, so as to reset the output synchronization reference signal and the output clock signal; when the next rising edge of the input clock signal arrives, synchronously generating the reset output synchronization reference signal and the reset output clock signal. This implementation is only a preferred embodiment, and it can also be reset from a low level to a high level.
[0040] In another embodiment, in the above step S204, generating the reset output clock signal may specifically include: generating a single-phase reset output clock signal according to the reset pulse signal and the input clock signal; or generating a multi-phase reset output clock signal according to the reset pulse signal and the input clock signal.
[0041] The above-mentioned step S204 can be specifically performed by an output synchronization reference signal generating circuit and an output clock signal generating circuit. When the output synchronization reference signal generating circuit includes a first flip-flop (D type Flip Flop, referred to as DFF), through the first DFF, at the next rising edge of the input clock signal after the reset pulse signal ends, a reset output synchronization reference signal is generated synchronously according to the reset pulse signal, the input synchronization reference signal and the input clock signal. When the rising edge of the clock signal in the first DFF arrives, the output synchronization reference signal becomes the input synchronization reference signal, and when the low level of the clock signal arrives, the output synchronization reference signal remains unchanged.
[0042] The above-mentioned output clock signal generating circuit can be a single-phase clock generating circuit or a multi-phase clock generating circuit. If the output clock signal is a single-phase clock generating circuit, the single-phase clock generating circuit generates a single-phase reset output clock signal synchronously according to the reset pulse signal and the input clock signal at the next rising edge of the input clock signal after the reset pulse signal ends; further, in the case that the single-phase clock generating circuit includes a third DFF, the third DFF generates a single-phase reset output clock signal synchronously according to the reset pulse signal and the input clock signal at the next rising edge of the input clock signal after the reset pulse signal ends.
[0043] If the output clock signal is a multi-phase clock generation circuit, the multi-phase reset output clock signal is generated synchronously according to the reset pulse signal and the input clock signal at the next rising edge of the input clock signal after the reset pulse signal ends through the multi-phase clock generation circuit. Further, in the case where the multi-phase clock generation circuit includes a frequency divider Divider and a shift register Shift register, a single-phase frequency-divided clock is generated according to the input clock signal and the reset pulse signal at the next rising edge of the input clock signal after the reset pulse signal ends through the Divider; a multi-phase reset output clock signal is generated according to the single-phase frequency-divided clock generated by the Divider under the control of the input clock signal through the Shift register; in the case where the multi-phase clock generation circuit includes a state machine and a synchronization circuit, a multi-phase frequency-divided clock is generated according to the input clock signal and the reset pulse signal at the next rising edge of the input clock signal after the reset pulse signal ends through the state machine; the multi-phase frequency-divided clock is synchronized through the synchronization circuit, and a multi-phase reset output clock signal is output.
[0044] In an optional embodiment, after the above-mentioned step S204, the method further includes: synchronizing the reset output synchronization reference signal according to the reset output clock signal to obtain a new reset output synchronization reference signal. At this time, the above-mentioned output synchronization reference signal generating circuit also includes a second DFF, and the second DFF is connected to the above-mentioned first DFF. Through the second DFF, the reset output synchronization reference signal is synchronized according to the reset output clock signal to obtain a new reset output synchronization reference signal.
[0045] In an embodiment of the present application, the above-mentioned step S202 may specifically include: using a reset pulse generation method of a delayed signal to generate a reset pulse signal based on an input synchronization reference signal and an input clock signal; or using a reset pulse generation method of a two-phase non-overlapping signal to generate a reset pulse signal based on an input synchronization reference signal and an input clock signal.
[0046] In another optional embodiment, the method also includes: when the reset pulse enable signal is enabled and the new air interface signal is enabled, generating the reset pulse signal according to the input synchronization reference signal and the input clock signal, and when the reset pulse enable signal is enabled and the new air interface enable signal is enabled, synchronously resetting the output synchronization reference signal and the output clock signal through the reset pulse signal; further, when the reset pulse enable signal is enabled and the new air interface signal is not enabled, the output synchronization reference signal and the output clock signal are not reset; when the reset pulse enable signal is not enabled and the new air interface signal is enabled, the output synchronization reference signal and the output clock signal are not reset, and the output synchronization reference signal and the output clock signal are generated when the rising edge of the input clock signal arrives.
[0047] In this embodiment, the input synchronization reference signal enters the reset pulse signal generating circuit and the output synchronization reference signal generating circuit respectively through the first buffer, and the input clock signal enters the reset pulse signal generating circuit, the output synchronization reference signal generating circuit and the output clock signal generating circuit respectively through the second buffer. The first buffer and the second buffer are an inverter chain structure, or the first buffer and the second buffer are integrated with a delay adjustment circuit, or the first buffer and the second buffer are integrated with a duty cycle adjustment circuit.
[0048] The embodiments of the present application can also compensate for the time delay of the data link in the following two ways: Method 1: within the period of the input synchronization reference signal of multiple clock domains, count the input clock signal to obtain a counting result; compare the counting result with the preset counting result to obtain a first comparison result; determine the first clock frequency deviation of the target time delay according to the first comparison result; adjust the time delay of the data link by adjusting the address of the read data to compensate for the first clock frequency deviation of the target time delay, thereby realizing compensation for the time delay of the data link. Method 2: Obtain the current address when the rising edge of the input synchronization reference signal arrives; compare the current address with the initialization address to obtain a second comparison result; determine the second clock frequency error of the target time delay based on the second comparison result; adjust the time delay of the data link by adjusting the position of the read address in the random access memory to compensate for the second clock frequency deviation of the target time delay. The storage depth of the random access memory is the product of the ratio of the period of the input synchronization reference signal to the period of the read signal and the inverse of N, so as to compensate for the first clock frequency deviation of the target time delay. The time delay of the data link is compensated by adjusting the position of the read address in the random access memory. The above-mentioned target time delay is the time from resetting the output synchronization reference signal and the output clock signal to synchronously generating the reset output synchronization reference signal and the reset output clock signal.
[0049] The embodiment of the present application introduces an input synchronization reference signal, which can be a periodic signal or a step signal. The input synchronization reference signal and the input clock signal are used to generate a reset pulse signal using synchronous timing logic, so that the reset pulse signal has a clear delay feature, and then the multi-phase output clock signal generating cable and the output synchronization reference signal generating cable are reset and synchronized, so that the phase information of the multi-phase output clock signal is clear, and the two are transmitted to the next clock domain together to repeat the above operation. Since each clock domain is synchronized in turn, the load of the synchronization reference signal is reduced, thereby reducing the uncertainty of the delay between different clock domains. Since the clock signal and the synchronization reference signal are transmitted together, the problem of wrong beats is avoided and the probability of metastable state is reduced. In this way, each clock domain has clear phase information. When the synchronization reference signal is a periodic signal, its period is an integer multiple of the ideal clock frequency. In the period of the synchronization reference signal, the clock frequency deviation is judged by counting the clock signal and comparing the counting result with the ideal counting result, and the delay deviation is compensated by adjusting the address of the read data to adjust the delay of the data link. The above method enables the entire data transmission link to have stable clock phase information, and by timely compensating for the delay error caused by the clock frequency, accurate delay characteristics are obtained.
[0050] Figure 3is a timing diagram of high-precision time delay according to this embodiment, such as Figure 3 As shown, the top five signals are in the clock domain 1 (clk domain1), and the bottom five signals are in the clock domain 2 (clk domain2). This diagram involves the process of using the synchronization reference signal (syncin1 / 2) and the local clock (Clk in1 / 2) to generate the reset pulse (sync pulse1 / 2), multi-phase frequency-divided clock (Clk out1 / 2), and output synchronization reference signal (Sync out1 / 2) locally, as well as the transmission process of the synchronization reference signal and clock signal between different clock domains (Clk out1 becomes Clk in2 after delay, and Sync out1 becomes sync in2 after delay). The reset pulse signal, multi-phase frequency-divided clock, and output synchronization reference signal are all generated synchronously under the control of the local clock signal, with clear and stable timing and precise delay information. As shown Figure 3 As shown, when clk1 acquires sync in1, it generates the rising edge of sync pulse1, and then resets Sync out1 and Clk out1. After 2 clk1 cycles, it generates the falling edge of sync pulse1. At the next rising edge of clk1, reset Clk out1 and Sync out1 are generated. Therefore, after clk1 acquires sync in1, 3 clk1 cycles (Td1), new clock signals and synchronization signals Clk out1 and Sync out1 are generated. Since the synchronization reference signal (Sync out1) is transmitted to the next clock domain together with the output clock (Clk out1), by matching the same transmission path between the two, it is ensured that when the synchronization reference signal and the clock signal are transmitted to the next clock domain (clk domain2), they (sync in2 and Clk in2) still have a clear phase relationship and delay information Td2. In clock domain 2, the multi-phase clock (Clk out2) is reset and the clock and synchronization reference signal (Sync out2) are transmitted in the same way as in clock domain 1. When Clk in2 samples 3 Clk in2 cycles of Sync in2, Td3, reset Clk out2 and Sync out2 are generated. When the synchronization reference signal is transmitted to all clock domains, all clock resets are completed, thereby ensuring that the clock signals in each clock domain have a certain delay information relative to the synchronization reference signal, and thus the clock signals also have a certain delay information. Figure 3As shown, if two clock domains are considered, the delay of clk1 out relative to sync in1 is 3 Clk in1 cycles, and the delay of clk2 out relative to sync in1 is 3 Clk in2 cycles plus the delay Td2 of the signal transmitted between clock domains 12. Since the delay of Td2 signal in wiring is relatively stable, it can be considered as a relatively fixed delay, so Clk out2 also has fixed delay information relative to sync in1.
[0051] Figure 4 The circuit structure of the high-precision time delay according to this embodiment is Figure 1 ,like Figure 4 As shown in the figure, the input synchronization reference signal (Sync in) and the local input clock signal (Clk in) pass through the buffer circuit (Buffer) to reach the local clock domain, generating a reset pulse signal (sync pulse) and an output synchronization reference signal (Sync out <x:0>) and the output clock signal (Clk out <x:0>) circuit. All of the above signals are generated under the synchronous timing logic of the local clock signal (Clk in). The reset pulse signal (sync pulse) is generated using the synchronization reference signal (Sync out) and the input clock signal (Clk in). It has a pulse width adjustment function, and the output pulse width is an integer multiple of the input clock signal (Clk in) period. The reset pulse signal acts on the output synchronization reference signal generating circuit and the output clock signal generating circuit. The output clock signal generating circuit specifically includes DFF41 (corresponding to the above-mentioned first DFF) and DFF42 (corresponding to the above-mentioned second DFF) to reset the output synchronization reference signal and the output pulse signal to obtain the reset output synchronization reference signal and the reset output pulse signal. When the reset pulse signal ends, the next local clock rising edge arrives, and a new output clock signal and output synchronization reference signal with a clear phase relationship are generated. The output multi-phase clock signal can be generated in a variety of ways, Figure 4 The method of first generating a single-phase divided clock through a divider and then generating a multi-phase clock (Clk out) through a shift register is given. <x:0>) solution. In order to ensure the phase relationship between the output multi-phase clock signal and the output synchronization reference signal, the output synchronization reference signal is synchronized with the output multi-phase clock (DFF <x:0>), output multi-phase synchronization reference signal (Sync out <x:0>). In addition, the circuit also integrates a reset pulse enable signal (sync pulse en, referred to as Spen) and a new radio enable signal (new radio en, referred to as Nren). When the reset pulse signal is enabled, the reset pulse signal is generated normally to reset the output synchronization reference signal and the output clock signal; when the reset pulse enable signal is not enabled and the new radio signal is enabled, the output synchronization reference signal and the output clock signal are not reset, and the synchronization reference signal is transmitted to the next clock domain through local clock synchronization.
[0052] The synchronization reference signal can be a step signal with a single rising edge or a periodic signal. When the synchronization reference signal is a step signal, it is mostly used for clock phase reset and initialization of the read address in the random access memory; when the synchronization signal is a periodic signal, it can also be used to correct the delay error caused by the frequency error of the divided clock signal on the basis of reset and initialization. When the synchronization reference signal is a periodic signal, it is necessary to ensure that the period of the synchronization reference signal is an integer multiple of the frequency of the ideal clock. Figure 5 is a schematic diagram of clock frequency deviation compensation according to this embodiment Figure 1 ,like Figure 5 As shown, in order to correct the delay deviation, a data buffer is introduced in the digital data link of the data link. By periodically counting the divided clock signal and comparing the counting result with the ideal counting result, the accuracy of the divided clock frequency is determined, and the deviation of the clock frequency is corrected by adjusting the data delay. In order to avoid frequent updates of the read address position, a threshold is also configured. When the deviation is within the threshold range, the read address is not updated. When the deviation is greater than the threshold, the read address is updated to the expected position, thereby ensuring that the delay deviation is within the required range.
[0053] In this embodiment, the buffer for synchronizing the reference signal and the local clock signal has many variations. Figure 6 is a circuit structure diagram of a buffer according to this embodiment, such as Figure 6 As shown, the buffer can be a simple chain of inverters ( Figure 6 a) to increase the driving capability, the buffer can also integrate delay adjustment function ( Figure 6 b, select different delay paths through multiplexers and adjust the delay from input to output) to obtain a relatively stable timing relationship between data and clock, and integrate duty cycle adjustment function ( Figure 6 c. Insert a bidirectional inverter between the differential signal transmission paths to form positive feedback and optimize the duty cycle) so that the signal has accurate duty cycle information, etc.
[0054] There are many variations of multi-phase clock generation circuits, and the attached Figure 4 The divider and shift register are shown in Figure 1. Figure 7 The circuit structure of the multi-phase clock generation according to this embodiment is Figure 1 ,like Figure 7 As shown, when rst_n is low, DFF71-72 is reset, clk_div outputs low, and after rest_n is released, the output of DFF1 changes from low to high at the first rising edge of clk, and the output of DFF72 maintains a low level. The output of DFF1 maintains a high level at the second rising edge of clk, and the output of DFF72, i.e., clk_div, changes from a low level to a high level. According to this rule, a 4-frequency division signal clk_div of clk is generated, and then clk_div generates a 4-phase 4-frequency division signal clk_div<3:0> through DFF73-DFF76; Figure 8 The circuit structure of the multi-phase clock generation according to this embodiment is Figure 2 ,like Figure 8 As shown, the state machine plus output synchronization is used to generate. When rest_n is low, DFF81-82 is reset, div<3:0> outputs low level, and after rest_n is released, DFF1 outputs div on the first rising edge of clk. <3> From low level to high level, its reverse signal div <1> From high level to low level, DFF82 output maintains low level, the second Clk rising edge DFF1 output maintains high level, DFF82 output is div <2> From low level to high level, its reverse signal div <1> From high level to low level, the output clk_div<3:0> is generated by the multi-phase frequency division signal div<3:0> after being synchronized by clk through DFF83-86.
[0055] The reset pulse signal generating circuit can have many variations. In order to shield the falling edge of the synchronization reference signal in this application, a rising edge trigger circuit is integrated in the solution. Fig. 9 The circuit structure of the reset pulse generation according to this embodiment is Figure 1 , Fig.10 The circuit structure of the reset pulse generation according to this embodiment is Figure 2 ,like Fig. 9 and Fig.10 In DFF91, since DFF91 is rising edge triggered, the output of DFF91 will change only when the rising edge of Sync in arrives. If dual edge triggering is required, the rising edge trigger circuit can be deleted. Fig. 9 The output signal of DFF91 passes through DFF92-94 under the control of clk to generate signals with different delays (each time it passes through a DFF, it is delayed by one clock cycle of clk). When s1 is high and s1n is low, the output of DFF92 and DFF93 passes through the XOR gate to generate a pulse signal of one clk cycle. When s1 is low and s1n is high, a pulse signal of two clk cycles is generated. When DFF is increased, a signal with a larger pulse width can also be generated. Fig.10 In the method, the principle of two-phase non-overlapping signal generation is used to generate signals with different pulse widths by adjusting the non-overlapping time through DFF. When s1 is high and s1n is low, DFF102 and DFF103 are connected to the input of the XOR gate. Since the DFF103 signal is generated by the DFF102 signal through a NOR gate and a DFF, a pulse signal delayed by a DFF and a NOR gate is generated. When s1 is high and s1n is low, DFF104 and DFF105 are connected to the input of the XOR gate. Since the DFF105 signal is generated by the DFF104 signal through a NOR gate and two DFFs, a pulse signal delayed by two DFFs and a NOR gate is generated. When DFF is increased, a signal with a larger pulse width can also be generated.
[0056] like Figure 3 As shown, after the system is powered on, a synchronization reference signal (Sync in1) is generated. When the synchronization reference signal passes through different clock domains (Clk domain1 / 2), it stimulates the generation of local reset pulse signals (Sync pulse1 / 2) in turn, and synchronously resets the clock signals (Clk out1 / 2) and the output synchronization reference signals (Sync out1 / 2) of each clock domain, so that each clock signal (Clk out1 / 2) has clear phase information. Fig.11 is a schematic diagram of clock frequency deviation compensation according to this embodiment Figure 2 ,like Fig.11 As shown in the figure, when the clock domain where the random access memory is located generates a clock signal (data_rd_clk) and a synchronous reset signal (Sync pulse), the read address (data_rd_addr) of the random access memory is initialized and the read address is checked periodically. If the deviation of the read address exceeds the set threshold, the read address is reset to the initialization address (rd_addr_init), otherwise, the read address remains unchanged. Through the above process, the accurate time delay of the data link can be obtained.
[0057] There are many variations of clock frequency error correction methods, such as Fig.11 As shown, in order to simplify the clock frequency detection method, the storage depth of the memory must ensure that the number of read data is an integer multiple of the storage depth within the synchronization reference cycle. Ideally, when the rising edge of the synchronization reference signal (Sync pulse) arrives, the address of the read data (data_rd_addr) should always be the initialized address (rd_addr_init). The clock frequency error is determined by comparing the current address with the initialized address when the synchronization reference signal rises. Then, the position of the read address in the data buffer is adjusted to compensate for the influence of the clock frequency error on the delay accuracy.
[0058] The synchronization method of the output clock signal and the output synchronization reference signal (Sync out and Clk out) can be as follows: Figure 4 The output synchronization reference signal is synchronized with the output multi-phase clock to generate a multi-phase synchronization reference signal; Fig.12 The circuit structure of the high-precision time delay according to this embodiment is Figure 2 ,like Fig.12 As shown, the output synchronization reference signal generating circuit is DFF121 (corresponding to the above-mentioned DFF41), and the output clock signal generating circuit includes a Divider and a Shift register (corresponding to the above-mentioned Figure 4 Similar), asynchronous direct output; Fig.13 The circuit structure of the high-precision time delay according to this embodiment is Figure 3 ,like Fig.13 As shown, the output synchronization reference signal generating circuit is DFF131 (corresponding to the above-mentioned DFF41). If the output clock frequency is consistent with the input clock frequency, the multi-phase clock generating circuit is replaced with a single-phase clock generating circuit, and the single-phase clock generating circuit includes DFF132 (corresponding to the above-mentioned third DFF).
[0059] The present application introduces a synchronous reference signal and adopts synchronous timing logic to sequentially transmit it and the clock signal to different clock domains, thereby generating a reset pulse locally in the clock domain to reset the clock, thereby reducing the uncertainty of the reset signal delay; by adopting synchronous timing logic, each synchronized signal has clear delay information, thereby avoiding misbeat or metastable problems; through the above method, the stability and accuracy of the clock phase are achieved.
[0060] The accuracy of the clock frequency is detected by taking the synchronous reference signal cycle as a reference, and the delay is adjusted by adjusting the position of the random access memory read address to compensate for the delay deviation introduced by the clock frequency deviation. This method is not available in traditional solutions.
[0061] According to another embodiment of the present application, a device for providing a clock signal in a data link is also provided. Fig.14 is a block diagram of a device for providing a clock signal in a data link according to an embodiment of the present application, such as Fig.14 As shown, the device includes: a reset pulse signal generating circuit 142, an output synchronization reference signal generating circuit 144 and an output clock signal generating circuit 146, wherein:
[0062] The reset pulse signal generating circuit 142 is used to generate a reset pulse signal based on an input synchronization reference signal and an input clock signal in each clock domain of a plurality of clock domains of the data link, generate an output synchronization reference signal based on the input synchronization reference signal and the input clock signal, and generate an output clock signal based on the input clock signal; and input the reset pulse signal to an output synchronization reference signal generating circuit 144 and an output clock signal generating circuit 146 to reset the output synchronization reference signal and the output clock signal;
[0063] An output synchronization reference signal generating circuit 144, used for synchronously generating a reset output synchronization reference signal at the next rising edge of the input clock signal after the reset pulse signal ends;
[0064] The output clock signal generating circuit 146 is used to synchronize the next rising edge of the input clock signal after the reset pulse signal ends to generate a reset output clock signal, wherein the reset output synchronization reference signal and the reset output clock signal are transmitted to the next clock domain of the data link after the same second time delay as the input synchronization reference signal and input clock signal of the next clock domain.
[0065] In one embodiment, the reset pulse signal generating circuit 142 is further configured to generate the reset pulse signal when the rising edge of the input synchronization reference signal is detected at the rising edge of the input clock signal.
[0066] In one embodiment, the output synchronization reference signal generating circuit 144 is also used to convert the output synchronization reference signal from a high level to a low level based on the reset pulse signal, and to convert the output clock signal from a high level to a low level based on the reset pulse signal, so as to reset the output synchronization reference signal and the output clock signal.
[0067] In one embodiment, the output synchronization reference signal generating circuit 144 includes a first flip-flop DFF, the output clock signal generating circuit 146 is a single-phase clock generating circuit or a multi-phase clock generating circuit, the reset pulse signal generating circuit 142 is connected to the first DFF, the reset pulse signal generating circuit 142 is connected to the single-phase clock generating circuit, or the reset pulse signal generating circuit 142 is connected to the multi-phase clock generating circuit.
[0068] a reset pulse signal generating circuit 142, configured to generate the reset pulse signal based on the input synchronization reference signal and the input clock signal, and input the reset pulse signal to the first DFF and the single-phase clock generating circuit, or input the reset pulse signal to the first DFF and the multi-phase clock generating circuit;
[0069] The first DFF is used to synchronously generate the reset output synchronization reference signal based on the reset pulse signal, the input synchronization reference signal and the input clock signal at the next rising edge of the input clock signal after the reset pulse signal ends;
[0070] The single-phase clock generating circuit is used to generate a single-phase reset output clock signal synchronously with the input clock signal based on the reset pulse signal at the next rising edge of the input clock signal after the reset pulse signal ends; or
[0071] The multi-phase clock generating circuit is used to generate the reset output clock signal of multiple phases synchronously with the input clock signal based on the reset pulse signal at the next rising edge of the input clock signal after the reset pulse signal ends.
[0072] In one embodiment, the output synchronization reference signal generating circuit 144 includes a first trigger DFF and a second DFF, the first DFF is connected to the second DFF, the output clock signal generating circuit 146 is a multi-phase clock generating circuit or a single-phase clock generating circuit, the reset pulse signal generating circuit 142 is connected to the first DFF, the reset pulse signal generating circuit 142 is connected to the single-phase clock generating circuit, or the reset pulse signal generating circuit 142 is connected to the multi-phase clock generating circuit, wherein,
[0073] A reset pulse signal generating circuit 142, configured to generate the reset pulse signal based on the input synchronization reference signal and the input clock signal, and input the reset pulse signal to the first DFF and the single-phase clock generating circuit, or input the reset pulse signal to the first DFF and the multi-phase clock generating circuit;
[0074] The first DFF is used to generate the reset output synchronization reference signal based on the reset pulse signal, the input synchronization reference signal and the input clock signal at the next rising edge of the input clock signal after the reset pulse signal ends, and input the reset output synchronization reference signal into the second DFF;
[0075] The second DFF is used to synchronize the reset output synchronization reference signal according to the reset output clock signal to obtain a new reset output synchronization reference signal;
[0076] The single-phase clock generating circuit is used to synchronously generate the single-phase reset output clock signal based on the reset pulse signal and the input clock signal at the next rising edge of the input clock signal after the reset pulse signal ends; or
[0077] The multi-phase clock generating circuit is used to synchronously generate the reset output clock signal of multiple phases based on the reset pulse signal and the input clock signal at the next rising edge of the input clock signal after the reset pulse signal ends.
[0078] In one embodiment, the single-phase clock generating circuit includes a third DFF, wherein the third DFF is used to generate a single-phase reset output clock signal based on the reset pulse signal and the input clock signal in synchronization with the next rising edge of the input clock signal after the reset pulse signal ends;
[0079] The multi-phase clock generating circuit includes a frequency divider Divider and a shift register Shift register, the reset pulse signal generating circuit 142 is connected to the Divider, and the Divider is connected to the Shift register, wherein:
[0080] The Divider is used to generate a single-phase divided clock based on the reset pulse signal and the input clock signal at the next rising edge of the input clock signal after the reset pulse signal ends;
[0081] The shift register is used to generate the reset output clock signal of multiple phases according to the input clock signal under the control of the single-phase divided clock.
[0082] In one embodiment, the single-phase clock generating circuit includes a third DFF, wherein the third DFF is used to synchronously generate the reset output clock signal of the single phase based on the reset pulse signal and the input clock signal at the next rising edge of the input clock signal after the reset pulse signal ends;
[0083] The multi-phase clock generating circuit includes a state machine and a synchronization circuit, the reset pulse signal generating circuit 142 is connected to the state machine, and the state machine is connected to the synchronization circuit, wherein:
[0084] The state machine is used to generate a multi-phase frequency-divided clock according to the reset pulse signal and the input clock signal at the next rising edge of the input clock signal after the reset pulse signal ends;
[0085] The synchronization circuit is used to synchronize the multi-phase divided clocks and output the reset output clock signals of the multi-phases.
[0086] In one embodiment, the device further includes a first buffer and a second buffer, wherein the first buffer is connected to the reset pulse signal generating circuit 142 and the output synchronization reference signal generating circuit 144 respectively, and the second buffer is connected to the reset pulse signal generating circuit 142, the output synchronization reference signal generating circuit 144, and the output clock signal generating circuit 146 respectively, wherein:
[0087] The input synchronization reference signal enters the reset pulse signal generating circuit 142 and the output synchronization reference signal generating circuit 144 respectively through the first buffer;
[0088] The input clock signal enters the reset pulse signal generating circuit 142 , the output synchronization reference signal generating circuit 144 , and the output clock signal generating circuit 146 respectively through the second buffer.
[0089] In one embodiment, the first buffer and the second buffer are in an inverter chain structure, or the first buffer and the second buffer are integrated with a delay adjustment circuit, or the first buffer and the second buffer are integrated with a duty cycle adjustment circuit.
[0090] In one embodiment, the reset pulse generating circuit is also used to generate the reset pulse signal based on the input synchronization reference signal and the input clock signal when the reset pulse enable signal is enabled and the new air interface signal is enabled, reset the output synchronization reference signal and the output clock signal through the reset pulse signal when the reset pulse enable signal is enabled and the new air interface enable signal is enabled, and synchronously generate the reset output synchronization reference signal and the reset output clock signal at the next rising edge of the input clock signal after the reset pulse signal ends.
[0091] In one embodiment, the reset pulse generating circuit is also used to not reset the output synchronization reference signal and the output clock signal when the reset pulse enable signal is enabled and the new air interface signal is not enabled; and not reset the output synchronization reference signal and the output clock signal when the reset pulse enable signal is not enabled and the new air interface signal is enabled.
[0092] In one embodiment, the reset pulse signal generating circuit 142 is also used to generate the reset pulse signal based on the input synchronization reference signal and the input clock signal by adopting a reset pulse generating method of a delayed signal; or to generate the reset pulse signal based on the input synchronization reference signal and the input clock signal by adopting a reset pulse generating method of a two-phase non-overlapping signal.
[0093] In one embodiment, the device further comprises: a compensation circuit, wherein:
[0094] The compensation circuit is used to count the input clock signal within the period of the input synchronization reference signal of the multiple clock domains to obtain a counting result; compare the counting result with the preset counting result to obtain a first comparison result; determine the first clock frequency deviation of the target time delay according to the first comparison result; adjust the time delay of the data link by adjusting the address of the read data to compensate for the first clock frequency deviation of the target time delay; or obtain the current address when the rising edge of the input synchronization reference signal arrives; compare the current address with the initialization address to obtain a second comparison result; determine the second clock frequency error of the target time delay according to the second comparison result; adjust the time delay of the data link by adjusting the position of the read address in the random access memory to compensate for the second clock frequency deviation of the target time delay, wherein the target time delay is the time from resetting the output synchronization reference signal and the output clock signal to synchronously generating the reset output synchronization reference signal and the reset output clock signal, and the storage depth of the random access memory is the product of the ratio of the period of the input synchronization reference signal to the period of the read signal and the inverse of N.
[0095] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0096] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0097] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0098] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0099] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0100] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0101] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for providing a clock signal in a data link, characterized in that: The method comprises: In each of the multiple clock domains of the data link, a reset pulse signal is generated based on an input synchronization reference signal and an input clock signal, an output synchronization reference signal is generated based on the input synchronization reference signal and the input clock signal, and an output clock signal is generated based on the input clock signal; The output synchronization reference signal and the output clock signal are reset by the reset pulse signal, and after the reset pulse signal ends, the next rising edge of the input clock signal is synchronized to generate the reset output synchronization reference signal and the reset output clock signal, wherein the reset output synchronization reference signal and the reset output clock signal are transmitted to the next clock domain of the data link after the same time delay, as the input synchronization reference signal and input clock signal of the next clock domain.
2. The method according to claim 1, characterized in that Generating the reset pulse signal based on the input synchronization reference signal and the input clock signal comprises: The reset pulse signal is generated when a rising edge of the input synchronization reference signal is detected at a rising edge of the input clock signal.
3. The method according to claim 1, characterized in that Resetting the output synchronization reference signal and the output clock signal by the reset pulse signal, and synchronously generating the reset output synchronization reference signal and the reset output clock signal by the next rising edge of the input clock signal after the reset pulse signal ends, comprises: Based on the reset pulse signal, convert the output synchronization reference signal from a high level to a low level, and based on the reset pulse signal, convert the output clock signal from a high level to a low level, so as to reset the output synchronization reference signal and the output clock signal; When the next rising edge of the input clock signal arrives after the reset pulse signal ends, the reset output synchronization reference signal and the reset output clock signal are synchronously generated.
4. The method according to claim 1, characterized in that: Generating the reset output clock signal comprises: Generate the reset output clock signal of a single phase according to the reset pulse signal and the input clock signal; or The reset output clock signal of multiple phases is generated according to the reset pulse signal and the input clock signal.
5. The method according to claim 4, characterized in that After generating the reset output synchronization reference signal and the reset output clock signal, the method further includes: The reset output synchronization reference signal is synchronized according to the reset output clock signal to obtain a new reset output synchronization reference signal.
6. The method according to claim 4, characterized in that Generating the reset output clock signal with multiple phases according to the reset pulse signal and the input clock signal includes: Generate a single-phase frequency-divided clock according to the input clock signal and the reset pulse signal, and generate a multi-phase reset output clock signal according to the single-phase frequency-divided clock under the control of the input clock signal; A multi-phase frequency-divided clock is generated according to the input clock signal and the reset pulse signal, the multi-phase frequency-divided clock is synchronized, and a multi-phase output clock signal after the reset is output.
7. The method according to claim 1, characterized in that Generating the reset pulse signal based on the input synchronization reference signal and the input clock signal comprises: A reset pulse generation method using a delayed signal is used to generate the reset pulse signal based on the input synchronization reference signal and the input clock signal; or A reset pulse generation method of two-phase non-overlapping signals is adopted to generate the reset pulse signal based on the input synchronization reference signal and the input clock signal.
8. The method according to any one of claims 1 to 7, characterized in that Generating the reset pulse signal based on the input synchronization reference signal and the input clock signal comprises: generating the reset pulse signal based on the input synchronization reference signal and the input clock signal when a reset pulse enable signal is enabled and a new air interface signal is enabled; The output synchronization reference signal and the output clock signal are reset by the reset pulse signal, and the reset output synchronization reference signal and the reset output clock signal are synchronously generated with the next rising edge of the input clock signal after the reset pulse signal ends, including: when the reset pulse enable signal is enabled and the new air interface enable signal is enabled, the output synchronization reference signal and the output clock signal are reset by the reset pulse signal, and the reset output synchronization reference signal and the reset output clock signal are synchronously generated with the next rising edge of the input clock signal after the reset pulse signal ends.
9. The method according to claim 8, characterized in that The method further comprises: When the reset pulse enable signal is enabled and the new air interface signal is disabled, the output synchronization reference signal and the output clock signal are not reset; When the reset pulse enable signal is disabled and the new air interface signal is enabled, the reset output synchronization reference signal and the reset output clock signal are not reset.
10. The method according to any one of claims 1 to 7 and 9, characterized in that: The method further comprises: Counting the input clock signals within the cycles of the input synchronization reference signals of the multiple clock domains to obtain counting results; Comparing the counting result with a preset counting result to obtain a first comparison result; Determine a first clock frequency deviation of a target time delay according to the first comparison result, wherein the target time delay is the time from when the output synchronization reference signal and the output clock signal are reset to when the reset output synchronization reference signal and the reset output clock signal are synchronously generated; The time delay of the data link is adjusted by adjusting the address of the read data to compensate for the first clock frequency deviation of the target time delay.
11. The method according to any one of claims 1 to 7 and 9, characterized in that: The method further comprises: Acquire the current address when the rising edge of the input synchronization reference signal arrives; Comparing the current address with the initialization address to obtain a second comparison result; Determine a second clock frequency error of a target time delay according to the second comparison result, wherein the target time delay is the time from when the output synchronization reference signal and the output clock signal are reset to when the reset output synchronization reference signal and the reset output clock signal are synchronously generated; The time delay of the data link is adjusted by adjusting the position of the read address in the random access memory to compensate for the second clock frequency deviation of the target time delay, wherein the storage depth of the random access memory is the product of the ratio of the period of the input synchronization reference signal to the period of the read signal and the inverse of N.
12. A device for providing a clock signal in a data link, characterized in that: The device comprises: a reset pulse signal generating circuit, an output synchronization reference signal generating circuit and an output clock signal generating circuit, wherein: The reset pulse signal generating circuit is used to generate a reset pulse signal based on an input synchronization reference signal and an input clock signal in each clock domain of a plurality of clock domains of a data link, generate an output synchronization reference signal based on the input synchronization reference signal and the input clock signal, and generate an output clock signal based on the input clock signal; and input the reset pulse signal into the output synchronization reference signal generating circuit and the output clock signal generating circuit to reset the output synchronization reference signal and the output clock signal; The output synchronization reference signal generating circuit is used to synchronously generate a reset output synchronization reference signal at the next rising edge of the input clock signal after the reset pulse signal ends; The output clock signal generating circuit is used to synchronously generate a reset output clock signal at the next rising edge of the input clock signal after the reset pulse signal ends, wherein the reset output synchronization reference signal and the reset output clock signal are transmitted to the next clock domain of the data link through the same second time delay as the input synchronization reference signal and input clock signal of the next clock domain.
13. The device according to claim 12, characterized in that The reset pulse signal generating circuit is further configured to generate the reset pulse signal when the rising edge of the input synchronization reference signal is detected at the rising edge of the input clock signal.
14. The device according to claim 12, characterized in that The output synchronization reference signal generating circuit is also used to convert the output synchronization reference signal from a high level to a low level based on the reset pulse signal, and to convert the output clock signal from a high level to a low level based on the reset pulse signal, so as to reset the output synchronization reference signal and the output clock signal.
15. The device according to claim 12, characterized in that The output synchronization reference signal generating circuit includes a first trigger DFF, the output clock signal generating circuit is a single-phase clock generating circuit or a multi-phase clock generating circuit, the reset pulse signal generating circuit is connected to the first DFF, the reset pulse signal generating circuit is connected to the single-phase clock generating circuit, or the reset pulse signal generating circuit is connected to the multi-phase clock generating circuit. The reset pulse signal generating circuit is used to generate the reset pulse signal based on the input synchronization reference signal and the input clock signal, and input the reset pulse signal to the first DFF and the single-phase clock generating circuit, or input the reset pulse signal to the first DFF and the multi-phase clock generating circuit; The first DFF is used to synchronously generate the reset output synchronization reference signal based on the reset pulse signal, the input synchronization reference signal and the input clock signal at the next rising edge of the input clock signal after the reset pulse signal ends; The single-phase clock generating circuit is used to generate a single-phase reset output clock signal synchronously with the input clock signal based on the reset pulse signal at the next rising edge of the input clock signal after the reset pulse signal ends; or The multi-phase clock generating circuit is used to generate the reset output clock signal of multiple phases synchronously with the input clock signal based on the reset pulse signal at the next rising edge of the input clock signal after the reset pulse signal ends.
16. The device according to claim 12, characterized in that The output synchronization reference signal generating circuit includes a first trigger DFF and a second DFF, the first DFF is connected to the second DFF, the output clock signal generating circuit is a multi-phase clock generating circuit or a single-phase clock generating circuit, the reset pulse signal generating circuit is connected to the first DFF, the reset pulse signal generating circuit is connected to the single-phase clock generating circuit, or the reset pulse signal generating circuit is connected to the multi-phase clock generating circuit, wherein, The reset pulse signal generating circuit is used to generate the reset pulse signal based on the input synchronization reference signal and the input clock signal, and input the reset pulse signal to the first DFF and the single-phase clock generating circuit, or input the reset pulse signal to the first DFF and the multi-phase clock generating circuit; The first DFF is used to generate the reset output synchronization reference signal based on the reset pulse signal, the input synchronization reference signal and the input clock signal at the next rising edge of the input clock signal after the reset pulse signal ends, and input the reset output synchronization reference signal into the second DFF; The second DFF is used to synchronize the reset output synchronization reference signal according to the reset output clock signal to obtain a new reset output synchronization reference signal; The single-phase clock generating circuit is used to synchronously generate the single-phase reset output clock signal based on the reset pulse signal and the input clock signal at the next rising edge of the input clock signal after the reset pulse signal ends; or The multi-phase clock generating circuit is used to synchronously generate the reset output clock signal of multiple phases based on the reset pulse signal and the input clock signal at the next rising edge of the input clock signal after the reset pulse signal ends.
17. The device according to claim 15 or 16, characterized in that The single-phase clock generating circuit comprises a third DFF, wherein the third DFF is used to generate a single-phase reset output clock signal based on the reset pulse signal and the input clock signal in synchronization with the next rising edge of the input clock signal after the reset pulse signal ends; The multi-phase clock generating circuit includes a frequency divider Divider and a shift register Shift register, the reset pulse signal generating circuit is connected to the Divider, and the Divider is connected to the Shift register, wherein: The Divider is used to generate a single-phase divided clock based on the reset pulse signal and the input clock signal at the next rising edge of the input clock signal after the reset pulse signal ends; The shift register is used to generate the reset output clock signal of multiple phases according to the input clock signal under the control of the single-phase divided clock.
18. The device according to claim 15 or 16, characterized in that The single-phase clock generating circuit includes a third DFF, wherein the third DFF is used to synchronously generate a single-phase reset output clock signal based on the reset pulse signal and the input clock signal at the next rising edge of the input clock signal after the reset pulse signal ends; The multi-phase clock generating circuit includes a state machine and a synchronization circuit, the reset pulse signal generating circuit is connected to the state machine, and the state machine is connected to the synchronization circuit, wherein: The state machine is used to generate a multi-phase frequency-divided clock according to the reset pulse signal and the input clock signal at the next rising edge of the input clock signal after the reset pulse signal ends; The synchronization circuit is used to synchronize the multi-phase divided clocks and output the reset output clock signals of the multi-phases.
19. The device according to any one of claims 12 to 16, characterized in that The device further includes a first buffer and a second buffer, wherein the first buffer is connected to the reset pulse signal generating circuit and the output synchronization reference signal generating circuit respectively, and the second buffer is connected to the reset pulse signal generating circuit, the output synchronization reference signal generating circuit and the output clock signal generating circuit respectively, wherein: The input synchronization reference signal enters the reset pulse signal generating circuit and the output synchronization reference signal generating circuit respectively through the first buffer; The input clock signal enters the reset pulse signal generating circuit, the output synchronization reference signal generating circuit and the output clock signal generating circuit respectively through the second buffer.
20. The device according to claim 19, characterized in that The first buffer and the second buffer are in an inverter chain structure, or the first buffer and the second buffer are integrated with a delay adjustment circuit, or the first buffer and the second buffer are integrated with a duty cycle adjustment circuit.
21. The device according to any one of claims 12 to 16, characterized in that The reset pulse generating circuit is also used to generate the reset pulse signal based on the input synchronization reference signal and the input clock signal when the reset pulse enable signal is enabled and the new air interface signal is enabled, reset the output synchronization reference signal and the output clock signal through the reset pulse signal when the reset pulse enable signal is enabled and the new air interface enable signal is enabled, and synchronously generate the reset output synchronization reference signal and the reset output clock signal at the next rising edge of the input clock signal after the reset pulse signal ends.
22. The device according to claim 21, characterized in that The reset pulse generating circuit is also used for not resetting the output synchronization reference signal and the output clock signal when the reset pulse enable signal is enabled and the new air interface signal is not enabled; and for not resetting the output synchronization reference signal and the output clock signal when the reset pulse enable signal is not enabled and the new air interface signal is enabled.
23. The device according to any one of claims 12 to 16, characterized in that The reset pulse signal generating circuit is further used to generate the reset pulse signal based on the input synchronization reference signal and the input clock signal by adopting a reset pulse generating method of a delayed signal; Alternatively, a reset pulse generation method of two-phase non-overlapping signals is adopted to generate the reset pulse signal based on the input synchronization reference signal and the input clock signal.
24. The device according to any one of claims 12 to 16, characterized in that The device further comprises: a compensation circuit, wherein: The compensation circuit is used to count the input clock signal within the period of the input synchronization reference signal of the multiple clock domains to obtain a counting result; compare the counting result with the preset counting result to obtain a first comparison result; determine the first clock frequency deviation of the target time delay according to the first comparison result; adjust the time delay of the data link by adjusting the address of the read data to compensate for the first clock frequency deviation of the target time delay; or obtain the current address when the rising edge of the input synchronization reference signal arrives; compare the current address with the initialization address to obtain a second comparison result; determine the second clock frequency error of the target time delay according to the second comparison result; adjust the time delay of the data link by adjusting the position of the read address in the random access memory to compensate for the second clock frequency deviation of the target time delay, wherein the target time delay is the time from resetting the output synchronization reference signal and the output clock signal to synchronously generating the reset output synchronization reference signal and the reset output clock signal, and the storage depth of the random access memory is the product of the ratio of the period of the input synchronization reference signal to the period of the read signal and the inverse of N.
25. A computer-readable storage medium, wherein a computer program is stored in the storage medium, wherein: The computer program is configured to execute the method according to any one of claims 1 to 11 when executed.
26. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Time synchronization method, time synchronization device and wireless communication protocol stack system
CN107295627A
Multi-ADC synchronization device based on phase-locked delay
CN110350913A
Clock generation circuit
US20140145770A1
Pulse signal generation circuit and method, and memory
US20220158645A1
Method and apparatus for using a synchronous reset pulse to reset circuitry in multiple clock domains
US8912829B1
Cited By
Light guide front transmission system with deterministic delay and transmission method
CN120090753A
Reset circuit, integrated circuit and chip
CN121441269A
