A simulation method, device, equipment and storage medium

By automatically controlling the multi-opening and task allocation of simulation software, the cumbersome and error-prone simulation process is solved, and the simulation efficiency and CPU performance are improved.

CN116149781BActive Publication Date: 2025-07-22NETTRIX INFORMATION IND CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211425740.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-14
Publication Date
2025-07-22
Estimated Expiration
2042-11-14

AI Technical Summary

Technical Problem

The process of multi-opening of existing simulation software is complicated, prone to errors, and takes a long time. Especially when multi-core optimization is limited, it is difficult to efficiently simulate the PCIe link state.

Method used

By reading CPU performance parameters, the number of multi-open simulation software is automatically determined, and simulation tasks are allocated based on the total number of link states, so as to automatically control the simulation software to perform simulation tasks, reducing the probability of manual calculation errors.

Benefits of technology

Improve simulation efficiency, maximize CPU performance, reduce process and trial and error time, and simplify simulation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116149781B_ABST
    Figure CN116149781B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a simulation method, apparatus, device, and storage medium. The method includes: reading performance parameters of the central processing unit (CPU) of the current device; reading the total number of link states to be simulated; determining the number of simulation software to be multi-opened based on the performance parameters as the first number; determining the number of simulation tasks of the link state allocated to each simulation software based on the total number and the first number as the second number; controlling the first number of simulation software to be multi-opened, and controlling each simulation software to perform simulation based on the allocated second number of simulation tasks. The technical solution provided by the embodiment of the present invention can solve the problems of cumbersome and error-prone simulation processes, maximize the performance of the CPU, save time, and improve simulation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of simulation technology, and in particular to a simulation method, device, equipment and storage medium. Background Art

[0002] With the continuous increase in the rate of the Peripheral Component Interconnect Express (PCIE) high-speed serial computer expansion bus standard, the requirement for the total length of the link is gradually tightened, and the requirement for simulation is getting higher and higher.

[0003] Among them, for a PCIE 5.0 link, often hundreds of link states need to be simulated. Limited by the limited multi-core optimization of the simulation software, it is necessary to open multiple simulation software to improve efficiency. However, each time multiple simulation software is opened, it needs to be manually opened, the process is cumbersome, time-consuming, and it is also easy to miss running or run incorrectly. Summary of the Invention

[0004] Embodiments of the present invention provide a simulation method, device, equipment and storage medium, which can solve the problems of cumbersome simulation process and easy error, can maximize the performance of the CPU, can save time and improve simulation efficiency.

[0005] In a first aspect, an embodiment of the present invention provides a simulation method, including:

[0006] Reading the performance parameters of the central processing unit (CPU) of the current device;

[0007] Reading the total number of link states to be simulated;

[0008] Determining the number of simulation software to be opened based on the performance parameters, and taking it as the first number;

[0009] Determining the number of simulation tasks of the link states allocated to each simulation software based on the total number and the first number, and taking it as the second number;

[0010] Controlling the opening of the first number of simulation software, and controlling each simulation software to perform simulation based on the allocated second number of simulation tasks.

[0011] Optionally, the performance parameters include the number of threads;

[0012] The determining the number of simulation software to be opened based on the performance parameters includes:

[0013] Taking the number of threads of the CPU as the number of simulation software to be opened for inner-layer step simulation;

[0014] Correspondingly, the controlling each simulation software to perform simulation based on the allocated second number of simulation tasks includes:

[0015] Control each simulation software to perform inner-layer step simulation based on the assigned second quantity of simulation tasks.

[0016] In the above technical solution, by using the number of threads of the CPU as the number of simulation software to be multi-opened for inner-layer step simulation, the CPU performance can be maximized, and the efficiency of inner-layer step simulation can be improved.

[0017] Optionally, the performance parameter further includes the number of cores;

[0018] Determining the number of simulation software to be multi-opened based on the performance parameter further includes:

[0019] Using the number of cores of the CPU as the number of simulation software to be multi-opened for outer-layer virtual eye diagram simulation;

[0020] Correspondingly, controlling each simulation software to perform simulation based on the assigned second quantity of simulation tasks further includes:

