Functional Test Method, Device and Storage Medium of Random Access Memory

By using test templates and the method of automatically combining input data and verification scripts in random memory functional testing, the problem of large and complex number of test cases is solved, and efficient automatic generation of test cases and fully automated testing processes are realized.

CN119559989BActive Publication Date: 2025-06-10SHENZHEN JINGCUN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510102672.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-06-10
Estimated Expiration
2045-01-22

AI Technical Summary

Technical Problem

Random memory needs to build a large number of different data in functional testing to participate in test verification, resulting in large and complex test cases and low testing efficiency, especially when different memory devices need to match test cases one by one.

Method used

By providing a test template, building a basic test process, and configuring test function instructions, input parameter items and output verification items in the preset test view, automatically combining input data and verification scripts in different test scenarios to achieve automatic generation of test cases.

Benefits of technology

It improves testing efficiency, reduces the need for artificially constructing test cases, realizes full automation of the test process, and meets the test coverage requirements in different application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119559989B_ABST
    Figure CN119559989B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a functional test method, device, and storage medium for a random access memory, belonging to the technical field of memories. The method includes configuring test function instructions, input parameter items corresponding to the test function instructions, output verification items, and parameter combination modes corresponding to the input parameter items in a preset test view; determining a plurality of target input data for the test function instructions according to the input parameter items and the parameter combination modes; calling a test template of the test function instructions, and generating a plurality of test cases according to the test template and the plurality of target input data; generating a verification script according to the output verification items; sending a test instruction to a target random access memory according to the test cases; and querying and outputting a test result from the target random access memory according to the verification script. The embodiment of the present application can improve the test efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of memories, and particularly to a method, device, and storage medium for functional testing of a random access memory. Background Art

[0002] Random access memories (such as LPDDR5 random access memories) are widely used in mobile phones, tablet computers, and terminal devices. In actual applications, to ensure the performance and normal functions of random access memories, it is often necessary to test the functions of random access memories. Among them, functional testing includes the verification of functional instructions corresponding to single functions and the stress test verification of repeatedly executing functional instructions. Moreover, for components with storage functions such as random access memories, the normal basic storage state needs to be ensured during functional testing. Therefore, it is necessary to construct multiple different data for test verification, which leads to a large number of test cases required for testing functional instructions. At the same time, as the storage scale of random access memories increases, more data needs to be constructed to meet the coverage requirements, which further leads to an increase in the number and complexity of test cases. Especially when the same function is applied to different memory devices, it is also necessary to match each test case of different memory devices one by one, resulting in low test efficiency. Summary of the Invention

[0003] The main purpose of the embodiments of the present application is to propose a method, device, and storage medium for functional testing of a random access memory, which can improve the test efficiency.

[0004] To achieve the above object, a first aspect of the embodiments of the present application proposes a method for functional testing of a random access memory, the method comprising:

[0005] Configuring a test functional instruction, input parameter items and output verification items corresponding to the test functional instruction, and a parameter combination mode corresponding to the input parameter items in a preset test view;

[0006] Determining a plurality of target input data of the test functional instruction according to the input parameter items and the parameter combination mode;

[0007] Invoking a test template of the test functional instruction, and generating a plurality of test cases according to the test template and the plurality of target input data;

[0008] Generating a verification script according to the output verification items;

[0009] Issuing a test instruction to a target random access memory according to the test case;

[0010] Querying a test result from the target random access memory according to the verification script and outputting the result.

[0011] To achieve the above object, a second aspect of the embodiments of the present application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the function test method of the random access memory described in any one of the above first aspects.

[0012] To achieve the above object, a third aspect of the embodiments of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, it implements the function test method of the random access memory described in any one of the first aspects.

