Function test method and device for random access memory, and storage medium
By configuring test function instructions and parameter items in the functional test of random memory, using the test template to generate test cases, and automatically query the results through the verification script, the problem of large number and high complexity of test cases in the functional test of random memory is solved, and the testing efficiency is improved and automation is achieved.
Patent Information
- Application Number
- CN202510102672.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2045-01-22
AI Technical Summary
Random memory needs to be constructed in functional testing to participate in test verification, resulting in a large number of test cases, increasing complexity and low testing efficiency. Especially when the same function is applied to different memory devices, the test cases need to be matched one by one.
A functional testing method for random memory is proposed. By configuring test function instructions, input parameter items and output verification items in the preset test view, multiple test cases are generated using the test template, and the test results are automatically queryed through the verification script to achieve automatic generation and full automation of test cases.
Improve testing efficiency, reduce the need to artificially construct data and match test cases one by one, and realize automation of the test process and high coverage.
Smart Images

Figure CN119559989A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of memory technology, and in particular to a functional testing method, device and storage medium for a random access memory. Background Art
[0002] Random access memory (such as LPDDR5 random access memory) is widely used in mobile phones, tablet computers and terminal devices. In practical applications, in order to ensure the normal performance and function of random access memory, it is often necessary to test the function of random access memory, where the functional test includes the verification of functional instructions corresponding to a single function and the stress test verification of repeated execution of functional instructions. And for components with storage functions such as random access memory, it is necessary to ensure the normal basic storage state during functional testing. Therefore, it is necessary to construct a variety of different data to participate in test verification, which leads to a large number of test cases required for the testing of functional instructions. At the same time, with the increase of the storage scale of random access memory, in order to meet the coverage requirements, more data needs to be constructed, which leads to a corresponding increase in the number and complexity of test cases. In particular, 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, and the test efficiency is low. Summary of the invention
[0003] The main purpose of the embodiments of the present application is to provide a functional testing method, device and storage medium for a random access memory, which can improve the testing efficiency.
[0004] To achieve the above object, a first aspect of an embodiment of the present application provides a functional testing method for a random access memory, the method comprising: 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, the test result is queried to the target random access memory and outputted.
[0005] To achieve the above-mentioned purpose, the second aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the functional testing method of the random access memory described in any one of the above-mentioned first aspects when executing the computer program.
[0006] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the functional testing method of the random access memory described in any one of the first aspects.
[0007] The functional test method, device and storage medium of the random access memory proposed in the present application, which realizes the basic test process built with the test function instruction as the core by providing a test template, and configures the input parameter items and output verification items corresponding to the test function instruction through the test view, so that the user does not need to pay attention to the specific use case, but only needs to care about the factors affecting the test case, and the construction of the test case is more efficient. And based on the input parameter items, the input data under different test scenarios are automatically combined and constructed, and the verification script under different test scenarios is constructed based on the output verification item. The automatic generation of test cases can be realized, and there is no need to match the test cases one by one manually, and the test efficiency is higher. Especially when the same function is adapted to different random access memories, because the test template can be universal, the tester only needs to consider the differences in the input parameter items and the output verification items under different application scenarios, and the full automation of the test process and the requirements for meeting the test coverage can be realized. Therefore, compared with the relevant technology, the test efficiency of the embodiment of the present application is higher. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 It is a flowchart of a functional testing method of a random access memory provided by the present application; Figure 2 It is a flow chart of a test template of an embodiment of a functional test method of a random access memory provided by the present application; Figure 3 It is a schematic diagram of a configuration interface of a test view in an embodiment of a functional test method for a random access memory provided by the present application; Figure 4 It is a schematic diagram of a use case execution interface of a test view in an embodiment of a functional testing method for a random access memory provided by the present application; Figure 5 It is a structural diagram of the hardware structure corresponding to the functional testing method of the random access memory provided in this application. DETAILED DESCRIPTION
[0009] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0010] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0011] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art 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.
[0012] First, some nouns involved in this application are analyzed: LPDDR5, or Low Power Double Data Rate 5, is a low-power double data rate memory standard.
[0013] Random access memory (such as LPDDR5 random access memory) is widely used in mobile phones, tablet computers and terminal devices. In practical applications, in order to ensure the normal performance and function of random access memory, it is often necessary to test the function of random access memory, where the functional test includes the verification of the functional instructions corresponding to a single function and the stress test verification of repeated execution of the functional instructions. Taking the sleep function test as an example, when the random access memory adds a sleep function, in addition to the need for the verifier to verify whether the random access memory enters the sleep mode after issuing the sleep mode instruction, it is also necessary to repeatedly issue entry and exit instructions to it to determine whether the random access memory can maintain normal function after repeatedly executing the sleep mode instruction. At the same time, for components with storage functions such as random access memory, it is necessary to ensure that the basic storage state is normal during functional testing. Therefore, it is necessary to construct a variety of different data to participate in test verification, which leads to a large number of test cases required for the test of functional instructions. At the same time, with the increase in the storage scale of random access memory, more data needs to be constructed to meet the coverage requirements, which leads to a corresponding increase in the number and complexity of test cases. In particular, 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 leads to low test efficiency. Based on this, the embodiments of the present application propose a functional testing method, device and storage medium of a random access memory, which can improve the testing efficiency.
[0014] The functional testing method, device and storage medium of the random access memory provided in the embodiments of the present application are specifically described through the following embodiments. First, the functional testing method of the random access memory in the embodiments of the present application is described.
[0015] The functional testing method of 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, etc. 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 distributed computing environments, in which 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.
[0016] Understandably, referring to Figure 1 As shown, according to an embodiment of the present application, a functional testing method of a random access memory is provided, the method comprising: Step S100, configuring a test function instruction, an input parameter item and an output verification item corresponding to the test function instruction, and a parameter combination mode corresponding to the input parameter item in a preset test view; Step S200, determining multiple target input data of the test function instruction according to the input parameter items and the parameter combination mode; Step S300, calling a test template of a test function instruction, and generating multiple test cases according to the test template and multiple target input data; Step S400: Generate a verification script according to the output verification items; Step S500: Sending a test instruction to the target random access memory according to the test case; Step S600: query the target random access memory for test results according to the verification script and output them.
[0017] Therefore, by providing a test template to realize the basic test process built with the test function instruction as the core, and configuring the input parameter items and output verification items corresponding to the test function instruction through the test view, the user does not need to pay attention to the specific use case, only needs to care about the factors affecting the test case, and the construction of the test case is more efficient. And based on the input parameter item, the input data under different test scenarios are automatically combined and constructed, and the verification script under different test scenarios is constructed based on the output verification item. The automatic generation of test cases can be realized, and there is no need to match the test cases one by one artificially, and the test efficiency is higher. Especially when the same function is adapted to different random access memories, because the test template can be universal, the tester only needs to consider the difference between the input parameter items and the output verification items under different application scenarios, and the full automation of the test process and the demand for meeting the test coverage can be realized. Therefore, compared with the relevant technology, the test efficiency of the embodiment of the present application is higher.
[0018] The input parameter item is used to determine the data to be written into the random access memory to verify whether the test function instruction is normal. It can be a parameter that the test function instruction itself needs to carry; if the test function instruction is a write instruction, the input parameter item is the data required to be written in the write instruction. In other embodiments, the input parameter item 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 the interface view, or they can be determined by importing relevant configuration files through the channel. In some embodiments, the functional testing method of applying the random access memory will configure the instruction relationship between the input parameter item and its own instruction for each test function instruction, and determine the target input data according to the instruction relationship, whether to follow the test function instruction itself or to issue it before issuing the test function instruction, thereby matching the strategy determined by different target input data.
[0019] The output verification item is used to determine whether the test case is executed normally, and may include the detection of the state of the test function instruction being issued, and may also include the detection of the storage state to verify the impact of the test function instruction on the storage state, and may also include the detection of the random access memory performance to verify the impact of the test function instruction on the random access memory performance. In this regard, the embodiments of the present application are not limited, and those skilled in the art may selectively set it according to actual needs.
[0020] The parameter combination mode is used to determine the combination of the data types of the target input data required for each test case and the proportion of data corresponding to the combined data types. By adding the parameter combination mode, the automatic combination of different data types in the input parameter items can be realized, and the expected number of test cases can be generated while meeting the test coverage requirements, thereby simplifying the way the test end constructs data manually and improving test efficiency.
[0021] In some embodiments, the test platform applied in the functional testing method of random access memory can establish a connection relationship with a variety of detection devices, and can provide an external query interface to query the results of the detection device, so that corresponding verification items can be added to the output verification items, thereby meeting the verification requirements in different scenarios.
[0022] Verification scripts and test cases are two independent entities. Test cases and verification scripts are executed synchronously one-to-one. That is, when each test case is executed, the verification script corresponding to the same functional instruction will be called synchronously. The verification script can monitor the status of the corresponding test case in real time to verify the test results of the functional instruction. By decoupling the verification script and the test case, the generation of test cases can be simplified, and the probability of human intervention in the test case can be further reduced. In addition, the automatic testing of functional instructions can be realized in a variety of scenarios, and the personalized setting of verification requirements can be realized.
[0023] The test template is used to record the issuing process when testing the function instruction verification function. For example, taking the function instruction as the sleep mode instruction as an example, refer 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 issuance -> exit sleep mode instruction issuance. At this time, each target input data and the test template combination can form a test case under different target input data input conditions. Taking the write instruction as an example, the test template can be set to: random access memory initialization -> write instruction issuance or the test template is set to write instruction issuance.
[0024] 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 may selectively set them according to actual needs.
[0025] The target random access memory is a random access memory to be tested.
[0026] It is understandable 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; according to the input parameter items and the parameter combination mode, multiple target input data of the test function instruction are determined, including at least one of the following: Generate multiple 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; 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; For each data type combination, one input data is randomly selected from multiple input data of corresponding parameters of each data type multiple times according to the number of use cases; Combine the target input data randomly selected for each data type combination each time to obtain the total number of target input data for the use case.
[0027] Random selection can be performed in the following way: sort the input data of the same data type and number the data according to the sorting order, and randomly extract based on the data number, such as using 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 has a variable length, which can further ensure the test coverage and test accuracy.
[0028] The type ratio parameter defines the ratio of different data type combinations. For example, Figure 3 As shown in the figure, you can check the combined data type and add the corresponding data type combination item by adding the input item control "+". You can get the input ratio in the displayed data type combination item to get the type ratio parameter. Figure 3 As shown, after checking "All 0" and "Random", select "+" to display an input item in the display area corresponding to the parameter combination mode. The input item includes the produced data type combination and the ratio input text box. Enter the corresponding ratio in the ratio input text box to get a type ratio parameter. Those skilled in the art can selectively set the specific content and quantity of the type ratio parameter according to actual needs. The embodiments of this application do not limit this. The embodiments of this application do not limit how to obtain the type ratio parameter. Those skilled in the art can refer to Figure 3 The method shown can also be determined by other methods. In some embodiments, a delete control "-" is provided for each input item, so that the type ratio parameter can be manually deleted.
[0029] The total number of test cases is the total number of test cases expected to be generated.
[0030] For example, suppose there are three data types, namely type 1, type 2, and type 3. The type ratio parameter determines that the proportion of use cases of type 1 and type 2 is 10%, the proportion 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 ratio parameter. For example, Figure 3As shown, the total number of test cases is 20, and the number of test cases for the data type combination of (random, all 0) is 20*20%=4; that is, among the 4 target input data that need to be generated, each target input data consists of a random type input data and an all-0 type input data.
[0031] It is understandable 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-zero type.
[0032] The regular arrangement type indicates that the data is arranged according to a certain pattern, such as 10101010, 110110110, which are all repeated occurrences of some data.
[0033] By setting a regular arrangement type, a random type, an all-1 type, and an all-zero type, and combining these four types, the target input data can be covered more widely.
[0034] For example, refer to Figure 3 The test view shown in the figure defines the display areas corresponding to the input parameter items, output verification items, and parameter combination modes. In the display area of the input parameter items, you can add data type items by pressing the "+" button, such as Figure 3 As shown, each data type item includes a type drop-down box and a data length text box. The type drop-down box includes regular arrangement type, random type, all 1 type and all 0 type. Among them, the regular arrangement type indicates that the bit data of fixed content changes periodically, the random type indicates that there is no correlation between any bit data and it is randomly generated, the all 1 type indicates that each bit data is 1, and the all 0 type indicates that each bit data is 0. For example, Figure 3 As shown, in the first data type item, the type drop-down box selects "Regular Distribution", and a fixed content input box and a data length text box of the regular distribution type are generated. 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 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 the delete control.
[0035] It is understandable that the output verification items include the external query interface and the status register address; according to the output verification items, a verification script is generated, including: 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 currently executed test case, and generate a third query instruction according to the target input data; The trigger condition of the first query instruction is configured as the issuing status of the test function instruction in the test case is issuing completed, and the first script instruction is obtained; The trigger condition of the second query instruction is configured 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 the second script instruction is obtained; The trigger condition of the third query instruction is configured as the execution status of the test case is execution completed, and the third script instruction is obtained; 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.
[0036] By periodically monitoring the delivery status of the corresponding test cases, the verification script and the test cases can be executed synchronously.
[0037] The status register address is the address of the memory in the random access memory that records the corresponding function test status.
[0038] By setting the query of the target written data as the default verification item and providing two methods: external query interface and status register address, the user can reduce the configuration items of the verification content and select the appropriate verification method according to the actual test environment, thereby meeting the needs of different test scenarios.
[0039] It is understandable that each item in the output verification item can be selectively set according to actual needs. For example, refer to Figure 3 As shown, you can add verification items in the input area of the output verification items, such as clicking "+" to generate a verification item drop-down box, and select the corresponding verification item from the drop-down box options to obtain output verification items under different functional instructions. Figure 3 As shown, Figure 3 Three verification items are added, and the verification item drop-down boxes of the three verification items are set to the status register address, the first query interface, and the second query interface from top to bottom.
[0040] It can be understood 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.
[0041] By providing interfaces for querying external detection devices such as power and current, the state of the random access memory itself and multiple dimensions of performance can be verified simultaneously to see if there are any abnormalities. In particular, for performance-related functional tests, such as functional tests in sleep mode, the accuracy of the verification results can be further ensured.
[0042] It is understandable that the test results are queried from the target random access memory according to the verification script and output, including: 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; When the memory value matches the expected memory value, the first query interface is called through the second script instruction to obtain the power test value and the second query interface is called through the second script instruction to obtain the current value; When the power test value is greater than the preset power threshold or the current value is greater than the preset current threshold, the output 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.
[0043] For example, refer to Figure 4 As shown, after the test case is generated, you can enter Figure 4 The test view shown in the figure shows a test case area and an output result area. The test case area shows the number of each test case and the corresponding target input data. When the corresponding test case is checked and "Execute" is selected, the output result area shows the failure reason, comparison result and other data of each test case. In some embodiments, Figure 4 As shown, the view interfaces such as input parameter items and output verification items are collapsed on the left in the form of tabs. You can expand them and reset them to generate new test cases.
[0044] It is understandable that, before issuing the test instruction to the target random access memory according to the test case, the method further includes: Get environment parameters from the test view; Generate multiple use case initialization scripts based on environment parameters; Bind multiple use case initialization scripts to each test case; Accordingly, a test instruction is issued to the target random access memory according to the test case, including: Execute the use case initialization script; According to the test case corresponding to the use case initialization script, test instructions are sent to the target random access memory.
[0045] By adding the configuration of environmental parameters, the test verification of actual usage scenarios can be comprehensively considered to further ensure the accuracy of the verification results. And by visualizing the environmental parameters as independent use case initialization scripts, more different functional instructions can be adapted while supporting the saving of the environmental parameters, thus improving the test efficiency.
[0046] It is understandable that the above-mentioned input parameter items and parameter combination modes can generate an independent first configuration file output. When the test function instruction configuration is performed later, the first configuration file can be directly imported. Similarly, the output verification items can also be output as a separate second configuration file. When the test function instruction configuration is performed, it can be directly imported without manual configuration. At this time, by generating the test template, the first configuration file, the second configuration file and the use case initialization script respectively, the generation of test cases can be realized in modular combination, and the test adaptation of random access memory in more scenarios can be adapted, thereby improving the test efficiency.
[0047] It is understood that the method further comprises: Get the number of tests from the test view; When the execution count of the currently executed test case is less than the test count, jump to the execution 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 multiple test cases and executed until each test case has completed the test times.
[0048] By setting the number of tests, you can implement stress testing of random access memory, which can further ensure the accuracy of the test. Through the visual configuration of the number of tests, the configuration efficiency of testers can be improved and more flexible.
[0049] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the functional test method of the random access memory when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0050] See also Figure 5 , Figure 5 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes: The processor 501 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application; The memory 502 may be a NAND flash, and the relevant program code is stored in the memory 502, and the processor 501 calls and executes the functional test method of the random access memory of the embodiment of the present application; Input / output interface 503, used to implement information input and output; Communication interface 504, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.); A bus 505 that transmits information between various components of the device (e.g., the processor 501, the memory 502, the input / output interface 503, and the communication interface 504); The processor 501 , the memory 502 , the input / output interface 503 and the communication interface 504 are connected to each other in communication within the device via the bus 505 .
[0051] An embodiment of the present application also provides a computer-readable storage medium, which is a computer-readable storage medium that stores a computer program. When the computer program is executed by a processor, it implements the functional testing method of the random access memory.
[0052] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory 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 embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor 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.
[0053] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0054] Those skilled in the art will appreciate 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 a combination of certain steps, or different steps.
[0055] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0056] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0057] 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 are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0058] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one 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, c can be single or multiple.
[0059] In the several embodiments provided in the present 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 only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0060] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0061] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0062] If 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 this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0063] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
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, the test result is queried to the target random access memory and outputted.
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 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.
5. The functional testing method of random access memory according to claim 4, 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.
6. The functional testing method of random access memory according to claim 5, 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.
7. 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.
8. The functional testing method of random access memory according to claim 7, 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.
9. 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 8 when executing the computer program.
10. 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 8 is implemented.
Citation Information
Patent Citations
Test case generation method, test case generation device and storage medium
CN111026670A
Method for automatically testing interface based on swagger
CN114116522A
Chip performance automatic test method and device, computer equipment and storage medium
CN117009243A
Automatic test method, system and equipment for visual equipment and storage medium
CN118535470A
Programmable built in self test of memory
US20050172180A1
Cited By
Ufs test case monitoring method and device, equipment and storage medium
CN120973666A
Memory simulation test vector generation method and device, equipment and medium
CN121011240A