Method and related device for setting simulation restore point of logic system design

By comparing log files to locate suspicious points in the logic system design and setting restoration points at the simulation time, the problem of inaccurate settings in the existing technology is solved, and the testing efficiency and accuracy of the logic system design are improved.

CN117370168BActive Publication Date: 2024-10-15XINHUAZHANG TECH (XIAMEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311277508.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2024-10-15
Estimated Expiration
2043-09-28

AI Technical Summary

Technical Problem

In the existing technology, in the testing of logic system design, setting the simulation restore point is not accurate enough, causing the user to wait for a long time to reach the specified time point, which reduces the debugging efficiency.

Method used

By comparing the reference log file and the target log file, suspicious points in the logical system design are located, and a restore point at the simulation time is set near the suspicious point to shorten the simulation time from the restore point to the specified time point.

Benefits of technology

Accurately setting restore points greatly shortens simulation time, enables users to complete test analysis and fault location more quickly and accurately, and improves debugging efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117370168B_ABST
    Figure CN117370168B_ABST
Patent Text Reader

Abstract

The present application provides a method for setting a simulation restore point of a logic system design and a related device. The method includes: simulating a reference logic system design to obtain a reference log file; simulating a target logic system design to obtain a target log file, wherein the target logic system design is modified based on the reference logic system design; comparing the reference log file with the target log file to locate a suspicious point of the target logic system design; determining one or more simulation moments associated with the suspicious point according to the suspicious point; and re-simulating the target logic system design to save one or more restore points at one or more simulation moments associated with the suspicious point.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer software technology, and in particular to a method for setting a simulation restore point for a logic system design and related equipment. Background Art

[0002] When testing a logic system design (e.g., a chip design), different stimulus signals are usually applied to the logic system design over time, and the temporal changes (e.g., waveforms) of the output signals of the logic system design are observed. Design problems can be discovered through changes in the output signals, and the design can be modified.

[0003] In order to better debug the logic system design, engineers usually need to repeatedly restore the test to a specific time point (also called a restore point) to observe the input signal and output signal at that time point, so as to debug the logic system design. This means that the test of the logic system design needs to be able to quickly restore the test at the time point specified by the engineer, including the values ​​of the input signal, output signal and multiple signals within the design at that time point.

[0004] In order to quickly restore the test, the traditional approach is to manually save a large amount of test information designed for the logic system at different time points as restore points. The restore point allows the simulation tool to restore the simulation at the corresponding time based on the saved test information. In this way, the corresponding restore point is loaded according to the specified time point that the engineer wants to observe, and the simulation continues from the restore point until the specified time point. Therefore, if the restore point is not set properly, the user may need to wait repeatedly during the simulation time from the restore point to the specified time point, which reduces the user's debugging efficiency.

[0005] Therefore, how to more accurately set the simulation restore point in the logic system design to be closer to the specified time point that the user wants to observe is an urgent problem to be solved. Summary of the invention

[0006] In view of this, the purpose of the present application is to propose a method for setting a simulation restore point for a logic system design and related equipment to solve or partially solve the above technical problems.

[0007] In a first aspect of the present application, a method for setting a simulation restore point of a logic system design is provided, comprising: simulating a reference logic system design to obtain a reference log file; simulating a target logic system design to obtain a target log file, wherein the target logic system design is modified based on the reference logic system design; comparing the reference log file and the target log file to locate suspicious points of the target logic system design; determining one or more simulation moments associated with the suspicious points according to the suspicious points; and re-simulating the target logic system design to respectively save one or more restore points at one or more simulation moments associated with the suspicious points.

[0008] In a second aspect of the present application, an electronic device is provided, comprising: a memory for storing a set of instructions; and at least one processor configured to execute the set of instructions to perform the method described in the first aspect.

[0009] According to a third aspect of the present application, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores a set of instructions for an electronic device, wherein the set of instructions is used to enable the electronic device to execute the method described in the first aspect.

[0010] The method and related equipment for setting the simulation restore point of the logic system design provided in the embodiment of the present application compares the log files, searches for suspicious points in the simulation process of the logic system design, and sets the restore point near the suspicious point. The specified time point that the engineer wants to observe is the suspicious point, so the time distance between the restore point set in this way and the specified time point (i.e., the suspicious point) is very short, or even 0. The restore point accurately set in the present application greatly shortens the simulation time from the restore point to the specified time point (i.e., the suspicious point), so that the user can complete the test analysis of the specified time point more quickly and efficiently, find the fault location more accurately and quickly for modification, and improve the test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0012] Figure 1 A schematic diagram of the structure of an exemplary electronic device provided in an embodiment of the present application.