[0013] The function test method, device, and storage medium of the random access memory proposed in the present application achieve a basic test process centered on test function instructions by providing a test template, and configure input parameter items and output verification items corresponding to the test function instructions through a test view, enabling users to not need to pay attention to specific test cases, but only need to care about the factors affecting the test cases, and making the construction of test cases more efficient. And based on the input parameter items, input data in different test scenarios are automatically combined and constructed, and verification scripts in different test scenarios are constructed based on the output verification items. It can realize the automatic generation of test cases without the need for manual one-to-one matching of test cases, and the test efficiency is higher. Especially when the same function is adapted to different random access memories, since the test template can be universal, testers only need to consider the differences in input parameter items and output verification items in different application scenarios to achieve full automation of the test process and meet the requirements of test coverage. Therefore, compared with the related art, the test efficiency of the embodiments of the present application is higher. Description of the Drawings

[0014] Figure 1 is a flowchart of the function test method of the random access memory provided by the present application;

[0015] Figure 2 is a flowchart of the test template of an embodiment of the function test method of the random access memory provided by the present application;

[0016] Figure 3 is a schematic diagram of the configuration interface of the test view in an embodiment of the function test method of the random access memory provided by the present application;

[0017] Figure 4 is a schematic diagram of the test case execution interface of the test view in an embodiment of the function test method of the random access memory provided by the present application;

[0018] Figure 5 is a schematic diagram of the hardware structure corresponding to the function test method of the random access memory provided by the present application. Detailed Embodiments

[0019] In order to make the objectives, technical solutions and advantages of this application more clear and understandable, the following further details this application in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit this application.

[0020] It should be noted that although functional modules are divided in the device schematic diagram and the logical sequence is shown in the flowchart, in some cases, the steps shown or described can be executed in a different module division in the device or a different sequence in the flowchart. Terms such as "first" and "second" in the description, claims and the above-mentioned drawings are used to distinguish similar objects and do not necessarily need to describe a specific order or sequence.

[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0022] First, several nouns involved in this application are analyzed:

[0023] LPDDR5, that is, Low Power Double Data Rate 5, is a low-power double data rate memory standard.

[0024] Random access memories (such as LPDDR5 random access memories) are widely used in mobile phones, tablet computers and terminal devices. In actual applications, in order to ensure the normal performance and functions of random access memories, it is often necessary to test the functions of random access memories. Among them, the function test includes the verification of function instructions corresponding to single functions and the stress test verification of repeatedly executing function instructions. Taking the sleep function test as an example, when a new sleep function is added to a random access memory, in addition to verifying whether the random access memory enters the sleep mode after the sleep mode instruction is issued, it is also necessary to repeatedly issue the enter and exit instructions to determine that the random access memory can still maintain normal functions after repeatedly executing the sleep mode instruction multiple times. At the same time, for components such as random access memories with storage functions, it is necessary to ensure the normal basic storage state during function testing. Therefore, it is necessary to construct multiple different data for test verification, which leads to a relatively large number of test cases required for the test of function instructions. At the same time, as the storage scale of random access memories increases, more data needs to be constructed to meet the coverage requirements, which in turn leads to an increase in the number and complexity of test cases. Especially when the same function is applied to different memory devices, it is also necessary to match each test case of different memory devices one by one, which results in low test efficiency. Based on this, the embodiments of this application propose a function test method, device and storage medium for random access memories, which can improve the test efficiency.

[0025] The functional test method, device, and storage medium for a random access memory provided by the embodiments of the present application will be specifically described through the following embodiments. First, the functional test method for the random access memory in the embodiments of the present application will be described.

[0026] The functional test method for the random access memory of the present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, and so on. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in a distributed computing environment, where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0027] It can be understood that, referring to Figure 1 As shown, according to a functional test method for a random access memory provided by an embodiment of the present application, the method includes:

[0028] Step S100: Configure test function instructions, input parameter items and output verification items corresponding to the test function instructions, and parameter combination modes corresponding to the input parameter items in a preset test view;

[0029] Step S200: Determine multiple target input data of the test function instructions according to the input parameter items and the parameter combination modes;

[0030] Step S300: Invoke the test template of the test function instructions, and generate multiple test cases according to the test template and the multiple target input data;

[0031] Step S400: Generate a verification script according to the output verification items;

[0032] Step S500: Send a test instruction to the target random access memory according to the test cases;

[0033] Step S600: Query the test results from the target random access memory according to the verification script and output them.

