Time synchronization error measurement method and device, computer equipment and storage medium

By sending interrupt trigger signals and reading timer register values ​​in the automotive domain controller multi-chip scenario, the system time-consuming error is calculated, which solves the problem of difficulty in measuring multi-chip time synchronization errors in the existing technology and ensures the accuracy of vehicle assisted driving. Security.

CN118690697APending Publication Date: 2024-09-24FOSS (HANGZHOU) INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410523398.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-28
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

Existing time synchronization error measurement methods are not suitable for automotive domain controller multi-chip test scenarios, making it difficult to accurately measure the time synchronization error between chips and affecting the safety of vehicle assisted driving.

Method used

By sending an interrupt trigger signal to trigger the external interrupt of the chip under test, and reading its timer register value, determine the target test data, calculate the system time-consuming error and chip time synchronization error, and consider the generation of the signal generator and chip during the working process. system time-consuming error to achieve accurate time synchronization error measurement.

Benefits of technology

In the multi-chip scenario of the automotive domain controller, accurate chip time synchronization error measurement is achieved, ensuring the safety of vehicle assisted driving.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690697A
    Figure CN118690697A
Patent Text Reader

Abstract

The invention relates to a time synchronization error measurement method and device, computer equipment and a storage medium. The method comprises the following steps: sending an interrupt trigger signal to trigger external interrupt of a tested chip, and reading a register value of a timer of the tested chip; determining target test data of the tested chip according to the register value; determining a system time consumption error of the tested chip in the measurement process according to the establishment time of the interrupt trigger signal, the interrupt trigger time of the tested chip and the timer reading time; and determining a chip time synchronization error of the tested chip according to the system time consumption error and the target test data. According to the scheme, the accurate chip time synchronization error can be obtained under the test scene of the multiple chips of the automobile domain controller, and the safety of auxiliary driving of the vehicle is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automation technology, and in particular to a time synchronization error measurement method, device, computer equipment and storage medium. Background Art

[0002] With the development of automotive electronic and electrical architecture, vehicle controllers have gradually evolved from distributed architectures to domain-centralized architectures. Since the domain-centralized architecture uses domain controllers to replace the original roles of multiple ECUs (electronic Control Units), it requires powerful processing capabilities. The domain-centralized architecture usually requires multiple SOCs (System on Chips) and MCUs (Microcontroller Units, MCUs). Due to business needs, time synchronization is used between each chip to ensure that the data processed by multiple chips can eventually be smoothly integrated. Large time errors between chips will reduce the accuracy of the fusion function, thereby affecting the effectiveness of the vehicle control algorithm, and in severe cases, affecting the safety of vehicle assisted driving.

[0003] The current time synchronization error measurement methods mainly include PPS (Pulse Per Second) measurement method, synchronization message method and multi-link calculation method. Among them, the PPS measurement method requires the device under test to output a PPS pulse signal at full seconds. After capturing each pulse signal with an oscilloscope, the time synchronization error between different devices can be obtained by comparing the rising edge phase difference. The synchronization message method is a pure software method that uses network time synchronization messages for calculation and comparison to finally obtain the time synchronization error. The multi-link calculation method is to build multiple time synchronization links between two devices, and summarize and process multiple time synchronization results through algorithms to finally obtain the time synchronization error between devices. However, the above three time synchronization error measurement methods are not suitable for the test scenario of multi-chips of automotive domain controllers. Therefore, how to obtain accurate chip time synchronization errors in the test scenario of multi-chips of automotive domain controllers to ensure the safety of vehicle assisted driving is a problem that needs to be solved. Summary of the invention

[0004] Based on this, it is necessary to provide a time synchronization error measurement method, device, computer equipment and storage medium that can obtain accurate chip time synchronization error in the test scenario of multiple chips of a vehicle domain controller to ensure the safety of vehicle assisted driving in response to the above technical problems.

[0005] In a first aspect, the present application provides a time synchronization error measurement method, the method comprising:

[0006] Sending an interrupt trigger signal to trigger an external interrupt of the chip under test, and reading a register value of a timer of the chip under test;

[0007] Determine target test data of the chip under test according to the register value;

[0008] Determine the system time-consuming error of the chip under test during the measurement process according to the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test and the timer reading time;

[0009] The chip time synchronization error of the chip under test is determined according to the system time consumption error and the target test data.

[0010] In one of the embodiments, determining the system time error of the chip under test during the measurement process according to the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test and the timer reading time includes:

[0011] Determining the interrupt trigger time of the chip under test according to the chip main frequency and the interrupt trigger period of the chip under test;

[0012] Determining the timer reading time of the chip under test according to the chip main frequency of the chip under test and the number of chip clock cycles required for timer reading;

[0013] The sum of the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test and the timer reading time is taken as the system time-consuming error of the chip under test during the measurement process.

[0014] In one embodiment, determining the chip time synchronization error of the chip under test according to the system time error and the target test data includes:

[0015] Determine the target time synchronization error of the chip under test according to the system time-consuming error and the target test data;

[0016] The average time synchronization error of the chip under test in the chip test cycle is determined according to the target time synchronization error and the historical time synchronization error, and the average time synchronization error is used as the chip time synchronization error of the chip under test.

[0017] In one embodiment, determining the target time synchronization error of the chip under test according to the system time error and the target test data includes:

[0018] Determining a test data increment according to the target test data and a time conversion coefficient;

[0019] Determine chip test data according to the target test data and the test data increment;

[0020] Taking the difference between the chip test data and the system time-consuming error as the target test time of the chip under test;

[0021] A target time synchronization error of the chip under test is determined according to the target test time.

[0022] In one embodiment, determining target test data of the chip under test according to the register value includes:

[0023] Determine candidate test data of the chip under test according to the register value;