[0021] Control each simulation software to perform outer-layer virtual eye diagram simulation based on the assigned second quantity of simulation tasks.

[0022] In the above technical solution, by using the number of cores of the CPU as the number of simulation software to be multi-opened for outer-layer virtual eye diagram simulation, the cores of the CPU can be maximally utilized, the performance of the CPU can be maximally utilized, and the efficiency of outer-layer virtual eye diagram simulation can be improved.

[0023] Optionally, after controlling each simulation software to perform inner-layer step simulation based on the assigned second quantity of simulation tasks, it further includes:

[0024] If the inner-layer step simulation is completed, control the opened simulation software to close;

[0025] Correspondingly, after controlling each simulation software to perform outer-layer virtual eye diagram simulation based on the assigned second quantity of simulation tasks, it further includes:

[0026] If the virtual eye diagram simulation is completed, control the opened simulation software to close.

[0027] In the above technical solution, by controlling the simulation software to close after the simulation is completed, an automated closing process can be realized, and the simulation efficiency can be improved.

[0028] Optionally, determining the number of simulation tasks of the link state assigned to each simulation software based on the total quantity and the first quantity includes:

[0029] Performing a division operation on the total quantity and the first quantity to obtain the number of simulation tasks of the link state assigned to each simulation software;

[0030] Among them, if there is a remainder m in the division operation, in the opened simulation software, an additional simulation task is assigned to the first m simulation software.

[0031] In the above technical solution, by performing a division operation on the total quantity and the first quantity, the number of simulation tasks of the link state assigned to each simulation software can evenly distribute the simulation tasks and improve the simulation efficiency.

[0032] Optionally, the reading of the total quantity of the link states to be simulated includes:

[0033] Reading the total number of lines describing the link states in the link configuration file, and determining the total quantity of the link states to be simulated based on the total number of lines.

[0034] In the above technical solution, by reading the total number of lines describing the link states in the link configuration file to determine the total quantity of the link states to be simulated, the total quantity of the link states can be accurately determined.

[0035] Optionally, each line in the link configuration file describing the link state corresponds to a link state to be simulated.

[0036] In the above technical solution, by defining that each line in the link configuration file describing the link state corresponds to a link state to be simulated, it is more convenient to obtain the quantity of the link states to be simulated.

[0037] In a second aspect, an embodiment of the present invention provides a simulation device, including:

[0038] A first reading module, configured to read the performance parameters of the central processing unit (CPU) of the current device;

[0039] A second reading module, configured to read the total quantity of the link states to be simulated;

[0040] A first determination module, configured to determine the number of simulation software to be opened based on the performance parameters and use it as the first quantity;

[0041] A second determination module, configured to determine the number of simulation tasks of the link state assigned to each simulation software based on the total quantity and the first quantity and use it as the second quantity;

[0042] A control module, configured to control the multi-opening of the first quantity of simulation software and control each simulation software to perform simulation based on the assigned second quantity of simulation tasks.

[0043] In a third aspect, an embodiment of the present invention provides an electronic device, the electronic device includes:

[0044] At least one processor; and

[0045] A memory communicatively connected to the at least one processor; wherein,

[0046] The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the method provided by the embodiments of the present invention.

[0047] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing computer instructions for causing a processor to implement the method provided by the embodiments of the present invention when executed.

[0048] In the technical solution of the embodiment of the present invention, the number of multi-opened simulation software is determined based on the performance parameters of the CPU, and the number of simulation tasks assigned to each simulation software is determined based on the total number of link states to be simulated and the number of multi-opened simulation software. The corresponding number of simulation software is multi-opened, and the simulation software is controlled to execute the corresponding number of simulation tasks. That is, the number of multi-opened simulation software is allocated by the performance parameters of the CPU, and tasks are assigned to each simulation software for simulation, which can maximize the performance of the CPU, solve the problems of cumbersome simulation process and easy error, reduce the process and trial-and-error time, and improve the simulation efficiency.

[0049] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. Description of the Drawings

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0051] Figure 1 is a flowchart of a simulation method provided by an embodiment of the present invention;

[0052] Figure 2a is a flowchart of a simulation method provided by an embodiment of the present invention;