[0034] Therefore, by providing a test template to implement a basic test process centered around test function instructions, and by configuring input parameter items and output verification items corresponding to the test function instructions through a test view, users can be concerned only with the factors affecting test cases without paying attention to specific test cases, making the construction of test cases more efficient. Moreover, different input data under different test scenarios are automatically combined and constructed based on the input parameter items, and verification scripts under different test scenarios are constructed based on the output verification items. Automatic generation of test cases can be achieved without manually matching each test case one by one, resulting in higher test efficiency. Especially when the same function is adapted to different random access memories, since the test template can be universal, testers only need to consider the differences in input parameter items and output verification items under different application scenarios to achieve full automation of the test process and meet the requirements of test coverage. Therefore, compared with related technologies, the test efficiency of the embodiments of the present application is higher.

[0035] The input parameter items are used to determine the data to be written into the random access memory for verifying whether the test function instruction is normal, and can be the parameters that the test function instruction itself needs to carry; for example, if the test function instruction is a write instruction, the input parameter item is the data to be written in the write instruction. In some other embodiments, the input parameter items can also be the data to be written into the random access memory before issuing the test function instruction to ensure that the test function instruction does not affect the data storage function of the random access memory. The input parameter items can be matched one by one through an interface view or determined by importing relevant configuration files through channels. In some embodiments, the functional test method of the random access memory will configure the instruction relationship between the input parameter items and the instruction itself for each test function instruction, and determine the issuing method of the target input data as following the issuance of the test function instruction itself or before issuing the test function instruction according to this instruction relationship, and then match the strategies determined by different target input data.

[0036] The output verification items are used to determine whether the test case is executed normally, and can include the detection of the issuance status of the test function instruction, the detection of the storage status to verify the impact of the test function instruction on the storage status, and also the detection of the performance of the random access memory to verify the impact of the test function instruction on the performance of the random access memory. In this regard, the embodiments of the present application do not make restrictions, and those skilled in the art can selectively set according to actual needs.

[0037] The parameter combination mode is used to determine the combination method of the data types of the target input data required for each test case and the proportion of the data corresponding to the combined data types. By increasing the parameter combination mode, automatic combination of different data types in the input parameter items can be achieved, generating the expected number of test cases while meeting the requirements of test coverage, thereby simplifying the way of artificially constructing data at the test end and improving test efficiency.

[0038] In some embodiments, the test platform applied in the functional test method of the random access memory can establish connection relationships with various detection devices, and can provide an external query interface to query the results of the detection devices, so that corresponding verification items can be added to the output verification items, and thus the verification requirements in different scenarios can be met.

[0039] The verification script and the test case are two independent entities. The test case and the verification script are executed synchronously one by one. That is, when each test case is executed, the verification script corresponding to the same function instruction is called synchronously. By the verification script monitoring the status of the corresponding test case in real time, the verification of the test result of the function instruction can be realized. And by the way that the verification script and the test case are decoupled from each other, the generation of test cases can be simplified, and the probability that the test cases need to be manually intervened can be further reduced. Thus, while realizing the automatic test of function instructions in multiple scenarios, the personalized setting of verification requirements can be realized.

[0040] The test template is used to record the issuing process when verifying the function of the test function instruction. Exemplarily, taking the function instruction as the sleep mode instruction as an example, referring to Figure 2 As shown, the test template for the sleep mode instruction is: random access memory initialization -> target input data writing -> sleep mode instruction issuing -> exit sleep mode instruction issuing. At this time, each target input data combined with this test template can form test cases under different target input data input conditions. Taking the write instruction as an example, the test template can be set as: random access memory initialization -> write instruction issuing or the test template is set as write instruction issuing.

[0041] The embodiments of the present application do not limit the input parameter items, output verification items, and parameter combination modes, and those skilled in the art can selectively set them according to actual needs.

[0042] The target random access memory is the random access memory to be tested.

[0043] It can be understood that the input parameter items include data type parameters and data length parameters, and the parameter combination modes include type ratio parameters and the total number of use cases; according to the input parameter items and the parameter combination modes, multiple target input data of the test function instruction are determined, including at least one of the following:

[0044] Multiple input data are generated according to the data length parameter and the data type parameter; wherein, the data type parameters and / or data type parameters of each of the input data are different;