[0024] The average value of the candidate test data and the historical test data acquired during the chip test cycle is used as the target test data of the chip under test.

[0025] In one of the embodiments, the time synchronization error measurement method further includes:

[0026] Determine the external interrupt port of the chip under test;

[0027] The external interrupt port is configured as a high priority external interrupt mode, and an interrupt service function is configured for the external interrupt port.

[0028] In one embodiment, sending an interrupt trigger signal to trigger an external interrupt of a chip under test, and reading a register value of a timer of the chip under test, includes:

[0029] Sending an interrupt trigger signal to the chip under test based on an external interrupt port of the chip under test to trigger an external interrupt of the chip under test;

[0030] When the external interrupt of the chip under test is triggered, the register value of the timer of the chip under test is read from the interrupt service function.

[0031] In a second aspect, the present application further provides a time synchronization error measurement device, the device comprising:

[0032] A register value determination module, used for sending an interrupt trigger signal to trigger an external interrupt of the chip under test, and reading a register value of a timer of the chip under test;

[0033] A target test data determination module, used to determine the target test data of the chip under test according to the register value;

[0034] A system time-consuming error determination module, used to determine the system time-consuming error of the chip under test during the measurement process according to the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test and the timer reading time;

[0035] A time synchronization error determination module is used to determine the chip time synchronization error of the chip under test according to the system time consumption error and the target test data.

[0036] In a third aspect, the present application further provides a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program:

[0037] Sending an interrupt trigger signal to trigger an external interrupt of the chip under test, and reading a register value of a timer of the chip under test;

[0038] Determine target test data of the chip under test according to the register value;

[0039] Determine the system time-consuming error of the chip under test during the measurement process according to the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test and the timer reading time;

[0040] The chip time synchronization error of the chip under test is determined according to the system time consumption error and the target test data.

[0041] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0042] Sending an interrupt trigger signal to trigger an external interrupt of the chip under test, and reading a register value of a timer of the chip under test;

[0043] Determine target test data of the chip under test according to the register value;

[0044] Determine the system time-consuming error of the chip under test during the measurement process according to the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test and the timer reading time;

[0045] The chip time synchronization error of the chip under test is determined according to the system time consumption error and the target test data.

[0046] The above-mentioned time synchronization error measurement method, device, computer equipment and storage medium send an interrupt trigger signal to trigger the external interrupt of the chip under test, and read the register value of the timer of the chip under test; determine the target test data of the chip under test according to the register value; determine the system time error of the chip under test during the measurement process according to the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test and the timer reading time; determine the chip time synchronization error of the chip under test according to the system time error and the target test data. It solves the problem that it is difficult to accurately measure the time synchronization error between multiple chips in the scenario where multiple SOCs and MCUs are set in the vehicle controller, and then it is difficult to ensure that the data processed by multiple chips can be accurately integrated, which affects the safety of vehicle assisted driving. In the above scheme, when measuring the time synchronization error of the chip under test, the target test data of the chip under test is determined by the register value when the chip under test executes an external interrupt. The target test data can reflect the response time of the chip under test to the external interrupt instruction. At the same time, when calculating the chip time synchronization error of the chip under test, the influence of the system timing error generated by the signal generator and the chip under test during the working process on the chip time synchronization error measurement result is taken into account, thereby achieving the effect of obtaining accurate chip time synchronization error in the test scenario of multiple chips of the automotive domain controller, thereby ensuring the safety of vehicle assisted driving. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 is an application environment diagram of a time synchronization error measurement method in an embodiment;

[0048] Figure 2 A schematic diagram of a flow chart of a method for measuring a time synchronization error in an embodiment;

[0049] Figure 3 is a flow chart of a method for measuring a time synchronization error in another embodiment;

[0050] Figure 4 is a flow chart of a method for measuring a time synchronization error in another embodiment;

[0051] Figure 5 An exemplary diagram of a time synchronization error measurement system in one embodiment;

[0052] Figure 6 is a structural block diagram of a time synchronization error measurement device in an embodiment;

[0053] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0055] The method for determining the radar elevation angle provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Figure 1 A side view of a vehicle 10 is shown, the vehicle 10 being disposed on a travel surface 70 (e.g., a paved road surface) and capable of traversing the travel surface 70. The vehicle 10 may include a vehicle onboard navigation system 24, a computer-readable storage device or medium (memory) 23 storing a digitized road map 25, a spatial monitoring system 100, a vehicle controller 50, a global positioning system (GPS) sensor 52, and a human / machine interface (HMI) device 60. In another embodiment, the vehicle 10 further includes an autonomous controller 65 and a telematics controller 75. Specifically, the vehicle 10 includes, but is not limited to, commercial vehicles, industrial vehicles, agricultural vehicles, passenger vehicles, airplanes, ships, trains, all-terrain vehicles, personal mobile devices, robots, and similar forms of mobile platforms for achieving the purposes of the present application.