[0013] Figure 2 A schematic diagram of a simulation tool and a debugging tool according to an embodiment of the present application.

[0014] Figure 3A schematic diagram of a process for generating a log file according to an embodiment of the present application.

[0015] Figure 4 A schematic diagram of a method for determining suspicious points in a logic system design according to an embodiment of the present application.

[0016] Figure 5 A schematic diagram of another method for determining suspicious points in a logic system design according to an embodiment of the present application.

[0017] Figure 6 A schematic diagram of another method for determining suspicious points in a logic system design according to an embodiment of the present application.

[0018] Figure 7 A logic schematic diagram for saving restore points during simulation for the logic system design of an embodiment of the present application.

[0019] Figure 8 Another logic schematic diagram for saving restore points during simulation is provided for the logic system design of an embodiment of the present application.

[0020] Fig. 9 A flowchart of an exemplary method for setting a simulation restore point for a logic system design provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0022] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.

[0023] The simulation logic system design can be to simulate the logic system design on the electronic equipment of the operation simulation tool. In certain embodiments, the logic system design can include one or more simulation events in the simulation process. These simulation events can be divided by time and can also be divided by the code segment of the design. This logic system design (for example, chip design) can be written by software programming language (for example, java, JavaScript, C language, C++ language or PHP (HypertextPreprocessor)), and can also be written by hardware programming language (for example Verilog, VHDL, System C or SystemVerilog).

[0024] When simulating a logic system design, users usually analyze the phenomenon and cause of the error at the time when the failure occurs.

[0025] For some potential problems, the cause of the problem cannot be found at the time when the problem occurs. Time backtesting can be used to return the simulation to a time point before that time point, so that users can analyze and find the cause of the problem at the previous time point, and then effectively trace the source of the fault and solve the fault. In theory, time backtesting can be performed at any time point of the test.

[0026] In the simulation process of the logic system design, for example, the simulation can be started from the zero time point of the logic system design, and the simulation process of the entire logic system design is divided into multiple unit time periods. When the simulation reaches the middle time point of the corresponding unit time period, the simulation information corresponding to the middle time point is recorded. The simulation information includes the values ​​of key signals (also called primary signals) and the environment parameters of the simulation. The time point where the simulation information is saved is also called the restore point. Therefore, the simulation tool can start the simulation at a restore point close to the specified time point, so that the user can quickly return from the restore point to the simulation time point specified by the user.

[0027] In the debugging process of traditional logic system design, the restore point setting is relatively vague, so it is impossible to accurately ensure that there is a suitable restore point near each user-specified time point. It may take too long for the nearest restore point near the user-specified time point to simulate the specified time point, and the user needs to wait all the time, unable to conduct effective test analysis, which reduces the user's debugging efficiency.

[0028] Therefore, how to more accurately set the simulation restore point in the logic system design to be closer to the specified time point that the user wants to observe is an urgent problem to be solved.

[0029] In view of the above problems, the present application proposes a method for setting a simulation restore point for a logic system design, an electronic device and a storage medium.

[0030] Figure 1 A schematic diagram of the structure of an exemplary electronic device 100 provided in an embodiment of the present application.

[0031] like Figure 1 As shown, the electronic device 100 may include: a processor 102, a memory 104, a network interface 106, a peripheral interface 108 and a bus 110. The processor 102, the memory 104, the network interface 106 and the peripheral interface 108 are connected to each other through the bus 110 in the electronic device.

[0032] Processor 102 may be a central processing unit (CPU), an image processor, a neural network processor (NPU), a microcontroller (MCU), a programmable logic device, a digital signal processor (DSP), an application specific integrated circuit (ASIC), or one or more integrated circuits. Processor 102 may be used to perform functions related to the technology described in this application. In some embodiments, processor 102 may also include multiple processors integrated into a single logical component. Figure 1 As shown, the processor 102 may include a plurality of processors 102a, 102b, and 102c.

[0033] The memory 104 may be provided with a database in which data during operation (eg, instruction sets, computer codes, intermediate data, etc.) are stored. The simulation tool used for test design may be a computer program stored in the memory 104. Figure 1 As shown, the data stored in the memory 104 may include program instructions (e.g., program instructions for implementing the technical solution of the present application) and a database storing operation data (e.g., the memory may store temporary codes generated during the compilation process). The processor 102 may also access the program instructions and database stored in the memory. The memory 104 may include a volatile storage device or a non-volatile storage device. In some embodiments, the memory 104 may include a random access memory (RAM), a read-only memory (ROM), an optical disk, a magnetic disk, a hard disk, a solid-state drive (SSD), a flash memory, a memory stick, etc.