[0045] According to the type ratio parameter and the total number of use cases, multiple data type combinations and the number of use cases corresponding to each data type combination are determined; each data type combination is composed of at least one data type parameter;

[0046] For each combination of data types, randomly select one input data from multiple input data of the corresponding data type parameters multiple times according to the number of use cases;

[0047] Combine the target input data randomly selected each time for each data type combination to obtain the total number of target input data equal to the total number of use cases.

[0048] Random selection can be done in the following way: Sort the input data of the same data type and number the data according to the sorting order, and perform random extraction based on the data numbers. For example, use the rand() function to determine the selected data number, so as to achieve random selection of each input data. At this time, although the length of each input data is fixed, since the input data forming the target input data is random, the target input data is also random and its length varies, thus further ensuring the test coverage and test accuracy.

[0049] The type proportion parameter defines the proportion of different data type combinations. Exemplarily, as Figure 3 shown, the type proportion parameter can be obtained by checking the combined data types and adding the corresponding data type combination items by increasing the input item control "+", and obtaining the input proportion in the displayed data type combination items. As Figure 3 shown, after checking "all 0" and "random", select "+", and an input item will be displayed in the display area corresponding to the parameter combination mode. The input item includes the generated data type combination and a proportion input text box. Enter the corresponding proportion in the proportion input text box to obtain a type proportion parameter. Those skilled in the art can selectively set the specific content and quantity of the type proportion parameter according to actual needs. The embodiments of the present application do not limit this, and the embodiments of the present application do not limit how to obtain the type proportion parameter. Those skilled in the art can refer to the Figure 3 shown method, or can be determined by other means. In some embodiments, a delete control "-" is set for each input item, so that the type proportion parameter can be manually deleted.

[0050] The total number of use cases is the total number of test cases expected to be generated.

[0051] Exemplarily, assume that there are 3 data types set, namely type 1, type 2, and type 3. The type proportion parameter determines that the proportion of use cases for the combination of type 1 and type 2 is 10%, the proportion of the combination of type 2 and type 3 is 20%, the proportion of type 2 is 30%, the proportion of type 1, type 2, and type 3 is 20%, and the proportion of type 1 is 20%. At this time, the number of use cases for each different data type combination can be determined based on the type proportion parameter. Exemplarily, as Figure 3As shown, the total number of use cases is 20. For the test case of the data type combination (random, all 0), the number of use cases is 20 * 20% = 4. That is, among the 4 target input data to be generated, each target input data is composed of a random type input data and an all 0 type input data.

[0052] It can be understood that the test function instruction is a sleep mode instruction; the data type parameters include regular arrangement type, random type, all 1 type, and all 0 type.

[0053] The regular arrangement type means arranged according to a certain rule. For example, 10101010 and 110110110 are both cases where some data appears repeatedly.

[0054] By setting the regular arrangement type, random type, all 1 type, and all 0 type, and combining based on these four types, the coverage of the target input data can be made wider.

[0055] Exemplarily, referring to Figure 3 the shown test view, in the test view, a display area corresponding to the input parameter item, output verification item, and parameter combination mode is defined. Among them, in the display area of the input parameter item, data type items can be added through the add button "+", such as Figure 3 shown, each data type item includes a type drop-down box and a data length text box. The type drop-down box includes the regular arrangement type, random type, all 1 type, and all 0 type. Among them, the regular arrangement type means that the bit data of the fixed content changes periodically, the random type means that there is no correlation between any bit data and it is randomly generated, the all 1 type means that each bit data is 1, and the all 0 type means that each bit data is 0. Exemplarily, as Figure 3 shown, in the first data type item, the "regular distribution" is selected in the type drop-down box, generating a fixed content input box of the regular distribution type and a data length text box. When the content of the fixed content input box is 1010 and the content of the corresponding data length text box is 20, the corresponding input data can be obtained as 10101010101010101010. Similarly, multiple data type items can be generated in the above manner. In some embodiments, a delete control "-" is set on the right side of each data type item, so that the data type item can be deleted through this delete control.