[0056] In one embodiment, the spatial monitoring system 100 includes: one or more spatial sensors and systems configured to monitor the visible area 32 in front of the vehicle 10; and a spatial monitoring controller 110. The spatial sensors configured to monitor the visible area 32 in front of the vehicle 10 include, for example, a laser radar sensor 34, a radar sensor 36, a digital camera 38, and the like. Each spatial sensor is configured to be mounted on the vehicle 10 to monitor all or part of the visible area 32 for detecting approaching remote objects, such as road features, lane markings, buildings, pedestrians, road signs, traffic control lights and signs, other vehicles, and geographic features near the vehicle 10. The spatial monitoring controller 110 generates a digital representation of the visible area 32 based on data input from the spatial sensors. The spatial monitoring controller 110 can evaluate the input from the spatial sensors to determine the linear range, relative speed, and trajectory of the vehicle 10 based on each approaching remote object. The spatial sensors can be set at various locations on the vehicle 10, including the front corners, rear corners, rear sides, and mid-sides. In one embodiment, the spatial sensors may include, but are not limited to, front radar sensors and cameras. The spatial sensors are arranged in such a way that the spatial monitoring controller 110 can monitor the flow of traffic, including approaching vehicles, intersections, lane markings, and other objects surrounding the vehicle 10. A lane marking detection processor (not shown) can estimate the road based on the data generated by the spatial monitoring controller 110. The spatial sensors of the vehicle spatial monitoring system 100 can include object location sensing devices, which include range sensors, such as FMCW (frequency modulated continuous wave) radars, pulse and FSK (frequency shift keying) radars, and Lidar (light detection and ranging) devices and ultrasonic devices, which rely on effects such as Doppler effect measurements to locate objects ahead. Object location devices can include charge coupled devices (CCD) or complementary metal oxide semiconductor (CMOS) video image sensors and other cameras / video image processors that use digital photography methods to 'see' objects ahead (including one or more vehicles).

[0057] The laser radar sensor 34 measures the range or distance to an object based on pulsed and reflected laser beams. The radar sensor 36 determines the range, angle and / or speed of an object based on radio waves. The camera 38 includes an image sensor, a lens and a camera controller. The image sensor is an electro-optical device that converts an optical image into an electronic signal using a multi-dimensional array of light-sensitive sensing elements. The camera controller is operatively connected to the image sensor to monitor the visible area 32. The camera controller is configured to control the image sensor to capture an image of the field of view (FOV) associated with the visible area 32 projected onto the image sensor via the lens. The optical lens may include a pinhole lens, a fisheye lens, a stereo lens, a telescopic lens, etc. The camera 38 periodically captures image files associated with the visible area 32 via the image sensor at a desired rate (e.g., 30 image files per second). Each image file includes a 2D or 3D pixelated representation of all or part of the visible area 32 captured at the native resolution of the camera 38. In one embodiment, the image file is in the form of a 24-bit image, including spectral values ​​and depth values ​​of RGB (red, green, blue) visible light representing the visible area 32. Other embodiments of the image file may include a 2D or 3D image at a certain resolution level, depicting a spectrum of black and white or grayscale visible light of the visible area 32, an infrared spectrum of the visible area 32, or other images, which are not specifically limited by the present application. In one embodiment, images of multiple image files can be evaluated for parameters related to brightness and / or luminance. Optionally, the image can be evaluated based on RGB color components, brightness, texture, contour, or a combination thereof. The image sensor communicates with an encoder, which performs digital signal processing (DSP) for each image file. The image sensor of the camera 38 can be set to capture images at a nominal standard definition resolution (e.g., 640x480 pixels). Optionally, the image sensor of the camera 38 can be set to capture images at a nominal high definition resolution (e.g., 1440x1024 pixels) or at another suitable resolution. The image sensor of the camera 38 can capture still images or optionally digital video images at a predetermined image capture rate. In one embodiment, the image file is sent to the camera controller as an encoded data file, which is stored in a non-transitory digital data storage medium for on-board or off-board analysis.

[0058] The camera 38 is disposed and positioned on the vehicle 10 in a position capable of capturing an image of the visible area 32, wherein the visible area 32 at least partially includes a portion of the travel surface 70 in front of the vehicle 10 and including the trajectory of the vehicle 10. The visible area 32 may also include the surrounding environment, for example, including vehicle traffic, roadside objects, pedestrians and other features, the sky, the horizon, the travel lane, and vehicles approaching in front of the vehicle 10. Other cameras (not shown) may also be included, for example, including a second camera disposed on a rear portion or a side portion of the vehicle 10 for monitoring the rear of the vehicle 10 and either the right side or the left side of the vehicle 10.

[0059] The autonomous controller 65 is used to implement autonomous driving or advanced driver assistance system (ADAS) vehicle functionality. Such functionality may include a vehicle onboard control system capable of providing a certain level of driving automation. The terms 'driver' and 'operator' describe a person responsible for directing the operation of the vehicle 10, and the operator may participate in controlling one or more vehicle functions, or directing an autonomous vehicle. Driving automation may include dynamic driving and vehicle operation. Driving automation may include a certain level of automatic control or intervention involving a single vehicle function (e.g., steering, acceleration, and / or braking), wherein the driver may continue to control the vehicle 10 as a whole. Driving automation may include a certain level of automatic control or intervention involving simultaneous control of multiple vehicle functions (e.g., steering, acceleration, and / or braking), wherein the driver may continue to control the vehicle 10 as a whole. Driving automation may include simultaneous automatic control of vehicle driving functions (including steering, acceleration, and braking), wherein the driver may give up control of the vehicle for a period of time during the journey. Driving automation may include simultaneous automatic control of vehicle driving functions (including steering, acceleration, and braking), wherein the driver may give up control of the vehicle 10 throughout the journey. Driving automation includes hardware and controllers configured to monitor the spatial environment in various driving modes for performing various driving tasks during dynamic vehicle operation. Driving automation includes, but is not limited to, cruise control, adaptive cruise control, lane change warning, intervention and control, automatic parking, acceleration, braking, and the like. Autonomous vehicle functions include, but are not limited to, adaptive cruise control (ACC) operations, lane guidance and lane keeping operations, lane change operations, steering assist operations, object avoidance operations, parking assist operations, vehicle braking operations, vehicle speed and acceleration operations, vehicle lateral movement operations, for example, as lane guidance, lane keeping and lane change operations, and the like. Based on this, braking commands can be generated by the autonomous controller 65 independently of the actions of the vehicle operator and in response to autonomous control functions.