[0053] Figure 2b is a flowchart of a memory step simulation provided by an embodiment of the present invention;

[0054] Figure 2c is a flowchart of an outer layer virtual eye diagram simulation method provided by an embodiment of the present invention;

[0055] Figure 2d It is a flowchart of a simulation method provided by an embodiment of the present invention;

[0056] Figure 3 A structural block diagram of a simulation device provided by an embodiment of the present invention;

[0057] Figure 4 It is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners

[0058] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0059] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily need to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0060] In the related art, it is necessary to manually open multiple simulation software to open multiple engineering pages and assign tasks to each simulation software. Among them, the simulation software can be Integrated Channel Analysis Tool (ICAT) software. Among them, the simulation is divided into two layers. The inner layer is step simulation, and the outer layer is virtual eye diagram simulation. The outer layer virtual eye diagram simulation requires the inner layer step simulation result to proceed. Among them, the ICAT software is a full-link simulation tool used to simulate whether the existing PCIe link design meets the specification requirements. A link refers to the physical path between the signal sending end and the receiving end.

[0061] Among them, for the inner-layer step simulation in the simulation task allocation interface, the starting number and the ending number need to be input. Here, the number n corresponds to the nth link state in the link configuration file (.CSV). In the simulation task allocation interface of the outer-layer virtual eye diagram simulation, the starting number and the ending number also need to be input. The number n corresponds to the nth link state in the link configuration file (.CSV). An example of allocating simulation tasks is as follows: If there are 96 link states in total and 6 simulation software need to be opened more, the task allocation is 1:16, 17:32, 33:48, 49:64, 65:80, 81:96.

[0062] During the process of opening multiple simulation software, the starting number and the ending number need to be manually input in each simulation software. The more software is opened, the more times the numbers need to be manually input, which is prone to input errors. Only after all simulations are executed can it be known which link state is normal.

[0063] During the process of manually inputting the starting number and the ending number, manual calculation is required, and there is a possibility of calculation errors. Generally, it is not until the last simulation software for task allocation that data errors are found. It must be that there is a calculation error when calculating and allocating simulation tasks in a certain previous simulation software. Each link state simulation needs to be stopped and the input needs to be redone. Among them, in the case of a large number of CPU cores, such as a remote simulation server, often more than 10 software need to be opened, and the process is cumbersome and time-consuming.

[0064] To solve the above problems, Figure 1 The flowchart of a simulation method provided by an embodiment of the present invention is shown. This embodiment is applicable to the case of link state simulation. This method can be executed by a simulation device, which can be implemented in the form of hardware and / or software. This device can be applied to an automation tool, and the automation tool can be configured in an electronic device such as a computer.

[0065] As Figure 1 shown, the technical solution provided by the embodiment of the present invention includes:

[0066] S110: Read the performance parameters of the central processing unit (CPU) of the current device.

[0067] In the embodiment of the present invention, the performance parameters of the current device CPU can be read through an automation tool. Among them, the performance parameters can include at least one of the number of CPU cores and the number of threads.

[0068] S120: Read the total number of link states to be simulated.

[0069] In an implementation manner of an embodiment of the present invention, optionally, reading the total number of link states that need to be simulated includes: reading the total number of lines describing the link states in the link configuration file, and determining the total number of link states that need to be simulated based on the total number of lines. Optionally, each line describing the link state in the link configuration file corresponds to a link state that needs to be simulated. Thus, by reading the total number of lines describing the link states in the link configuration file, the total number of link states that need to be simulated is determined, where the total number of lines is equal to the total number of link states that need to be simulated.

[0070] Thus, by reading the total number of lines describing the link states in the link configuration file to determine the total number of link states that need to be simulated, the total number of link states can be accurately determined.

[0071] S130: Determine the number of multi-opened simulation software based on the performance parameters and use it as the first number.

[0072] In an embodiment of the present invention, optionally, the performance parameters may include the number of threads. The number of multi-opened simulation software required for the inner-layer step simulation can be determined based on the number of threads of the CPU, that is, the number of threads of the CPU is used as the number of multi-opened simulation software required for the inner-layer step simulation.