[0056] It can be understood that the output verification item includes an external query interface and a status register address; according to the output verification item, a verification script is generated, including:

[0057] Generating a monitoring instruction for the test case issuing status of the cycle monitoring to determine the execution status of the test case and the issuing status of the test function instruction in the test case according to the monitoring instruction;

[0058] Determine the first query instruction according to the status register address;

[0059] Determine the second query instruction according to the external query interface;

[0060] Obtain the target input data of the currently executed test case, and generate a third query instruction according to the target input data;

[0061] Configure the trigger condition of the first query instruction as that the issuance status of the test function instruction in the test case is issued and completed, and obtain the first script instruction;

[0062] Configure the trigger condition of the second query instruction as that the query result of the first query instruction matches the expected memory value or the execution status of the test case is execution completed, and obtain the second script instruction;

[0063] Configure the trigger condition of the third query instruction as that the execution status of the test case is execution completed, and obtain the third script instruction;

[0064] Generate a fourth script instruction according to the query result of the third query instruction and the corresponding target input data;

[0065] Generate a verification script according to the first script instruction, the second script instruction, the third script instruction and the fourth script instruction.

[0066] By periodically monitoring the issuance status of the corresponding test case, synchronous execution of the verification script and the test case can be achieved.

[0067] The status register address is the address of the memory in the random access memory that records the corresponding function test status.

[0068] By taking the query of the target write data as the default verification item and providing two methods of an external query interface and a status register address, the configuration items of the verification content for the user can be reduced, and at the same time, a suitable verification method can be selected according to the actual test environment, so as to meet the requirements under different test scenarios.

[0069] It can be understood that each item in the output verification item can be selectively set according to actual needs. Exemplarily, referring to Figure 3 as shown, verification items can be added in the input area of the output verification item. For example, by clicking on the "+" to generate a verification item drop-down box and selecting the corresponding verification item from the drop-down box options, the output verification items under different function instructions can be obtained. As Figure 3 shown, Figure 3 3 verification items are added, and the verification item drop-down boxes of the 3 verification items are set in sequence from top to bottom as the status register address, the first query interface, and the second query interface.

[0070] It is understandable that the external query interface includes a first query interface for querying the detection results of the power detection device and a second query interface for querying the detection results of the current detection device.

[0071] By providing the interface query for external detection devices such as power and current, it is possible to synchronously verify whether there are abnormalities in multiple dimensions of the state and performance of the random access memory itself. Especially for function tests related to performance, such as function tests in the sleep mode, the accuracy of the verification results can be further ensured.

[0072] It is understandable that querying the test results from the target random access memory according to the verification script and outputting includes:

[0073] Calling the first query instruction through the first script instruction to obtain the memory value in the preset memory address after the memory executes the test function instruction;

[0074] When the memory value matches the expected memory value, calling the first query interface through the second script instruction to obtain the power test value and calling the second query interface through the second script instruction to obtain the current value;

[0075] When the power test value is greater than the preset power threshold or the current value is greater than the preset current threshold, output the test failure and display the reason for the failure;

[0076] Calling the third query instruction through the third script instruction to obtain the actual written value of the register;

[0077] Comparing the actual written value of the register with the corresponding target input data through the fourth script instruction and outputting the comparison result.

[0078] Exemplarily, referring to Figure 4 As shown, after the test case is generated, it can enter the test view as shown in Figure 4 As shown, the test view displays a test case area and an output result area. In the test case area, the numbers of each test case and the corresponding target input data are displayed. When the corresponding test case is checked and "Execute" is selected, data such as the reason for the failure of each test case and the comparison result will be displayed in the output result area. In some embodiments, as shown in Figure 4 As shown, view interfaces such as input parameter items and output verification items are shrunk on the left side in the form of tab pages and can be expanded by clicking to reset to generate new test cases.

[0079] It is understandable that before sending the test instruction to the target random access memory according to the test case, the method further includes:

[0080] Obtaining the environmental parameters from the test view;

[0081] Generate multiple test case initialization scripts according to environmental parameters;

[0082] Bind the multiple test case initialization scripts to each test case;

[0083] Correspondingly, send test instructions to the target random access memory according to the test cases, including:

