Chip performance test method and device, computer equipment and storage medium
By automating the comparison between simulation results and theoretical results of chips, the problems of long testing time and low accuracy in traditional chip performance testing are solved, achieving more efficient and accurate testing while reducing disk space usage.
Patent Information
- Application Number
- CN202310618469.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-29
- Publication Date
- 2024-11-29
AI Technical Summary
Traditional chip performance testing is time-consuming and the accuracy of test results is difficult to guarantee. Furthermore, waveform files consume a large amount of disk space, resulting in wasted costs.
By generating first and second stimulus data, performing simulation based on the first stimulus data, generating the current simulation result, processing based on the second stimulus data to obtain the current theoretical result, and automatically comparing the two to determine whether the performance test passes, thus avoiding manual inspection and waveform file generation.
Significantly shortens chip performance testing time, improves the accuracy of test results, reduces disk space usage, and enhances user satisfaction.
Smart Images

Figure CN119044740A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of chip performance testing, and in particular to a chip performance testing method, device, computer equipment and storage medium. Background Art
[0002] During the chip design process, it is often necessary to test multiple chip performances. Traditional solutions generally require generating corresponding simulation waveforms through EDA (Electronic Design Automation) simulation, and then manually checking the performance-related signals in the simulation waveform to manually determine whether the chip performance meets the standards. Although traditional solutions can realize the chip performance test function, the process of manually checking the simulation result waveform leads to a long chip performance test time; moreover, it is difficult to ensure the accuracy of the chip performance test results by relying on manual inspection to determine whether the chip performance test has passed. In addition, there is a problem in the related technology that waveform files occupy a large amount of disk space, resulting in a waste of cost. Summary of the invention
[0003] In view of this, the present invention provides a chip performance testing method, apparatus, computer equipment and storage medium to solve the problems existing in the related art that the chip performance testing time is long and it is difficult to ensure the accuracy of the chip performance testing results.
[0004] In a first aspect, the present invention provides a chip performance testing method, the method comprising:
[0005] Generate first stimulus data and second stimulus data; wherein the first stimulus data and the second stimulus data are used to describe the same performance of the chip;
[0006] Performing simulation based on the first excitation data to obtain a current simulation result; and processing the second excitation data to obtain a current theoretical result;
[0007] Compare the current simulation results with the current theoretical results to obtain a comparison result;
[0008] Based on the comparison results, determine whether the chip performance test has passed.
[0009] Based on the first stimulus data and the second stimulus data, the present invention generates the current simulation result and the current theoretical result, and determines whether the performance test is passed by automatically comparing the current simulation result with the current theoretical result; compared with the related art, the present invention does not need to manually check the waveform, so there is no need to manually judge whether the performance test is passed. The chip performance automation test solution provided by the present invention not only helps to significantly shorten the chip performance test time, but also can greatly improve the accuracy of the chip performance test results, and the user satisfaction is high. In addition, the present invention reduces the occupation of disk space through the simulation results without waveforms, avoiding the cost waste problem caused by the large occupation of disk space.
[0010] In an optional implementation, generating the first excitation data and the second excitation data includes:
[0011] Receive stimulus description information, where the stimulus description information is used to represent a current chip performance test scenario;
[0012] The first stimulus data and the second stimulus data are generated according to the stimulus description information.
[0013] The present invention can also satisfy the user's need to input stimulus description information as needed according to specific chip performance test scenarios. It can be seen that the present invention also has the advantages of wider coverage of scenarios, greater flexibility, and wider adaptability.
[0014] In an optional implementation, the stimulus description information includes a plurality of preset parameters, and the preset parameters include one or more test values; generating the first stimulus data and the second stimulus data according to the stimulus description information includes:
[0015] Loop through multiple preset parameters, and read test values from the multiple preset parameters respectively during each traversal process;
[0016] A stimulus combination is constructed using a plurality of test values read out during each traversal process, where the stimulus combination is used to represent an input stimulus;
[0017] According to the excitation combination, corresponding first excitation data and second excitation data are generated; the data format of the first excitation data is different from the data format of the second excitation data.
[0018] The present invention can also effectively avoid the problem of missing chip performance to be tested through various stimulus combinations, and can better meet the needs of increased performance testing scenarios, thereby significantly improving the market competitiveness of the performance testing method of the present invention.
[0019] In an optional implementation, comparing the current simulation result with the current theoretical result includes:
[0020] Determine a current error between a current simulation result and a current theoretical result, and determine whether the current error is within a preset range; wherein the comparison result is that the current error is within the preset range or the current error is outside the preset range.
[0021] The present invention realizes quantification of the comparison result between the current simulation result and the current theoretical result through the calculation method of the current error, so as to more accurately judge whether the comparison result is within a reasonable range, and further more accurately judge whether the chip performance test is passed.
[0022] In an optional implementation, the current simulation result includes a register transfer level simulation result and an electronic system level simulation result; determining a current error between the current simulation result and the current theoretical result includes:
[0023] Determine a first error between a register transfer level simulation result and an electronic system level simulation result, determine a second error between the register transfer level simulation result and a current theoretical result, and determine a third error between the electronic system level simulation result and the current theoretical result, wherein the current error includes the first error, the second error and the third error.
[0024] Based on the register transfer level simulation results and the electronic system level simulation results, the present invention no longer needs to generate a waveform file. Since no waveform file is generated, the present invention can further shorten the simulation time and further improve the accuracy of the simulation test results by comparing the three errors.
[0025] In an optional implementation, determining whether the chip performance test passes according to the comparison result includes:
[0026] If the first error, the second error, and the third error are all within the preset range, it is determined that the chip performance test has passed.
[0027] The present invention can also determine whether the chip performance test result meets the standard after comprehensively considering various situations, thereby further improving the accuracy of the chip performance test.
[0028] In an optional implementation, the first excitation data includes first sub-excitation data and second sub-excitation data; and the simulation based on the first excitation data includes:
[0029] Simulation is performed based on the first sub-stimulus data to generate a register transfer level simulation result; and simulation is performed based on the second sub-stimulus data to generate an electronic system level simulation result.
[0030] The present invention can also provide the first sub-stimulation data and the second sub-stimulation data correspondingly according to a variety of different actual simulation environments, thereby improving the effectiveness and reliability of simulation data input.
[0031] In an optional implementation, the first stimulus data is an instruction sequence, the second stimulus data is a text file for script processing; and the current simulation result and the current theoretical result are both log files.
[0032] Based on the instruction sequence and the excitation data in the form of a text file, the present invention can also significantly improve the applicability of the excitation data input for simulation and processing of the present invention. The simulation process of generating a log file of the present invention is shorter than the simulation process of generating a waveform, and the simulation time is greatly shortened. Compared with the problem in the related art that the files for saving waveforms occupy a large amount of disk space, the log files of the present invention occupy less disk space.
[0033] In an optional implementation, the chip performance testing method further includes:
[0034] If the chip performance test passes, a test report is generated based on the current simulation results and / or current theoretical results;
[0035] If the chip performance test fails, an analysis report is generated based on the current simulation results and the current theoretical results.
[0036] The present invention can also provide a test report generation function and an analysis report generation function, providing users with more comprehensive chip test-related information, further improving user satisfaction.
[0037] In a second aspect, the present invention provides a chip performance testing device, the device comprising:
[0038] A generating module, used to generate first stimulus data and second stimulus data; wherein the first stimulus data and the second stimulus data are used to describe the same performance of the chip;
[0039] A processing module is used to perform simulation based on the first excitation data to obtain a current simulation result; the processing module is also used to process the second excitation data to obtain a current theoretical result;
[0040] A comparison module, used for comparing the current simulation result with the current theoretical result to obtain a comparison result;
[0041] The determination module is used to determine whether the chip performance test passes according to the comparison result.
[0042] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the chip performance testing method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0043] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the chip performance testing method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0045] Figure 1 is a schematic flow chart of a chip performance testing method according to an embodiment of the present invention;
[0046] Figure 2 is a flow chart of another chip performance testing method according to an embodiment of the present invention;
[0047] Figure 3 is a flow chart of another chip performance testing method according to an embodiment of the present invention;
[0048] Figure 4 is a flow chart of another chip performance testing method according to an embodiment of the present invention;
[0049] Figure 5 It is a flowchart of a chip performance testing method based on register transfer level simulation and electronic system level simulation according to an embodiment of the present invention;
[0050] Figure 6 is a flow chart of a chip performance testing method with a report generating function according to an embodiment of the present invention;
[0051] Figure 7 is a schematic diagram of the working principle of a chip performance testing method according to an embodiment of the present invention;
[0052] Figure 8 is a structural block diagram of a chip performance testing device according to an embodiment of the present invention;
[0053] Fig. 9 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0055] In the related art, when a chip is subjected to performance testing, the traditional approach is to construct a separate performance test stimulus (file in sv format), obtain simulation results through EDA simulation, and generally, simulate the performance test stimulus through VCS (Verilog Computer Simulation, hardware description language computer simulation) simulation tools, and obtain simulation results specifically as simulation waveforms (files in fsdb format or vcd format), and then manually check whether the performance-related signals in the waveform meet the standards to confirm whether the performance meets the standards. The traditional approach has defects, such as manual waveform inspection is very time-consuming, the waveform generation process causes the simulation time to be very long, and the method of relying on manual waveform inspection is prone to errors, and there are problems with limited performance test scenarios or omission of certain performance, which results in the market competitiveness of traditional chip performance testing methods being damaged.
[0056] According to an embodiment of the present invention, an embodiment of a chip performance testing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0057] In this embodiment, a chip performance testing method is provided, which can be used for computer equipment. Figure 1 is a flow chart of a chip performance testing method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0058] Step S101, generating first stimulus data and second stimulus data; wherein the first stimulus data and the second stimulus data are used to describe the same performance of the chip.
[0059] The chip involved in this embodiment is, for example, a processor chip, such as an AI (Artificial Intelligence) processor chip, but is certainly not limited thereto.
[0060] Among them, the chip performance involved in this embodiment may include, for example, but is not limited to, the chip power consumption, bandwidth (for example, on-chip bandwidth, off-chip bandwidth, discrete access bandwidth, broadcast bandwidth), computing efficiency (for example, matrix computing efficiency, vector computing efficiency, scalar computing efficiency), computing time, instruction switching overhead or synchronization overhead, etc. The same performance of the above-mentioned chip is power consumption, bandwidth, computing efficiency, computing time, instruction switching overhead or synchronization overhead, etc. Of course, the chip performance that can be tested in the present invention is not limited to the above examples.
[0061] Step S102, performing simulation based on the first excitation data to obtain a current simulation result; and processing the second excitation data to obtain a current theoretical result.
[0062] In an embodiment of the present invention, the process of simulating based on the first stimulus data may include: using the first stimulus data as stimulus, simulating the working process of the chip, and generating the current simulation result; the process of processing the second stimulus data may include: processing the second stimulus data according to a preset performance script, specifically, calculating the second stimulus data according to a preset performance formula in the preset performance script to generate the current theoretical result. In this embodiment, the performance formula can be implemented through python (computer programming language).
[0063] Taking the chip operation time as an example, the performance formula in this embodiment is operation time = N*C*H*W / operator scale, where N represents batch, C represents the number of channels, H represents height, and W represents width. The second stimulus data includes the above N, C, H, and W. In addition, the unit of operation time in this embodiment is clock cycle, that is, the operation time represents a certain number of clock cycles calculated using the above performance formula.
[0064] In a certain example, the operation time = N*C*H*W / operator size = 64*64*32*32 / 512 = 8192 clock cycles. Taking an AI processor chip with an operating frequency of 1GHz as an example, the clock cycle is 1ns, then 8192 clock cycles = 8192ns.
[0065] Taking chip computing efficiency as an example, the performance formula in other embodiments of the present invention is computing efficiency = computing amount / chip computing power*chip working efficiency.
[0066] Step S103, comparing the current simulation result with the current theoretical result to obtain a comparison result.
[0067] In this embodiment, after obtaining the current simulation result and the current theoretical result, the current simulation result is compared with the current theoretical result, and a comparison result between the current simulation result and the current theoretical result is obtained.
[0068] Step S104: determine whether the chip performance test passes according to the comparison result.
[0069] If the comparison result between the current simulation result and the current theoretical result is within a reasonable range, it is determined that the chip performance test has passed; and if the comparison result between the current simulation result and the current theoretical result is not within a reasonable range, it is determined that the chip performance test has failed.
[0070] The specific numerical range of the reasonable range in this embodiment is determined according to the specific performance of the chip to be tested.
[0071] Based on the generated first stimulus data and second stimulus data, the present invention obtains the current simulation result and the current theoretical result, and determines whether the performance test is passed by automatically comparing the current simulation result with the current theoretical result. Therefore, the present invention does not need to generate waveform results, does not need to manually check the waveform, and thus does not need to manually determine whether the performance test is passed. The chip performance automation test solution in the present invention not only helps to significantly shorten the chip performance test time, but also can greatly improve the accuracy of the chip performance test results, saves a lot of labor costs, and has high user satisfaction. In addition, the present invention reduces the occupation of disk space through waveform-free simulation results, avoiding the cost waste problem caused by the large occupation of disk space.
[0072] In this embodiment, a chip performance testing method is provided, which can be used for computer equipment. Figure 2 is a flow chart of a chip performance testing method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0073] Step S201, generating first stimulus data and second stimulus data; wherein the first stimulus data and the second stimulus data are used to describe the same performance of the chip.
[0074] Specifically, the above step S201 includes:
[0075] Step S2011, receiving stimulus description information, where the stimulus description information is used to represent the current chip performance test scenario.
[0076] In this embodiment, the stimulus description information is a test case, and a specific test case can be constructed for a specific test scenario for testing. The stimulus description information can be used to better meet the user's input for simulation and calculation according to actual needs, so as to meet different processing requirements in different test scenarios.
[0077] Among them, the stimulus description information may be, for example, description information related to the chip's power consumption, bandwidth, computing efficiency or computing time. The stimulus description information may be, for example, stimulus description information for peak performance testing. The peak performance test may be, for example, a computing power peak test, a bandwidth peak test or a power consumption peak test. The sources of current chip performance test scenarios may include, but are not limited to, chip design specifications, microarchitecture design, typical application scenarios, etc., which are positively correlated with the complexity of chip design. However, due to the limited chip R&D period and relatively time-consuming performance testing, the scale is generally limited to a few thousand.
[0078] Exemplarily, the stimulus description information may be represented by a convolution, wherein the convolution includes a plurality of preset parameters, each of which specifically includes at least one test value, and the test value is used to represent the range covered by the corresponding preset parameter.
[0079] In combination with the above-mentioned example of chip operation time, the stimulus description information may include preset parameters N, preset parameters C, preset parameters H and preset parameters W, for example, N = [32, 64, 128], C = [32, 64, 128, 256], H = [1, 3, 5], W = [1, 3, 5]; wherein, the preset parameter N includes test values 32, 64, 128, the preset parameter C includes test values 32, 64, 128, 256, the preset parameter H includes test values 1, 3, 5, and the preset parameter W includes test values 1, 3, 5.
[0080] Step S2012: Generate first stimulus data and second stimulus data according to the stimulus description information.
[0081] In this embodiment, the stimulus generator implemented specifically in Python (computer programming language) receives the stimulus description information, and then the stimulus generator generates the first stimulus data and the second stimulus data according to the stimulus description information.
[0082] During specific implementation, the tester inputs the stimulus description information into the stimulus generator, and the stimulus generator generates the required stimulus data in the instruction sequence file format.
[0083] In combination with the above content, the tester inputs the stimulus description according to the actual scenario requirements. It can be seen that this embodiment can also meet the user's needs to input stimulus description information as needed according to the specific chip performance test scenario. It can be seen that this embodiment also has the advantages of wider coverage of scenarios, greater flexibility, and wider adaptability.
[0084] In some optional implementations, the stimulus description information includes a plurality of preset parameters, and the preset parameters include one or more test values. The above step S2012 includes:
[0085] Step a1, looping through multiple preset parameters, and reading test values from the multiple preset parameters respectively during each looping process.
[0086] The loop traversal is implemented in a multi-layer nested loop (such as a for loop implementation), and a test value can be read from each prediction parameter one by one during a loop traversal. For example, in combination with the above chip operation time example, the first traversal reads N=32, C=32, H=1, and W=1.
[0087] Step a2, constructing a stimulus combination using multiple test values read out during each traversal process, where the stimulus combination is used to represent an input stimulus.
[0088] In this embodiment, one loop traversal process generates one stimulus combination, and the loop traversal process ends after all stimulus combinations are obtained. For example, combined with the above-mentioned chip operation time example, according to the number of test values contained in the preset parameter N, preset parameter C, preset parameter H and preset parameter W (specifically N = [32, 64, 128], C = [32, 64, 128, 256], H = [1, 3, 5], W = [1, 3, 5]), a total of 3×4×3×3=108 stimulus combinations are generated, that is, 3×4×3×3=108 stimulus contents.
[0089] Step a3: Generate corresponding first excitation data and second excitation data according to the excitation combination; the data format of the first excitation data is different from the data format of the second excitation data.
[0090] The stimulus generator generates corresponding stimulus data for each stimulus combination. Specifically, this embodiment encapsulates according to the format required for subsequent processing, for example, the first stimulus data may be encapsulated according to the first data format, and the second stimulus data may be encapsulated according to the second data format.
[0091] Step S202: Perform simulation based on the first excitation data to obtain the current simulation result; and process the second excitation data to obtain the current theoretical result. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0092] Step S203, compare the current simulation result with the current theoretical result to obtain a comparison result. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0093] Step S204: Determine whether the chip performance test has passed based on the comparison result. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.
[0094] Since the performance test objectives of each scenario are different, the signals that need to be observed and captured in each scenario are also different, and the target performance is also different. The relevant technologies are all done manually, which is time-consuming and error-prone, resulting in problems such as limited performance test scenarios or missed performance, thereby damaging market competitiveness. This embodiment can effectively avoid the problem of missing chip performance to be tested through multiple stimulus combinations, and can better meet the needs of increasing performance test scenarios, thereby significantly improving the market competitiveness of the performance test method of the embodiment of the present invention.
[0095] In this embodiment, a chip performance testing method is provided, which can be used for computer equipment. Figure 3 is a flow chart of a chip performance testing method according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:
[0096] Step S301, generating first stimulus data and second stimulus data; wherein the first stimulus data and the second stimulus data are used to describe the same performance of the chip. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0097] Step S302: Perform simulation based on the first excitation data to obtain the current simulation result; and process the second excitation data to obtain the current theoretical result. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0098] Step S303, comparing the current simulation result with the current theoretical result, including: determining the current error between the current simulation result and the current theoretical result, and determining whether the current error is within a preset range; wherein the comparison result is that the current error is within the preset range or the current error is outside the preset range.
[0099] This embodiment represents the quantification result of the comparison result between the current simulation result and the current theoretical result through the current error between the current simulation result and the current theoretical result. By quantifying the comparison result, it is possible to more accurately judge whether the comparison result is within a reasonable range, and further more accurately judge whether the chip performance test has passed.
[0100] In some optional embodiments, the current simulation result includes a register transfer level simulation result and an electronic system level simulation result, and the above-mentioned determination of the current error between the current simulation result and the current theoretical result includes: determining a first error between the register transfer level simulation result and the electronic system level simulation result, and determining a second error between the register transfer level simulation result and the current theoretical result, and determining a third error between the electronic system level simulation result and the current theoretical result, and the current error includes the first error, the second error and the third error.
[0101] Among them, the register transaction level (RTL) refers to the hardware implementation code of the chip, which can be implemented through Verilog; the electric system level (ESL) refers to the performance model of the chip, which can be implemented through C++ or python or systemC (a software / hardware co-design language) and the like. In this embodiment, the first sub-stimulus data in the first stimulus data is simulated by RTL to obtain the register transfer level simulation result, and the second sub-stimulus data in the first stimulus data is simulated by ESL to obtain the electronic system level simulation result. In this embodiment, the first stimulus data is obtained by encapsulating according to the instruction sequence format executable by RTL and ESL, and the second stimulus data is obtained by encapsulating according to the csv format.
[0102] During specific implementation, the embodiment of the present invention adds the performance statistics code required for performance testing to RTL and ESL, and obtains the results of the performance test (simulation results) on demand after simulation, which may specifically be performance statistics content. Optionally, the RTL in this embodiment can be replaced by an FPGA (Field Programmable Gate Array), a ZEBU (hardware simulation accelerator) or an actual chip with the same function as the RTL in this embodiment. In addition, the RTL in this embodiment will generate a netlist for chip casting in the later stage, which is the actual chip code; the ESL platform can output it to the software (performance statistics code) for use in the gap between RTL casting and return, so as to perform software performance testing.
[0103] The data format of the first excitation data of this embodiment can be different from the data format of the second excitation data, that is, excitation data of three data formats are used. Based on the excitation data of three data formats, the present invention obtains simulation results without waveforms, avoiding the problem of waveform files occupying a large amount of disk space in the related art.
[0104] Taking the computing efficiency of the chip performance to be tested as an example, assuming that the register transfer level simulation result is 85%, the electronic system level simulation result is 87%, and the current theoretical result is 90%, the first error is |85%-87%|=2%, the second error is |85%-90%|=5%, and the third error is |87%-90%|=4%.
[0105] It should be understood that in actual chip testing scenarios, any of the register transfer level simulation results, the electronic system level simulation results, and the current theoretical results may have erroneous results. This embodiment can determine that the chip performance test has passed only when the register transfer level simulation results, the electronic system level simulation results, and the current theoretical results are all correct, thereby greatly improving the accuracy of the chip performance test.
[0106] Step S304: Determine whether the chip performance test has passed based on the comparison result. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.
[0107] Based on RTL and ESL, this embodiment can not only obtain register transfer level simulation results and electronic system level simulation results that occupy less disk space and shorten the simulation time by not generating waveform files, but also further improve the accuracy of simulation test results by comparing three errors.
[0108] In some optional implementations, the first stimulus data is an instruction sequence, the second stimulus data is a text file for script processing; and the current simulation result and the current theoretical result are both log files.
[0109] The instruction sequence in this embodiment can be directly used for input into RTL and ESL, and the text file can be used for direct input into the performance script, thereby significantly improving the applicability of the present invention for input of stimulus data for simulation and processing.
[0110] The log file involved in this embodiment refers to a log file. A log file is a simulation result represented by data (without a waveform). In this embodiment, the current theoretical result is specifically a text file in csv format.
[0111] The log file used in the embodiment of the present invention occupies very little disk space, which better solves the problem that the file used to save the waveform occupies a large amount of disk space, and the simulation process used to generate the log file greatly shortens the simulation time.
[0112] In this embodiment, a chip performance testing method is provided, which can be used for computer equipment. Figure 4 is a flow chart of a chip performance testing method according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:
[0113] Step S401, generating first stimulus data and second stimulus data; wherein the first stimulus data and the second stimulus data are used to describe the same performance of the chip. Figure 3 Step S301 of the illustrated embodiment will not be described in detail here.
[0114] Step S402: Perform simulation based on the first excitation data to obtain the current simulation result; and process the second excitation data to obtain the current theoretical result. Figure 3 Step S302 of the illustrated embodiment will not be described in detail here.
[0115] Step S403, compare the current simulation result with the current theoretical result to obtain a comparison result. Figure 3 Step S303 of the illustrated embodiment will not be described in detail here.
[0116] Step S404, determining whether the first error, the second error and the third error are all within a preset range.
[0117] The preset range may be set accordingly according to the specific chip performance to be tested involved in this embodiment.
[0118] In combination with the above example where the chip performance to be tested is computing efficiency, the first error is |85%-87%|=2%, the second error is |85%-90%|=5%, and the third error is |87%-90%|=4%. If the preset range is ≤3.9%, the first error is within the preset range, and the second error and the third error are not within the preset range.
[0119] Step S405: if the first error, the second error and the third error are all within a preset range, it is determined that the chip performance test has passed.
[0120] For example, if the first error, the second error, and the third error are all smaller than the maximum value in the preset range, it means that the chip performance test has passed.
[0121] Step S406: If any one of the first error, the second error and the third error is not within the preset range, it is determined that the chip performance test fails.
[0122] In combination with the above example where the chip performance to be tested is computing efficiency, the first error is |85%-87%|=2%<3.9%, the second error is |85%-90%|=5%>3.9%, and the third error is |87%-90%|=4%>3.9%, then the chip computing efficiency test fails.
[0123] The embodiment of the present invention considers that the chip performance test is passed only when the three errors of the first error, the second error and the third error are all within a preset range. This method can determine whether the chip performance test result meets the standard after comprehensively considering various situations, avoiding the problem of inaccurate test results caused by two results with the same error (for example, register transfer level simulation results and electronic system level simulation results, or register transfer level simulation results and current theoretical results, or electronic system level simulation results and current theoretical results). Therefore, this embodiment further improves the accuracy of the chip performance test.
[0124] In this embodiment, a chip performance testing method is provided, which can be used for computer equipment. Figure 5 is a flow chart of a chip performance testing method according to an embodiment of the present invention. Figure 5 As shown, the process includes the following steps:
[0125] Step S501, generating first stimulus data and second stimulus data; wherein the first stimulus data and the second stimulus data are used to describe the same performance of the chip. Figure 3 Step S301 of the illustrated embodiment will not be described in detail here.
[0126] Step S502: performing simulation based on the first excitation data to obtain a current simulation result; and processing the second excitation data to obtain a current theoretical result.
[0127] In some optional implementations, the first stimulus data includes first sub-stimulus data and second sub-stimulus data; the above step S502 includes:
[0128] Step S5021, performing simulation based on the first stimulus data, including: performing simulation based on the first sub-stimulus data to generate a register transfer level simulation result; and performing simulation based on the second sub-stimulus data to generate an electronic system level simulation result.
[0129] In this embodiment, the first sub-stimulus data may be specifically a binary first instruction sequence, which is an instruction sequence suitable for inputting into RTL, and the second sub-stimulus data may be specifically a binary second instruction sequence, which is an instruction sequence suitable for inputting into ESL.
[0130] Step S5022: Process the second excitation data to obtain a current theoretical result.
[0131] In this embodiment, the second excitation data is specifically a text file in csv format.
[0132] Step S503, compare the current simulation result with the current theoretical result to obtain a comparison result. Figure 3Step S303 of the illustrated embodiment will not be described in detail here.
[0133] Step S504: Determine whether the chip performance test has passed based on the comparison result. Figure 3 Step S304 of the illustrated embodiment will not be described in detail here.
[0134] For RTL and ESL simulation environments, this embodiment can also provide first sub-stimulus data and second sub-stimulus data correspondingly according to a variety of different actual simulation environments, thereby improving the effectiveness and reliability of simulation data input.
[0135] In this embodiment, a chip performance testing method is provided, which can be used for computer equipment. Figure 6 is a flow chart of a chip performance testing method according to an embodiment of the present invention. Figure 6 As shown, the process includes the following steps:
[0136] Step S601, generating first stimulus data and second stimulus data; wherein the first stimulus data and the second stimulus data are used to describe the same performance of the chip. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0137] Step S602: Perform simulation based on the first excitation data to obtain the current simulation result; and process the second excitation data to obtain the current theoretical result. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0138] Step S603, compare the current simulation result with the current theoretical result to obtain a comparison result. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0139] Step S604: Determine whether the chip performance test has passed based on the comparison result. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.
[0140] Step S605, determining whether the chip performance test has passed.
[0141] Step S606: if the chip performance test passes, a test report is generated based on the current simulation results and / or the current theoretical results.
[0142] In this embodiment, when the chip test passes, the generated test report can be directly printed out as a performance analysis report.
[0143] Step S607: if the chip performance test fails, an analysis report is generated based on the current simulation results and the current theoretical results.
[0144] In this embodiment, when the chip test fails, an analysis report is generated, and the analysis report can be output in the form of a performance test report and printed out.
[0145] The present invention can also provide a test report generation function and an analysis report generation function, providing users with more comprehensive chip test-related information, further improving user satisfaction.
[0146] like Figure 7 As shown, in the performance test automation environment (such as Linux system environment), this embodiment represents the current performance test scenario by inputting incentives, and the tester can fill the text description (input incentive) used to represent the current chip performance test scenario into the incentive generator, and then the incentive generator generates incentive data for inputting into RTL, ESL and performance scripts respectively according to the input incentives, and outputs the waveform-free simulation results respectively through RTL and ESL, and outputs the theoretical results through the performance formula, and then the inspection tool can be used to determine whether the errors between the two waveform-free simulation results and the theoretical results are all within the preset range. If they are within the preset range, it means that the test results meet the standards and the chip performance test passes; if they are not within the preset range, it means that the test results do not meet the standards and the chip performance test fails. In the case of passing the chip performance test, a performance test report is generated and output, and in the case of failing the chip performance test, an analysis tool is called to generate an analysis report, the analysis report is merged into the performance test report, and then the performance test report is output. The incentive generator, performance script, inspection tool, and analysis tool involved in the present invention can be completed by python or shell scripts.
[0147] In this embodiment, a chip performance test device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0148] This embodiment provides a chip performance testing device, such as Figure 8 As shown, including:
[0149] A generating module 801 is used to generate first stimulus data and second stimulus data; wherein the first stimulus data and the second stimulus data are used to describe the same performance of the chip;
[0150] The processing module 802 is used to perform simulation based on the first excitation data to obtain the current simulation result; the processing module 802 is also used to process the second excitation data to obtain the current theoretical result;
[0151] A comparison module 803 is used to compare the current simulation result with the current theoretical result to obtain a comparison result;
[0152] The determination module 804 is used to determine whether the chip performance test passes according to the comparison result.
[0153] In some optional implementations, the generating module 801 includes:
[0154] A receiving unit, used to receive stimulus description information, where the stimulus description information is used to represent a current chip performance test scenario;
[0155] The generating unit is used to generate the first stimulus data and the second stimulus data according to the stimulus description information.
[0156] In some optional implementations, the stimulus description information includes a plurality of preset parameters, and the preset parameters include one or more test values; and the generating unit includes:
[0157] A traversal subunit, used for cyclically traversing a plurality of preset parameters, and for reading test values from the plurality of preset parameters respectively during each traversal process;
[0158] A construction subunit, used to construct a stimulus combination using a plurality of test values read out during each traversal process, wherein the stimulus combination is used to represent an input stimulus;
[0159] The generating subunit is used to generate corresponding first excitation data and second excitation data according to the excitation combination; the data format of the first excitation data is different from the data format of the second excitation data.
[0160] In some optional implementations, the comparison module 803 includes:
[0161] A first determining unit, used to determine a current error between a current simulation result and a current theoretical result;
[0162] The second determination unit is used to determine whether the current error is within a preset range; wherein the comparison result is that the current error is within the preset range or the current error is outside the preset range.
[0163] In some optional implementations, the current simulation result includes a register transfer level simulation result and an electronic system level simulation result. The first determination unit includes:
[0164] A first determining subunit, used to determine a first error between a register transfer level simulation result and an electronic system level simulation result;
[0165] A second determining subunit, used to determine a second error between the register transfer level simulation result and the current theoretical result;
[0166] The third determination subunit is used to determine a third error between the electronic system-level simulation result and the current theoretical result, where the current error includes the first error, the second error and the third error.
[0167] In some optional implementations, the determination module 804 is specifically configured to determine whether the chip performance test has passed according to the first error, the second error, and the third error being within a preset range.
[0168] In some optional implementations, the first stimulus data includes first sub-stimulus data and second sub-stimulus data. The processing module 802 includes:
[0169] A first simulation unit, configured to perform simulation based on the first sub-stimulus data to generate a register transfer level simulation result;
[0170] The second simulation unit is used to perform simulation based on the second sub-stimulus data to generate electronic system-level simulation results.
[0171] In some optional implementations, the first stimulus data is an instruction sequence, the second stimulus data is a text file for script processing; and the current simulation result and the current theoretical result are both log files.
[0172] In some optional implementations, the chip performance testing device further includes:
[0173] A first report generating module, configured to generate a test report based on the current simulation result and / or the current theoretical result according to whether the chip performance test passes;
[0174] The second report generating module is used to generate an analysis report based on the current simulation results and the current theoretical results according to the chip performance test failing.
[0175] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0176] The chip performance testing device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0177] The embodiment of the present invention also provides a computer device having the above Figure 8 The chip performance test device is shown.
[0178] See also Fig. 9 , Fig. 9 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig. 9 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig. 9 A processor 10 is taken as an example.
[0179] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0180] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0181] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0182] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0183] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0184] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0185] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A chip performance testing method, characterized in that: The method comprises: Generate first stimulus data and second stimulus data; wherein the first stimulus data and the second stimulus data are used to describe the same performance of the chip; Performing simulation based on the first excitation data to obtain a current simulation result; and processing the second excitation data to obtain a current theoretical result; Comparing the current simulation result with the current theoretical result to obtain a comparison result; According to the comparison result, it is determined whether the chip performance test passes.
2. The method according to claim 1, characterized in that The generating of the first excitation data and the second excitation data comprises: Receiving stimulus description information, where the stimulus description information is used to represent a current chip performance test scenario; The first stimulus data and the second stimulus data are generated according to the stimulus description information.
3. The method according to claim 2, characterized in that The stimulus description information includes a plurality of preset parameters, and the preset parameters include one or more test values; and generating the first stimulus data and the second stimulus data according to the stimulus description information includes: The plurality of preset parameters are traversed in a loop, and test values are read out from the plurality of preset parameters respectively during each traversal process; Constructing a stimulus combination using a plurality of test values read out during each traversal process, wherein the stimulus combination is used to represent an input stimulus; The first excitation data and the second excitation data are generated according to the excitation combination; the data format of the first excitation data is different from the data format of the second excitation data.
4. The method according to any one of claims 1 to 3, characterized in that The comparing the current simulation result with the current theoretical result comprises: Determine a current error between the current simulation result and the current theoretical result, and determine whether the current error is within a preset range; The comparison result is that the current error is within the preset range or the current error is outside the preset range.
5. The method according to claim 4, characterized in that The current simulation result includes a register transfer level simulation result and an electronic system level simulation result; and determining a current error between the current simulation result and the current theoretical result includes: Determine a first error between the register transfer level simulation result and the electronic system level simulation result, determine a second error between the register transfer level simulation result and the current theoretical result, and determine a third error between the electronic system level simulation result and the current theoretical result, wherein the current error includes the first error, the second error, and the third error.
6. The method according to claim 5, characterized in that Determining whether the chip performance test passes according to the comparison result includes: If the first error, the second error, and the third error are all within the preset range, it is determined that the chip performance test has passed.
7. The method according to claim 5, characterized in that The first excitation data includes first sub-excitation data and second sub-excitation data; and the simulation based on the first excitation data includes: A simulation is performed based on the first sub-stimulus data to generate the register transfer level simulation result; and a simulation is performed based on the second sub-stimulus data to generate the electronic system level simulation result.
8. The method according to any one of claims 1 to 3, characterized in that The first stimulus data is an instruction sequence, and the second stimulus data is a text file for script processing; The current simulation result and the current theoretical result are both log files.
9. The method according to any one of claims 1 to 3, characterized in that The method further comprises: If the chip performance test passes, a test report is generated based on the current simulation result and / or the current theoretical result; If the chip performance test fails, an analysis report is generated based on the current simulation results and the current theoretical results.
10. A chip performance testing device, characterized in that: The device comprises: A generating module, used to generate first stimulus data and second stimulus data; wherein the first stimulus data and the second stimulus data are used to describe the same performance of the chip; A processing module, used for performing simulation based on the first excitation data to obtain a current simulation result; the processing module is also used for processing the second excitation data to obtain a current theoretical result; A comparison module, used for comparing the current simulation result with the current theoretical result to obtain a comparison result; The determination module is used to determine whether the chip performance test passes according to the comparison result.
11. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the chip performance testing method according to any one of claims 1 to 9 by executing the computer instructions.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the chip performance testing method according to any one of claims 1 to 9.