[0034] The network interface 106 can be configured to provide the electronic device 100 with communication with other external devices via a network. The network can be any wired or wireless network capable of transmitting and receiving data. For example, the network can be a wired network, a local wireless network (e.g., Bluetooth, WiFi, near field communication (NFC), etc.), a cellular network, the Internet, or a combination thereof. It is understood that the type of network is not limited to the above specific examples. In some embodiments, the network interface 106 can include any number of network interface controllers (NICs), radio frequency modules, transceivers, modems, routers, gateways, adapters, cellular network chips, etc., in any combination.

[0035] The peripheral interface 108 can be configured to connect the electronic device 100 to one or more peripheral devices to achieve information input and output. For example, the peripheral devices can include input devices such as a keyboard, a mouse, a touch pad, a touch screen, a microphone, and various sensors, and output devices such as a display, a speaker, a vibrator, and an indicator light.

[0036] The bus 110 can be configured to transmit information between various components of the electronic device 100 (e.g., the processor 102, the memory 104, the network interface 106, and the peripheral interface 108), such as an internal bus (e.g., a processor-memory bus), an external bus (USB port, PCI-E bus), etc.

[0037] It should be noted that, although the structural architecture of the electronic device 100 only shows the processor 102, the memory 104, the network interface 106, the peripheral interface 108 and the bus 110, in the specific implementation process, the structural architecture of the electronic device 100 may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the structural architecture of the electronic device 100 may also only include the components necessary for implementing the embodiment of the present application, and does not necessarily include all the components shown in the figure.

[0038] Figure 2 The schematic diagram of the simulation tool 202 and the debugging tool 200 according to the embodiment of the present application is shown. The simulation tool 202 and the debugging tool 200 may be computer programs running on the electronic device 100.

[0039] In the field of chip design, a design can usually be simulated using a simulation tool, such as the GalaxSim simulation tool produced by Xinhuazhang Technology Co., Ltd. Figure 2The exemplary simulation tool 202 shown may include a compiler 120 and a simulator 220. The compiler 120 may compile a design (e.g., a verification system 210) into a target code 204, and the simulator 220 may perform simulation according to the target code 204 and output a simulation result 206. For example, the simulation tool 202 may output the simulation result (e.g., a simulation waveform) via Figure 1 The verification system 210 may include a logic system design 210a and a verification environment 210b. The verification environment 210b may also be referred to as a testbench. For example, the verification environment 210b may be a UVM environment.

[0040] The simulation result 206 may also be stored in the form of a log database. The log database storing log information may also be referred to as a log file.

[0041] The debugging tool 200 can also read the simulation result 206. The debugging tool 200 can be, for example, the Fusion Debug debugging tool produced by Xinhuazhang Technology Co., Ltd. For example, the debugging tool 200 can read the simulation result 206 stored in a waveform file, and generate a corresponding simulation waveform for debugging. The debugging tool 200 can also read the description of the verification system 210 (usually SystemVerilog and Verilog code) and display it to the user. The debugging tool 200 can also generate various graphical interfaces (for example: debugging window) to facilitate the user's debugging work. The user can issue a debugging command to the debugging tool 200 (for example, run the verification system 210 to a certain moment), and the debugging tool 200 applies the debugging command to the simulation tool 202 to execute accordingly. The debugging tool 200 can also read a log file. The log file can include various information of the simulation process, including information of the simulation error, the line number of the error, the time when the simulation error occurred, etc.

[0042] It is understandable that, in addition to being connected to the simulation tool 202 , the debugging tool 200 may also be connected to a hardware emulator.

[0043] Figure 3 A schematic diagram of a process for generating a log file according to an embodiment of the present application.

[0044] 300 shows a flow chart of generating a reference log file, and 310 shows a flow chart of generating a target log file.

[0045] The reference logic system design 301 in 300 and the target logic system design 302 in 310 may be a chip design or a part of a complete chip design. Furthermore, the target logic system design 302 may be obtained by modifying the reference logic system design 301. It can be understood that most designs of the reference logic system design 301 and the target logic system design 303 are the same, and therefore, the simulation events included in the simulation process and the log files returned therefrom may be the same or mostly the same.

[0046] The simulation tool 202 can read and compile a description of the logic system design (eg, source code) and generate an executable file for simulation.

[0047] When the simulation is finished, the simulation data is stored in the memory 104. Subsequently, the simulator 220 may generate a log file according to the simulation data in the memory 104. The log in the log file may include information such as a timestamp, event type, event description, and event level.