[0084] Execute the test case initialization script;

[0085] Send test instructions to the target random access memory according to the test cases corresponding to the test case initialization script.

[0086] By increasing the configuration of environmental parameters, the test verification of the actual usage scenario can be comprehensively considered, further ensuring the accuracy of the verification results. And by visualizing the environmental parameters as independent test case initialization scripts, more different function instructions can be adapted when the environmental parameters can be saved, improving the test efficiency.

[0087] It can be understood that the above input parameter items and parameter combination modes can generate an independent first configuration file for output. When configuring test function instructions subsequently, this first configuration file can be directly imported. Similarly, the output verification items can also be output as a separate second configuration file and can be directly imported during the configuration of test function instructions without manual configuration. At this time, by generating test templates, the first configuration file, the second configuration file, and test case initialization scripts respectively, the generation of test cases can achieve modular combination, can adapt to the test adaptation of random access memories in more scenarios, and improve the test efficiency.

[0088] It can be understood that the method further includes:

[0089] Obtain the number of test times from the test view;

[0090] When the number of executions of the currently executed test case is less than the number of test times, jump to execute the test case initialization script;

[0091] When the number of executions of the currently executed test case is equal to the number of test times, select unexecuted test cases from multiple test cases for execution until each test case has completed the test the number of test times.

[0092] By setting the number of test times, the stress test of the random access memory can be realized, and further the accuracy of the test can be ensured. Through the visual configuration of the number of test times, the configuration efficiency of testers can be improved and it is more flexible.

[0093] An embodiment of the present application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the functional test method of the above-mentioned random access memory is implemented. The electronic device can be any intelligent terminal including a tablet computer, an in-vehicle computer, etc.

[0094] Please refer to Figure 5 , Figure 5 which schematically shows the hardware structure of the electronic device in another embodiment. The electronic device includes:

[0095] A processor 501, which can be implemented by using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided by the embodiments of the present application;

[0096] A memory 502, which can be a NAND flash. The relevant program codes are stored in the memory 502, and the processor 501 is used to call and execute the functional test method of the random access memory in the embodiments of the present application;

[0097] An input / output interface 503, which is used to implement information input and output;

[0098] A communication interface 504, which is used to implement communication and interaction between this device and other devices. Communication can be achieved through a wired method (such as USB, network cable, etc.) or through a wireless method (such as mobile network, WIFI, Bluetooth, etc.);

[0099] A bus 505, which transmits information between various components of the device (such as the processor 501, the memory 502, the input / output interface 503, and the communication interface 504);

[0100] Among them, the processor 501, the memory 502, the input / output interface 503, and the communication interface 504 are communicatively connected to each other inside the device through the bus 505.

[0101] An embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium is a computer-readable storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, the functional test method of the above-mentioned random access memory is implemented.

[0102] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory optionally includes a memory remotely located relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above networks include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0103] The embodiments described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art will know that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.

[0104] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or combine certain steps, or different steps.

[0105] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0106] Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices can be implemented as software, firmware, hardware, and appropriate combinations thereof.

[0107] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have 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.

[0108] It should be understood that in this application, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist at the same time. Among them, A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single items (items) or plural items (items). For example, at least one (item) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0109] In several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the above division of units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of devices or units can be in electrical, mechanical or other forms.

[0110] The units described above as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0111] In addition, in each embodiment of this application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0112] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes: various media that can store programs, such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.

[0113] The preferred embodiments of the embodiments of this application have been described above with reference to the accompanying drawings. However, this does not limit the scope of the rights of the embodiments of this application. Any modifications, equivalent replacements, and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of this application shall fall within the scope of the rights of the embodiments of this application.

Claims