[0060] The passenger compartment of the vehicle 10 may include operator controls, including but not limited to a steering wheel, an accelerator pedal, a brake pedal, and an operator input device, which is an element of the HMI device 60. The vehicle operator can interact with the operating vehicle 10 based on the operator controls and direct the operation of the vehicle 10 for providing passenger transportation. In some embodiments of the vehicle 10, the operator controls, including the steering wheel, accelerator pedal, brake pedal, transmission range selector, and similar other control devices, may be omitted.

[0061] The HMI device 60 provides human-machine interaction for guiding the operation functions of the infotainment system, the global positioning system (GPS) sensor 52, the navigation system 24, and the like, and the HMI device 60 may include a controller. The HMI device 60 monitors operator requests and provides information to the operator, including the status, service, and maintenance information of the vehicle system. The HMI device 60 may communicate with multiple operator interface devices and / or control the operation of multiple operator interface devices, wherein the operator interface device is capable of transmitting messages associated with the operation in the automatic vehicle control system. The HMI device 60 may also communicate with one or more devices, which monitor biometric data associated with the vehicle operator, for example, including eye sight position, posture, and head position tracking, etc. For simplicity of description, the HMI device 60 is described as a single device, but in an embodiment of the system of the present application, it may be set as multiple controllers and associated sensing devices. The operator interface device may include a device capable of transmitting a message urging the operator to act, and may include an electronic visual display module, for example, a liquid crystal display (LCD) device, a head-up display (HUD), an audio feedback device, a wearable device, and a tactile seat. Operator interface devices capable of prompting operator actions may be controlled by or through the HMI device 60. The HUD may project information reflected onto the inside side of the vehicle's windshield in the operator's field of view, including conveying a confidence level associated with operating one of the automated vehicle control systems. The HUD may also provide augmented reality information, such as lane position, vehicle path, direction and / or navigation information, and the like.

[0062] The onboard navigation system 24 provides navigation support and information to the vehicle operator based on the digitized road map 25. The autonomous controller 65 controls autonomous vehicle operations or ADAS vehicle functions based on the digitized road map 25.

[0063] The vehicle 10 may include a telematics controller 75 including a wireless telematics communication system capable of off-vehicle communications, including communications with a communication network 90 having wireless and wired communication capabilities. The telematics controller 75 is capable of off-vehicle communications, including short-range vehicle-to-vehicle (V2V) communications and / or vehicle-to-external (V2x) communications, which may include communications with infrastructure monitors (e.g., traffic cameras). Alternatively or additionally, the telematics controller 75 has a wireless telematics communication system capable of short-range wireless communications with a handheld device (e.g., a cellular phone, a satellite phone, or another telephone device). In one embodiment, the handheld device includes a software application including a wireless protocol for communicating with the telematics controller 75, and the handheld device can perform off-vehicle communications, including communications with an off-board server 95 based on the communication network 90. ​​Alternatively or additionally, the telematics controller 75 performs off-vehicle communications directly by communicating with the off-board server 95 based on the communication network 90.

[0064] The term "controller" and related terms (e.g., microcontroller, control unit, processor, and similar terms) refer to one or various combinations of: application specific integrated circuit(s) (ASICs), field programmable gate arrays (FPGAs), electronic circuit(s), central processing unit(s), such as microprocessor(s), and associated non-transitory memory components (indicated by memory 23) in the form of memory and storage devices (read-only, programmable read-only, random access, hard drive, etc.). The non-transitory memory components are capable of storing machine-readable instructions in the form of one or more software or firmware programs or routines, combinational logic circuit(s), input / output circuit(s) and devices, signal conditioning and buffering circuit systems, and other components accessible by one or more processors for implementing the corresponding functions. The input / output circuit(s) and devices include analog / digital converters and related devices that monitor inputs from sensors, which can monitor such inputs at a preset sampling frequency or in response to a triggering event. Software, firmware, programs, instructions, control routines, code, algorithms, and similar terms refer to controller executable instruction sets, including calibration and lookup tables. Each controller executes (multiple) control routines to provide corresponding functions. Routines can be executed at regular intervals, for example, once every 100 microseconds during ongoing operation. Alternatively, routines can be executed in response to triggering events. Communication between controllers, actuators and / or sensors can be implemented using direct wired point-to-point links, networked communication bus links, wireless links or other suitable communication links. Communication includes corresponding exchanged data signals, for example, including electrical signals based on conductive media, electromagnetic signals based on air, optical signals based on optical waveguides, etc. The data signal may include discrete, analog or digitized analog signals, which represent inputs from sensors, actuator commands, and communications between controllers. The term "signal" refers to a physically identifiable indicator of information transmission, and can be a corresponding waveform (e.g., electrical, optical, magnetic, mechanical or electromagnetic), for example, DC, AC, sine wave, triangle wave, square wave, vibration, etc., which can be transmitted through a medium. Parameters are defined as measurable quantities that represent physical properties of a device or other element that can be identified using one or more sensors and / or physical models. A parameter can have discrete values, such as "1" or "0", or be infinitely variable in value.

[0065] The terminal vehicle can communicate with the server through the network. The data storage system can store the data that the server needs to process. The data storage system can be integrated on the server, or it can be placed on the cloud or other network servers. The terminal vehicle can send an interrupt trigger signal to trigger the external interrupt of the chip under test, and read the register value of the timer of the chip under test; determine the target test data of the chip under test according to the register value; determine the system time error of the chip under test during the measurement process according to the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test, and the timer reading time; determine the chip time synchronization error of the chip under test according to the system time error and the target test data. In other embodiments, the terminal vehicle can also send a time synchronization error measurement instruction to the server, and the server executes the above-mentioned sending of the interrupt trigger signal to trigger the external interrupt of the chip under test, and read the register value of the timer of the chip under test; determine the target test data of the chip under test according to the register value; determine the system time error of the chip under test during the measurement process according to the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test, and the timer reading time; determine the chip time synchronization error of the chip under test according to the system time error and the target test data.