[0073] In an embodiment of the present invention, optionally, the performance parameters may further include the number of cores. The number of multi-opened simulation software required for the outer-layer virtual eye diagram simulation can be determined based on the number of cores of the CPU, that is, the number of cores of the CPU is used as the number of multi-opened simulation software required for the outer-layer virtual eye diagram simulation.

[0074] Among them, due to the characteristics of the simulation software and the practice in the application process of the simulation software, the simulation software occupies the CPU threads for the inner-layer step simulation, and the simulation software occupies the cores of the CPU for the outer-layer virtual eye diagram simulation. Therefore, the number of multi-opened simulation software required for the inner-layer step simulation can be determined by the number of CPU threads, and the number of multi-opened simulation software required for the outer-layer virtual eye diagram simulation can be determined by the number of cores of the CPU. Here, multi-opening can be understood as opening multiple software simultaneously.

[0075] Thus, by determining the number of multi-opened simulation software based on the performance parameters, the CPU performance can be fully utilized and the simulation efficiency can be improved.

[0076] S140: Determine the number of simulation tasks of the link states assigned to each simulation software based on the total number and the first number, and use it as the second number.

[0077] In one implementation of the embodiments of the present invention, optionally, perform a division operation on the total quantity and the first quantity to obtain the number of simulation tasks of the link state assigned to each simulation software; wherein, if there is a remainder m in the division operation, in the opened simulation software, allocate one more simulation task to the first m simulation software.

[0078] Specifically, the total quantity of the link states to be simulated can be divided by the number of opened simulation software to obtain the number of simulation tasks of the link state assigned to each simulation software, that is, the number of link states to be simulated assigned to each simulation software. Wherein, if there is a remainder m, allocate one more simulation task to the first m simulation software, or randomly allocate the m simulation tasks to the simulation software, so as to achieve the purpose of evenly distributing the simulation tasks, thereby improving the efficiency.

[0079] S150: Control the opening of the first quantity of simulation software, and control each simulation software to perform simulation based on the assigned second quantity of simulation tasks.

[0080] In the embodiments of the present invention, control the opening of the first quantity of simulation software, and control each simulation software to execute the second quantity of simulation tasks. During the execution of the simulation tasks, inner-layer step simulation can be performed, or outer-layer virtual eye diagram simulation can be performed.

[0081] It should be noted that in the embodiments of the present invention, opening multiple simulation software can be understood as opening multiple project windows of the software simultaneously.

[0082] Therefore, by determining the number of simulation tasks of the link state assigned to each simulation software based on the total quantity of the link states and the number of simulation software to be opened, and executing the corresponding number of simulation tasks, calculation errors in the simulation process can be reduced, the trial-and-error time can be reduced, and the simulation efficiency can be improved.

[0083] The technical solution of the embodiments of the present invention determines the number of simulation software to be opened based on the performance parameters of the CPU, and determines the number of simulation tasks assigned to each simulation software based on the total quantity of the link states to be simulated and the number of simulation software to be opened. Open the corresponding number of simulation software, and control the simulation software to execute the corresponding number of simulation tasks, that is, allocate the number of simulation software to be opened through the performance parameters of the CPU, and automatically assign tasks to each simulation software for simulation, which can maximize the performance of the CPU, solve the problems of cumbersome and error-prone simulation process, reduce the process and trial-and-error time, and improve the simulation efficiency.

[0084] Figure 2a It is a flowchart of a simulation method provided by the embodiments of the present invention. In this embodiment, optionally, the performance parameters include the number of threads;

[0085] Determining the number of simulation software to be opened based on the performance parameters includes:

[0086] Regarding the number of threads of the CPU as the number of additional simulation software required for the inner-layer step simulation;

[0087] Correspondingly, controlling each simulation software to perform simulation based on the allocated second quantity of simulation tasks includes:

[0088] Controlling each simulation software to perform inner-layer step simulation based on the allocated second quantity of simulation tasks.

[0089] Optionally, the performance parameters further include the number of cores;

[0090] Determining the number of additional simulation software based on the performance parameters further includes:

[0091] Regarding the number of cores of the CPU as the number of additional simulation software required for the outer-layer virtual eye diagram simulation;

