A clock adjustment device, laser radar and terminal equipment

By designing a clock adjustment device in an asynchronous circuit, using phase adjustment and flip-flop sampling technology, the problem of inaccurate asynchronous signal sampling is solved, and the stability and sampling accuracy of the asynchronous circuit are improved.

CN115598960BActive Publication Date: 2024-11-29YINWANG INTELLIGENT TECHNOLOGIES CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110766477.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-07
Publication Date
2024-11-29
Estimated Expiration
2041-07-07

AI Technical Summary

Technical Problem

In an asynchronous circuit, the asynchronous signal sampling between the clock domains is inaccurate, resulting in unstable transmission of the input asynchronous signal level, affecting the stability of the circuit.

Method used

A clock adjustment device is designed, including a clock generation unit, a phase adjustment unit and a phase control unit. By adjusting the clock signal phase, the sampling accuracy and stability of the asynchronous signal is improved, and the sampling control unit is used to sample at the clock edge to reduce the Circuit glitches and power consumption.

Benefits of technology

It improves the sampling accuracy of the cross-clock domain transmission of asynchronous signals, reduces the risk of metastable state, and enhances the stability of the asynchronous circuit and the overall stability of the sampling system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115598960B_ABST
    Figure CN115598960B_ABST
Patent Text Reader

Abstract

A clock adjustment device, a laser radar and a terminal device are used to improve the accuracy of sampling a signal to be measured in the field of electronic technology. The clock adjustment device includes a clock generating unit, a phase adjustment unit and a phase control unit. The clock generating unit generates a first clock signal. The phase adjustment unit obtains N second clock signals according to the first clock signal. The N second clock signals correspond to N phases, and N is a positive integer greater than or equal to 2. The phase control unit sends a first phase adjustment instruction to the phase adjustment unit according to a preset rule and the sampling result of the N second clock signals on the signal to be measured, so as to instruct the phase adjustment unit to obtain a third clock signal with a target phase according to the first clock signal. By using N phases to pre-sample the signal to be measured, it is helpful to use the target phase with a better sampling result among the N phases to formally sample the signal to be measured, thereby effectively improving the sampling accuracy of the signal to be measured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology, in particular to the field of digital circuits, and provides a clock adjustment device, a laser radar and a terminal device. Background Art

[0002] With the development of electronic technology, asynchronous circuits are increasingly used in digital circuit systems. An asynchronous circuit refers to a circuit with at least two clock domains. Electronic devices in the same clock domain use the same clock signal, while electronic devices in different clock domains use different clock signals. In an asynchronous circuit, a signal generated by a clock domain is an asynchronous signal for another clock domain, and the driving clock of the asynchronous signal is not aligned with the driving clock of the other clock domain. Therefore, how to make the clock domain that receives the asynchronous signal accurately sample the asynchronous signal sent by other clock domains is crucial to accurately complete the control operations related to the asynchronous signal.

[0003] However, in the prior art, the clock domain in the asynchronous circuit usually uses a fixed-period clock signal for sampling, that is, the asynchronous signal is sampled once every fixed time interval. However, when an asynchronous signal emitted from a clock domain appears within the time interval between two adjacent samples, the clock domain receiving the asynchronous signal cannot accurately sample the asynchronous signal, which in turn causes the input asynchronous signal level to be unable to be accurately transmitted to the output, which is not conducive to the stability of the asynchronous circuit. Summary of the invention

[0004] The present application provides a clock adjustment device, a laser radar and a terminal device, which are used to improve the accuracy of sampling a signal to be measured (such as an asynchronous signal).

[0005] In the first aspect, the present application provides a clock adjustment device, comprising: a clock generating unit, for generating a first clock signal; a phase adjustment unit, for performing phase adjustment on the first clock signal from the clock generating unit to obtain N second clock signals, the N second clock signals corresponding to N phases, N being a positive integer greater than or equal to 2; a phase control unit, for obtaining the N second clock signals from the phase adjustment unit, and sending a first phase adjustment indication to the phase adjustment unit according to a preset rule and a sampling result of the N second clock signals sampling the signal to be measured, the first phase adjustment indication being used to indicate a target phase; the phase adjustment unit is also used to perform phase adjustment on the first clock signal from the clock generating unit according to the first phase adjustment indication to obtain a third clock signal, and the phase of the third clock signal is the target phase. In the above design, by using the clock signals corresponding to each phase to pre-sample the signal to be measured before formally sampling the signal to be measured, it is helpful to obtain a target phase with a better sampling result in each phase, and using the target phase with a better sampling result can also improve the sampling accuracy and sampling stability of the formal sampling of the signal to be measured.

[0006] In a possible design, the signal to be tested may be an asynchronous signal, for example, an asynchronous signal sent from another clock domain to the clock domain where the clock adjustment device is located. In this way, the design enables the clock domain receiving the asynchronous signal to have the ability to flexibly adjust the clock phase, and the adjusted clock phase can always keep matching with the received asynchronous signal, effectively improving the sampling accuracy of the asynchronous signal transmitted across clock domains, and helping to improve the stability of the asynchronous circuit.

[0007] In one possible design, the signal to be tested may be pre-set or configured, and may also be actively sent to the phase control unit after power-on, so that the phase control unit may actively perform phase calibration on the clock signal that samples the signal to be tested after power-on.

[0008] In one possible design, after the phase adjustment unit obtains the third clock signal, the phase control unit can also re-determine the target phase. For example, after power-on calibration of the clock signal for sampling the signal to be tested, a secondary calibration of the target phase is performed based on the actual received signal to be tested, so that the clock signal for sampling the signal to be tested can always be kept matching the signal to be tested, thereby effectively improving the sampling accuracy and stability.

[0009] In a possible design, the phase control unit may include a trigger and a sampling control unit, wherein the first input end of the trigger is used to receive the signal to be measured, the second input end of the trigger is connected to the output end of the phase adjustment unit, the output end of the trigger is connected to the input end of the sampling control unit, and the output end of the sampling control unit is connected to the input end of the phase adjustment unit. The trigger may use each second clock signal output by the phase adjustment unit to sample the signal to be measured to obtain an output signal corresponding to each second clock signal, and the sampling control unit may send a first phase adjustment instruction to the phase adjustment unit according to a preset rule and the output signals corresponding to the N second clock signals. In this design, the trigger may perform sampling only at the clock edge and not at the non-clock edge. Therefore, by using a trigger to sample the signal to be measured, it is not only helpful to reduce the probability of circuit glitches, but also to reduce sampling power consumption.

[0010] In a possible design, when the trigger includes a D trigger, the output end of the trigger may include an output end Q and / or an output end Q of the D trigger. For example, the output terminal Q is included but the output terminal is not included Or include output but does not include the output terminal Q, or includes both the output terminal Q and the output terminal In this way, the clock control unit can utilize the D flip-flop to sample the signal to be tested at the rising edge of the second clock signal to obtain a stable output signal.

[0011] In a possible design, the preset rule may be related to the sampling result of correct sampling. In this case, the sampling control unit may include a sampling unit and an evaluation control unit, wherein the input end of the sampling unit is connected to the output end of the trigger, the output end of the sampling unit is connected to the input end of the evaluation control unit, and the output end of the evaluation control unit is connected to the input end of the phase adjustment unit. The sampling unit may collect M output signals obtained by the trigger sampling the signal to be tested M times under each second clock signal, and the evaluation control unit may send a first phase adjustment indication to the phase adjustment unit based on the preset rule according to the reference signal and the M output signals corresponding to each second clock signal from the sampling unit. M is a positive integer greater than or equal to 2, and the reference signal is used to indicate the output signal of the correct sampling. In this way, by using the sampling unit to perform the sampling operation and using the evaluation control unit to perform the evaluation operation and the phase adjustment operation, the sampling operation and the evaluation and phase adjustment operation after the sampling can be decoupled, which helps to reduce the working pressure of each unit while reducing the impact of the evaluation operation and the phase adjustment operation on the sampling operation.

[0012] In a possible design, the evaluation control unit can also send an enable signal to the sampling unit, and the enable signal is used to instruct the sampling unit to collect the output signal of the trigger within the effective period of the indication message. The effective period of the indication message can be used to indicate a period of time for the sampling unit to receive the enable signal. In this way, the evaluation control unit can send an enable signal to the sampling unit before each arrival of the signal to be tested, and each time the sampling unit receives an enable signal, it can enable its sampling capability, that is, start the sampling operation of the output signal of the trigger within a period of time. The specific sampling duration can be pre-set or configured in the sampling unit, or, when the enable signal has the ability to carry information, it can also be carried in the enable signal by the evaluation control unit to notify the sampling unit, and there is no specific limitation. Through this design, the operation of sampling the output signal of the sampling unit can be uniformly supervised and controlled by the evaluation control unit, which helps to improve the flexibility of the evaluation control unit in managing the overall clock adjustment process.

[0013] In a possible design, N second clock signals can be obtained through N-1 phase adjustments. In any phase adjustment: after determining that the sampling unit obtains M output signals corresponding to the current second clock signal, the evaluation control unit can send a second phase adjustment instruction to the phase adjustment unit, and the phase adjustment unit can perform phase adjustment on the first clock signal from the clock generation unit according to the second phase adjustment instruction to obtain the next second clock signal, wherein the phase of the next second clock signal is one of the N phases that has not been adjusted. Through this design, the operation of the phase adjustment unit to obtain N second clock signals can also be uniformly supervised and controlled by the evaluation control unit, further improving the flexibility of the evaluation control unit in managing the overall clock adjustment process.

[0014] In a possible design, any two adjacent phases among the N phases may have the same phase interval in the order of phase from large to small or from small to large, wherein the phase interval may be a fixed value that is preset or configured, or a variable value that supports user modification according to actual scenarios. In this way, by using the same phase interval to set the N second clock signals, it is helpful to obtain a sampling result with a relatively uniform phase distribution, thereby simplifying the complexity of determining the target phase.

[0015] In a possible design, a preset rule is used to indicate that the target phase is obtained based on a phase interval consisting of continuous adjacent phases whose sampling index values ​​are not less than an index threshold, wherein the sampling index value of any phase is positively correlated with the number of output signals that are identical to the reference signal in the M output signals corresponding to the phase, and adjacent phases refer to adjacent phases in the order of phase from large to small or from small to large in N phases. In this way, since the phase interval is constructed using phases that meet the sampling index requirements, the phase interval can be considered as an interval in which the sampling index is relatively stable. The target phase is selected within this interval. Even if the environment changes and causes a slight shift in the phase, as long as it does not exceed the range of the phase interval, a certain sampling effect can still be guaranteed.