[0048] In 300 , a reference logic system design 301 is simulated to obtain a reference log file 303 ; in 310 , a target logic system design 302 is simulated to obtain a target log file 304 .

[0049] Since the reference logic system design 301 corresponding to the reference log file 303 is generally considered to be the correct design, the reference log file 303 can be considered to be the correct log file. Since the target logic system design 302 has been modified and errors may be introduced, the difference between the target log file 304 and the reference log file 303 can generally reflect the errors introduced into the target logic system design 302. Therefore, by comparing the difference between the target log file 304 and the reference log file 303, the log in which the target log file 304 appears abnormal (hereinafter collectively referred to as the abnormal log) can be quickly located. The abnormal log can reflect the errors that may occur in the target logic system design 302. Each log corresponds to a simulation time point. The simulation time point corresponding to the abnormal log can be called a suspicious point.

[0050] Figure 4 A schematic diagram of a method for determining suspicious points in a logic system design according to an embodiment of the present application.

[0051] In this application, the simulation process of the logic system design may include multiple simulation events. Generally, a simulation event refers to a specific event that occurs during the simulation process, such as system errors, warnings, information, and debugging information. These simulation events can be divided by time or by the designed code. A simulation event can be associated with multiple reference logs and multiple target logs.

[0052] In some embodiments, the simulation process of the logic system design can be pre-divided into multiple simulation events in time sequence. Multiple simulation events can include, for example, simulation event A. Simulation event A can include one or more stimulus signals applied by a testbench to the design under test of the logic system design.

[0053] like Figure 4 As shown, the simulation tool 202 may include simulation event A during the simulation of the reference logic system design 301 and the target logic system design 302. The simulation tool 202 may generate a reference log file 303 and a target log file 304 after the simulation of the reference logic system design 301 and the target logic system design 302 is completed. The reference log file 303 may include reference logs 1 to 4, and the target log file 304 may include target logs 1 to 4. Simulation event A is associated with reference logs 1 to 4 and target logs 1 to 4. Reference logs 1 to 4 and target logs 1 to 4 may correspond to each other in time series. It can be understood that, due to the differences between the reference logic system design 301 and the target logic system design 302, the reference logs 1 to 4 and the target logs 1 to 4 may correspond in time but are not necessarily identical.

[0054] like Figure 4 As shown, the debugging tool 200 can compare the reference logs 1 to 4 and the target logs 1 to 4 in time series. The event information "TASK A" in the reference log 1 represents that the reference log 1 is associated with the simulation event A. Among them, "AXI_WR" indicates a write operation to the AXI bus. And the reference log 1 records the value written to the AXI bus as "0xABCD_123 0 Compared with reference log 1, the value written to the AXI bus in target log 1 is "0xABCD_123 F Since the reference log 1 and the target log 1 have the same parameters but different values, the debugging tool 200 can determine that the reference log 1 and the target log 1 do not match.

[0055] Since the reference log 1 and the target log 1 do not match, the debugging tool 200 marks the target log 1 as an exception log, records the event sequence corresponding to the exception log and the simulation time “2023-09-0518:49:13” of the exception log as suspicious point a, and stores them in the memory 104 .

[0056] Figure 5 It is a schematic diagram of another method for determining suspicious points in logic system design according to an embodiment of the present application.

[0057] In some embodiments, Figure 5As shown, the simulation process of the reference logic system design 301 and the target logic system design 303 may include a simulation event B. The simulation tool 202 may generate a reference log file 303 and a target log file 304 after the simulation is completed. The reference log file 304 may include reference logs 5 to 8, and the target log file 304 may include target logs 5 to 8. Simulation event B is associated with reference logs 5 to 8 and target logs 5 to 8. The reference logs 5 to 8 and the target logs 5 to 8 may correspond to each other in time series.

[0058] The debugging tool 200 can compare reference logs 5 to 8 and target logs 5 to 8 in time series. The event information "TASK B" in reference log 5 represents that reference log 5 is associated with simulation event B. The timestamp of reference log 5 is "2023-09-05 16:49:55", and the timestamp of target log 5 is "2023-09-05 17:49:13". It can be seen from the time series that the timestamps of reference log 6, reference log 7 and reference log 8 subsequent to reference log 5 are "2023-09-05 16:49:56", "2023-09-0516:49:58" and "2023-09-05 16:49:59" respectively. In terms of time, reference logs 5 to 8 are coherent and compact.