[0092] Correspondingly, controlling each simulation software to perform simulation based on the allocated second quantity of simulation tasks further includes:

[0093] Controlling each simulation software to perform outer-layer virtual eye diagram simulation based on the allocated second quantity of simulation tasks.

[0094] Optionally, after controlling each simulation software to perform inner-layer step simulation based on the allocated second quantity of simulation tasks, it further includes:

[0095] If the inner-layer step simulation is completed, controlling the opened simulation software to close;

[0096] Correspondingly, after controlling each simulation software to perform outer-layer virtual eye diagram simulation based on the allocated second quantity of simulation tasks, it further includes:

[0097] If the virtual eye diagram simulation is completed, controlling the opened simulation software to close.

[0098] As Figure 2a shown, the technical solution provided by the embodiment of the present invention includes:

[0099] S210: Read the number of threads and the number of cores of the central processing unit (CPU) of the current device.

[0100] S220: Read the total number of link states to be simulated.

[0101] S230: Regarding the number of threads of the CPU as the number of additional simulation software required for the inner-layer step simulation and as the first quantity.

[0102] In the embodiment of the present invention, the inner layer step simulation occupies the CPU threads. To maximize the utilization of the CPU performance, the number of CPU threads can be used as the number of simulation software to be launched more for the inner layer step simulation, so that during the inner layer simulation process, the CPU threads can be fully occupied, maximizing the utilization of resources and also improving the simulation efficiency.

[0103] S240: Determine the number of simulation tasks of the link state allocated to each simulation software based on the total number and the first number, and use it as the second number.

[0104] In the embodiment of the present invention, based on the total number of link states to be simulated and the number of software to be launched more for the inner layer step simulation, determine the number of simulation tasks of the link state allocated to each simulation software. That is, through automatic calculation, it is not necessary to manually calculate the start number and end number of the link state, reducing the probability of manual calculation errors.

[0105] S250: Control the launch of the first number of simulation software, and control each simulation software to perform inner layer step simulation based on the allocated second number of simulation tasks.

[0106] In the embodiment of the present invention, use the number of CPU threads as the number of simulation software to be launched more for the inner layer step simulation, launch the simulation software of this number, and perform the inner layer step simulation.

[0107] S260: If the inner layer step simulation is completed, control the opened simulation software to close.

[0108] In the embodiment of the present invention, detect whether the inner layer step simulation is completed through an automatic tool. If it is completed, control all opened simulation software to close.

[0109] Among them, the process of the inner layer step simulation provided by the embodiment of the present invention can refer to Figure 2b As Figure 2b shown, the start number and end number respectively correspond to the start number and end number of the link state.

[0110] S270: Use the number of CPU cores as the number of simulation software to be launched more for the outer layer virtual eye diagram simulation, and use it as the first number.

[0111] In the embodiment of the present invention, the simulation software for the outer layer virtual eye diagram simulation needs to occupy the number of CPU cores. To maximize the CPU performance, use the number of CPU cores as the number of simulation software to be launched more for the outer layer virtual eye diagram simulation. During the outer layer virtual eye diagram simulation process, all CPU cores can be occupied, maximizing the utilization of resources, thereby improving the efficiency of the outer layer virtual eye diagram simulation.

[0112] S280: Determine the number of simulation tasks for the link state assigned to each simulation software based on the total quantity and the first quantity, and use it as the second quantity.

[0113] In the embodiment of the present invention, based on the total number of link states to be simulated and the number of software that needs to be opened more for the outer virtual eye diagram simulation, determine the number of simulation tasks for the link state assigned to each simulation software. That is, by automatic calculation, there is no need for manual calculation of the starting number and ending number of the link state, which can reduce the probability of manual calculation errors.

[0114] S290: Control the opening of the first quantity of simulation software, and control each simulation software to perform the outer virtual eye diagram simulation based on the assigned second quantity of simulation tasks.

[0115] In the embodiment of the present invention, by using the number of cores of the CPU as the number of simulation software that needs to be opened more for the outer virtual eye diagram simulation, open the number of simulation software and perform the outer virtual eye diagram simulation.

[0116] S291: If the virtual eye diagram simulation is completed, control the opened simulation software to close.