[0016] In a possible design, the target phase can be one of the following: the central phase of each phase included in the phase interval; the phase corresponding to the center of gravity of the phase region, wherein the phase region is obtained based on each phase included in the phase interval and at least two corresponding phases located on both sides of the phase interval; the central phase of the two corresponding phases on both sides of the phase interval. Among them, the two corresponding phases located on both sides of the phase interval have the same or the closest sampling index value. Through this design, when the sampling environment becomes worse (for example, the temperature rises), the phase interval will first gradually erode inward from the edge phase until it erodes to the most central phase, and the sampling success rate of the eroded phase will decrease. It can be seen that the central phase or the center of gravity phase of the phase interval belongs to the most stable phase point in the phase interval. In this way, by using the central phase or the center of gravity phase of the phase interval as the target phase, the third clock signal obtained based on the target phase can have the best environmental coping ability, and even if the environment changes slightly, the third clock signal can be adjusted without adjusting, thereby helping to improve the stability of sampling the signal to be measured using the third clock signal.

[0017] In a possible design, when there are multiple phase intervals, the target phase can be determined based on the phase interval with the largest phase range among the multiple phase intervals. In this way, since the phase interval with the largest phase range belongs to the phase region with the best stability, the target phase is selected based on the phase region with the best stability. Even if the target phase is slightly offset in actual operation, it is only offset to the adjacent phase on the left or right side, and the adjacent phase on the left or right side of the phase interval with the largest phase range can also have a good sampling success rate, that is, the sampling accuracy can be guaranteed as much as possible based on the offset phase.

[0018] In a possible design, the phase range of the phase interval formed by the N phases is not less than the phase range of one clock cycle of the first clock signal. In this way, by making the N phases cover two clock cycles of the first clock signal, the sampling results can simultaneously include the sampling results within two repeated clock cycles, which not only avoids the accidental problem of using one clock cycle to determine the target phase, but also takes into account the critical phase between the two clock cycles, which helps to select the target phase more accurately.

[0019] In a possible design, the phase adjustment unit may be a phase-locked loop, or include N delay links, and any two delay links of the N delay links include different numbers of delay units.

[0020] In one possible design, the third clock signal can be used for one or more of the following operations: the programmable logic circuit of the laser radar samples the target echo signal sent by the receiving module of the laser radar; the programmable logic circuit of the laser radar samples the driving control command sent by the central processing unit of the laser radar; the scanning mechanism of the laser radar samples the scanning control signal sent by the programmable logic circuit of the laser radar; the transmitting module of the laser radar samples the transmission control signal sent by the programmable logic circuit of the laser radar; the central processing unit of the laser radar samples the detection result sent by the programmable logic circuit of the laser radar, etc.

[0021] In one possible design, the signal to be tested may include one or more of the following: a target echo signal sent by a receiving module of the laser radar; a driving control command sent by a central processing unit of the laser radar; a scanning control signal sent by a programmable logic circuit of the laser radar; a transmission control signal sent by a programmable logic circuit of the laser radar; a detection result sent by a programmable logic circuit of the laser radar, etc.

[0022] In a second aspect, the present application provides a laser radar, comprising a first circuit and a second circuit located in different clock domains, wherein the second circuit comprises a clock adjustment device designed as in any one of the first aspects above. The first circuit is used to send a signal to be tested to the second circuit, and the second circuit is used to sample the signal to be tested using a third clock signal obtained after adjustment by the clock adjustment device.

[0023] In one possible design, when the laser radar includes a central processing unit, a programmable logic circuit, a transmitting module, a receiving module and a scanning mechanism located in different clock domains, the first circuit, the second circuit and the signal to be measured can be one or more of the following combinations: Combination one, the first circuit is a programmable logic circuit, the second circuit is a transmitting module, and the signal to be measured includes a transmitting control signal; Combination two, the first circuit is a receiving module, the second circuit is a programmable logic circuit, and the signal to be measured includes a target echo signal of the laser radar; Combination three, the first circuit is a central processing unit, the second circuit is a programmable logic circuit, and the signal to be measured includes a driving control command; Combination four, the first circuit is a programmable logic circuit, the second circuit is a scanning mechanism, and the signal to be measured includes a scanning control command; Combination five, the first circuit is a programmable logic circuit, the second circuit is a central processing unit, and the signal to be measured includes a detection result, and the detection result is obtained based on the emitted laser signal and the target echo signal.

[0024] In a third aspect, the present application provides a terminal device, comprising the laser radar described in the second aspect above.

[0025] By way of example, some examples of terminal devices include, but are not limited to: smart home devices (such as televisions, sweeping robots, smart desk lamps, audio systems, smart lighting systems, appliance control systems, home background music, home theater systems, intercom systems, video surveillance, etc.), smart transportation equipment (such as cars, ships, drones, trains, vans, trucks, etc.), smart manufacturing equipment (such as robots, industrial equipment, smart logistics, smart factories, etc.), smart terminals (mobile phones, computers, tablets, PDAs, desktops, headphones, audio, wearable devices, vehicle-mounted devices, virtual reality devices, augmented reality devices, etc.).

[0026] For the beneficial effects of the second and third aspects mentioned above, please refer to the technical effects that can be achieved by the corresponding design in the first aspect mentioned above, and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A schematic diagram of an application scenario of a laser radar provided in an embodiment of the present application is exemplarily shown;

[0028] Figure 2 A schematic diagram of the architecture of a laser radar-based driving system provided in an embodiment of the present application is exemplarily shown;

[0029] Figure 3 A possible asynchronous signal sampling circuit diagram provided by an embodiment of the present application is exemplarily shown;

[0030] Figure 4 A schematic diagram of a sampling result provided by an embodiment of the present application is exemplarily shown;

[0031] Figure 5 A schematic diagram showing the structure of a clock adjustment device provided in an embodiment of the present application is exemplified;

[0032] Figure 6 A schematic diagram of the structure of a phase adjustment unit provided in an embodiment of the present application is exemplarily shown;

[0033] Figure 7 The following is a schematic diagram showing the structure of another phase adjustment unit provided in an embodiment of the present application;

[0034] Figure 8 A schematic diagram showing the correlation between a phase and a sampling success rate provided in an embodiment of the present application is exemplified. DETAILED DESCRIPTION

[0035] The clock adjustment device disclosed in the present application can be applied to terminal devices with signal processing capabilities, and is particularly suitable for terminal devices with asynchronous signal processing capabilities. In some embodiments of the present application, the clock adjustment device can be a terminal device or an independent unit. When the clock adjustment device is an independent unit, the unit can be embedded in one or more clock domains of the terminal device, and can control the terminal device to adjust the clock signal of one or more internal clock domains to improve the accuracy of one or more clock domains sampling asynchronous signals sent by other clock domains. In other embodiments of the present application, the clock adjustment device can also be a unit encapsulated inside the terminal device, which is used to implement the clock phase adjustment function of the clock domain in the terminal device. Among them, the terminal device can be an intelligent device with signal processing capabilities, including but not limited to: smart home devices, such as TVs, sweeping robots, smart desk lamps, audio systems, smart lighting systems, electrical control systems, home background music, home theater systems, intercom systems, video surveillance, etc.; intelligent transportation equipment, such as cars, ships, drones, trains, trucks, trucks, etc.; intelligent manufacturing equipment, such as robots, industrial equipment, intelligent logistics, smart factories, etc. Alternatively, the terminal device may also be a computer device with signal processing capabilities, such as a desktop, a personal computer, a server, etc. It should also be understood that the terminal device may also be a portable electronic device with signal processing capabilities, such as a mobile phone, a tablet computer, a PDA, headphones, speakers, wearable devices (such as smart watches), vehicle-mounted devices, virtual reality devices, augmented reality devices, etc. Examples of portable electronic devices include but are not limited to devices equipped with Or a portable electronic device with other operating systems. The portable electronic device may also be a laptop computer (Laptop) with a touch-sensitive surface (eg, a touch panel).

[0036] The technical solutions in the embodiments of the present application will be described in detail below with reference to the specific drawings.

[0037] In a specific application scenario, the clock adjustment device can be applied to laser radar (LR). Figure 1 The following is a schematic diagram of an application scenario of a laser radar provided by an embodiment of the present application. In this example, the laser radar 100 is installed on a vehicle, so it is also called a vehicle-mounted laser radar. In addition to vehicle-mounted laser radars, laser radars also include ship-mounted laser radars installed on ships, and airborne laser radars installed on machines. In a possible example, Figure 1 As shown, the laser radar 100 can be specifically installed at the front position of the vehicle, and includes a mechanical rotating component and a transmitting mirror, and the transmitting mirror is fixedly connected to the mechanical rotating component. During the driving process of the vehicle, the transmitting mirror can emit a laser signal, and the mechanical rotating component can change the emission angle of the laser signal emitted by the transmitting mirror by rotating. The laser radar 100 can also receive the target echo signal corresponding to the laser signal emitted by the transmitting mirror, and then detect the environmental information at various positions around the vehicle based on the target echo signal. The environmental information can be used to complete the driving function of the vehicle, including but not limited to automatic driving or assisted driving. In addition, the laser radar may also include other possible optical elements or electronic components, which are not specifically limited in this application. It should be pointed out that according to Figure 1 As shown, although the mechanical rotating part of the laser radar 100 is cylindrical in appearance and the transmitting mirror is rectangular in appearance, the mechanical rotating part and the transmitting mirror in actual scenes can also be other shapes, for example, the mechanical rotating part can also be annular or polygonal, and the transmitting mirror can also be circular or annular, etc., and this application does not make specific limitations on this. In addition, Figure 1 The application scenarios are introduced by taking a mechanical type of laser radar as an example. In other application scenarios, the laser radar may also be of other types, such as a liquid laser radar, and this application does not make any specific limitation on this.

[0038] Further exemplary, Figure 2 A schematic diagram of the architecture of a laser radar-based driving system provided in an embodiment of the present application is shown, Figure 2As shown, in addition to the laser radar 100, the architecture may also include one or more of the host computer 200, the global positioning system (GPS) 300 or the inertial navigation system (INS) 400, such as including the host computer 200, GPS300 and INS400 at the same time. Among them, the host computer 200 refers to a computer that can directly issue control commands. In the field of Internet of Vehicles, it can specifically be a vehicle-mounted central control machine. The vehicle-mounted central control machine is usually also connected to a display screen, which can be used to display environmental images around the vehicle, such as environmental images constructed by the laser radar 100 in combination with GPS300, INS400 and other sensors. When the display screen is a touch screen, the display screen can also receive driving instructions or other instructions input by the user through touch operation. GPS300 refers to a satellite system composed of multiple satellites covering the world, which can collect the absolute position of the vehicle on the earth at any time, such as the latitude and longitude and altitude of the vehicle's location, so as to guide the vehicle to arrive at the destination on time along the driving route. INS400, referred to as inertial navigation, is an autonomous navigation system that does not rely on external information or radiate energy to the outside. The system is based on Newton's laws of mechanics and measures the acceleration of the vehicle in the inertial reference system through inertial sensors such as gyroscopes, integrates the measured acceleration over time, and then transforms the integral into the navigation coordinate system to obtain the vehicle's speed, yaw angle, position and other information in the navigation coordinate system. Among them, INS400 can be applied to a variety of environments including air, ground or underwater, and can also obtain good position accuracy.