[0059] The debugging tool 202 further analyzes the target logs 5 to 8. The timestamp of the target log 5 is "2023-09-05 17:49:13", the timestamp of the target log 6 is "2023-09-06 17:00:19", the timestamp of the target log 7 is "2023-09-07 17:00:23", and the timestamp of the target log 8 is "2023-10-05 18:53:24". Obviously, in terms of time series, the time series of the target logs 5 to 8 are chaotic and disordered. Since the time series of the target logs 5 to 8 are obviously chaotic, the debugging tool 200 can determine that the target logs 5 to 8 do not match the reference logs 5 to 8.

[0060] Since the reference logs 5 to 8 do not match the target logs 5 to 8 , the debugging tool 200 marks the target logs 5 to 8 as abnormal logs, records the event sequence and simulation time corresponding to the abnormal logs as suspicious points b, and stores them in the memory 104 .

[0061] Figure 6 It is a schematic diagram of another method for determining suspicious points in logic system design according to an embodiment of the present application.

[0062] In some embodiments, Figure 6As shown, the simulation process of the reference logic system design 301 and the target logic system design 303 may include a simulation event C. The simulation tool 202 may generate a reference log file 303 and a target log file 304 after the simulation is completed. The reference log file 304 may include reference logs 9 to 12, and the target log file 304 may include target logs 9 to 12. Simulation event B is associated with reference logs 9 to 12 and target logs 9 to 12. The reference logs 9 to 12 and the target logs 9 to 12 may correspond to each other in time series.

[0063] The debugging tool 200 can compare the reference logs 9 to 12 and the target logs 9 to 12 in time series. The event information "TASK C" in the reference log 9 represents that the reference log 5 is associated with the simulation event C. The reference logs 9 to 12 respectively record the input port parameter values ​​and the output port parameter values ​​in the simulation event C. The debugging tool 200 can cluster the input port parameter values ​​and the output port parameter values ​​into multiple groups of corresponding values. Figure 6 As shown in the figure, the input port parameter value of reference log 9 is 75, and the output port parameter value is 81, which can be recorded as [75, 81]. Similarly, the parameter values ​​of reference logs 9 to 12 can be clustered into array X: [75, 81], [1, 23], [87, 97], and [62, 17]; the parameter values ​​of target logs 9 to 12 can be clustered into array Y: [1, 23], [75, 51], [62, 81], and [87, 19].

[0064] Obviously, only the second element [1, 23] in array Y falls into array X, and the rest of the elements do not fall into array X. Therefore, the debugging tool can confirm that the target logs 9, 11, and 12 do not match the reference logs 9, 11, and 12.

[0065] Since the reference logs 9 , 11 and 12 do not match the target logs 9 , 11 and 12 , the debugging tool 200 marks the target logs 9 , 11 and 12 as abnormal logs, records the event sequence and simulation time corresponding to the abnormal logs as suspicious point c, and stores them in the memory 104 .

[0066] The debugging tool 200 of the present application can also use machine learning and artificial intelligence technology to identify suspicious points. For example, the debugging tool 200 can use unsupervised learning to cluster logs into multiple groups, and logs that cannot be clustered can be considered suspicious points. It is understandable that other methods for determining suspicious points can also be used, and are not limited to the specific examples of the embodiments of the present application.

[0067] Figure 7 A logic schematic diagram of saving restore points during simulation of a logic system design according to an embodiment of the present application is shown.

[0068] During the simulation of the target logic system design 303, the debugging tool 200 first confirms suspicious points in multiple logs. After the simulation is completed, based on the suspicious points confirmed and saved during the first simulation, the restore points are saved during the second simulation.

[0069] The restore point includes the time of the restore point and the restore information at that time. The restore information includes the value of key signals (also called primary signals) and the simulation environment parameters.

[0070] In some embodiments, the restoration point may include a simulation time point corresponding to the suspicious point and one or more simulation time points before the simulation time point corresponding to the suspicious point. Figure 7 As shown, the time corresponding to the suspicious point a is t5, and the time t5 and the four time points t1 to t4 before the time t5 are set as restoration points.

[0071] In some other embodiments, the restoration point may include the simulation time point corresponding to the suspicious point and one or more simulation time points after the simulation time point corresponding to the suspicious point. Figure 7 As shown, the time corresponding to the suspicious point b is t6, and the time t6 and the four time points t7 to t10 after the time t6 are set as restoration points.

[0072] In some other embodiments, the restoration point may include the simulation time point corresponding to the suspicious point and one or more simulation time points before and after the simulation time point corresponding to the suspicious point. Figure 7 As shown, the time corresponding to the suspicious point c is t13, and the time t13, the two time t11-t12 before t13, and the two time t14-t15 after t13 are all set as restoration points.

[0073] It can be understood that the method of setting a restore point near the time corresponding to the suspicious point includes but is not limited to the specific example of the embodiment of the present application.