[0117] In the embodiment of the present invention, use an automatic tool to detect whether the outer virtual eye diagram simulation is completed. If it is completed, control all opened simulation software to close.

[0118] Among them, the process of the outer virtual eye diagram simulation can refer to Figure 2c . The method provided by the embodiment of the present invention can also refer to Figure 2d .

[0119] Figure 3 It is a schematic structural diagram of a simulation device provided by an embodiment of the present invention. As Figure 3 shown, the device includes: a first reading module 310, a second reading module 320, a first determination module 330, a second determination module 340, and a control module 350.

[0120] Among them, the first reading module 310 is used to read the performance parameters of the central processing unit (CPU) of the current device;

[0121] The second reading module 320 is used to read the total number of link states to be simulated;

[0122] The first determination module 330 is used to determine the number of simulation software to be opened more based on the performance parameters, and use it as the first quantity;

[0123] The second determination module 340 is used to determine the number of simulation tasks for the link state assigned to each simulation software based on the total quantity and the first quantity, and use it as the second quantity;

[0124] A control module 350, configured to control the multi-opening of the first quantity of simulation software, and control each simulation software to perform simulation based on the second quantity of simulation tasks allocated thereto.

[0125] Optionally, the performance parameter includes the number of threads.

[0126] Determining the number of multi-opened simulation software based on the performance parameter includes:

[0127] Taking the number of threads of the CPU as the number of multi-opened simulation software required for inner-layer step simulation;

[0128] Correspondingly, controlling each simulation software to perform simulation based on the second quantity of simulation tasks allocated thereto includes:

[0129] Controlling each simulation software to perform inner-layer step simulation based on the second quantity of simulation tasks allocated thereto.

[0130] Optionally, the performance parameter further includes the number of cores.

[0131] Determining the number of multi-opened simulation software based on the performance parameter further includes:

[0132] Taking the number of cores of the CPU as the number of multi-opened simulation software required for outer-layer virtual eye diagram simulation;

[0133] Correspondingly, controlling each simulation software to perform simulation based on the second quantity of simulation tasks allocated thereto further includes:

[0134] Controlling each simulation software to perform outer-layer virtual eye diagram simulation based on the second quantity of simulation tasks allocated thereto.

[0135] Optionally, it further includes a closing module, configured to, after controlling each simulation software to perform inner-layer step simulation based on the second quantity of simulation tasks allocated thereto, if the inner-layer step simulation is completed, control the opened simulation software to close;

[0136] Correspondingly, the closing module is further configured to, after controlling each simulation software to perform outer-layer virtual eye diagram simulation based on the second quantity of simulation tasks allocated thereto, if the virtual eye diagram simulation is completed, control the opened simulation software to close.

[0137] Optionally, determining the number of simulation tasks of the link state allocated to each simulation software based on the total quantity and the first quantity includes:

[0138] Performing a division operation on the total quantity and the first quantity to obtain the number of simulation tasks of the link state allocated to each simulation software;

[0139] Among them, if there is a remainder m in the division operation, in the opened simulation software, an additional simulation task is allocated to the first m simulation software.

[0140] Optionally, the total number of link states to be simulated read includes:

[0141] Reading the total number of rows describing the link states in the link configuration file, and determining the total number of link states to be simulated based on the total number of rows.

[0142] Optionally, each row describing the link state in the link configuration file corresponds to a link state to be simulated.

[0143] The device provided by the embodiments of the present invention can execute the methods provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the methods.

[0144] Figure 4 FIG. shows a schematic structural diagram of an electronic device 10 that can be used to implement the embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0145] As Figure 4 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. Among them, the memory stores a computer program executable by the at least one processor. The processor 11 can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.

[0146] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0147] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the simulation method.

[0148] In some embodiments, the simulation method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the simulation method described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the simulation method by any other suitable means (e.g., by means of firmware).

[0149] The various embodiments of the systems and technologies described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor, the programmable processor can be a special or general-purpose programmable processor, can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0150] A computer program for implementing the method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0151] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0152] In order to provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0153] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.

[0154] A computing system can include a client and a server. The client and the server are generally far from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0155] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.

[0156] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims

1. A simulation method, characterized in that, Including: Reading the performance parameters of the central processing unit (CPU) of the current device through an automated tool; Reading the total number of link states to be simulated; wherein, the number of multi-opened simulation software is the number of multiple simulation software opened simultaneously; Determining the number of multi-opened simulation software based on the performance parameters and taking it as the first number; Performing a division operation on the total number and the first number to obtain the number of simulation tasks of the link state assigned to each simulation software and taking it as the second number; wherein, if there is a remainder m in the division operation, among the opened simulation software, the first m simulation software are assigned one more simulation task; controlling the multi-opening of the simulation software of the first number, and controlling each simulation software to perform simulation based on the assigned second number of simulation tasks; Wherein, the performance parameters include the number of threads; The determining the number of multi-opened simulation software based on the performance parameters includes: Taking the number of threads of the CPU as the number of multi-opened simulation software required for inner-layer step simulation; Correspondingly, the controlling each simulation software to perform simulation based on the assigned second number of simulation tasks includes: Controlling each simulation software to perform inner-layer step simulation based on the assigned second number of simulation tasks; The performance parameters further include the number of cores; The determining the number of multi-opened simulation software based on the performance parameters further includes: Taking the number of cores of the CPU as the number of multi-opened simulation software required for outer-layer virtual eye diagram simulation; Correspondingly, the controlling each simulation software to perform simulation based on the assigned second number of simulation tasks further includes: Controlling each simulation software to perform outer-layer virtual eye diagram simulation based on the assigned second number of simulation tasks.

2. The method according to claim 1, characterized in that, After controlling each simulation software to perform inner-layer step simulation based on the assigned second number of simulation tasks, it further includes: If the inner-layer step simulation is completed, controlling the opened simulation software to close; Correspondingly, after controlling each simulation software to perform outer-layer virtual eye diagram simulation based on the assigned second number of simulation tasks, it further includes: If the virtual eye diagram simulation is completed, controlling the opened simulation software to close.

3. The method according to claim 1, wherein The reading the total number of link states to be simulated includes: Reading the total number of rows describing the link states in the link configuration file, and determining the total number of link states to be simulated based on the total number of rows.

4. The method according to claim 3, wherein Each row in the link configuration file describing the link state corresponds to a link state to be simulated.

5. A simulation device, characterized in that, Including: A first reading module, configured to read the performance parameters of the central processing unit (CPU) of the current device through an automated tool; A second reading module, configured to read the total number of link states to be simulated; A first determining module, configured to determine the number of multi-opened simulation software based on the performance parameters and take it as the first number; wherein, the number of multi-opened simulation software is the number of multiple simulation software opened simultaneously; A second determination module, configured to perform a division operation on the total quantity and the first quantity to obtain the number of simulation tasks of the link state allocated to each simulation software, and use it as the second quantity; wherein, if there is a remainder m in the division operation, among the opened simulation software, the first m simulation software are allocated one more simulation task; A control module, configured to control the multi-opening of the first quantity of simulation software, and control each simulation software to perform simulation based on the allocated second quantity of simulation tasks; Wherein, the performance parameter includes the number of threads; The determining the number of simulation software to be multi-opened based on the performance parameter includes: Using the number of threads of the CPU as the number of simulation software to be multi-opened for the inner-layer step simulation; Correspondingly, the controlling each simulation software to perform simulation based on the allocated second quantity of simulation tasks includes: Controlling each simulation software to perform inner-layer step simulation based on the allocated second quantity of simulation tasks; the performance parameter further includes the number of cores; The determining the number of simulation software to be multi-opened based on the performance parameter further includes: Using the number of cores of the CPU as the number of simulation software to be multi-opened for the outer-layer virtual eye diagram simulation; Correspondingly, the controlling each simulation software to perform simulation based on the allocated second quantity of simulation tasks further includes: Controlling each simulation software to perform outer-layer virtual eye diagram simulation based on the allocated second quantity of simulation tasks.

6. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1-4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a processor to implement the method according to any one of claims 1-4 when executed.

Citation Information

Patent Citations

  • Parallel discrete simulation event driving method and device based on multiple threads

    CN111177893A