[0039] Continue to refer to Figure 2 As shown, in a possible implementation, the laser radar 100 may include a central processing unit (CPU) 110, a programmable logic circuit 120, a scanning mechanism 130, a transmitting module 140 and a receiving module 150. Among them, the programmable logic circuit 120 is mainly used to process tasks with high real-time requirements, such as completing the communication interaction with the scanning mechanism 130, the transmitting module 140 and the receiving module 150. The CPU 110 is mainly used to process tasks other than those processed by the programmable logic circuit 120, including tasks with low real-time requirements and some relatively complex tasks. The scanning mechanism 130 can be carried on Figure 1 The transmitting module 140 can be carried in the mechanical rotating component of the present invention, and is used to change the rotation direction of the mechanical rotating component to change the environmental scanning angle. Figure 1In the transmitting mirror, it is used to transmit the laser signal through the transmitting mirror. The transmitting module 140 and the receiving module 150 can be coaxial or off-axis, and can be one-to-one-receive, one-to-multiple-receive, or multiple-to-one-receive, or multiple-to-multiple-receive, without specific limitation. In addition, the various components in the laser radar 100, the CPU 110 and the host computer 200, the programmable logic circuit 120 and the GPS 300, and the programmable logic circuit 120 and the INS 400 can be connected through a controller area network (CAN) bus to realize message communication between each other.

[0040] In a possible driving scenario, the host computer 200 can receive the user's driving instructions and send them to the CPU 110. The CPU 110 generates a corresponding driving control command according to the driving command and sends it to the programmable logic circuit 120. The programmable logic circuit 120 determines the scanning method of the surrounding environment according to the driving control command, generates a scanning control signal according to the scanning method and sends it to the scanning mechanism 130. The scanning control signal is used to instruct the scanning mechanism 130 to control the internal angle sensor to scan according to the indicated scanning method. Among them, the scanning method includes but is not limited to: scanning angle, scanning dimension (one-dimensional scanning, two-dimensional scanning or three-dimensional scanning, etc.) or scanning cycle, etc. In addition, the programmable logic circuit 120 can also decide the emission method of the laser signal according to the driving control command, generate an emission control signal according to the emission method and send it to the emission module 140. The emission method includes but is not limited to: emission period, emission cycle or emission intensity, etc. Further, the transmitting module 140 transmits a laser signal in accordance with the transmitting mode indicated by the transmitting control signal. After the laser signal is scanned by the scanning mechanism 130 to the target object in the environment, it will be reflected by the target object, and the reflected target echo signal can be received by the receiving module 150, and sent to the programmable logic circuit 120 by the receiving module 150. The programmable logic circuit 120 can also obtain the detection result (for example, including the time difference between receiving and transmitting, and the signal strength difference between receiving and transmitting) by comparing the received target echo signal with the emitted laser signal, and then send the detection result to the CPU 110, and the CPU 110 obtains the relevant information of the target object according to the detection result, such as distance, direction, height, speed, posture and even shape. In addition, when two-dimensional or three-dimensional scanning is adopted, the CPU 110 can also construct point cloud data according to the detection result, and calibrate the point cloud data using the environmental information perceived by the vehicle-mounted camera or other sensors, construct a driving image according to the calibrated point cloud data, and send the driving image to the host computer 200, so as to display it to the driver through the host computer 200, thereby effectively improving the driving experience of the driver. It should be pointed out that in other driving scenarios, the programmable logic circuit 120 can also directly send the received target echo signal to the CPU 110 , and the CPU 110 will complete the operation of comparing the target echo signal and the laser signal, thereby reducing the working pressure of the programmable logic circuit 120 .

[0041] For further example, continue to refer to Figure 2As shown, there may be at least two components in the laser radar 100 located in different clock domains, for example, the CPU 110 is located in clock domain 1, the programmable logic circuit 120 is located in clock domain 2, the scanning mechanism 130 is located in clock domain 3, the transmitting module 140 is located in clock domain 4, and the receiving module 150 is located in clock domain 5. In other scenarios, the transmitting module 140 and the receiving module 150 may also be located in the same clock domain. In this case, in the above-mentioned driving process, the driving control command sent by the CPU 110 to the programmable logic circuit 120, the scanning control signal sent by the programmable logic circuit 120 to the scanning mechanism 130, the transmitting control signal sent by the programmable logic circuit 120 to the transmitting module 140, the target echo signal sent by the receiving module 150 to the programmable logic circuit 120, and the detection result sent by the programmable logic circuit 120 to the CPU 110, etc., are all signals transmitted across clock domains, referred to as asynchronous signals. However, the detection principle of the laser radar 100 requires measuring the time difference between the received target echo signal and the emitted laser signal, and the speed of light reaches 3×10 8 m / s, therefore, the time measurement accuracy of the laser radar 100 must at least reach the ns level or even the ps level. Based on such high time accuracy measurement requirements, only when the clock domain that receives the asynchronous signal can also perform high time accuracy analysis and judgment on the asynchronous signal across the clock domain, can the above-mentioned driving function be realized in a timely and accurate manner.