[0066] In one embodiment, Figure 2 As shown, a time synchronization error measurement method is provided. This embodiment uses the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0067] S210 , sending an interrupt trigger signal to trigger an external interrupt of the chip under test, and reading a register value of a timer of the chip under test.

[0068] The chip under test refers to the chip whose time synchronization error needs to be measured, such as the chip in the vehicle controller, and there are at least two chips under test. The register value of the timer of the chip under test is the system time when the chip under test executes the external interrupt instruction. The interrupt trigger signal is a periodic signal. This triggering method requires that the input signal level is a specific level to trigger the interrupt request signal, and the specific level can be a high level.

[0069] Specifically, an interrupt trigger signal is sent to the chip under test to synchronously trigger the external interrupt of each chip under test, and when the external interrupt of the chip under test is triggered, the register value of the timer of each chip under test is read.

[0070] S220 , determining target test data of the chip under test according to the register value.

[0071] Among them, the target test data is time data.

[0072] Specifically, the register value may be directly used as the target test data of the chip under test, or the register value may be brought into a preset test data calculation function, and the target test data of the chip under test may be determined according to the calculation result of the test data calculation function.

[0073] S230 , determining a system time-consuming error of the chip under test during the measurement process according to the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test, and the timer reading time.

[0074] Among them, the establishment time of the interrupt trigger signal, that is, the rise time of the signal generator that sends the interrupt trigger signal to establish a high level, the interrupt trigger time of the chip under test and the timer reading time can be obtained by referring to the chip manual. The timer reading time is the time required for the chip to read the timer that maintains the system time, and the interrupt trigger time is the time required for the chip to trigger an interrupt. The interrupt trigger time of the chip under test refers to how many clock cycles it takes for the chip under test to trigger an external interrupt. How long is one clock cycle of the chip under test can be calculated by the main frequency of the chip under test. Therefore, the time required for the chip under test to trigger an external interrupt can be calculated by the interrupt trigger time and the main frequency of the chip under test.

[0075] Specifically, the sum of the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test and the timer reading time is taken as the system time-consuming error of the chip under test during the measurement process.

[0076] Exemplarily, the calculation formula of the system time-consuming error of the chip under test during the measurement process is shown in formula (1):

[0077] t delay =t record +t int +t est (1)

[0078] Among them, t delay is the system time error of the chip under test during the measurement process; t record Read the time for the timer of the chip under test; t int is the interrupt trigger time of the chip under test; t est It is the setup time of the interrupt trigger signal.

[0079] S240: Determine a chip time synchronization error of the chip under test according to the system time-consuming error and the target test data.

[0080] The chip time synchronization error includes the time synchronization error between every two chips under test.

[0081] Specifically, the recording timestamp of the target test data is determined according to the system timing error and the target test data. The recording timestamp of the target test data may be the difference between the target test data and the system timing error. The chip time synchronization error of the chip under test is determined according to the recording timestamp of the target test data.

[0082] In the above-mentioned time synchronization error measurement method, an interrupt trigger signal is sent to trigger the external interrupt of the chip under test, and the register value of the timer of the chip under test is read; the target test data of the chip under test is determined according to the register value; the system time error of the chip under test during the measurement process is determined according to the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test and the timer reading time; the chip time synchronization error of the chip under test is determined according to the system time error and the target test data. This solves the problem that it is difficult to accurately measure the time synchronization error between multiple chips in the scenario where multiple SOCs and MCUs are set in the vehicle controller, and it is difficult to ensure that the data processed by multiple chips can be accurately integrated, which affects the safety of vehicle assisted driving. In the above scheme, when measuring the time synchronization error of the chip under test, the target test data of the chip under test is determined by the register value when the chip under test executes an external interrupt. The target test data can reflect the response time of the chip under test to the external interrupt instruction. At the same time, when calculating the chip time synchronization error of the chip under test, the influence of the system timing error generated by the signal generator and the chip under test during the working process on the chip time synchronization error measurement result is taken into account, thereby achieving the effect of obtaining accurate chip time synchronization error in the test scenario of multiple chips of the automotive domain controller, thereby ensuring the safety of vehicle assisted driving.

[0083] In one embodiment, Figure 3 As shown, the system time-consuming error of the chip under test during the measurement process is determined according to the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test, and the timer reading time, including:

[0084] S310: Determine the interrupt trigger time of the chip under test according to the chip main frequency and the interrupt trigger period of the chip under test.

[0085] The chip main frequency of the chip under test and the interrupt trigger period of the chip can be determined by referring to the chip manual of the chip under test.

[0086] Specifically, the calculation formula for the interrupt trigger time of the chip under test is shown in formula (2):

[0087] t int =α*freq*period int (2)

[0089] Among them, t intis the interrupt trigger time of the chip under test, and freq is the main frequency of the chip under test;

[0090] period int is the interrupt trigger period of the chip under test; α is a coefficient used to convert the chip main frequency of the chip under test into period data.

[0091] S320: Determine the timer reading time of the chip under test according to the chip main frequency of the chip under test and the number of chip clock cycles required for the timer reading.

[0092] Specifically, the calculation formula for the timer reading time of the chip under test is shown in formula (3):

[0093] t record =α*freq*period reg (3)

[0094] Among them, t record Read the time for the timer of the chip under test; period reg The number of chip clock cycles required for the chip timer under test to read.

[0095] S330, taking the sum of the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test and the timer reading time as the system time-consuming error of the chip under test during the measurement process.

[0096] The above method determines the interrupt trigger time of the chip under test according to the chip main frequency and interrupt trigger period of the chip under test, and determines the timer reading time of the chip under test according to the chip main frequency and timer reading time of the chip under test, which can improve the accuracy of the interrupt trigger time and timer reading time of the chip under test, thereby improving the accuracy of the system timing error.