1. A functional testing method for a random access memory, characterized in that: The method comprises: Configure the test function instruction, the input parameter items and output verification items corresponding to the test function instruction, and the parameter combination mode corresponding to the input parameter items in a preset test view; Determining a plurality of target input data of the test function instruction according to the input parameter items and the parameter combination mode; Calling the test template of the test function instruction, and generating multiple test cases according to the test template and the multiple target input data; Generate a verification script according to the output verification item; Sending a test instruction to the target random access memory according to the test case; According to the verification script, query the target random access memory for test results and output them; The output verification item includes an external query interface and a status register address; and generating a verification script according to the output verification item includes: Generate a monitoring instruction for periodically monitoring the delivery status of the test case, so as to determine the execution status of the test case and the delivery status of the test function instruction in the test case according to the monitoring instruction; Determine a first query instruction according to the status register address; Determine a second query instruction according to the external query interface; Obtain target input data of the test case currently being executed, and generate a third query instruction according to the target input data; The trigger condition of the first query instruction is set to the issuing status of the test function instruction in the test case as issuing completed, to obtain a first script instruction; The trigger condition of the second query instruction is set to that the query result of the first query instruction matches the expected memory value or the execution status of the test case is execution completed, to obtain a second script instruction; The trigger condition of the third query instruction is set to the execution status of the test case being execution completed, thereby obtaining a third script instruction; Generate a fourth script instruction according to the query result of the third query instruction and the corresponding target input data; A verification script is generated according to the first script instruction, the second script instruction, the third script instruction and the fourth script instruction.

2. The functional testing method of random access memory according to claim 1, characterized in that: The input parameter items include a data type parameter and a data length parameter, and the parameter combination mode includes a type ratio parameter and a total number of use cases; The step of determining a plurality of target input data of the test function instruction according to the input parameter items and the parameter combination mode comprises: Generate a plurality of input data according to the data length parameter and the data type parameter; wherein the data type parameter and / or data type parameter of each input data is different; Determine multiple data type combinations and the number of use cases corresponding to each data type combination according to the type ratio parameter and the total number of use cases; each data type combination is composed of at least one data type parameter; For each of the data type combinations, randomly selecting one input data from the multiple input data of the corresponding data type parameters multiple times according to the number of use cases; The target input data randomly selected for each combination of the data types are combined each time to obtain the total number of target input data for the use case.

3. The functional testing method of random access memory according to claim 2, characterized in that: The test function instruction is a sleep mode instruction; the data type parameter includes a regular arrangement type, a random type, an all-1 type, and an all-0 type.

4. The functional testing method of random access memory according to claim 1, characterized in that: The external query interface includes a first query interface for querying the detection result of the power detection device, and a second query interface for querying the detection result of the current detection device.

5. The functional testing method of random access memory according to claim 4, characterized in that: The step of querying the target random access memory for a test result according to the verification script and outputting the result includes: Calling the first query instruction through the first script instruction to obtain a memory value in a preset memory address after the memory executes the test function instruction; When the memory value matches the expected memory value, the first query interface is called through the second script instruction to obtain a power test value, and the second query interface is called through the second script instruction to obtain a current value; When the power test value is greater than a preset power threshold or the current value is greater than a preset current threshold, the test fails and the reason for the failure is displayed; Call the third query instruction through the third script instruction to obtain the actual written value of the register; The fourth script instruction compares the actual write value of the register with the corresponding target input data and outputs the comparison result.

6. The functional testing method of random access memory according to claim 1, characterized in that: Before issuing a test instruction to the target random access memory according to the test case, the method further includes: Obtaining environmental parameters from the test view; Generate multiple use case initialization scripts according to the environment parameters; Binding a plurality of the use case initialization scripts to each of the test cases; Accordingly, sending a test instruction to the target random access memory according to the test case includes: Execute the use case initialization script; According to the test case corresponding to the use case initialization script, a test instruction is issued to the target random access memory.

7. The functional testing method of random access memory according to claim 6, characterized in that: The method further comprises: Get the number of tests from the test view; When the number of executions of the currently executed test case is less than the number of tests, jump to the execution of the test case initialization script; When the execution times of the currently executed test case is equal to the test times, a test case that has not been executed is selected from the multiple test cases and executed until each test case has completed the test times.

8. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the functional testing method of the random access memory according to any one of claims 1 to 7 when executing the computer program.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the functional testing method of the random access memory according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method for automatically testing interface based on swagger

    CN114116522A

  • Automatic test method, system and equipment for visual equipment and storage medium

    CN118535470A