[0042] However, taking the example of the programmable logic circuit 120 in the clock domain 2 sending a transmission control signal (an asynchronous signal) to the transmission module 140 in the clock domain 4, Figure 3 A possible asynchronous signal sampling circuit diagram provided by an embodiment of the present application is exemplarily shown. Figure 3 As shown in the example, the transmitting module 140 includes a D flip-flop (it may also be other types of flip-flops, such as RS flip-flops, JK flip-flops or T flip-flops, etc., which are not specifically limited), and the D flip-flop includes two input terminals, one of which is called a clock input terminal (i.e. Figure 3 The D flip-flop includes a port with a triangle mark, which is used to receive the clock signal CLK generated by the clock domain 4 itself, and the other input terminal is called the data input terminal, which is used to receive the emission control signal sent by the programmable logic circuit 120 in the clock domain 2. The D flip-flop can use the clock signal CLK received by the clock input terminal to sample the emission control signal received by the data input terminal. In some embodiments, continue to refer to Figure 3 As shown, the D flip-flop can also include two output terminals, namely output terminal Q and output terminal Output Q and output The output signal obtained by sampling the D trigger can be output, and the output signal is then input into the subsequent circuit of the transmitting module 140 to drive the laser tube in the subsequent circuit to emit a laser signal. The output signal is opposite, for example, when the output terminal Q outputs level 1, the output terminal Output level 0, or, when the output terminal Q output level 0, the output terminal Output level 1. In some other embodiments, the D flip-flop may also include an output terminal Q but not an output terminal Alternatively, a D flip-flop can also contain an output But it does not include the output terminal Q, or, although the D flip-flop contains both the output terminal Q and the output terminal But the output Q and output Only one output terminal can work while the other output terminal cannot work.

[0043] Assume that the output terminals Q and Q of the D flip-flop All work, then Table 1 shows an input-output relationship table of a D flip-flop. As shown in Table 1, when the clock signal CLK is at the clock rising edge, if the emission control signal is level 0, the output terminal Q will output level 0, and the output terminal On the contrary, when the clock signal CLK is at the rising edge of the clock, if the emission control signal is level 1, the output terminal Q will output level 1, and the output terminal When the clock signal CLK is at a non-clock rising edge (including: clock falling edge, 0 level, 1 level, or any level between 0 level and 1 level), no matter what level the emission control signal is, the output terminal Q and the output terminal The output level of the previous period is maintained.

[0044] Table 1: Input and output relationship of D flip-flop

[0045]

[0046] Further exemplary, the clock signal CLK is based on the initial clock signal CLK in the clock domain 2 0 The obtained signal may be, for example, the initial clock signal CLK 0 , or the initial clock signal CLK 0 A clock signal after phase adjustment. However, no matter how the phase of the clock signal CLK changes, the clock period of the clock signal CLK is the same as the initial clock signal CLK. 0 The clock cycle of the clock signal CLK is always consistent, or in other words, the clock frequency of the clock signal CLK is consistent with the initial clock signal CLK 0The clock frequency of the clock signal CLK is consistent with the initial clock signal CLK 0 It is a clock signal with the same frequency and phase or the same frequency but different phase. Based on this, Figure 4 A schematic diagram showing the sampling results of a transmission control signal by clock signals of different phases provided in an embodiment of the present application is shown as an example. In this example, the initial clock signal CLK 0 It is a pulse signal that changes in a frequency period of 125MHz.

[0047] Figure 4 (A) shows that the initial clock signal CLK is directly 0 The schematic diagram of the sampling result of the emission control signal obtained by applying it to the clock input terminal of the D flip-flop is as follows: Figure 4 As shown in (A), during the period of change of the emission control signal, when the D flip-flop detects the clock signal CLK 0 When the rising edge of the clock arrives, the level of the emission control signal is level 1. In this way, after the D flip-flop samples the emission control signal, it will output level 1 at the output terminal Q. Later, when the D flip-flop detects the clock signal CLK 0 When the rising edge of the clock comes again, the level of the emission control signal is level 0. In this way, after the D flip-flop samples the emission control signal, it will output level 0 at the output terminal Q. It can be seen that Figure 4 The clock signal CLK used in (A) 0 The emission control signal can be sampled 100% accurately.

[0048] Figure 4 (B) shows the initial signal CLK 0 The phase delay D 0 After that, the phase-shifted clock signal CLK=CLK 0 +D 0 The schematic diagram of the sampling result of the emission control signal obtained by applying it to the clock input terminal of the D flip-flop is as follows: Figure 4 As shown in (B), during the change period of the emission control signal, the D flip-flop does not detect the rising edge of the clock signal CLK, resulting in the output terminal Q of the D flip-flop outputting level 0. It can be seen that Figure 4 The clock signal CLK used in (B) 0 +D 0 Unable to sample the transmit control signal.

[0049] Figure 4 (C) shows the initial signal CLK 0 The phase delay D 1 After that, the phase-shifted clock signal CLK=CLK 0 +D 1The schematic diagram of the sampling result of the emission control signal obtained by applying it to the clock input terminal of the D flip-flop is as follows: Figure 4 As shown in (C), during the period of change of the emission control signal, when the D flip-flop detects the rising edge of the clock signal CLK, the level of the emission control signal is between level 0 and level 1. In this case, after the D flip-flop samples the emission control signal, it may output level 0 at the output terminal Q (see the corresponding sampling result). Figure 4 The single node line shown in (C) in the figure) may also output level 1 at the output terminal Q (see the corresponding sampling results for Figure 4 In other words, the probability of the D flip-flop outputting level 0 and level 1 is 50%. Therefore, Figure 4 The clock signal CLK used in (C) 0 +D 1 The accuracy rate of successfully sampling the emission control signal is 50%.

[0050] Figure 4 (D) shows the initial signal CLK 0 The phase delay D 2 After that, the phase-shifted clock signal CLK=CLK 0 +D 2 The schematic diagram of the sampling result of the emission control signal obtained by applying it to the clock input terminal of the D flip-flop is as follows: Figure 4 As shown in (D), during the change period of the emission control signal, when the D flip-flop detects the rising edge of the clock signal CLK, the level of the emission control signal is level 1. In this way, after the D flip-flop samples the emission control signal, it will output level 1 at the output terminal Q. It can be seen that Figure 4 The clock signal CLK used in (D) 0 +D 2 The transmission control signal can also be sampled 100% accurately.

[0051] based on Figure 4 Middle(A) to Figure 4From the sampling process shown in (D), it can be seen that the transition edge of the asynchronous signal (referring to the moment when the level of the asynchronous signal begins to transition, such as the moment when the emission control signal changes from level 0 to non-level 0, or the moment when the emission control signal changes from non-level 0 to level 0) is not an ideal steep edge, but has a certain slope. When the time interval between the clock rising edge of the clock signal CLK of the D flip-flop and the transition edge of the asynchronous signal is less than a certain value, the time interval is insufficient for the D flip-flop to meet the setup time or hold time requirements, resulting in a probabilistic error in the D flip-flop's level judgment of the asynchronous signal. Moreover, the smaller the time interval between the clock rising edge of the clock signal CLK and the transition edge of the asynchronous signal, the greater the probability of an error in the level judgment. This phenomenon is called the metastable phenomenon of asynchronous signal transmission across clock domains. When the D flip-flop is in a metastable state, the D flip-flop can neither predict the correct output level nor predict when it will stabilize at a correct output level, resulting in the D flip-flop being able to output one or more levels randomly or according to certain rules, such as stably outputting an intermediate level between level 0 and level 1, or oscillating output (i.e., the output level frequently switches between level 0 and level 1). This useless output level will propagate in a cascade manner along the various circuits on the signal channel, causing problems in the subsequent processing of the circuit, thereby affecting the stability of the entire circuit system.

[0052] In view of this, the present application provides a clock adjustment device, which can adjust the phase of the clock signal used to sample the signal to be tested in the clock domain to a target phase with a better sampling result, so as to improve the accuracy of the clock domain sampling of the signal to be tested. Among them, the signal to be tested can be an asynchronous signal or a synchronous signal. When it is an asynchronous signal and is applied to a laser radar, it can specifically include one or more of the following signals: driving control commands, scanning control signals, transmission control signals, target echo signals, detection results, etc., without specific limitation.

[0053] It should be noted that the clock adjustment device in the present application can be applied to the above-mentioned laser radar, and can also be applied to other devices, devices or chips other than the above-mentioned laser radar, for example, it can be applied to other intelligent terminals with signal processing functions other than the above-mentioned laser radar, or it can be set in the components of other intelligent terminals, which include but are not limited to controllers, chips or cameras and other sensors, and other components. Alternatively, the clock adjustment device in the present application can be applied to the above-mentioned driving system, and can also be applied to other imaging systems other than the above-mentioned driving system, such as a three-dimensional building modeling system, a terrain mapping system or a rendezvous and docking system. Moreover, with the evolution of the system architecture and the emergence of new scenarios, the clock adjustment device provided in the present application is also applicable to similar technical problems, and the present application does not make specific limitations on this.

[0054] The specific structure of the clock adjustment device in the present application will be introduced below in conjunction with specific embodiments. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments.

[0055] It should be noted that the terms "system" and "network" in the embodiments of the present application can be used interchangeably. "At least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0056] Also, in the embodiments of the present application, "connection" can be understood as electrical connection, and the connection between two electrical components can be a direct or indirect connection between the two electrical components. For example, the connection between A and B can be either a direct connection between A and B, or an indirect connection between A and B through one or more other electrical components, such as A and B connection, or A and C direct connection, C and B direct connection, and A and B are connected through C. In some scenarios, "connection" can also be understood as coupling, such as electromagnetic coupling between two inductors. In short, the connection between A and B enables the transmission of electrical energy between A and B.

[0057] In addition, the port names in the embodiments of the present application are only exemplary expressions. In other examples, other port names may be used, such as input ports, output ports, or control ports, which may also be collectively referred to as communication ports. The present application does not limit this. Moreover, in the embodiments of the present application, a port corresponds to another port, which may mean that the two ports are the same port, or that the two ports are different ports but connected through a line. The present application does not limit this.

[0058] Furthermore, unless otherwise specified, ordinal numbers such as "first" and "second" mentioned in the embodiments of the present application are used to distinguish multiple objects, and are not used to limit the priority or importance of multiple objects. For example, the first phase adjustment instruction is an instruction sent to the phase adjustment unit in order to determine the target phase, while the second phase adjustment instruction is an instruction sent to use the target phase after the target phase is determined. These two phase adjustment instructions are only used to distinguish different phase adjustment instructions sent in different time periods and under different requirements, and do not indicate the difference in priority or importance of the two phase adjustment instructions.

[0059] Figure 5 A schematic diagram showing the structure of a clock adjustment device provided in an embodiment of the present application is shown as follows: Figure 5 As shown, the clock adjustment device 500 includes a clock generating unit 510, a phase adjustment unit 520 and a phase control unit 530. The output end of the clock generating unit 510 is connected to the first input end (a) of the phase adjustment unit 520. 1 ), the output terminal (a 3 ) is connected to the first input terminal (b) of the phase control unit 530 1 ), the second input terminal (b 2 ) is used to receive the signal S to be tested (for example, an asynchronous signal sent by other clock domains), the output end (b 3 ) is connected to the second input terminal (a) of the phase adjustment unit 520 2 In an implementation, the clock generating unit 510 is used to generate a first clock signal (CLK 0 ), the first clock signal CLK 0 After being outputted to the phase adjustment unit 520 through the output terminal of the clock generation unit 510, the phase adjustment unit 520 adjusts the received first clock signal CLK 0 Phase adjustment is performed to obtain N second clock signals (CLK 1 ,CLK 2 ,……,CLK N ), and N second clock signals CLK 1 ~CLK N Corresponding to the N phases, N is a positive integer greater than or equal to 2. Further, the N second clock signals CLK 1 ~CLK N Through the output terminal a of the phase adjustment unit 520 3 The phase control unit 530 outputs the N second clock signals to the input terminal b. 2The input signal to be tested S is sampled to obtain the sampling results of the N second clock signals on the signal to be tested S, and then according to the sampling results and the preset rules, a first phase adjustment instruction is sent to the phase adjustment unit 520, and the first phase adjustment instruction is used to indicate the target phase. After receiving the first phase adjustment instruction, the phase adjustment unit 520 adjusts the first clock signal CLK from the clock generation unit 510 according to the first phase adjustment instruction. 0 Phase adjustment is performed to obtain a third clock signal, the phase of the third clock signal is the target phase, and the third clock signal is subsequently used to sample the signal S to be measured.

[0060] In a possible implementation, continue to refer to Figure 3 As shown, taking the transmitting module 140 in the clock domain 4 as an example, the laser radar 100 can be pre-set or configured as follows: after the programmable logic circuit 120 in the clock domain 2 is turned on, it actively sends a transmission control signal (test signal) to the transmitting module 140 in the clock domain 4 where there will be business interaction in the future according to a pre-set or configured cycle. After the transmitting module 140 in the clock domain 4 is turned on, it can obtain N second clock signals with different phases according to the initial clock signal (i.e., the first clock signal) of the clock domain 4, and use the N second clock signals to The transmission control signal sent by the programmable logic circuit 120 in the clock domain 2 is sampled to obtain the sampling results corresponding to each of the N second clock signals. Then, according to the preset rules and the sampling results corresponding to the N second clock signals, the target second clock signal is obtained from the N second clock signals, and then the initial clock signal generated by the clock domain 4 is phase-adjusted based on the target phase corresponding to the target second clock signal to obtain a third clock signal with a target phase, and then the third clock signal is used to sample the real transmission control signal sent by the programmable logic circuit 120 in the clock domain 2 during the real scanning process. Among them, the transmission control signal sent by the transmission module 140 after power-on can be pre-set or configured in the transmission module 140, and can also be set according to the real transmission control signal that will appear in the real scanning process, so that the target phase determined based on the transmission control signal used after power-on can also be applied to the real transmission control signal.

[0061] It should be noted that the above-mentioned clock adjustment device 500 is particularly suitable for occasions with fixed signals to be measured, such as laser radar calibration occasions. In the calibration occasion, the programmable logic circuit 120 in the laser radar 100 will repeatedly send a certain fixed and known transmission control signal to the transmission module 140 to drive the transmission module 140 to send a laser signal to the fixed target object according to the fixed and known transmission control signal, and the programmable logic circuit 120 will also receive the target echo signal collected by the receiving module 150 for the transmission control signal, and then report it to the CPU 110, so that the CPU 110 can complete the calibration of each device in the laser radar 100 with reference to the target echo signal. In this scenario, since the transmission control signal is fixed and known, and the target object is fixed and known, the target echo signal is also fixed and known. Based on this, in implementation, not only can the fixed known transmission control signal be pre-set or configured in the transmission module 140 so that the transmission module 140 can use the transmission control signal to complete the phase adjustment function of the clock domain 4 after power-on, but the fixed known target echo signal can also be pre-set or configured in the programmable logic circuit 120 so that the programmable logic circuit 120 can also use the target echo signal to complete the phase adjustment function of the clock domain 2 after power-on.

[0062] Further, still taking the signal to be tested including the emission control signal as an example, considering that the real emission control signal may also change during the business interaction process between the clock domain 2 and the clock domain 4, therefore, after obtaining the third clock signal, the clock adjustment device 500 provided in the emission module 140 can also re-use the N second clock signals to perform a round of the above sampling operation on the real emission control signal at intervals, and re-determine the target phase according to the preset rules and the sampling results corresponding to the N second clock signals obtained by resampling. When the phase difference between the re-determined target phase and the currently used target phase (which may be the target phase determined at startup, or the target phase determined in a previous period of time) is not large, it means that the real emission control signal has changed but the change is relatively slight, and even if the current target phase is still used, a better sampling result can still be obtained. In this case, the clock adjustment device 500 may not update the target phase, that is, continue to sample the subsequent emission control signal using the third clock signal, so as to save unnecessary phase adjustment operations and save processing resources as much as possible when the acquisition result meets the preset rules. When the phase difference between the re-determined target phase and the currently used target phase is large, it means that the actual emission control signal has undergone a relatively drastic change. If the current target phase is still used, a good sampling result may not be obtained, which is not conducive to the accurate implementation of subsequent control operations. In this case, the clock adjustment device 500 can update the target phase, that is, re-adjust the phase of the initial clock signal generated by the clock domain 4, obtain a new third clock signal with a phase of the re-determined target phase, and use the new third clock signal to sample the subsequent emission control signal, so that when the emission control signal changes greatly, it is re-adjusted to adapt to the changed emission control signal. The third clock signal, as much as possible, maintains the accuracy and stability of asynchronous sampling.

[0063] It should be noted that the above resampling operation may be performed once every preset or configured period, or may be performed according to a certain agreement between clock domain 2 and clock domain 4. For example, in a possible example, in order to avoid the influence of resampling on the real sampling process, the programmable logic circuit 120 in clock domain 2 may send the most recently sent historical transmission control signal to the clock adjustment device 500 in clock domain 4 according to a preset or configured period during the period when the transmission control signal is not really sent, or send the transmission control signal to be sent in the future predicted based on the historical transmission control signals sent in the last few times. In this way, by resampling with reference to the historical transmission control signal with greater value during the period when the transmission control signal is not really sent, not only the influence of phase adjustment on the real sampling operation can be reduced, but also the re-determined target phase can be matched with the future transmission control signal as much as possible, taking into account the accuracy of real sampling and the flexibility of re-adjustment.