[0097] In one embodiment, Figure 4 As shown, the chip time synchronization error of the chip under test is determined according to the system time error and the target test data, including:

[0098] S410 , determining a target time synchronization error of the chip under test according to the system time-consuming error and target test data.

[0099] S420, determining a mean time synchronization error of the chip under test within a chip test cycle according to the target time synchronization error and the historical time synchronization error, and using the mean time synchronization error as the chip time synchronization error of the chip under test.

[0100] The chip test cycle may be set according to actual needs. For example, the chip test cycle may be the time required to measure the target time synchronization error of the chip under test one thousand times.

[0101] Specifically, read the historical time synchronization error within the chip test cycle corresponding to the target time synchronization error, determine the average time synchronization error of the chip under test within the chip test cycle based on the target time synchronization error and the historical time synchronization error, and use the average time synchronization error as the chip time synchronization error of the chip under test.

[0102] The above scheme uses the average time synchronization error of the chip under test during the chip test cycle as the chip time synchronization error of the chip under test, which can avoid the problem of low reliability of the chip time synchronization error obtained due to the instability of the test system, and improves the reliability of the chip time synchronization error.

[0103] In one embodiment, determining a target time synchronization error of a chip under test according to a system time-consuming error and target test data includes:

[0104] Determine the test data increment based on the target test data and the time conversion coefficient; determine the chip test data based on the target test data and the test data increment; use the difference between the chip test data and the system time error as the target test time of the chip under test; determine the target time synchronization error of the chip under test based on the target test time.

[0105] The time conversion factor refers to the time conversion factor between seconds and nanoseconds. The target test time of the chip under test is the recording timestamp of the target test data.

[0106] Exemplarily, the calculation formula for the chip test data of the chip under test identified as n is shown in formula (4):

[0107]

[0108] Where n≥2, and n is an integer; is the chip test data of the chip under test identified as n; T sec_n and T nsec_n is the target test data of the chip under test marked as n, T sec_n The unit of measurement is seconds, T nsec_n The unit of measurement is nanosecond; the time conversion factor is 1′000′000′000.

[0109] The target test time of the chip under test identified as n is shown in formula (5):

[0110]

[0111] Among them, T chip_n is the target test time of the chip under test marked as n; t delay_n is the system timing error of the chip under test marked as n.

[0112] Exemplarily, the calculation formula for the chip time synchronization error between the chip under test identified as 1 and the chip under test identified as 2 is shown in formula (6):

[0113] Δt 12 =T chip_1 -T chip_2 (6)

[0114] Among them, Δt 12 is the target time synchronization error between the chip under test marked as 1 and the chip under test marked as 2; T chip_1 is the target test time of the chip under test marked as 1; T chip_2 It is the target test time of the chip under test marked as 2.

[0115] The above scheme adjusts the target test data and determines the chip test data of the chip under test, which can improve the accuracy of the chip test data and thus improve the reliability of the target time synchronization error of the chip under test.

[0116] In one embodiment, determining target test data of the chip under test according to the register value includes:

[0117] Determine candidate test data of the chip under test according to the register value; and take the average value of the candidate test data and the historical test data obtained during the chip test cycle as the target test data of the chip under test.

[0118] It should be noted that when measuring the time synchronization error of the chip under test, the signal generator needs to send rising edges multiple times in a chip test cycle to trigger external interrupts of each chip, and each rising edge needs to be separated by a certain time to ensure that the chip under test has enough time to store and output the candidate test data. The average value of the candidate test data and the historical test data obtained in the chip test cycle is used as the target test data of the chip under test, and the chip under test can transmit the target test data through the serial port, CAN (Controller Area Network) bus or network.

[0119] The above scheme uses the average value of the candidate test data obtained during the chip test cycle as the target test data of the chip under test, which can improve the reliability of the target test data.

[0120] In one embodiment, the time synchronization error measurement method further includes: determining an external interrupt port of the chip under test; configuring the external interrupt port to a high priority external interrupt mode, and configuring an interrupt service function for the external interrupt port.

[0121] Specifically, a GPIO (General-purpose input / output) that can be derived is selected for each chip under test as the external interrupt port of each chip under test, and the external interrupt port is configured as a high-priority external interrupt mode, and a corresponding interrupt service function is edited for the external interrupt port of each chip under test.

[0122] It should be noted that the configuration of GPIO includes enabling the GPIO clock, configuring the IO (Input / Output) mode as input, and configuring a unified interrupt trigger mode for each chip, such as rising edge trigger. The interrupt service function is related to the chip under test. The main control chip inside the domain controller can be mainly divided into two categories, one is the MCU chip and the other is the SOC chip. Among them, the MCU chip usually runs a bare metal program or a real-time operating system (RTOS), and the normal implementation of the interrupt service function can ensure the real-time performance of the measurement. The SOC chip generally runs a time-sharing operating system, such as the Linux operating system. In the Linux operating system, interrupts are divided into hard interrupts and soft interrupts. Hard interrupts are generated by hardware and can directly interrupt the CPU (Central Processing Unit), with good real-time performance; soft interrupts must be scheduled by the operating system, with poor real-time performance. In order to ensure that as few errors as possible are introduced during the measurement process, the SOC chip needs to implement the interrupt service function in the Linux system kernel, that is, to implement hard interrupts. The priority of the interrupt service function should be as high as possible without affecting the chip time synchronization function. Before testing the time synchronization error of the chip under test, other unnecessary functions except the time synchronization function should be turned off to ensure that the external interrupt can be triggered at the first time.

[0123] The above solution configures the external interrupt port to a high priority external interrupt mode and configures an interrupt service function for the external interrupt port, which can ensure that the external interrupt is triggered at the first time and improve the accuracy of the target test data.

