A clock synchronization output circuit of a low-frequency clock generator and an electronic device
By using the frequency and phase judgment unit of the FPGA chip in the low-frequency clock generator, delay synchronization and phase adjustment of the clock signal is achieved, which solves the problem of clock signals being unable to be aligned and improves the performance of electronic equipment.
Patent Information
- Application Number
- CN202110516441.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-12
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2041-05-12
AI Technical Summary
Existing low-frequency clock generators cannot achieve clock phase alignment and synchronous output, resulting in clock signals that cannot be aligned and output, affecting the performance of electronic equipment.
Design a low-frequency clock generator clock synchronization output circuit that uses the frequency judgment unit and phase judgment unit of the FPGA chip to perform delay synchronization or phase adjustment by judging the clock frequency and phase difference to ensure the phase alignment of the clock signal.
By adjusting the clock signal through the high-speed performance of the FPGA chip, the phase alignment of the clock signal is achieved, which improves the performance of electronic equipment.
Smart Images

Figure CN113346897B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of low-frequency clock generators, and more specifically, to a clock synchronization output circuit of a low-frequency clock generator and electronic equipment. Background Art
[0002] Low-frequency clock generators generally refer to clock generators with a clock frequency of less than 200MHz. Low-frequency clock generators can be used in electronic devices such as smart speakers and laser ranging equipment. In the prior art, low-frequency clock generators do not support clock phase alignment and synchronous output. In particular, when there is a large offset between different output clock ports, there will be a certain phase difference, which makes it impossible to align the clock signal output, thereby affecting the performance of the electronic device. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a clock synchronization output circuit of a low-frequency clock generator and an electronic device in view of the above-mentioned defects of the prior art.
[0004] The technical solution adopted by the present invention to solve its technical problem is: construct a clock synchronization output circuit of a low-frequency clock generator, including a low-frequency clock generator and an FPGA chip, the clock frequency of the low-frequency clock generator is less than 200MHz; the clock signal output interface of the low-frequency clock generator is connected to the first input-output interface group of the FPGA chip, and the I2C interface of the low-frequency clock generator is connected to the second input-output interface of the FPGA chip; the FPGA chip includes a frequency judgment unit and a phase judgment unit, the input end of the frequency judgment unit is connected to the first input-output interface group, and the output end of the frequency judgment unit is connected to the first input end of the phase judgment unit; the second input-output interface is connected to the second input end of the phase judgment unit; the working principle of the clock synchronization output circuit of the low-frequency clock generator is:
[0005] S1, the frequency determination unit determines whether the clock frequency of the clock signal generated by the low-frequency clock generator is less than a preset clock frequency;
[0006] S2. If yes, the phase determination unit performs delay synchronization on all clock signals and outputs a synchronized clock signal;
[0007] S3. If not, the phase judgment unit feeds back the phase difference of the clock signal to the low-frequency clock generator, and the low-frequency clock generator adjusts the clock phase according to the phase difference, and outputs a synchronous clock signal after the clock phases are aligned.
[0008] Further, in the clock synchronization output circuit of the low-frequency clock generator described in the present invention, the phase judgment unit in step S2 delays and synchronizes all clock signals, and outputs a synchronous clock signal including: the phase judgment unit performs synchronous clock sampling on all clock signals, and outputs a synchronous clock signal after delaying for a preset period of time based on the sampling time.
[0009] Furthermore, in the clock synchronization output circuit of the low-frequency clock generator described in the present invention, the preset time length is two clock cycles of the internal clock of the FPGA chip.
[0010] Further, in the clock synchronization output circuit of the low-frequency clock generator of the present invention, the phase determination unit in step S3 feeds back the phase difference of the clock signal to the low-frequency clock generator, including:
[0011] The phase determination unit determines whether the phases of the clock signals generated by the low-frequency clock generator are aligned; if not, the phase determination unit feeds back the phase difference of the clock signals to the low-frequency clock generator.
[0012] Further, in the clock synchronization output circuit of the low-frequency clock generator of the present invention, the low-frequency clock generator in step S3 adjusts the clock phase according to the phase difference, including: the offset part register of the low-frequency clock generator adjusts the clock phase according to the phase difference.
[0013] Furthermore, in the clock synchronization output circuit of the low-frequency clock generator of the present invention, after step S3, the following steps are further included:
[0014] S4. The phase judgment unit monitors in real time whether the phase of the clock signal generated by the low-frequency clock generator is aligned, and if not, executes step S1.
[0015] Furthermore, in the clock synchronization output circuit of the low-frequency clock generator described in the present invention, the preset clock frequency is 1 MHz.
[0016] Furthermore, in the clock synchronization output circuit of the low-frequency clock generator described in the present invention, the low-frequency clock generator is a SI5351 series low-frequency clock generator.
[0017] Further, in the clock synchronization output circuit of the low-frequency clock generator described in the present invention, the model of the low-frequency clock generator is SI5351A, and the first input and output interface group includes multiple GPIO interfaces; the clock signal output interfaces CLK0, CLK1, CLK2, CLK3, CLK4, CLK5, CLK6 and CLK7 of the low-frequency clock generator respectively correspond to a GPIO interface connected to the FPGA chip.
[0018] In addition, the present invention also provides an electronic device, comprising the clock synchronization output circuit of the low-frequency clock generator as described above.
[0019] A low-frequency clock generator clock synchronization output circuit and electronic device implementing the present invention have the following beneficial effects: the present invention uses the high-speed performance of the FPGA chip to adjust the clock signal of the low-frequency clock generator, realizes the phase of the clock signal and outputs it, and improves the performance of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0021] Figure 1 It is a schematic diagram of a clock synchronization output circuit of a low-frequency clock generator provided by an embodiment of the present invention;
[0022] Figure 2 The present invention provides a circuit diagram of a clock synchronization output circuit of a low-frequency clock generator according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, specific embodiments of the present invention are now described in detail with reference to the accompanying drawings.
[0024] In a preferred embodiment, reference Figure 1 The clock synchronization output circuit of the low-frequency clock generator of this embodiment includes a low-frequency clock generator 10 and an FPGA chip 20, and the clock frequency of the low-frequency clock generator 10 is less than 200MHz. The clock signal output interface of the low-frequency clock generator 10 is connected to the first input-output interface group of the FPGA chip 20, and the I2C interface of the low-frequency clock generator 10 is connected to the second input-output interface of the FPGA chip 20. The FPGA chip 20 includes a frequency judgment unit 201 and a phase judgment unit 202, the input end of the frequency judgment unit 201 is connected to the first input-output interface group, and the output end of the frequency judgment unit 201 is connected to the first input end of the phase judgment unit 202; the second input-output interface is connected to the second input end of the phase judgment unit 202. Specifically, the working principle of the clock synchronization output circuit of the low-frequency clock generator is:
[0025] S1. The frequency judgment unit 201 judges whether the clock frequency of the clock signal generated by the low-frequency clock generator 10 is less than the preset clock frequency. Specifically, the low-frequency clock generator 10 generates a clock signal and sends it to the frequency judgment unit 201, and the frequency judgment unit 201 stores the preset clock frequency. The frequency judgment unit 201 can identify the clock frequency of the clock signal generated by the low-frequency clock generator 10, and judge whether the clock frequency of the clock signal generated by the low-frequency clock generator 10 is less than the preset clock frequency. As an option, the preset clock frequency is 1MHz.
[0026] S2. If the clock frequency of the clock signal is less than the preset clock frequency, the phase judgment unit 202 performs delay synchronization on all clock signals and outputs a synchronized clock signal. Specifically, if the clock frequency of the clock signal is less than the preset clock frequency, the frequency judgment unit 201 sends the clock signal generated by the low-frequency clock generator 10 to the phase judgment unit 202, and the phase judgment unit 202 performs delay synchronization on all clock signals to achieve phase alignment and output a synchronized clock signal. As an option, the preset duration is two clock cycles of the internal clock of the FPGA chip 20.
[0027] S3. If the clock frequency of the clock signal is not less than the preset clock frequency, the phase judgment unit 202 feeds back the phase difference of the clock signal to the low-frequency clock generator 10, and the low-frequency clock generator 10 adjusts the clock phase according to the phase difference, and outputs a synchronous clock signal after the clock phases are aligned. Specifically, if the clock frequency of the clock signal is not less than the preset clock frequency, the frequency judgment unit 201 sends the clock signal generated by the low-frequency clock generator 10 to the phase judgment unit 202, and the phase judgment unit 202 identifies and records the phase difference between each clock signal, and feeds back the phase difference to the low-frequency clock generator 10 through the I2C interface, and the low-frequency clock generator 10 adjusts the clock phase according to the phase difference, and outputs a synchronous clock signal after the clock phases are aligned.
[0028] This embodiment uses the high-speed performance of the FPGA chip to adjust the clock signal of the low-frequency clock generator, so as to output the clock signal in phase, thereby improving the performance of the electronic equipment.
[0029] In the clock synchronization output circuit of the low-frequency clock generator of some embodiments, the phase judgment unit 202 in step S2 performs delayed synchronization on all clock signals, and outputs the synchronous clock signal, including: the phase judgment unit 202 performs synchronous clock sampling on all clock signals, and outputs the synchronous clock signal after delaying the sampling time for a preset time. This embodiment uses the high-speed sampling of the FPGA chip to achieve synchronous sampling of all clock signals, and then delays the preset time after sampling to output the synchronous clock signal.
[0030] In the clock synchronization output circuit of the low-frequency clock generator of some embodiments, the phase judgment unit 202 in step S3 feeds back the phase difference of the clock signal to the low-frequency clock generator 10, including: the phase judgment unit 202 judges whether the phase of the clock signal generated by the low-frequency clock generator 10 is aligned. If the phase of the clock signal is aligned, the phase judgment unit 202 directly outputs the clock signal. If the phase of the clock signal is not aligned, the phase judgment unit 202 feeds back the phase difference of the clock signal to the low-frequency clock generator 10, and the low-frequency clock generator 10 adjusts the clock phase according to the phase difference, and outputs a synchronous clock signal after the clock phase is aligned.
[0031] In the clock synchronization output circuit of the low-frequency clock generator of some embodiments, the low-frequency clock generator 10 adjusts the clock phase according to the phase difference in step S3, including: the offset part register of the low-frequency clock generator 10 adjusts the clock phase according to the phase difference. Specifically, if the clock frequency of the clock signal is not less than the preset clock frequency, the frequency judgment unit 201 sends the clock signal generated by the low-frequency clock generator 10 to the phase judgment unit 202, the phase judgment unit 202 identifies and records the phase difference between each clock signal, and feeds back the phase difference to the offset part register of the low-frequency clock generator 10 through the I2C interface. The offset part register adjusts the clock phase according to the phase difference, and outputs the synchronous clock signal after the clock phase is aligned. Alternatively, if the clock signal is still not aligned after the offset part register is adjusted once, the phase judgment unit 202 continues to identify and record the phase difference between each clock signal, and feeds back the phase difference to the offset part register of the low-frequency clock generator 10 through the I2C interface. The offset part register adjusts the clock phase again according to the phase difference, and repeats the process multiple times until all clock signals are aligned. In this embodiment, an FPGA chip is used to collect the phase difference and feed it back to the offset part register of the low-frequency clock generator 10. The offset part register adjusts the clock phase according to the phase difference to achieve alignment of all clock signals.
[0032] In the clock synchronization output circuit of the low-frequency clock generator of some embodiments, after step S3, the following steps are further included: S4, the phase judgment unit 202 monitors in real time whether the phase of the clock signal generated by the low-frequency clock generator 10 is aligned, and if the phase of the clock signal is not aligned, step S1 is executed. This embodiment continuously monitors the phase of the clock signal generated by the low-frequency clock generator 10, and once the phase is found to be not aligned, it can be adjusted in time to ensure that the output clock signal is phase-aligned.
[0033] In the clock synchronization output circuit of the low-frequency clock generator in some embodiments, the low-frequency clock generator 10 is a SI5351 series low-frequency clock generator. Alternatively, the model of the low-frequency clock generator 10 is SI5351A. Figure 2The clock synchronization output circuit of the low-frequency clock generator of this embodiment includes a low-frequency clock generator 10 and an FPGA chip 20, and the clock frequency of the low-frequency clock generator 10 is less than 200MHz. The clock signal output interface of the low-frequency clock generator 10 is connected to the first input-output interface group of the FPGA chip 20, and the first input-output interface group includes multiple GPIO interfaces; the clock signal output interfaces CLK0, CLK1, CLK2, CLK3, CLK4, CLK5, CLK6 and CLK7 of the low-frequency clock generator 10 are respectively connected to a GPIO interface of the FPGA chip 20. The I2C interface of the low-frequency clock generator 10 is connected to the second input-output interface of the FPGA chip 20. The FPGA chip 20 includes a frequency judgment unit 201 and a phase judgment unit 202, the input end of the frequency judgment unit 201 is connected to the first input-output interface group, the output end of the frequency judgment unit 201 is connected to the first input end of the phase judgment unit 202; the second input-output interface is connected to the second input end of the phase judgment unit 202. The working principle of the clock synchronization output circuit of the low-frequency clock generator of this embodiment can refer to the above embodiment and will not be repeated. This embodiment uses the high-speed performance of the FPGA chip to adjust the clock signal of the low-frequency clock generator, realizes the phase of the clock signal to output it, and improves the performance of the electronic device.
[0034] In a preferred embodiment, the electronic device of this embodiment includes the clock synchronization output circuit of the low-frequency clock generator as in the above embodiment. Alternatively, the electronic device includes but is not limited to smart speakers, laser ranging equipment, etc., and the high-speed performance of the FPGA chip keeps the clock signal output by the low-frequency clock generator aligned, which can improve the performance of the electronic device.
[0035] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0036] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0037] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0038] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot limit the scope of protection of the present invention. All equivalent changes and modifications made to the scope of the claims of the present invention should fall within the scope of the claims of the present invention.
Claims
1. A low frequency clock generator clock synchronization output circuit, It is characterized in that The invention comprises a low-frequency clock generator (10) and an FPGA chip (20), wherein the clock frequency of the low-frequency clock generator (10) is less than 200 MHz; the clock signal output interface of the low-frequency clock generator (10) is connected to a first input-output interface group of the FPGA chip (20), and the I2C interface of the low-frequency clock generator (10) is connected to a second input-output interface of the FPGA chip (20); the FPGA chip (20) comprises a frequency judgment unit (201) and a phase judgment unit (202); the input end of the frequency judgment unit (201) is connected to the first input-output interface group, and the output end of the frequency judgment unit (201) is connected to a first input end of the phase judgment unit (202); the second input-output interface is connected to a second input end of the phase judgment unit (202); the clock synchronization output circuit of the low-frequency clock generator works as follows: S1. The frequency determination unit (201) determines whether the clock frequency of the clock signal generated by the low-frequency clock generator (10) is less than a preset clock frequency; the frequency determination unit (201) stores the preset clock frequency; S2, if yes, the phase determination unit (202) performs delay synchronization on all clock signals and outputs a synchronized clock signal; S3. If not, the phase judgment unit (202) feeds back the phase difference of the clock signal to the low-frequency clock generator (10), and the low-frequency clock generator (10) adjusts the clock phase according to the phase difference, and outputs a synchronous clock signal after the clock phases are aligned.
2. The low-frequency clock generator clock synchronization output circuit according to claim 1, It is characterized in that In step S2, the phase judgment unit (202) performs delayed synchronization on all clock signals, and outputs a synchronous clock signal, comprising: the phase judgment unit (202) performs synchronous clock sampling on all clock signals, and outputs the synchronous clock signal after delaying for a preset time period based on the sampling time.
3. The low-frequency clock generator clock synchronization output circuit according to claim 2, It is characterized in that The preset time length is two clock cycles of the internal clock of the FPGA chip (20).
4. The low-frequency clock generator clock synchronization output circuit according to claim 1, It is characterized in that In step S3, the phase determination unit (202) feeds back the phase difference of the clock signal to the low-frequency clock generator (10), comprising: The phase determination unit (202) determines whether the phase of the clock signal generated by the low-frequency clock generator (10) is aligned; if not, the phase determination unit (202) feeds back the phase difference of the clock signal to the low-frequency clock generator (10).
5. The low frequency clock generator clock synchronization output circuit according to claim 1, It is characterized in that In step S3, the low-frequency clock generator (10) adjusting the clock phase according to the phase difference comprises: an offset part register of the low-frequency clock generator (10) adjusting the clock phase according to the phase difference.
6. The low frequency clock generator clock synchronization output circuit according to claim 1, It is characterized in that After step S3, the method further includes: S4. The phase judgment unit (202) monitors in real time whether the phase of the clock signal generated by the low-frequency clock generator (10) is aligned. If not, step S1 is executed.
7. The low frequency clock generator clock synchronization output circuit according to claim 1, It is characterized in that The preset clock frequency is 1 MHz.
8. The low frequency clock generator clock synchronization output circuit according to claim 1, It is characterized in that The low-frequency clock generator (10) is a SI5351 series low-frequency clock generator.
9. The low frequency clock generator clock synchronization output circuit according to claim 8, It is characterized in that The model of the low-frequency clock generator (10) is SI5351A, and the first input-output interface group includes a plurality of GPIO interfaces; the clock signal output interfaces CLK0, CLK1, CLK2, CLK3, CLK4, CLK5, CLK6 and CLK7 of the low-frequency clock generator (10) correspond to a GPIO interface connected to the FPGA chip (20) respectively.
10. An electronic device, It is characterized in that It comprises the low-frequency clock generator clock synchronization output circuit as described in any one of claims 1 to 9.