[0064] Based on the above content, it can be seen that the use of Figure 5 The clock adjustment device shown in the figure, by using the clock signals of each phase to pre-sample the signal to be tested before formally sampling the signal to be tested, helps to obtain the target phase with better sampling results in each phase, and uses the target phase with better sampling results, thereby improving the sampling accuracy and sampling stability of the formal sampling of the signal to be tested. Furthermore, when the signal to be tested is an asynchronous signal, the design can also enable the clock domain receiving the asynchronous signal to have the ability to flexibly adjust the clock phase, and the adjusted clock phase can also always keep matching the received asynchronous signal, effectively improving the sampling accuracy of the asynchronous signal transmitted across clock domains, reducing the metastable risk of the asynchronous signal transmitted across clock domains, and improving the stability of the entire circuit system. Moreover, when the clock adjustment device is applied to one or more clock domains of the laser radar, it can also enable the one or more clock domains to timely and accurately collect the asynchronous signals sent by other clock domains, thereby helping the laser radar to accurately collect environmental information during driving, effectively improving the accuracy and safety of driving.

[0065] In the embodiment of the present application, the phase adjustment unit 520 may be any device or component having a phase adjustment function, for example:

[0066] In one possible implementation, Figure 6 The structural diagram of a phase adjustment unit provided in an embodiment of the present application is exemplarily shown as follows: Figure 6 As shown, in this implementation, the phase adjustment unit 520 may include N delay links L 1 , L 2 , L 3 ,……,L N-1 , L N , N delay links L 1 ~L N Each delay link can contain a switch component, and any two delay links can also contain different numbers of delay units (i.e. Figure 6 Each delay unit can delay the phase of the input clock signal by a preset time length (the preset time length can also be called a preset phase) and then output it. 1 The switch assembly K 1 , and does not include a delay unit, so when the phase adjustment unit 520 turns on the delay link L 1 Switch assembly K on 1 When the first clock signal CLK 0 can be directly along the delay link L 1 is transmitted to the phase control unit 530, thereby delaying the link L 1The second clock signal CLK output 1 The phase of the first clock signal CLK 0 The phase of the delay link L 2 The switch assembly K 2 and 1 delay unit, so when the phase adjustment unit 520 turns on the delay link L 2 Switch assembly K on 2 When the first clock signal CLK 0 Along the delay link L 2 During the transmission process, it will first be delayed by a delay unit for a preset time length before being transmitted to the phase control unit 530, thereby delaying the link L 2 The second clock signal CLK output 2 The phase of the first clock signal CLK 0 The phase of the delay link L is delayed by a preset time length; ...; delay link L N The switch assembly K N-1 and N-1 delay units. Thus, when the phase adjustment unit 520 turns on the delay link L N Switch assembly K on N When the first clock signal CLK 0 Along the delay link L N-1 During the transmission process, it will first be delayed by N-1 times the preset time length through N-1 delay units before being transmitted to the phase control unit 530, thereby delaying the link L N The second clock signal CLK output N-1 The phase of the first clock signal CLK 0 The phase is delayed by N-1 times the preset duration.

[0067] Furthermore, when the phase adjustment unit 520 adopts Figure 6 In the structure shown in the figure, the phase adjustment unit 520 receives the first clock signal CLK sent by the clock generation unit 510. 0Afterwards, N delay links can be traversed. When traversing each delay link: the switch component on the delay link is controlled to be turned on, and N-1 delay links other than the delay link are controlled to be disconnected, so that the phase control unit 530 can use the second clock signal corresponding to the delay link to sample the signal to be tested and obtain the sampling result of the second clock signal corresponding to the delay link. Afterwards, after determining that the phase control unit 530 has finished sampling the second clock signal corresponding to the delay link, the phase adjustment unit 520 can start to traverse a delay link that has not been traversed among the remaining delay links. Furthermore, when all N delay links are traversed, the phase control unit 530 can determine a target delay link with better sampling results based on preset rules and the sampling results of the second clock signals corresponding to each of the N delay links, and send a first phase adjustment indication that can indicate the target delay link to the phase adjustment unit 520. The phase adjustment unit 520 turns on the switch component on the target delay link according to the first phase adjustment indication, and disconnects the switch components on the other N-1 delay links except the target delay link, so that the target delay link with better sampling results can be used to sample the signal to be tested subsequently.

[0068] In another possible implementation, Figure 7 The schematic diagram of the structure of another phase adjustment unit provided by the embodiment of the present application is shown as an example. In this example, the phase adjustment unit 520 can be a phase-locked loop, which is a negative feedback control system that uses the voltage generated by phase synchronization to tune the voltage-controlled oscillator to generate a target frequency. It uses an external reference signal to control the frequency and phase of the oscillation signal inside the loop to achieve automatic tracking of the output signal frequency to the input signal frequency. Figure 7 As shown, the phase adjustment unit 520 may include a phase detector 521, a low-pass filter 522, a voltage-controlled oscillator 523, a phase shifter 524 and a 1 / T counter 525, where T is a positive integer. One input end of the phase detector 521 corresponds to the first input end a of the phase adjustment unit 520. 1 The output end of the phase detector 521 is connected to the input end of the low-pass filter 522, the output end of the low-pass filter 522 is connected to the input end of the voltage-controlled oscillator 523, the output end of the voltage-controlled oscillator 523 is connected to the input end of the phase shifter 524, the output end of the phase shifter 524 is connected to the input end of the 1 / T counter 525, and the output end of the 1 / T counter 525 is respectively connected to the other input end of the phase detector 521 and the output end a of the phase adjustment unit 520 3. Among them, the phase shifter 524 is pre-configured with a plurality of delay units, any two of the plurality of delay units correspond to the same delay time (for example, 1°), and each delay unit can have two states of invalid or valid. When a clock signal is input to the phase shifter 524, the phase of the clock signal will be delayed by the valid delay unit, and then converted into another clock signal whose phase is different from the phase of the input clock signal but the frequency is still the frequency of the input clock signal and then output. For example, assuming that the phase shifter 524 is configured with 180 delay units, and the delay time of each delay unit is 1°, then: if all 180 delay units are invalid, the phase of the output clock signal is the same as the phase of the input clock signal; if 60 of the 180 delay units are valid, the phase of the output clock signal is delayed by 60° compared with the phase of the input clock signal; if 100 of the 180 delay units are valid, the phase of the output clock signal is delayed by 100° compared with the phase of the input clock signal.

[0069] In implementation, the phase detector 521 may receive the first clock signal CLK 0 sent to the low-pass filter 522, and can also be used to input the first clock signal CLK 0 The phase of the received signal is compared with the phase of the clock signal fed back by the 1 / T counter 525, and the phase difference is obtained and sent to the low-pass filter 522. The low-pass filter 522 can filter out the high-frequency signal in the received signal and transmit the low-frequency signal in the received signal to the voltage-controlled oscillator 523. The low-frequency signal includes the first clock signal CLK 0 The voltage-controlled oscillator 523 can adjust the operating voltage of the clock domain where the phase adjustment unit 520 is located according to the phase difference to obtain a first clock signal CLK 0 The fourth clock signal generated by the voltage-controlled oscillator 523 is transmitted to the phase shifter 524, and after being phase-delayed by the effective delay unit in the phase shifter 524, a phase different from the first clock signal CLK is obtained. 0 The first clock signal CLK with a phase of T and a frequency of T times 0 The fifth clock signal with a frequency of CLK is output to the 1 / T counter 525, and then the fifth clock signal is down-converted to the same frequency as the first clock signal CLK by the 1 / T counter 525. 0 The second clock signal with the same frequency as the second clock signal is output to the phase control unit 530 for sampling on the one hand, and fed back to the phase detector 521 on the other hand, so as to realize the precise adjustment of the phase and frequency by cyclically performing the above-mentioned phase feedback operation. The specific implementation of these components is not specifically introduced in this application.

[0070] Furthermore, when the phase adjustment unit 520 adopts Figure 7 In the structure shown in the figure, the phase adjustment unit 520 receives the first clock signal CLK sent by the clock generation unit 510. 0 After that, all delay units in the phase shifter 524 can be set to fail first, so that the phase control unit 530 can use the first clock signal to directly sample the signal to be tested and obtain the first clock signal CLK 0 The sampling result of the signal to be measured. Afterwards, the phase adjustment unit 520 can obtain a phase different from the first clock signal CLK by changing the number of effective delay units in the phase shifter 524 N-1 times. 0 For example, assuming that there are 180 delay units in the phase shifter 524, and the delay time corresponding to each delay unit is 1°, when the phase adjustment unit 520 adjusts the phase in a step-by-step manner, if the minimum unit of each step is 1 delay unit, the phase adjustment unit 520 can obtain 181 second clock signals whose phases are respectively shifted by 0°, 1°, 2°, 3°, ..., 178°, 179°, and 180° compared to the first clock signal by not changing the number of delay units that take effect and by changing 180 times, and the phase control unit 530 can obtain the sampling results of the 181 second clock signals on the signal to be measured. Alternatively, if the minimum unit of each step is 2 delay units, the phase adjustment unit 520 can obtain 91 second clock signals whose phases are shifted by 0°, 2°, 4°, 6°, ..., 176°, 178°, and 180° respectively compared to the first clock signal by not changing the number of delay units and by changing the number of delay units that take effect 90 times, and the phase control unit 530 can obtain the sampling results of the test signal by these 91 second clock signals.

[0071] It should be noted that the number of delay units included in the phase shifter 524 and the delay time corresponding to each delay unit can be a preset or configured fixed value, and the minimum unit of each step can be a preset or configured fixed value, or a variable value that supports the user to modify according to the actual scene. For example, when the current scene does not require high accuracy, in order to save calculation complexity, the user can also set the minimum unit of each step to 10 delay units. In this case, the phase adjustment unit 520 can obtain 19 second clock signals whose phases are respectively shifted by 0°, 10°, 20°, 30°, ..., 160°, 170°, and 180° compared to the first clock signal by not changing and changing the number of effective delay units 18 times, and the phase control unit 530 can obtain the sampling results of the 19 second clock signals on the signal to be measured. Compared with the above-mentioned solution in which the minimum unit is 1 delay unit or 2 delay units, the calculation is simpler and the efficiency of phase adjustment is higher.

[0072] It should be pointed out that Figure 6 or Figure 7 The phase adjustment unit 520 shown is only an exemplary description. In actual operation, the phase adjustment unit 520 may also have a Figure 6 or Figure 7 More or fewer components shown in the figure, or, Figure 6 or Figure 7 The multiple components in the system can be integrated into one physical unit, or distributed over multiple physical units, or the system can also use Figure 6 or Figure 7 Other devices with phase shift function other than the phase adjustment unit 520 can be used as the phase adjustment unit 520, etc., and this application does not make any specific limitation on this.

[0073] In a possible implementation, continue to refer to Figure 5 As shown, the phase control unit 530 may include a trigger 531 and a sampling control unit 532. The clock input terminal of the trigger 531 (for example, when the trigger 531 includes a D trigger, the clock input terminal refers to Figure 5 The port with a triangle mark in the figure corresponds to the first input terminal b of the phase control unit 530. 1 , the data input terminal of the trigger 531 (for example, when the trigger 531 includes a D trigger, the data input terminal refers to Figure 5 The port on the same side as the port marked with a triangle. In actual scenarios, the data input terminal and the clock input terminal of the trigger 531 can be located on the same side, or on two opposite sides, or on two adjacent sides, etc., which are not specifically limited) corresponds to the second input terminal b of the phase control unit 530 2 The output end of the trigger 531 is connected to the input end of the sampling control unit 532, and the output end of the sampling control unit 532 corresponds to the output end b of the phase control unit 530. 3 In implementation, the trigger 531 can use each second clock signal received at the clock input terminal to sample the signal S to be tested input at the data input terminal, obtain an output signal corresponding to each second clock signal and output it through its output terminal, and the sampling control unit 532 can obtain the output signal corresponding to each second clock signal output from the output terminal of the trigger, and determine the target phase according to the preset rule and the output signal corresponding to the N second clock signals, and then send the first phase adjustment indication indicating the target phase to the phase adjustment unit 520. In this way, in this implementation, since the trigger can only sample at the clock edge and not at the non-clock edge, using the trigger to sample the signal to be tested not only helps to reduce the probability of circuit glitches (circuit glitches refer to transitions that cross the logic threshold once or more during the sampling period) but also reduces the sampling power consumption.

[0074] It should be noted that, when the trigger 531 includes a D trigger, the output terminal of the trigger 531 may include the output terminal Q and / or the output terminal Q of the D trigger. For example, Figure 5 The diagram shown in FIG. includes the output terminal Q but does not include the output terminal Or it can also include output But it does not include the output terminal Q, or it can also include both the output terminal Q and the output terminal In addition, in addition to the clock input terminal, data input terminal and output terminal, the trigger 531 may also include other functional ports, such as one or more of the reset port (CLR), the set port PRE, the enable port ENA, etc., without specific limitation.

[0075] Exemplarily, in an implementation, the preset rule may be related to the sampling result of correct sampling. For example, the preset rule may be used to indicate that the target phase is the phase corresponding to the second clock signal with the correct output signal. In this case, after obtaining the output signal corresponding to each second clock signal, the sampling control unit 532 may compare the output signal with the reference signal. If the output signal matches the reference signal, it means that the second clock signal is sampled correctly. If the output signal does not match the reference signal, it means that the second clock signal is sampled incorrectly. In this way, after comparing N second clock signals, the sampling control unit 532 may select the target second clock signal from the second clock signal with the correct sampling, and use the phase corresponding to the target second clock signal as the target phase. Among them, the reference signal may be a signal for indicating the correct sampling of the output signal. The reference signal may be a fixed signal pre-set or configured in the sampling control unit 532, or may be a clock domain that sends the signal to be tested and notifies the sampling control unit 532 before sending the signal to be tested. The specific details are not limited. Among them, the output signal matches the reference signal means that the output signal and the signal to be tested corresponding to the signal to be tested are the same as the signal to be output in theory. For example, when the trigger 531 includes a D trigger, and the signal to be tested is at level 1, if the output end of the trigger 531 is the output end Q of the D trigger, then when the signal to be tested is sampled at the rising edge of the clock, the output end Q of the D trigger should theoretically output a signal at level 1. Therefore, when the output signal corresponding to a second clock signal is at level 1, it is considered that the output signal of the second clock signal matches the reference signal, the output signal of the second clock signal is correct, and the second clock signal is more suitable for sampling the signal to be tested S; when the output signal corresponding to a second clock signal is at level 0, it is considered that the output signal of the second clock signal does not match the reference signal, the output signal of the second clock signal is wrong, and the second clock signal is not suitable for sampling the signal to be tested.

[0076] Further exemplary, considering that there may be a problem of contingency when judging N second clock signals using a single sampling result, the preset rule can also be used to indicate that the target phase is the phase corresponding to the second clock signal whose correct number of output signals is not less than the number threshold. In this case, the sampling control unit 532 can also obtain the M output signals obtained by the trigger 531 sampling the signal to be tested S M times (M is a positive integer greater than or equal to 2) under each second clock signal, and compare the M output signals corresponding to each second clock signal with the reference signal, so as to determine the number of output signals matching the reference signal in the M output signals. If the number is not less than the number threshold, it means that the second clock signal has a high sampling accuracy for the signal to be tested S, and the second clock signal is more suitable for sampling the signal to be tested S. If the number is less than the number threshold, it means that the second clock signal has a low sampling accuracy for the signal to be tested S, and the second clock signal is not suitable for sampling the signal to be tested S. In this way, after comparing N second clock signals, the sampling control unit 532 can also select a target second clock signal from the second clock signals suitable for sampling the signal to be measured S, and then use the phase corresponding to the second clock signal as the target phase, so as to use a target phase that is relatively accurate for multiple samplings to improve the accuracy of sampling the signal to be measured.

[0077] It should be understood that the preset rule can also be other rules set according to the above idea. For example, the preset rule can also be used to indicate that the target phase is the phase corresponding to the second clock signal whose sampling success rate (the sampling success rate can be represented by the ratio of the number of correct output signals to M) is not less than the success rate threshold, or it can also be used to indicate that the target phase is the most stable phase among the phases corresponding to each second clock signal whose number of correct output signals is not less than the number threshold, or it can be used to indicate that the target phase is the most stable phase among the phases corresponding to each second clock signal whose sampling success rate is not less than the success rate threshold, or it can be used to indicate that the target phase is the most stable phase among the phases corresponding to each second clock signal whose other sampling indicators are greater than the indicator threshold, and the other sampling indicators are positively correlated with the number of correct output signals. In addition, the above content is only introduced by taking N second clock signals corresponding to the same sampling number M as an example. In other embodiments, N second clock signals can also correspond to two or more sampling numbers. In this case, the sampling indicator can also be set to be positively correlated with the number of correct output signals and negatively correlated with the sampling number.

[0078] For ease of understanding, the following text will take the sampling indicator, which is the sampling success rate, as an example for introduction. Other sampling indicators can be directly implemented by reference, and this application will not repeat them one by one.

[0079] In a possible implementation, continue to refer to Figure 5As shown, the sampling control unit 532 may include a sampling unit 5321 and an evaluation control unit 5322. The first input terminal (c 1 ) is connected to the output terminal of the trigger 531, and the output terminal (c 3 ) is connected to the input terminal (d 1 ), the first output terminal (d 2 ) is connected to the second input terminal a of the phase adjustment unit 2 In implementation, for each of the N second clock signals, the sampling unit 5321 can collect M output signals obtained by the trigger 531 under the second clock signal by sampling the signal to be tested S M times, and output the M output signals corresponding to each second clock signal to the evaluation control unit 5322 through the output end of the sampling unit 5321. After receiving the M output signals corresponding to each second clock signal, the evaluation control unit 5322 can obtain the number of output signals matching the reference signal from the M output signals, and determine the sampling success rate of the phase corresponding to the second clock signal for sampling the signal to be tested S according to the number and the total number of output signals M, and then determine the target second clock signal according to the sampling success rate corresponding to the N second clock signals, and use the phase corresponding to the target second clock signal as the target phase, and then send the first phase adjustment indication indicating the target phase to the phase adjustment unit. In this way, by using the sampling unit to perform the sampling operation and using the evaluation control unit to perform the evaluation of the sampling success rate and control the phase adjustment operation, the sampling operation and the evaluation and phase adjustment operations after the sampling can be decoupled, which helps to reduce the working pressure of each unit while reducing the impact of the evaluation operation and phase adjustment operation on the sampling operation, effectively improving the accuracy of the sampling output results, and thereby improving the accuracy of the evaluation and phase adjustment.

[0080] For example, in the above implementation, the operation of the sampling unit 5321 sampling the M output signals of the trigger 531 under each second clock signal can also be controlled by the evaluation control unit 5322. Figure 5 As shown, the second output terminal (d 3 ) can be connected to the second input terminal (c 2 ), before the sampling unit 5321 samples the M output signals of the trigger 531 under each second clock signal, the evaluation control unit 5322 can also output the M output signals of the trigger 531 through the second output terminal d 3An enable signal is sent to the sampling unit 5321, and the enable signal is used to instruct the sampling unit 5321 to sample the output signal of the trigger 531 within the effective period of the indication message. The enable signal can be determined according to the arrival period of the signal to be tested S, and the arrival period of the signal to be tested S can be pre-set or configured in the evaluation control unit 5322, or the clock domain that generates the signal to be tested S can notify the evaluation control unit 5322 before sending the signal to be tested S, and the specific details are not limited. The effective period of the indication message is used to indicate the period in which the sampling unit samples the output signal of the trigger 531, and the period can have multiple possibilities. For example, in one case, the effective period of the indication message can be used to indicate a period of time after receiving the enable signal. In this case, the evaluation control unit 5322 can send an enable signal to the sampling unit 5321 before each arrival of the high level of the signal to be tested S, and the sampling unit 5321 can enable its sampling capability after receiving an enable signal, so as to start the sampling operation of the output signal of the trigger 531 within a period of time. The duration of this period of time may be pre-set or configured in the sampling unit 5321, or, when the enable signal has the ability to carry information, it may also be carried in the enable signal by the evaluation control unit 5322 to notify the sampling unit 5321, without specific limitation. In another case, the indication message valid period may also be used to indicate the initial sampling moment and the sampling time interval. In this case, the evaluation control unit 5322 may also send an enable signal including the initial sampling moment and the sampling time interval to the sampling unit 5321 before sampling the M output signals corresponding to any second clock signal. After the sampling unit 5321 receives the enable signal, it may first sample the output signal of the trigger once at the initial sampling moment indicated in the enable signal, and then sample the output signal of the trigger 531 once every sampling time interval. It should be understood that there are many possible implementation forms of the enable signal, which are not listed here one by one.

[0081] Further exemplarily, the N second clock signals may include a second clock signal having the same phase as the first clock signal and N-1 second clock signals having different phases from the first clock signal. Among them, the N-1 second clock signals may also be obtained by the evaluation control unit 5322 controlling the phase adjustment unit 520 through N-1 adjustments. In any adjustment, the evaluation control unit 5322 may also send a second phase adjustment indication to the phase adjustment unit 520 after determining that the sampling unit 5321 has sampled the M output signals corresponding to the current second clock signal. The second phase adjustment indication is used to indicate that the phase adjustment unit 520 performs phase adjustment on the first clock signal from the clock generation unit 510 to obtain the next second clock signal, and the phase of the next second clock signal is a phase that has not been adjusted among the N phases. Among them, for any second clock signal, the evaluation control unit 5322 can determine in a variety of ways whether the sampling unit 5321 has sampled the M output signals corresponding to the second clock signal. For example, in one possible way, the sampling unit 5321 can record the number of times the output signal corresponding to a second clock signal is sampled. When it is determined that the sampling has been performed M times, a notification message of the end of sampling can be sent to the evaluation control unit 5322. Once the evaluation control unit 5322 receives the notification message of the end of sampling, it can instruct the phase adjustment unit 520 to adjust the next phase. In another possible way, the evaluation control unit 5322 can count the number of times the sampling unit 5321 is instructed to sample the output signal corresponding to a second clock signal. When it is determined that the sampling has been instructed M times, the sampling unit 5321 can no longer be instructed to sample, and the phase adjustment unit 520 can be instructed to adjust the next phase. In another possible manner, the evaluation control unit 5322 may also instruct the sampling unit 5321 to perform M samplings through an enable signal, and start timing after sending the enable signal, and after timing to the estimated sampling unit 5321 sampling M times, instruct the phase adjustment unit 520 to adjust the next phase. And so on. There are many possible implementation methods, which are not listed here one by one.

[0082] Further exemplarily, in the order of phase from large to small or from small to large, any two adjacent phases in the N phases may have the same phase interval, wherein the phase interval may be a fixed value set in advance or configured, or a variable value that supports user modification according to actual scenarios. For example, in a possible design, when the phase adjustment unit 520 adopts the following Figure 7 In the structure shown in the figure, it is assumed that the first clock signal CLK 0 The phase of 0°, the phase interval set by the user is 3°, the value of M is 5000, and the value of N is 10. Then the evaluation control unit 5322 determines that the phase adjustment unit 520 receives the first clock signal CLK 0After that, an enable signal can be sent to the sampling unit 5321 to control the sampling unit 5321 to sample the output signal of the trigger 531 within 5000 time periods when the level 1 of the signal to be measured comes, so as to obtain the output signal of the trigger 531 using the first clock signal CLK 0 5000 output signals obtained by sampling the signal to be tested S; afterwards, the evaluation control unit 5323 can send a second phase adjustment instruction to the phase adjustment unit 520, and after the phase adjustment unit 520 receives the second phase adjustment unit, it can control the three delay units in the phase shifter 524 to take effect, and the first clock signal CLK from the clock generating unit 510 0 The phase of the test signal S is delayed to 3°, and a second clock signal with a phase of 3° is obtained; thereafter, the evaluation control unit 5322 can send an enable signal to the sampling unit 5321 to control the sampling unit 5321 to sample the output signal of the trigger 531 within 5000 time periods when the level 1 of the test signal arrives, and 5000 output signals are obtained by sampling the test signal S using the second clock signal with a phase of 3°, and then a second phase adjustment instruction is sent to the phase adjustment unit 520, and this is repeated until 5000 output signals corresponding to the second clock signal with a phase of 30° are obtained.

[0083] Further, assuming that the signal to be tested S is at level 1, the trigger 531 is as follows: Figure 5 The schematic diagram includes a D flip-flop, the output terminal Q of the D flip-flop is working and the output terminal If it does not work, then after the evaluation control unit 5322 obtains 5000 output signals corresponding to each phase, in theory, for each second clock signal, the output signal obtained by the D flip-flop using the clock rising edge of the second clock signal to sample the signal to be tested S should be level 1 (that is, the reference signal is set to level 1). Therefore, if the output signal sampled by the sampling unit 5321 is not level 1, then the output signal is sampled incorrectly, and if the output signal sampled by the sampling unit 5321 is level 1, then the output signal is sampled correctly. Based on this, after receiving the 5000 output signals corresponding to each second clock signal sent by the sampling unit 5321, the evaluation control unit 5322 can obtain the output signal with the output of level 1 from the 5000 output signals, and then use the ratio of the number of these output signals to 5000 as the sampling success rate of the phase corresponding to each second clock signal. Afterwards, the evaluation control unit 5322 can obtain the target phase according to a variety of rules based on the sampling success rates corresponding to each phase, for example:

[0084] Rule 1: The target phase is a phase among the N phases whose sampling success rate is not less than the success rate threshold. In implementation, the evaluation control unit 5322 can sequentially compare each phase among the N phases with the success rate threshold in a pre-set or configured order. Once it is found that the sampling success rate of a certain phase is not less than the sampling success rate threshold, the phase can be used as the target phase, and there is no need to compare other phases to save computing resources. Alternatively, the evaluation control unit 5322 can first compare the sampling success rate and the success rate threshold of the N phases to obtain an alternative phase whose sampling success rate is not less than the success rate threshold, and then randomly select an alternative phase from the alternative phases as the target phase, or select the alternative phase with the largest sampling success rate from the alternative phases as the target phase, etc. In this case, the target phase is one of the N phases.

[0085] Rule 2: The target phase is obtained based on the phase interval formed by continuous adjacent phases whose sampling success rate is not less than the success rate threshold, wherein the adjacent phase refers to the adjacent phases in the N phases in the order of phase from large to small or from small to large. In implementation, the evaluation control unit 5322 can first obtain the candidate phases whose sampling success rate is not less than the success rate threshold by comparing the sampling success rate and the success rate threshold of the N phases, and then construct a phase interval based on each part of the continuous adjacent phases in each candidate phase, and select the target phase from the constructed phase interval, for example, randomly select a phase from any phase interval as the target phase to simplify the calculation process, or select the phase located inside the phase interval as much as possible instead of the phase located at the edge of the phase interval to improve the stability of the target phase, etc. In this case, the target phase may be one of the N phases or one outside the N phases. By adopting this rule, since the phases in the constructed phase interval can meet the requirements of the sampling success rate, the phase interval can be considered as an interval with a relatively stable sampling success rate. The target phase is selected within this interval. Even if the environment changes and causes a slight shift in the phase, as long as it does not exceed the range of the phase interval, a certain sampling success rate can still be guaranteed.

[0086] Based on the above rule 2, in a specific implementation, the phase interval can be obtained based on the correlation between the phase and the sampling success rate, and the correlation can be represented in any form of a correlation diagram, a correlation table, a correlation database, a correlation stack, etc. For example, assuming that the correlation is represented in the form of a correlation diagram, Figure 8 The following is a schematic diagram showing the correlation between a phase and a sampling success rate provided by an embodiment of the present application. In this example, the horizontal axis of the correlation diagram is used to represent the phase, and the vertical axis of the correlation diagram is used to represent the sampling success rate. Figure 8As shown, the correlation diagram includes sampling points corresponding to the phase and sampling success rate of each second clock signal, and the sampling points corresponding to each phase and sampling success rate can also be connected by a curve. In implementation, assuming that the success rate threshold is set to 100% (it can also be set to other values ​​in actual operation, such as 99%, not specifically limited), the evaluation control unit 5322 can draw a reference line L from the position where the vertical coordinate value is 100%. 01 , falls on the reference line L 01 The sampling points above the reference line L are sampling points with a sampling success rate of not less than 100%. 01 The sampling points below are sampling points with a sampling success rate less than 100%. 01 And obtain phase-continuous sampling points from those sampling points above, and use each part of phase-continuous sampling points to construct a phase interval. Further, when there is only one phase interval, the evaluation control unit 5322 can determine the target phase based on this phase interval; when there are multiple phase intervals, the evaluation control unit 5322 can select one from the multiple phase intervals randomly or according to a certain rule, and then determine the target phase based on the selected phase interval. Among them, a certain rule can be, for example: the selected phase interval is the phase interval with the largest phase range. For example, Figure 8 There are two phase intervals {U1} and phase interval {U2}, and the phase interval {U1} is obviously larger than the phase range of the phase interval {U2}, so the evaluation control unit 5322 can determine the target phase based on the phase interval {U1}. In this way, since the phase interval with the largest phase range belongs to the phase area with the best stability, the target phase is selected based on the phase area with the best stability. Even if the target phase is slightly offset in actual operation, it is only offset to the adjacent phase on the left or right side, and the adjacent phase on the left or right side of the phase interval with the largest phase range can also have a good sampling success rate, that is, based on the offset phase, it can also try to ensure good sampling accuracy.

[0087] Further, assuming that the target phase is determined using the phase interval {U1}, the target phase can be any of the following possibilities:

[0088] Possibility 1: the target phase is the central phase of each phase contained in the phase interval {U1}, that is, the central point A of the sampling points falling within the phase interval {U1} 1 The corresponding phase. The central phase can be obtained by calculating the average phase of the minimum phase and the maximum phase in the phase interval {U1}. The average phase may be one of the N phases or one other than the N phases, for example Figure 8 The central sampling point A is shown1 The corresponding phase is a phase other than the N phases.

[0089] Possibility 2: the target phase is the phase corresponding to the center of gravity of the phase region, wherein the phase region is constructed based on each phase in the phase interval {U1} and at least two corresponding phases on both sides of the phase interval {U1}, and the two corresponding phases on both sides of the phase interval {U1} have the same sampling success rate or the closest sampling success rate. In implementation, the evaluation control unit 5322 can be based on the reference line L 01 , the reference line L falling within the phase interval {U1} 01 The two curves on both sides and the horizontal axis construct a closed figure, and we get Figure 8 The area marked with a diagonal line is the phase area. After that, the evaluation control unit 5322 can find the center of gravity point A of the area. 2 , the center of gravity point A 2 The corresponding phase is taken as the target phase.

[0090] Possibility three, the target phase is the center phase of the two corresponding phases on both sides of the phase interval {U1}. Among them, the two corresponding phases on both sides of the phase interval {U1} have the same sampling success rate or the closest sampling success rate. For example, assuming that the two corresponding phases are obtained based on a 50% sampling success rate, the evaluation control unit 5322 can first draw a reference line L from the position where the vertical coordinate value is 50%. 02 , and then from the reference line L falling in the phase interval {U1} 01 The two curves on both sides are obtained from the reference line L 02 The two sampling points P that intersect or are closest to each other 1 and P 2 , and take two sampling points P 1 and P 2 The center point A 3 The corresponding phase is taken as the target phase.

[0091] In the above content, when the sampling environment becomes worse (for example, the temperature rises), the phase interval will first gradually erode inward from the edge phase until it erodes to the most central phase, and the sampling success rate of the eroded phase will decrease. It can be seen that the central phase or the center of gravity phase of the phase interval belongs to the most stable phase point in the phase interval. In this way, by using the central phase or the center of gravity phase of the phase interval as the target phase, the third clock signal obtained based on the target phase can have the best environmental coping ability. Even if the environment changes slightly, the third clock signal can be adjusted, which helps to improve the stability of sampling the signal to be measured using the third clock signal. Furthermore, the central phase or the center of gravity phase may also be a phase other than the N phases. In this way, when the N phases have the same phase interval, the accuracy of the target phase is at least not less than the phase interval, and may even be greater than the phase interval. In other words, the target phase obtained according to the above rules can also have a better resolution. For example, if N phases are obtained by stepping in units of 1 delay unit, and the delay time of one delay unit is 1°, when the target phase is the center phase of two phases with a delay time of 1° and a delay time of 4°, the target phase is finally calculated to have a delay time of 2.5°. Obviously, the resolution of the target phase is 0.5°, which is significantly higher than the resolution of one delay unit, 1°, and the accuracy of the target phase is better.

[0092] In addition, it should be noted that selecting the center phase or the centroid phase as the target phase is only an optional implementation method. In actual operation, other phases can also be selected as the target phase, such as the phase corresponding to other characteristic sampling points, or the phase close to the center phase or the centroid phase, etc. This application does not make specific limitations on this.

[0093] In a possible implementation, the phase range formed by the N phases is not less than the phase range of one clock cycle of the first clock signal, and preferably, may be not less than the phase range of two clock cycles of the first clock signal. For example, when the phase range of one clock cycle of the first clock signal is 180°, the phase range of the N phases may be pre-set or configured to be 360°. In this way, by making the N phases cover two clock cycles of the first clock signal, the above correspondence diagram can simultaneously include sampling results within two repeated clock cycles, which not only avoids the accidental problems existing in determining the target phase using one clock cycle, but also takes into account the critical phase between the two clock cycles, which helps to select the target phase more accurately.

[0094] For example, when the clock adjustment device 500 also has the function of updating the target phase, the evaluation control unit 5322 can also control the sampling unit 5321 and the phase adjustment unit 520 to repeat the above content at regular intervals, that is, to re-obtain an association relationship between N phases and N sampling success rates, and then compare the newly obtained association relationship with the currently used association relationship. If the difference between the two exceeds the maximum tolerable difference that is preset or configured (for example, when the association relationship is Figure 8 When the two are presented in the form of an association diagram, if the phase difference between the starting points of the phase interval with the largest phase range in the two association diagrams is greater than the maximum tolerable phase difference, or the phase difference between the ending points of the phase interval with the largest phase range is greater than the maximum tolerable phase difference, or the phase difference between other characteristic points that can characterize the phase position of the phase interval with the largest phase range is greater than the maximum tolerable phase difference), the target phase can be re-determined according to the newly obtained association relationship, and a first phase adjustment indication is generated based on the newly confirmed target phase, and then sent to the phase adjustment unit 520, so as to update the third clock signal to a clock signal suitable for the current signal to be measured. If the difference between the two does not exceed the maximum tolerable difference set or configured in advance, the current target phase can be maintained, that is, the current third clock signal continues to be used to sample the current signal to be measured. In this way, by comparing the intermediate information used when determining the target phase, a step of determining the target phase according to the association relationship can be saved without updating the target phase, which helps to save computing resources.

[0095] It should be understood that the division of the units of the clock adjustment device 500 above is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. For example, in another implementation, the evaluation control unit 5322 can also be divided into an evaluation unit and a control unit. The evaluation unit is used to complete the evaluation operation of the N second clock signals, for example, the target phase can be determined based on the M output results corresponding to each second clock signal sampled by the sampling unit 5321, and based on the preset rules and the M output signals corresponding to the N second clock signals. The control unit is used to complete related control operations, for example, the sampling unit can be controlled to obtain the M output signals corresponding to each second clock signal sampled by the trigger, and the phase adjustment unit can be controlled to obtain the N second clock signals, and the phase adjustment unit 520 can also be controlled to obtain the third clock signal based on the target phase determined by the evaluation unit. Of course, the units of the clock adjustment device 500 can also have other division methods, and this application does not make specific limitations on this.

[0096] Furthermore, the trigger 531 can be an additional device for realizing the phase adjustment function, or it can be a device originally existing in the clock domain. When it is a device originally existing in the clock domain, by utilizing the original trigger, adding the phase adjustment unit 520 on the input side of the trigger, and adding the sampling control unit 532 on the output side of the trigger, only a slight adjustment is needed on the original circuit structure of the clock domain, so that the clock domain can have the function of accurately sampling the signal to be tested, which helps to simplify the complexity of circuit design.

[0097] In addition, the clock adjustment scheme provided by the present application can also be extended to any circuit information system that needs to accurately identify and eliminate metastable states of stable asynchronous signals. For example, in some possible application scenarios, after the clock domain accurately samples the signal to be tested according to the clock adjustment scheme in the present application, it can also generate an output signal with a certain time interval with the signal to be tested, or it can also adjust the phase of the clock signal used to sample the signal to be tested according to a certain period, so that the time difference between the input signal to be tested and the output signal shows a certain specific change law, so as to realize the pulse coding function, etc. It should be understood that all technical solutions that use the clock adjustment scheme provided by the present application to achieve precise sampling are within the scope of protection of the present application, and the present application will not list them one by one.

[0098] According to the clock adjustment scheme provided in the embodiment of the present application, the present application also provides a laser radar, which includes a first circuit and a second circuit located in different clock domains, and the second circuit includes the clock adjustment device introduced in the above content. Among them, the first circuit is used to send a signal to be tested to the second circuit, and the second circuit can use the target clock signal adjusted by the clock adjustment device to sample the signal to be tested, and perform corresponding control operations according to the output signal obtained by sampling the signal to be tested.

[0099] According to the clock adjustment scheme provided in the embodiment of the present application, the present application also provides a terminal device, including the laser radar introduced in the above content. Among them, examples of some terminal devices include but are not limited to: smart home devices (such as TVs, sweeping robots, smart desk lamps, audio systems, smart lighting systems, electrical control systems, home background music, home theater systems, intercom systems, video surveillance, etc.), smart transportation equipment (such as cars, ships, drones, trains, trucks, trucks, etc.), smart manufacturing equipment (such as robots, industrial equipment, smart logistics, smart factories, etc.), smart terminals (mobile phones, computers, tablets, PDAs, desktops, headphones, audio, wearable devices, vehicle-mounted devices, virtual reality devices, augmented reality devices, etc.).

[0100] The terms "component", "module", "system", etc. used in this specification are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program and / or a computer. By way of illustration, both applications running on a computing device and a computing device can be components. One or more components may reside in a process and / or an execution thread, and a component may be located on a computer and / or distributed between two or more computers. In addition, these components may be executed from various computer-readable media having various data structures stored thereon. Components may, for example, communicate through local and / or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system and / or a network, such as the Internet interacting with other systems through signals).

[0101] Those of ordinary skill in the art will appreciate that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0102] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0103] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0104] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0105] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0106] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.