[0124] In one embodiment, sending an interrupt trigger signal to trigger an external interrupt of the chip under test and reading a register value of a timer of the chip under test includes:

[0125] An interrupt trigger signal is sent to the chip under test based on the external interrupt port of the chip under test to trigger the external interrupt of the chip under test; when the external interrupt of the chip under test is triggered, the register value of the timer of the chip under test is read from the interrupt service function.

[0126] The above scheme synchronously triggers the external interrupt of the chip under test and reads the register value of the timer of the chip under test from the interrupt service function, which can improve the efficiency of obtaining the register value.

[0127] Exemplarily, the above-mentioned time synchronization error measurement method can be performed as follows: Figure 5 The time synchronization error measurement system shown in the figure is implemented, wherein the time synchronization source device, i.e., the clock device, generally refers to a standard time reference, which can be used to calibrate the clocks of other devices or systems. Based on the above embodiment, the time synchronization error measurement method includes:

[0128] For each chip under test, a GPIO that can be brought out is selected as the external interrupt port of each chip under test, and the external interrupt port is configured as a high priority external interrupt mode, and a corresponding interrupt service function is edited for the external interrupt port of each chip under test.

[0129] When measuring the time synchronization error of the chip under test, a rising edge signal is sent out through the signal generator to synchronously trigger the external interrupt of each chip under test, and when the external interrupt of the chip under test is triggered, the register value of the timer of each chip under test is read. In a chip test cycle, the signal generator needs to send rising edges multiple times to trigger the external interrupt of each chip. Each rising edge needs to be separated by a certain time to ensure that the chip under test has enough time to store and output the candidate test data. The average value of the candidate test data and the historical test data obtained during the chip test cycle is used as the target test data of the chip under test. The chip under test can send the target test data to the data analysis equipment through the serial port, CAN bus or network.

[0130] Through data analysis equipment, the interrupt trigger time of the chip under test is determined according to the chip main frequency and interrupt trigger period of the chip under test; the timer reading time of the chip under test is determined according to the chip main frequency and timer reading time of the chip under test; the sum of the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test and the timer reading time is taken as the system time error of the chip under test during the measurement process.

[0131] Determine the test data increment based on the target test data and the time conversion coefficient; determine the chip test data based on the target test data and the test data increment; use the difference between the chip test data and the system time error as the target test time of the chip under test; determine the target time synchronization error of the chip under test based on the target test time. Read the historical time synchronization error within the chip test cycle corresponding to the target time synchronization error, determine the mean time synchronization error of the chip under test within the chip test cycle based on the target time synchronization error and the historical time synchronization error, and use the mean time synchronization error as the chip time synchronization error of the chip under test.

[0132] In the above-mentioned time synchronization error measurement method, an interrupt trigger signal is sent to trigger the external interrupt of the chip under test, and the register value of the timer of the chip under test is read; the target test data of the chip under test is determined according to the register value; the system time error of the chip under test during the measurement process is determined according to the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test and the timer reading time; the chip time synchronization error of the chip under test is determined according to the system time error and the target test data. This solves the problem that it is difficult to accurately measure the time synchronization error between multiple chips in the scenario where multiple SOCs and MCUs are set in the vehicle controller, and it is difficult to ensure that the data processed by multiple chips can be accurately integrated, which affects the safety of vehicle assisted driving. In the above scheme, when measuring the time synchronization error of the chip under test, the target test data of the chip under test is determined by the register value when the chip under test executes an external interrupt. The target test data can reflect the response time of the chip under test to the external interrupt instruction. At the same time, when calculating the chip time synchronization error of the chip under test, the influence of the system timing error generated by the signal generator and the chip under test during the working process on the chip time synchronization error measurement result is taken into account, thereby achieving the effect of obtaining accurate chip time synchronization error in the test scenario of multiple chips of the automotive domain controller, thereby ensuring the safety of vehicle assisted driving.

[0133] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0134] Based on the same inventive concept, the embodiment of the present application also provides a time synchronization error measurement device for implementing the time synchronization error measurement method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more time synchronization error measurement device embodiments provided below can refer to the limitations of the time synchronization error measurement method above, and will not be repeated here.

[0135] In one embodiment, Figure 6As shown, a time synchronization error measurement device is provided, including: a register value determination module 601, a target test data determination module 602, a system time consumption error determination module 603 and a time synchronization error determination module 604, wherein:

[0136] The register value determination module 601 is used to send an interrupt trigger signal to trigger an external interrupt of the chip under test, and read the register value of the timer of the chip under test;

[0137] A target test data determination module 602 is used to determine the target test data of the chip under test according to the register value;

[0138] The system time-consuming error determination module 603 is used to determine the system time-consuming error of the chip under test during the measurement process according to the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test and the timer reading time;

[0139] The time synchronization error determination module 604 is used to determine the chip time synchronization error of the chip under test according to the system time consumption error and the target test data.

[0140] Exemplarily, the system time-consuming error determination module 603 is specifically used for:

[0141] Determine the interrupt trigger time of the chip under test according to the chip main frequency and interrupt trigger cycle of the chip under test;

[0142] Determine the timer reading time of the chip under test according to the chip main frequency of the chip under test and the number of chip clock cycles required for the timer reading;

[0143] The sum of the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test and the timer reading time is taken as the system time error of the chip under test during the measurement process.

[0144] Exemplarily, the time synchronization error determination module 604 is specifically used for:

[0145] Determine the target time synchronization error of the chip under test according to the system time error and the target test data;

[0146] The average time synchronization error of the chip under test during the chip test cycle is determined according to the target time synchronization error and the historical time synchronization error, and the average time synchronization error is used as the chip time synchronization error of the chip under test.

[0147] Furthermore, the time synchronization error determination module 604 is further specifically configured to:

