A timing monitoring method and related device
By obtaining event signals and identification signals in real-time tests of chips or equipment, and using preset frequency clock signals for time counting, the problem of insufficient timing monitoring accuracy in the prior art is solved, and high-precision timing monitoring and comparison of test results between different devices is realized.
Patent Information
- Application Number
- CN202411689361.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-11-25
AI Technical Summary
The time measurement accuracy of the prior art timing monitoring in real-time test of chips or devices is only milliseconds, and it is impossible to support comparison of test results and high-precision timing monitoring between different chips or devices.
By obtaining the trigger signal and identification signal of the start and terminate events, using the preset frequency clock signal for time counting, generating time counting values, and establishing a correspondence relationship after the event identification is resolved, achieving high-precision timing monitoring.
It realizes the unity of time measurement accuracy, supports comparison of test results between different chips or devices, and time counts are performed through physical rising edges, with higher accuracy than software time measurements, meeting the needs of high-precision timing monitoring.
Smart Images

Figure CN119165921B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer application technology, and in particular to a timing monitoring method and related devices. Background Art
[0002] When performing real-time testing on a chip or device, timing monitoring usually uses the chip or device's own clock system, and performs time sampling, time point positioning, and time measurement at the software level. The accuracy of this time measurement method depends on the accuracy of the chip or device's own clock system, and its time measurement accuracy is only at the millisecond level. The accuracy of the clock systems of different chips or devices is not the same, and it is impossible to compare test results between different chips or devices. At present, the external timing monitoring device for real-time testing of chips or devices needs to be synchronized with the chip or device to be tested, and the accuracy of time synchronization also depends on the accuracy of the chip or device's own clock system to be tested, resulting in the time measurement accuracy of the external timing monitoring device being only at the millisecond level, which makes it difficult to support the comparison of test results between different chips or devices and the need for high-precision timing monitoring. Summary of the invention
[0003] In view of the above problems, the present application provides a timing monitoring method and related devices to achieve the purpose of high-precision timing monitoring on the basis of unified time measurement accuracy. The specific scheme is as follows:
[0004] The first aspect of the present application provides a timing monitoring method, comprising:
[0005] Obtaining a start event trigger signal and a start event identification signal;
[0006] When the rising edge of the start event trigger signal is detected, time counting is started according to a clock signal of a preset frequency to generate a time count value;
[0007] Parsing the start event identification signal, and generating a corresponding relationship between the start event identification and the time count value when the start event identification is obtained;
[0008] Obtaining a termination event trigger signal and a termination event identification signal;
[0009] storing the current time count value when a rising edge of the termination event trigger signal is detected;
[0010] The termination event identification signal is parsed, and when the termination event identification is obtained through the analysis and the termination event identification is the start event identification, a timing monitoring result is obtained, wherein the timing monitoring result is the current time count value corresponding to the start event identification.
[0011] In a possible implementation, after parsing the start event identification signal, the method further includes:
[0012] If the start event identifier is not obtained, the time counting is stopped and the time count value is cleared to zero, the start event trigger signal and the start event identifier signal are reacquired, and then the time counting is started according to the clock signal of the preset frequency when the rising edge of the start event trigger signal is detected.
[0013] In a possible implementation, after parsing the termination event identification signal, the method further includes:
[0014] When the termination event identifier is not obtained, or when the termination event identifier is obtained through parsing and the termination event identifier is different from the start event identifier, the termination event trigger signal and the termination event identifier signal are reacquired, and then the process of storing the current time count value when a rising edge of the termination event trigger signal is detected is performed.
[0015] In a possible implementation, after the termination event identifier is obtained through parsing and the termination event identifier is used as the start event identifier, the method further includes:
[0016] Determining whether the time count value corresponding to the start event identifier increases;
[0017] If yes, stop the time counting and reset the time counting value to zero;
[0018] If not, the start event trigger signal and the start event identification signal are reacquired, and then the time counting is started according to the clock signal of the preset frequency when the rising edge of the start event trigger signal is detected.
[0019] In a possible implementation, after obtaining the timing monitoring result, the method further includes:
[0020] One or more of the time count values in the timing monitoring results whose duration is less than the first preset time length, the time count values whose duration is greater than the second preset time length, and the time count values whose value is less than zero are deleted; wherein the first preset time length is less than the second preset time length.
[0021] A second aspect of the present application provides a timing monitoring device, comprising:
[0022] An event trigger signal detection module is used to obtain a start event trigger signal and an end event trigger signal;
[0023] An event identification detection module is used to obtain a start event identification signal and parse the start event identification signal to obtain a start event identification, and is also used to obtain a termination event identification signal and parse the termination event identification signal, and when the termination event identification is obtained through parsing and the termination event identification is the start event identification, a timing monitoring result is obtained, wherein the timing monitoring result is a current time count value corresponding to the start event identification;
[0024] A counter module, used to start time counting according to a clock signal of a preset frequency to generate a time count value when a rising edge of the start event trigger signal is detected, and also used to generate a corresponding relationship between the start event identifier and the time count value when a start event identifier is obtained;
[0025] A time counting storage module, used for storing the current time counting value when a rising edge of the termination event trigger signal is detected;
[0026] A clock generation module is used to generate a clock signal of the preset frequency.
[0027] In one possible implementation, the counter module is also used to stop time counting and clear the time count value if the start event identifier is not obtained, and / or to determine whether the time count value corresponding to the start event identifier increases after the termination event identifier is parsed and obtained and the termination event identifier is the start event identifier. If so, stop time counting and clear the time count value.
[0028] In a possible implementation, the method further includes:
[0029] A time count proofreading module is used to delete one or more of the time count values in the timing monitoring results whose duration is less than a first preset duration, the time count values whose duration is greater than a second preset duration, and the time count values whose value is less than zero after the timing monitoring results are obtained; wherein the first preset duration is less than the second preset duration.
[0030] A third aspect of the present application provides a timing monitoring system, comprising:
[0031] An event initiation device, an event termination device and a timing monitoring device as described in the second aspect;
[0032] The event initiation device is used to generate a start event trigger signal and transmit the start event trigger signal to the event trigger signal detection module of the timing monitoring device, and is also used to generate a start event identification signal and transmit the start event identification signal to the event identification detection module of the timing monitoring device;
[0033] The event termination device is used to generate a termination event trigger signal and transmit the termination event trigger signal to the event trigger signal detection module, and is also used to generate a termination event identification signal and transmit the termination event identification signal to the event identification detection module.
[0034] In one possible implementation,
[0035] The event initiation device comprises:
[0036] An event initiation module and a first signal generation module;
[0037] The event start module is used to generate event start information;
[0038] The first signal generating module is used to generate the start event trigger signal and the start event identification signal according to the event start information;
[0039] The event termination device comprises:
[0040] An event termination module and a second signal generation module;
[0041] The event termination module is used to generate event termination information;
[0042] The second signal generating module is used to generate the termination event trigger signal and the termination event identification signal according to the event termination information.
[0043] The fourth aspect of the present application provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the timing monitoring method of the first aspect or any implementation of the first aspect.
[0044] A fifth aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:
[0045] The memory is used to store computer programs;
[0046] The processor is used to execute the computer program so that the electronic device can implement the timing monitoring method of the above-mentioned first aspect or any implementation manner of the first aspect.
[0047] In a sixth aspect, the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the timing monitoring method of the first aspect or any implementation method of the first aspect.
[0048] With the help of the above-mentioned technical scheme, the timing monitoring method and related devices provided by the present application obtain the timing monitoring results based on the time counting of the clock signal of the preset frequency, which ensures the uniformity of time measurement accuracy. There is no need to perform time synchronization when performing real-time testing on the chip or device, and the comparison of test results between different chips or devices can be supported. The time measurement accuracy depends on the preset frequency of the clock signal. When the preset frequency is high, the high-precision timing monitoring requirements can be met. In addition, the present application starts the time counting based on the rising edge of the detected start event trigger signal, and stores the time count value based on the rising edge of the detected end event trigger signal. The method of using the physical rising edge for time counting has higher accuracy than that of time measurement through software, and the purpose of high-precision timing monitoring can be achieved on the basis of uniform time measurement accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0050] Figure 1 A flow chart of a timing monitoring method provided by this application;
[0051] Figure 2 A timing diagram of the process a→b→c→d→f provided in this application;
[0052] Figure 3 A timing diagram of the process a→b→c→d→e→a provided in this application;
[0053] Figure 4 A timing diagram of the g→h→i→j→k process provided in this application;
[0054] Figure 5 A timing diagram of the g→h→i→g process provided in this application;
[0055] Figure 6 A schematic diagram of the structure of a timing monitoring device provided in this application;
[0056] Figure 7 A schematic diagram of the structure of a timing monitoring system provided in this application;
[0057] Figure 8 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION
[0058] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0059] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0060] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0061] The embodiment of the present application provides a timing monitoring method. The timing monitoring method of the embodiment of the present application is described in detail below with reference to the accompanying drawings.
[0062] Reference Figure 1 , Figure 1 A flow chart of a timing monitoring method provided in an embodiment of the present application is shown as follows: Figure 1 As shown, a timing monitoring method provided in an embodiment of the present application may include steps 101 to 106, and these steps are described in detail below.
[0063] Step 101: Acquire a start event trigger signal and a start event identification signal.
[0064] When performing real-time testing on an object to be tested, such as a chip or device, it is necessary to input test sample data to the object to be tested. The starting event is the event of inputting data to the object to be tested. After receiving the input data, the object to be tested starts processing until the processing is completed. The timing monitoring method provided in the present application can monitor the time from the start of sending the input data to the completion of the processing of the object to be tested.
[0065] When a starting event occurs, a starting event trigger signal is obtained. The starting event has a corresponding identifier, and different starting events have different identifiers. By obtaining the starting event identifier signal, the identifier information of the starting event can be extracted.
[0066] Step 102: When a rising edge of a start event trigger signal is detected, time counting is started according to a clock signal of a preset frequency to generate a time count value.
[0067] The rising edge of the start event trigger signal is detected, and the timing starts when the rising edge is detected. The time is counted by the clock signal of the preset frequency, and the generated time count value will continue to increase. The time measurement accuracy depends on the frequency of the clock signal. The higher the preset frequency, the higher the time accuracy. The preset frequency can be higher than 1MHz, so that the time measurement accuracy can reach the microsecond level, such as setting the preset frequency to 100MHz or 200MHz. Since the time count is generated based on the clock signal of the preset frequency, even if the clock systems of different objects to be tested are different, such as the accuracy of some objects to be tested is at the millisecond level, the accuracy of time measurement is the same, and the time measurement accuracy can reach the microsecond level, ensuring the uniformity of time measurement accuracy, and no time synchronization is required, which can support the comparison of test results between different chips or devices. In addition, the method of using the physical rising edge for time counting is more accurate than the time measurement through software, and the purpose of high-precision timing monitoring can be achieved on the basis of uniform time measurement accuracy.
[0068] Optionally, if the rising edge of the event trigger signal is not detected, the detection of the rising edge of the start event trigger signal continues until the rising edge is detected.
[0069] Optionally, when the rising edge of the start event trigger signal is detected, it can be determined whether the counter used for time counting is idle, and the idle counter is selected for time counting. If there is no idle counter, the start event trigger signal is continuously detected.
[0070] Step 103: parse the start event identification signal, and when the start event identification is obtained, generate a corresponding relationship between the start event identification and the time count value.
[0071] The start event identification signal is parsed to obtain the start event identification, and the start event identification is matched with the time count value of step 102, indicating that the time count is the time count corresponding to the start event, different start events correspond to different time counts, and different start events have different identifications. The start event identification is used to distinguish the time count to avoid counting confusion.
[0072] When generating the correspondence between the start event identifier and the time count value, the counter used to generate the time count value can be numbered, and the counter number can be the start event identifier. The start event identifier can include but is not limited to the test sample data number, the initial N bytes of data of the test image frame, etc., and N can be 3 or other non-zero integer values.
[0073] In a possible implementation, after parsing the start event identification signal, the method further includes:
[0074] If the start event identifier is not obtained, the time counting is stopped and the time counting value is cleared to zero, the start event trigger signal and the start event identifier signal are re-acquired, and then the time counting is started according to the clock signal of the preset frequency when the rising edge of the start event trigger signal is detected.
[0075] If the start event identifier is not obtained, the time count value cannot be matched with the start event, and the time count value is invalid. At this time, the time count can be stopped and the time count value can be cleared. The counter used for the time count can also be marked as idle to facilitate subsequent counting. Then, the start event trigger signal and the start event identifier signal can be re-obtained, and then step 102 is executed.
[0076] Step 104: Acquire a termination event trigger signal and a termination event identification signal.
[0077] When a test object such as a chip or device is tested in real time, after the test sample data is input into the test object, the test object processes the input data, and the termination event is the event that the test object completes the processing. When the termination event occurs, a termination event trigger signal is obtained. The termination event has a corresponding identifier, and the identifier of the termination event should be the same as the start event identifier, so that the start event and the termination event can be matched, thereby monitoring the duration from the start event to the end of the termination event. Obtaining the termination event identification signal can extract the identification information of the termination event.
[0078] Step 105: When the rising edge of the termination event trigger signal is detected, the current time count value is stored.
[0079] The rising edge of the termination event trigger signal is detected, and the current time count value is stored when the rising edge is detected. The current count value reflects the time from the detection of the rising edge of the start event trigger signal in step 102 to the detection of the rising edge of the termination event trigger signal in step 105.
[0080] Step 106: parse the termination event identification signal, and when the termination event identification is obtained through analysis and the termination event identification is the start event identification, obtain a timing monitoring result, wherein the timing monitoring result is a current time count value corresponding to the start event identification.
[0081] The termination event signal is parsed to obtain a termination event identifier, and the termination event identifier is compared with the start event identifier obtained by parsing in step 103 to determine whether the termination event identifier is the start event identifier. If the identifiers are the same, the current time count value stored in step 105 is the time count value from the start of the start event to the end of the termination event, and the timing monitoring result is obtained at this time.
[0082] In a possible implementation, after parsing the termination event identification signal, the method further includes:
[0083] When the termination event identifier is not obtained, or when the termination event identifier is obtained through parsing and the termination event identifier is different from the start event identifier, the termination event trigger signal and the termination event identifier signal are reacquired, and then the current time count value is stored when the rising edge of the termination event trigger signal is detected.
[0084] If the termination event identification signal is parsed and no termination event identification is obtained, it cannot be explained that the stored current time count value is the time count value from the start event to the end of the termination event. In this case, it is necessary to re-acquire the termination event trigger signal and the termination event identification signal, and then execute step 105.
[0085] If the termination event identification signal is parsed to obtain the termination event identification, but the termination event identification is different from the start event identification, it means that they are not the same event, and the stored current time count value is meaningless from the occurrence to the end of the event. In this case, it is also necessary to re-acquire the termination event trigger signal and the termination event identification signal, and then execute step 105.
[0086] In a possible implementation, after the termination event identifier is obtained through parsing and the termination event identifier is used as the start event identifier, the method further includes:
[0087] Determine whether the time count value corresponding to the start event identifier increases;
[0088] If yes, stop the time counting and reset the time counting value to zero;
[0089] If not, the start event trigger signal and the start event identification signal are reacquired, and then time counting is started according to a clock signal of a preset frequency when a rising edge of the start event trigger signal is detected.
[0090] When determining whether the time count value corresponding to the start event identifier increases, the counter number used to generate the time count value can be obtained based on the start event identifier to determine whether the time count value of the counter corresponding to the counter number increases.
[0091] When the termination event identifier is not obtained or the termination event identifier is different from the start event identifier, time counting will continue and the time count value will continue to increase until the termination event identifier is obtained and the termination event identifier is the start event identifier. If the time count value is still increasing, the time counting will be stopped. If the time count value no longer increases, there may be a counter failure problem. At this time, the time count value may be inaccurate. At this time, the start event trigger signal and the start event identifier signal can be re-obtained, and then step 102 is executed.
[0092] In a possible implementation, after obtaining the timing monitoring result, the method further includes:
[0093] One or more of the time count values in the timing monitoring results whose duration is less than the first preset time length, the time count values whose duration is greater than the second preset time length, and the time count values whose value is less than zero are deleted; wherein the first preset time length is less than the second preset time length.
[0094] When performing timing monitoring, erroneous time counts may occur, such as negative time counts due to counter overflow. In this case, time count values less than zero can be deleted. Time counts that are too short can also be deleted, such as time count values that are less than the first preset duration. Time counts that are too long can also be deleted, such as time count values that are longer than the second preset duration.
[0095] To further illustrate the timing monitoring method provided by this application, the following process can be referred to:
[0096] a. Based on whether the rising edge of the start event trigger signal is detected, if yes, proceed to step b, if no, repeat step a;
[0097] b. Determine whether there is an idle counter. If yes, proceed to c. If not, return to a.
[0098] c. Select an idle counter to start counting, and then proceed to d; wherein the counter receives a clock signal of a preset frequency;
[0099] d. Based on whether the start event identification signal is resolved to a valid start event identification, if yes, proceed to f, if not, proceed to e;
[0100] e. The selected counter is cleared and marked as idle, then returns to a;
[0101] f. Mark the selected counter number as the start event identifier;
[0102] g. Based on whether the termination event trigger signal detects the rising edge of the termination event trigger signal, if yes, proceed to h, if not, repeat g;
[0103] h. Store the current time count value of the counter, and then proceed to i;
[0104] i. Based on whether the termination event identification signal is resolved to the termination event identification, whether the termination event identification is the start event identification, if so, proceed to j, if not, return to g;
[0105] j. Check whether the counter numbered as the start event identifier is counting. If yes, proceed to k; if not, return to a;
[0106] k. Clear the counter numbered as the start event identifier and mark it as idle, then proceed to l;
[0107] l. Output the stored current time count value and the corresponding start event identifier.
[0108] Figure 2 is the timing diagram of the above process a→b→c→d→f, Figure 3 This is the timing diagram of the above process a→b→c→d→e→a. Figure 2 and Figure 3 In the figure, sys_clk is the system clock of the device that generates the start event trigger signal and the start event identification signal; GPIO is the start event trigger signal using the GPIO interface; ctn_start / end is the time counting start signal; CAN is the start event identification signal using the CAN protocol, Figure 2 The start event identifier obtained by parsing is ID0; CAN_valid is the start event identification signal; clk_100MHz is the 100MHz clock signal; ctn_0, ctn_1, ctn_2 are three different counters; ctn_0_label, ctn_1_label, ctn_2_label are the numbers of each counter; H0 is a hexadecimal number, indicating that the count value is 0.
[0109] Figure 4 is the timing diagram of the above g→h→i→j→k process, Figure 5 This is the timing diagram of the above g→h→i→g process. Figure 4 and Figure 5In the figure, sys_clk is the system clock; IIC is the termination event identification signal using the IIC protocol; IIC_valid is the termination event identification signal; ctn_start / end is the storage time count signal; clk_100MHz is the 100MHz clock signal; ctn_0 and ctn_1 are two different counters; ctn_0_label and ctn_1_label are the numbers of each counter; ctn_0_save and ctn_1_save are the time counts stored in each counter; the number of the ctn_0 counter ctn_0_label is ID0; the number of the ctn_1 counter ctn_1_label is ID1. H0, H1, H2, ..., HD, HE are the count values expressed in hexadecimal, the time count value stored in the ctn_0 counter is H5, and the time count value stored in the ctn_1 counter is H6.
[0110] A timing monitoring method provided by an embodiment of the present application is introduced above, and a device for executing the timing monitoring method will be introduced below.
[0111] See also Figure 6 , Figure 6 A schematic diagram of the structure of a timing monitoring device provided in an embodiment of the present application. Figure 6 As shown, the timing monitoring device comprises:
[0112] The event trigger signal detection module 601 is used to obtain a start event trigger signal and a stop event trigger signal.
[0113] The event identifier detection module 602 is used to obtain the start event identifier signal and parse the start event identifier signal to obtain the start event identifier, and is also used to obtain the termination event identifier signal and parse the termination event identifier signal. When the termination event identifier is obtained through analysis and the termination event identifier is the start event identifier, a timing monitoring result is obtained, wherein the timing monitoring result is the current time count value corresponding to the start event identifier.
[0114] Optionally, the event identifier detection module 602 is further configured to execute the event trigger signal detection module 601 when the termination event identifier is not obtained, or when the termination event identifier is obtained through parsing and the termination event identifier is different from the start event identifier.
[0115] The counter module 603 is used to start time counting according to a clock signal of a preset frequency and generate a time count value when a rising edge of a start event trigger signal is detected, and is also used to generate a correspondence between a start event identifier and a time count value when a start event identifier is obtained.
[0116] Optionally, the counter module may include multiple counters.
[0117] The time count storage module 604 is used to store the current time count value when the rising edge of the termination event trigger signal is detected.
[0118] Optionally, the time count storage module 604 is further configured to receive an output instruction from the event identifier detection module 602, and output the stored current time count value and a start event identifier corresponding to the time count value.
[0119] The clock generating module 605 is used to generate a clock signal of a preset frequency.
[0120] Optionally, the frequency of the clock signal generated by the clock generation module 605 may be 100 MHz, 200 MHz, and of course, may also be set according to actual application requirements, such as 50 Hz, 100 KHz, etc.
[0121] In one possible implementation, the counter module 603 is also used to stop the time counting and clear the time count value to zero if the start event identifier is not obtained, and / or to determine whether the time count value corresponding to the start event identifier has increased after the termination event identifier is parsed and obtained and the termination event identifier is the start event identifier. If so, stop the time counting and clear the time count value to zero.
[0122] Optionally, the counter module 603 is further configured to execute the event trigger signal detection module 601 if the time count value corresponding to the start event identifier does not increase after the end event identifier is obtained through parsing and the end event identifier is the start event identifier.
[0123] In a possible implementation, the timing monitoring device further includes:
[0124] The time count proofreading module 606 is used to delete one or more of the time count values whose duration is less than the first preset time length, the time count values whose duration is greater than the second preset time length, and the time count values whose value is less than zero in the timing monitoring results after obtaining the timing monitoring results; wherein the first preset time length is less than the second preset time length.
[0125] See also Figure 7 , Figure 7 A schematic diagram of the structure of a timing monitoring system provided in an embodiment of the present application. Figure 7 As shown, the timing monitoring system comprises:
[0126] Event starting device 701, event terminating device 702 and timing monitoring device 600.
[0127] The event initiation device 701 is used to generate a start event trigger signal and transmit the start event trigger signal to the event trigger signal detection module of the timing monitoring device, and is also used to generate a start event identification signal and transmit the start event identification signal to the event identification detection module of the timing monitoring device.
[0128] The event termination device 702 is used to generate a termination event trigger signal and transmit the termination event trigger signal to the event trigger signal detection module, and is also used to generate a termination event identification signal and transmit the termination event identification signal to the event identification detection module.
[0129] The hardware form of the event initiation device may include but is not limited to CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), single-chip microcomputer, DSP (Digital Signal Processing), hardware board, etc., such as an event initiation device based on STM32. The signal source of the start event trigger signal may include but is not limited to an image transmission module with a field synchronization signal, an IIC communication module, a CAN communication module, and other hardware with a standard signal transmission format, such as the signal source of the start event trigger signal may come from the frame synchronization signal vsync. The sending protocol of the start event identification signal includes but is not limited to the IIC protocol and the CAN protocol. The hardware interface of the start event trigger signal and the start event identification signal may include but is not limited to the GPIO interface, the IIC interface, and the CAN interface.
[0130] The event termination device can be an object to be tested, such as a chip or a device. The protocol of the termination event trigger signal can include but is not limited to the IIC protocol and the CAN protocol. The transmission protocol of the termination event identification signal can include but is not limited to the IIC protocol and the CAN protocol. The hardware interface of the termination event trigger signal and the termination event identification signal can include but is not limited to the GPIO interface, the IIC interface, and the CAN interface.
[0131] The timing monitoring device can be a timing monitoring device based on FPGA. The structure of the timing monitoring device is shown in FIG. Figure 6 , I will not go into details here.
[0132] In a possible implementation, the event initiating device includes:
[0133] An event starting module 7011 and a first signal generating module;
[0134] The event start module is used to generate event start information;
[0135] The first signal generating module is used for generating a start event trigger signal and a start event identification signal according to the event start information.
[0136] Optionally, the first signal generating module may further include a starting event trigger signal generating module 7012 for generating a starting event trigger signal and a starting event identification signal generating module 7013 for generating a starting event identification signal, the starting event trigger signal generating module 7012 transmitting the starting event trigger signal to the event trigger signal detection module 601 of the timing monitoring device 600, and the starting event identification signal generating module 7013 transmitting the starting event identification signal to the event identification detection module 602 of the timing monitoring device 600. Of course, the starting event trigger signal generating module 7012 and the starting event identification signal generating module 7013 may also be one module.
[0137] In a possible implementation, the event termination device includes:
[0138] The event termination module 7021 and the second signal generation module.
[0139] The event termination module is used to generate event termination information.
[0140] The second signal generating module is used to generate a termination event trigger signal and a termination event identification signal according to the event termination information.
[0141] Optionally, the second signal generating module may include a termination event trigger signal generating module 7022 for generating a termination event trigger signal and a termination event identification signal generating module 7023 for generating a termination event identification signal. The termination event trigger signal generating module 7022 transmits the termination event trigger signal to the event trigger signal detection module 601 of the timing monitoring device 600, and the termination event identification signal generating module 7023 transmits the termination event identification signal to the event identification detection module 602 of the timing monitoring device 600. Of course, the termination event trigger signal generating module 7022 and the termination event identification signal generating module 7023 may also be one module.
[0142] The present application also provides an electronic device in an embodiment. Figure 8 As shown, it shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 8 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0143] like Figure 8As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 to a random access memory (RAM) 803. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 803. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0144] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a memory card, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0145] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any one of the timing monitoring methods provided in the embodiments of the present application.
[0146] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any timing monitoring method provided in the embodiment of the present application.
[0147] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0148] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0149] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0150] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk (SSD)), etc.
Claims
1. A timing monitoring method, characterized in that: include: Obtaining a start event trigger signal and a start event identification signal; When the rising edge of the start event trigger signal is detected, time counting is started according to a clock signal of a preset frequency to generate a time count value; the clock signal of the preset frequency is not generated by the clock system of the object to be tested itself; Parsing the start event identification signal, and generating a corresponding relationship between the start event identification and the time count value when the start event identification is obtained; Obtaining a termination event trigger signal and a termination event identification signal; storing the current time count value when a rising edge of the termination event trigger signal is detected; The termination event identification signal is parsed, and when the termination event identification is obtained through the analysis and the termination event identification is the start event identification, a timing monitoring result is obtained, wherein the timing monitoring result is the current time count value corresponding to the start event identification.
2. The timing monitoring method according to claim 1, characterized in that: After parsing the start event identification signal, the method further includes: If the start event identifier is not obtained, the time counting is stopped and the time count value is cleared to zero, the start event trigger signal and the start event identifier signal are reacquired, and then the time counting is started according to the clock signal of the preset frequency when the rising edge of the start event trigger signal is detected.
3. The timing monitoring method according to claim 1, characterized in that: After parsing the termination event identification signal, the method further includes: When the termination event identifier is not obtained, or when the termination event identifier is obtained through analysis and the termination event identifier is different from the start event identifier, the termination event trigger signal and the termination event identifier signal are reacquired, and then the process of storing the current time count value when the rising edge of the termination event trigger signal is detected is performed.
4. The timing monitoring method according to claim 1, characterized in that: After the termination event identifier is obtained through parsing and the termination event identifier is used as the start event identifier, the method further includes: Determining whether the time count value corresponding to the start event identifier increases; If yes, stop the time counting and reset the time counting value to zero; If not, the start event trigger signal and the start event identification signal are reacquired, and then the time counting is started according to the clock signal of the preset frequency when the rising edge of the start event trigger signal is detected.
5. The timing monitoring method according to any one of claims 1 to 4, characterized in that: After obtaining the timing monitoring result, the method further includes: One or more of the time count values in the timing monitoring results whose duration is less than the first preset time length, the time count values whose duration is greater than the second preset time length, and the time count values whose value is less than zero are deleted; wherein the first preset time length is less than the second preset time length.
6. A timing monitoring device, characterized in that: include: An event trigger signal detection module is used to obtain a start event trigger signal and an end event trigger signal; An event identification detection module is used to obtain a start event identification signal and parse the start event identification signal to obtain a start event identification, and is also used to obtain a termination event identification signal and parse the termination event identification signal, and when the termination event identification is obtained through parsing and the termination event identification is the start event identification, a timing monitoring result is obtained, wherein the timing monitoring result is a current time count value corresponding to the start event identification; A counter module, used to start time counting according to a clock signal of a preset frequency and generate a time count value when a rising edge of the start event trigger signal is detected, and also used to generate a corresponding relationship between the start event identifier and the time count value when a start event identifier is obtained; the clock signal of the preset frequency is not generated by the clock system of the object to be tested itself; A time counting storage module, used for storing the current time counting value when a rising edge of the termination event trigger signal is detected; A clock generation module is used to generate a clock signal of the preset frequency.
7. The timing monitoring device according to claim 6, characterized in that: The counter module is also used to stop time counting and clear the time count value if the start event identifier is not obtained, and / or to determine whether the time count value corresponding to the start event identifier has increased after the termination event identifier is parsed and the termination event identifier is the start event identifier. If so, stop time counting and clear the time count value.
8. The timing monitoring device according to claim 6 or 7, characterized in that: Also includes: A time count proofreading module is used to delete one or more of the time count values in the timing monitoring results whose duration is less than a first preset duration, the time count values whose duration is greater than a second preset duration, and the time count values whose value is less than zero after the timing monitoring results are obtained; wherein the first preset duration is less than the second preset duration.
9. A timing monitoring system, characterized in that: include: An event initiation device, an event termination device and a timing monitoring device as claimed in any one of claims 6 to 8; The event initiation device is used to generate a start event trigger signal and transmit the start event trigger signal to the event trigger signal detection module of the timing monitoring device, and is also used to generate a start event identification signal and transmit the start event identification signal to the event identification detection module of the timing monitoring device; The event termination device is used to generate a termination event trigger signal and transmit the termination event trigger signal to the event trigger signal detection module, and is also used to generate a termination event identification signal and transmit the termination event identification signal to the event identification detection module.
10. The timing monitoring system according to claim 9, characterized in that: The event initiation device comprises: An event initiation module and a first signal generation module; The event start module is used to generate event start information; The first signal generating module is used to generate the start event trigger signal and the start event identification signal according to the event start information; The event termination device comprises: An event termination module and a second signal generation module; The event termination module is used to generate event termination information; The second signal generating module is used to generate the termination event trigger signal and the termination event identification signal according to the event termination information.
Citation Information
Patent Citations
Converter event management method and device, computer equipment and storage medium
CN118034955A