[0107] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A clock adjustment device, characterized in that: include: A clock generating unit, configured to generate a first clock signal; a phase adjustment unit, configured to perform phase adjustment on the first clock signal from the clock generating unit to obtain N second clock signals, wherein the N second clock signals correspond to N phases, and a phase range of a phase interval constituted by the N phases is not less than a phase range of a clock cycle of the first clock signal, and N is a positive integer greater than or equal to 2; A phase control unit, configured to obtain the N second clock signals from the phase adjustment unit, and send a first phase adjustment indication to the phase adjustment unit according to a preset rule and a sampling result of the N second clock signals sampling the signal to be measured; the first phase adjustment indication is used to indicate a target phase; The phase adjustment unit is further used to perform phase adjustment on the first clock signal from the clock generation unit according to the first phase adjustment instruction to obtain a third clock signal, wherein the phase of the third clock signal is the target phase.

2. The clock adjustment device according to claim 1, characterized in that: The phase control unit includes a trigger and a sampling control unit, wherein the first input end of the trigger is used to receive the signal to be measured, the second input end of the trigger is connected to the output end of the phase adjustment unit, the output end of the trigger is connected to the input end of the sampling control unit, and the output end of the sampling control unit is connected to the input end of the phase adjustment unit; The trigger is used to sample the signal to be tested using each of the second clock signals output by the phase adjustment unit to obtain an output signal corresponding to each of the second clock signals; The sampling control unit is used to send the first phase adjustment instruction to the phase adjustment unit according to the preset rule and the output signal corresponding to the N second clock signals.