[0148] Determine the test data increment according to the target test data and the time conversion factor;

[0149] Determine chip test data according to target test data and test data increment;

[0150] The difference between the chip test data and the system time error is used as the target test time of the chip under test;

[0151] The target time synchronization error of the chip under test is determined according to the target test time.

[0152] Exemplarily, the target test data determination module 602 is specifically used for:

[0153] Determine candidate test data of the chip under test according to the register value;

[0154] The average of the candidate test data and the historical test data obtained during the chip test cycle is used as the target test data of the chip under test.

[0155] Exemplarily, the above-mentioned time synchronization error measurement device further includes:

[0156] An external interrupt port determination module is used to determine the external interrupt port of the chip under test;

[0157] The interrupt function configuration module is used to configure the external interrupt port to a high priority external interrupt mode and configure an interrupt service function for the external interrupt port.

[0158] Exemplarily, the register value determination module 601 is specifically used for:

[0159] Sending an interrupt trigger signal to the chip under test based on the external interrupt port of the chip under test to trigger the external interrupt of the chip under test;

[0160] When the external interrupt of the chip under test is triggered, the register value of the timer of the chip under test is read from the interrupt service function.

[0161] Each module in the above-mentioned time synchronization error measurement device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.

[0162] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a time synchronization error measurement method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0163] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0164] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0165] Step 1: Send an interrupt trigger signal to trigger an external interrupt of the chip under test, and read the register value of the timer of the chip under test;

[0166] Step 2: Determine the target test data of the chip under test according to the register value;

[0167] Step 3, determining the system time-consuming error of the chip under test during the measurement process according to the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test and the timer reading time;

[0168] Step 4: Determine the chip time synchronization error of the chip under test according to the system timing error and the target test data.

[0169] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0170] Step 1: Send an interrupt trigger signal to trigger an external interrupt of the chip under test, and read the register value of the timer of the chip under test;

[0171] Step 2: Determine the target test data of the chip under test according to the register value;

[0172] Step 3, determining the system time-consuming error of the chip under test during the measurement process according to the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test and the timer reading time;

[0173] Step 4: Determine the chip time synchronization error of the chip under test according to the system timing error and the target test data.

[0174] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0175] Step 1: Send an interrupt trigger signal to trigger an external interrupt of the chip under test, and read the register value of the timer of the chip under test;

[0176] Step 2: Determine the target test data of the chip under test according to the register value;

[0177] Step 3, determining the system time-consuming error of the chip under test during the measurement process according to the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test and the timer reading time;

[0178] Step 4: Determine the chip time synchronization error of the chip under test according to the system timing error and the target test data.

[0179] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0180] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0181] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0182] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A time synchronization error measurement method, characterized in that: include: Sending an interrupt trigger signal to trigger an external interrupt of the chip under test, and reading a register value of a timer of the chip under test; Determine target test data of the chip under test according to the register value; Determine the system time-consuming error of the chip under test during the measurement process according to the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test and the timer reading time; The chip time synchronization error of the chip under test is determined according to the system time consumption error and the target test data.

2. The method according to claim 1, characterized in that Determining a system time-consuming error of the chip under test during the measurement process according to the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test, and the timer reading time, including: Determining the interrupt trigger time of the chip under test according to the chip main frequency and the interrupt trigger period of the chip under test; Determining the timer reading time of the chip under test according to the chip main frequency of the chip under test and the number of chip clock cycles required for timer reading; The sum of the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test and the timer reading time is taken as the system time-consuming error of the chip under test during the measurement process.

3. The method according to claim 1, characterized in that Determining the chip time synchronization error of the chip under test according to the system time-consuming error and the target test data includes: Determine the target time synchronization error of the chip under test according to the system time-consuming error and the target test data; The average time synchronization error of the chip under test in the chip test cycle is determined according to the target time synchronization error and the historical time synchronization error, and the average time synchronization error is used as the chip time synchronization error of the chip under test.

4. The method according to claim 3, characterized in that Determining a target time synchronization error of the chip under test according to the system time-consuming error and the target test data includes: Determining a test data increment according to the target test data and a time conversion coefficient; Determine chip test data according to the target test data and the test data increment; Taking the difference between the chip test data and the system time-consuming error as the target test time of the chip under test; A target time synchronization error of the chip under test is determined according to the target test time.

5. The method according to claim 1, characterized in that Determining target test data of the chip under test according to the register value includes: Determine candidate test data of the chip under test according to the register value; The average value of the candidate test data and the historical test data acquired during the chip test cycle is used as the target test data of the chip under test.

6. The method according to claim 1, characterized in that Also includes: Determine the external interrupt port of the chip under test; The external interrupt port is configured as a high priority external interrupt mode, and an interrupt service function is configured for the external interrupt port.

7. The method according to claim 6, characterized in that Sending an interrupt trigger signal to trigger an external interrupt of the chip under test, and reading a register value of a timer of the chip under test, including: Sending an interrupt trigger signal to the chip under test based on an external interrupt port of the chip under test to trigger an external interrupt of the chip under test; When the external interrupt of the chip under test is triggered, the register value of the timer of the chip under test is read from the interrupt service function.

8. A time synchronization error measurement device, characterized in that: The time synchronization error measuring device comprises: A register value determination module, used for sending an interrupt trigger signal to trigger an external interrupt of the chip under test, and reading a register value of a timer of the chip under test; A target test data determination module, used to determine the target test data of the chip under test according to the register value; A system time-consuming error determination module, used to determine the system time-consuming error of the chip under test during the measurement process according to the establishment time of the interrupt trigger signal, the interrupt trigger time of the chip under test and the timer reading time; A time synchronization error determination module is used to determine the chip time synchronization error of the chip under test according to the system time consumption error and the target test data.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.