[0074] In some embodiments, the restoration information may be data in the memory at a given moment during the simulation process. The debugging tool 200 finds the restoration moment that needs to be saved based on the determined suspicious points, copies the data in the memory of the process at the given restoration moment, and stores the copy result in the memory 104.

[0075] Figure 8 Another logic schematic diagram of saving restore points during simulation of the logic system design of an embodiment of the present application is shown.

[0076] During the simulation process of logic system design, a simulation event can be associated with multiple suspicious points. Figure 6As shown, simulation event C can be associated with three exception logs, and each exception log can be regarded as a suspicious point by debugging tool 200. In some embodiments, the suspicious points can be very close in simulation time. When the distance between two suspicious points is very close, debugging tool 200 can flexibly set the restore point.

[0077] In some embodiments, Figure 8 As shown in 800, the distance between suspicious point d and suspicious point e is relatively close. According to the above method, the debugging tool 200 sets the time point corresponding to suspicious point d and one or more time points before and after the time point corresponding to suspicious point d as the first group of restore points X, and sets the time point corresponding to suspicious point e and one or more time points before and after the time point corresponding to suspicious point e as the second group of restore points Y. This results in too many restore points between time points 801 and 802. Too many restore points may occupy too many memory resources. In order to minimize the occupation of memory resources, the user can pre-set a given threshold, requiring that the density of restore points within a time period cannot be higher than the given threshold. The density of restore points refers to the number of restore points in a unit time period.

[0078] like Figure 8 As shown, the debugging tool 200 can determine whether the density of multiple restore points in the time period from time point 801 to time point 802 is greater than a given threshold. If the density of restore points in the time period is greater than the given threshold, the debugging tool 200 can delete some restore points so that the density in the time period is less than the threshold. It is understandable that the density of restore points in the time period after deleting some restore points should be higher than a given minimum value. For example, as shown in Figure (a) of 800, the debugging tool 200 can delete the restore point corresponding to a suspicious point (e.g., suspicious point d) in the time period. For another example, as shown in Figure (b) of 800, the debugging tool 200 can delete the restore points in the time period at intervals (e.g., delete 1 restore point every 2 restore points, or delete a restore point every time interval). It is understandable that various methods of deleting restore points can be applied to the embodiments of the present application, and are not limited to the above examples.

[0079] The debugging tool 200 selectively saves the restore points, thereby reducing the memory resource usage of the restore points and not affecting the efficiency of the restore points reaching the specified time point. On the basis of ensuring the debugging efficiency, the burden of the memory resources is reduced.

[0080] The embodiment of the present application also provides a method for setting a simulation restore point for a logic system design. The debugging tool 200 can set a restore point for the logic system design near a suspicious point, greatly shortening the simulation time from the restore point to the suspicious point, saving the user's debugging and analysis time, so that the user can perform design testing faster and thus more efficiently find faults in the logic system design.

[0081] Fig. 9 FIG. 1 is a flow chart of an exemplary method 900 for setting a simulation restore point of a logic system design provided by an embodiment of the present application. The method 900 may be Figure 1 The method 900 is executed by the electronic device 100, more specifically, by the debugging tool 200 running on the electronic device 100. The method 900 may include the following steps.