3. The clock adjustment device according to claim 2, characterized in that: The preset rule is related to the sampling result of correct sampling; The sampling control unit comprises: a sampling unit connected to the output end of the trigger, and used for collecting M output signals obtained by the trigger by sampling the signal to be tested M times under each second clock signal, where M is a positive integer greater than or equal to 2; An evaluation control unit is connected to the phase adjustment unit and is used to send the first phase adjustment indication to the phase adjustment unit based on the preset rule and according to the reference signal and the M output signals corresponding to each of the second clock signals from the sampling unit, wherein the reference signal is used to indicate the output signal of the correct sampling.

4. The clock adjustment device according to claim 3, characterized in that: The evaluation control unit is also used for: An enable signal is sent to the sampling unit, where the enable signal is used to instruct the sampling unit to collect the output signal of the trigger within a valid period of an indication message.

5. The clock adjustment device according to claim 3 or 4, characterized in that: The N second clock signals are obtained by N-1 phase adjustments. In any phase adjustment: The evaluation control unit is further configured to send a second phase adjustment instruction to the phase adjustment unit after determining that the sampling unit obtains the M output signals corresponding to the current second clock signal; The phase adjustment unit is further used to perform phase adjustment on the first clock signal from the clock generating unit according to the second phase adjustment indication to obtain a next second clock signal, wherein the phase of the next second clock signal is a phase that has not been adjusted among the N phases.

6. The clock adjustment device according to claim 5, characterized in that: In the order of phase from large to small or from small to large, any two adjacent phases among the N phases have the same phase interval.

7. The clock adjustment device according to any one of claims 3 to 6, characterized in that: The preset rule is used to indicate that the target phase is obtained based on a phase interval formed by continuous adjacent phases whose sampling index values ​​are not less than the index threshold, the sampling index value of any phase is positively correlated with the number of output signals that are identical to the reference signal in the M output signals corresponding to the phase, and the adjacent phases refer to adjacent phases among the N phases in order from large to small or from small to large.

8. The clock adjustment device according to any one of claims 1 to 7, characterized in that: After the phase adjustment unit obtains the third clock signal, the phase control unit is further used for: The target phase is re-determined.

9. The clock adjustment device according to any one of claims 1 to 8, characterized in that: The phase adjustment unit is a phase-locked loop, or includes N delay links, and any two delay links of the N delay links include different numbers of delay units.

10. The clock adjustment device according to any one of claims 1 to 9, characterized in that: The third clock signal is used for the transmitting module to sample the transmitting control signal of the programmable logic circuit.

11. The clock adjustment device according to any one of claims 1 to 9, characterized in that: The third clock signal is used by the programmable logic circuit to sample the target echo signal of the receiving module.

12. The clock adjustment device according to any one of claims 1 to 11, characterized in that: The signal to be measured includes a target echo signal and / or a transmission control signal.

13. A laser radar, characterized in that: comprising a first circuit and a second circuit located in different clock domains, the second circuit comprising a clock adjustment device as claimed in any one of claims 1 to 12; The first circuit is used to send a signal to be tested to the second circuit.

14. A terminal device, characterized in that: Comprising a laser radar as described in claim 13.

Citation Information

Patent Citations

  • Clock adjustment method and controller

    CN106708167A