[0082] In step 902, the simulation tool 202 may simulate a reference logic system design (eg, Figure 3 301 in the logical system design to obtain a reference log file (e.g., Figure 3 The reference log file 303 in the reference logic system design may include multiple simulation events (e.g., Figure 4 Simulation event A in Figure 5 Simulation event B and Figure 6 Press C for the simulation time in .

[0083] In step 904, the simulation tool 202 may simulate the target logic system design (e.g., Figure 3 The logical system design 302 in the embodiment of the present invention is used to obtain the target log file (e.g., Figure 3 304), the target logical system design (e.g., Figure 3 The logic system design 302 in the reference logic system design (eg, Figure 3 The target logic system design may include multiple simulation events (for example, Figure 4 Simulation event A in Figure 5 Simulation event B and Figure 6 Press C for the simulation time in .

[0084] In step 906, the debugging tool 200 compares the reference log file (eg, Figure 3 304) and the target log file (e.g., Figure 3 Reference log file 303 in the target logic system design to locate suspicious points;

[0085] In some embodiments, Figure 4As shown, the debugging tool 200 obtains information related to a simulation event (for example, Figure 4 Multiple reference logs associated with simulation event A in Figure 4 Reference logs 1 to 4 in the example above) and multiple target logs (for example, Figure 4 Target logs 1 to 4 in the table).

[0086] Determine the values ​​of the same parameters in the multiple reference logs and the multiple target logs (for example, Figure 4 In response to the same parameter value (e.g., Figure 4 The parameter values ​​of reference log 1 and target log 1 in are different, and the multiple reference logs (for example, Figure 4 The reference log 1) and the plurality of target logs (eg, Figure 4 The target log in 1) does not match.

[0087] In response to the plurality of target logs (eg, Figure 4 The target log 1) and the multiple reference logs (for example, Figure 4 One or more reference logs 1 in the simulation time do not match, and determine the time point corresponding to the one or more target logs in the simulation time as the suspicious point (for example, Figure 4 Suspicious point a).

[0088] In some other embodiments, Figure 5 As shown, the debugging tool 200 obtains information related to a simulation event (for example, Figure 5 A simulation event B) associated with multiple reference logs (for example, Figure 5 Reference logs 5 to 8 in the example above) and multiple target logs (e.g. Figure 5 Target logs 5 to 8).

[0089] Determine the time sequence of the plurality of reference logs and the plurality of target logs (eg, Figure 5 In response to the time series of the reference logs 5 to 8 and the target logs 5 to 8, for example, Figure 5 There is an anomaly in the time series of reference logs 5 to 8 and target logs 5 to 8 in the target logs 5 to 8, and it is determined that the multiple reference logs (for example, Figure 5 The reference logs 5 to 8 in the example do not match the multiple target logs (for example, Figure 5 Target logs 5 to 8).

[0090] In response to the plurality of target logs (eg, Figure 5 Target logs 5 to 8 in the example) and the plurality of reference logs (eg, Figure 5 One or more of the reference logs 5 to 8 in the simulation time do not match, and determine the time point corresponding to the one or more target logs in the simulation time as the suspicious point (for example, Figure 5 Suspicious point b).

[0091] In some other embodiments, Figure 6 As shown, the debugging tool 200 obtains information related to a simulation event (for example, Figure 6 Simulation event C) associated with multiple reference logs (for example, Figure 6 Reference logs 9 to 12 in the example above) and multiple target logs (e.g. Figure 6 Target logs 9 to 12).

[0092] From the plurality of reference logs (for example, Figure 6 9 to 12) and the plurality of target logs (eg, Figure 6 9-12 in the target log) extract multiple reference values ​​and multiple target values ​​of the target parameter; cluster the multiple reference values ​​into one or more groups (for example, the array X in the above description); determine the multiple target values ​​(for example, Figure 6 The debugging tool 200 marks the target values ​​that cannot fall into the one or more groups (for example, the array X in the above description). Figure 6 The target logs 9, 11 and 12 in the input parameter values ​​and output parameter values) are abnormal target values; and determining the target log corresponding to the abnormal target value (for example, Figure 6 The target logs in 9, 11, and 12) do not match.

[0093] In response to the plurality of target logs (eg, Figure 6 The target logs 9 to 12 in the example and the plurality of reference logs (eg, Figure 5 One or more of the reference logs 9 to 12 in the simulation time do not match, and determine the time point corresponding to the one or more target logs in the simulation time as the suspicious point (for example, Figure 6 Suspicious point in c).

[0094] In step 908, the debugging tool 200 generates a query based on the suspicious point (eg, Figure 4 Suspicious points in a Figure 5 The suspicious points b and Figure 6 c) determining one or more simulation moments associated with the suspicious point.

[0095] In some embodiments, Figure 7 As shown, the one or more simulation moments include: the suspicious point (for example, Figure 7 The suspicious point a) is a time point in the simulation time (for example, Figure 7 t5 in the simulation time), one or more time points before the suspicious point in the simulation time (for example, Figure 7 (times t1 to t4 in the figure).

[0096] In some other embodiments, Figure 7 As shown, the one or more simulation moments include: the suspicious point (for example, Figure 7 The suspicious point b) is a time point in the simulation time (for example, Figure 7 t6 in the simulation time), one or more time points after the time point of the suspicious point on the simulation time (for example, Figure 7 (t7~t10 in the figure).

[0097] In some other embodiments, Figure 7 As shown, the one or more simulation moments include: the suspicious point (for example, Figure 7 The suspicious point c) is a time point in the simulation time (for example, Figure 7 t13 in the simulation time), one or more time points before the suspicious point in the simulation time, and one or more time points after the suspicious point (for example, Figure 7 (times t11~t12, t14~t15 in the figure).

[0098] In step 910, the simulation tool 202 re-simulates the target logic system design (eg, Figure 3 302) in the logic system design at the one or more simulation moments (e.g., Figure 6 One or more restore points are saved at the time t1 to t15.

[0099] In some embodiments, the simulation tool 202 may obtain the main input and the simulation parameters of the restore point; restore and simulate the target logic system design (for example, Figure 3 The process of the logical system design 302 in the restore point is performed to the simulation time corresponding to the restore point.

[0100] In some embodiments, simulation tool 202 may determine the density of multiple restore points within a time period (e.g., Figure 8The debugging tool 200 determines whether the density of the restore points in the time period from 801 to 802 in the debugging tool 200 is greater than a given threshold. In response to the density of the multiple restore points being greater than the given threshold, some restore points are deleted from the multiple restore points so that the density in the time period is less than the given threshold. For example, as shown in Figure (a) in 800, the debugging tool 200 can delete the restore point corresponding to a suspicious point (for example, suspicious point d) in the time period. For another example, as shown in Figure (b) in 800, the debugging tool 200 can delete the restore points in the time period at intervals (for example, delete 1 restore point every 2 restore points, or delete a restore point every certain period of time).

[0101] The method for setting a simulation restore point for a logic system design provided in an embodiment of the present application is that the debugging tool 200 can set a restore point for the logic system design near a suspicious point, which greatly shortens the simulation time from the restore point to the suspicious point and saves the user's debugging and analysis time, so that the user can perform design testing faster and thus more efficiently find faults in the logic system design.

[0102] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.

[0103] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0104] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.

[0105] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.

[0106] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0107] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.

Claims

1. A method for setting a simulation restore point for a logic system design, comprising: simulating a reference logic system design to obtain a reference log file; Simulating a target logic system design to obtain a target log file, wherein the target logic system design is modified based on the reference logic system design; comparing the reference log file and the target log file to locate suspicious points in the target logic system design; Determine one or more simulation moments associated with the suspicious point according to the suspicious point; as well as The target logic system design is re-simulated to save one or more restore points at one or more simulation moments associated with the suspect point, respectively.

2. The method according to claim 1, wherein: Comparing the reference log file with the target log file to locate suspicious points in the target logic system design further includes: Respectively acquiring a plurality of reference logs and a plurality of target logs associated with a simulation event from the reference log file and the target log file; determining whether the plurality of reference logs and the plurality of target logs match; and In response to the multiple reference logs not matching one or more target logs among the multiple target logs, a time point corresponding to the one or more target logs in simulation time is determined as the suspicious point.

3. The method according to claim 2, wherein: Determining whether the plurality of reference logs and the plurality of target logs match further comprises: determining whether values ​​of the same parameter in the plurality of reference logs and the plurality of target logs are the same; In response to the values ​​of the same parameter being different, determining that the plurality of reference logs and the plurality of target logs do not match; or, Determine whether there is an anomaly in the time series of the multiple reference logs and the multiple target logs; In response to an abnormality in the time series of the multiple reference logs and the multiple target logs, determining that the multiple reference logs and the multiple target logs do not match; or, extracting a plurality of reference values ​​and a plurality of target values ​​of a target parameter from the plurality of reference logs and the plurality of target logs, respectively; clustering the plurality of reference values ​​into one or more groups; determining whether the plurality of target values ​​fall into the one or more groups; Marking the target value that fails to fall into the one or more groups as an abnormal target value; and It is determined that a target log corresponding to the abnormal target value does not match.

4. The method according to claim 1, wherein: The one or more simulation moments include: a time point of the suspicious point in simulation time, one or more time points before the time point of the suspicious point in simulation time, or one or more time points after the time point of the suspicious point in simulation time.

5. The method according to claim 1, wherein: Re-simulating the target logic system design to save one or more restore points at the one or more simulation times further includes: simulating the target logic system design; and Main inputs and simulation parameters of the simulation are saved at one or more simulation moments associated with the suspicious point as the one or more restoration points.

6. The method according to claim 5, further comprising: Determine whether the density of multiple restore points in a time period is greater than a given threshold; as well as In response to the density of the plurality of restoration points being greater than the given threshold, some restoration points are deleted from the plurality of restoration points so that the density within the time period is less than the given threshold.

7. The method according to claim 1, further comprising: Obtaining main input and simulation parameters of a restore point; as well as The process of simulating the target logic system design is restored to a simulation time corresponding to the restoration point according to the main input and the simulation parameters.

8. An electronic device comprising: a memory for storing a set of instructions; as well as At least one processor is configured to execute the set of instructions to perform the method according to any one of claims 1 to 7.

9. A non-transitory computer-readable storage medium storing a set of instructions for a computer, the set of instructions being used to cause the computer to perform the method of any one of claims 1 to 7 when executed.