Memory test method, device and equipment, electronic equipment and storage medium
By determining the test information based on the test mode during the memory test, and using the simultaneous action test of the read and write ports, the problems of long test time and poor adaptability in the existing technology are solved, and fast and comprehensive testing is achieved, adapting to different port numbers. of memory.
Patent Information
- Application Number
- CN202410825805.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-10-01
AI Technical Summary
The existing technology has problems such as long test time, poor adaptability, and poor flexibility when testing multi-port memories, and is incompatible with memories with different port numbers.
By determining the test information of the memory based on the test mode, and using the read and write ports to simultaneously test each port of the memory, a fast and comprehensive test is achieved, which does not rely on the circuit structure of the memory and adapts to the needs of different users.
It improves the accuracy and comprehensiveness of test information, shortens test time, enhances test flexibility and adaptability, and is compatible with memories with different port numbers.
Smart Images

Figure CN118737255A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to, but is not limited to, the field of testing technology, and in particular to a memory testing method, device and equipment, electronic equipment and storage medium. Background Art
[0002] Memory is a memory component used to store programs and various data information. Memory is a collection of many storage units, each of which is composed of a number of binary bits to represent the value stored in the storage unit. Memory can be divided into read-only memory (ROM), random access memory (RAM), etc. according to the type of use.
[0003] In the related art, in the process of testing a memory (for example, a static random access memory with multiple ports such as two reads and one write, multiple reads and one write, or multiple reads and multiple writes), serial testing, fault model testing or customized testing is usually used, which has problems such as long testing time, poor adaptability, and poor flexibility (for example, it must rely on the circuit structure of the memory). Summary of the invention
[0004] Embodiments of the present disclosure provide a memory testing method, device, and equipment, an electronic device, and a storage medium.
[0005] The technical solution of the embodiment of the present disclosure is implemented as follows:
[0006] The present disclosure provides a memory testing method, the method comprising:
[0007] Based on the test mode, determining first test information of the memory, the memory having at least one write port and at least two read ports, the memory including at least one storage unit, the first test information including a first write address, first write data and a first read address;
[0008] writing the first write data into a first storage unit corresponding to the first write address through a first write port, and reading the first read data from a second storage unit corresponding to the first read address through a first read port, the first storage unit being different from the second storage unit;
[0009] Based on the first read data, a test result of the memory is determined.
[0010] The present disclosure provides a memory testing device, the device comprising a configuration unit, a control unit and a determination unit, wherein:
[0011] The configuration unit is used to configure the configuration information of the memory;
[0012] The control unit is used to determine a test mode based on the configuration information; determine first test information of the memory based on the test mode, the memory having at least one write port and at least two read ports, the memory including at least one storage unit, the first test information including a first write address, first write data and a first read address; write the first write data into a first storage unit corresponding to the first write address through the first write port, and read first read data from a second storage unit corresponding to the first read address through the first read port, the first storage unit being different from the second storage unit;
[0013] The determining unit is used to determine a test result of the memory based on the first read data.
[0014] The present disclosure provides a memory testing device, the device comprising:
[0015] A first determining module, configured to determine first test information of the memory based on a test mode, the memory having at least one write port and at least two read ports, the memory including at least one storage unit, the first test information including a first write address, first write data and a first read address;
[0016] a read / write module, configured to write the first write data into a first storage unit corresponding to the first write address through a first write port, and read the first read data from a second storage unit corresponding to the first read address through a first read port, wherein the first storage unit is different from the second storage unit;
[0017] The second determining module is used to determine a test result of the memory based on the first read data.
[0018] An embodiment of the present disclosure provides an electronic device, including a processor and a memory, wherein the memory stores a computer program that can be run on the processor, and the processor implements the above method when executing the computer program.
[0019] An embodiment of the present disclosure provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above method is implemented.
[0020] An embodiment of the present disclosure provides a computer program product, including a computer program or instructions, and when the computer program or instructions are executed by a processor, the above method is implemented.
[0021] In the embodiment of the present disclosure, based on the test mode, the first test information of the memory is determined, the memory has at least one write port and at least two read ports, the memory includes at least one storage unit, the first test information includes a first write address, a first write data and a first read address; the first write data is written into the first storage unit corresponding to the first write address through the first write port, and the first read data is read from the second storage unit corresponding to the first read address through the first read port, the first storage unit is different from the second storage unit; based on the first read data, the test result of the memory is determined. In this way, firstly, the test information is determined according to the test mode, and the accuracy of the test information is improved; secondly, by controlling the read and write ports to act simultaneously to test each port of the memory, the test time is shortened, and at the same time, because it can test whether there is anomaly (for example, interference, fault, etc.) between the read and write ports, multiple write ports, multiple read ports, etc. of the memory, the comprehensiveness of the test is improved; finally, the memory is tested according to different test modes without relying on the circuit structure of the memory, which not only meets the diverse test requirements of different users but also improves the flexibility of the test, and because it can be compatible with the test of memories with different port numbers, the versatility and adaptability are improved.
[0022] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used to illustrate the technical solutions of the present disclosure together with the specification.
[0024] Figure 1 A schematic diagram of an implementation process of a memory testing method provided in an embodiment of the present disclosure Figure 1 ;
[0025] Figure 2 A schematic diagram of an implementation process of a memory testing method provided in an embodiment of the present disclosure Figure 2 ;
[0026] Figure 3 A schematic diagram of the composition structure of a memory test device provided in an embodiment of the present disclosure Figure 1 ;
[0027] Figure 4 A schematic diagram of a test state of a memory provided by an embodiment of the present disclosure Figure 1 ;
[0028] Figure 5 A schematic diagram of a test state of a memory provided by an embodiment of the present disclosure Figure 2 ;
[0029] Figure 6 A schematic diagram of the composition structure of a memory test device provided in an embodiment of the present disclosure Figure 2 ;
[0030] Figure 7 A schematic diagram of an implementation process of a memory testing method provided in an embodiment of the present disclosure Figure 3 ;
[0031] Figure 8 A schematic diagram of the structure of a memory test device provided by an embodiment of the present disclosure;
[0032] Fig. 9 A hardware entity schematic diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0033] In order to make the objectives, technical solutions and advantages of the present disclosure clearer, the present disclosure will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present disclosure. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.
[0034] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0035] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present disclosure described herein can be implemented in an order other than that illustrated or described herein.
[0036] 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 the present disclosure belongs. The terms used herein are only for the purpose of describing the embodiments of the present disclosure and are not intended to limit the present disclosure.
[0037] RAM consists of several parts, such as storage matrix, address decoder, read / write controller, input / output, chip select control, etc. According to the working principle of the storage unit, RAM can be divided into SRAM (Static Random-Access Memory), DRAM (Dynamic Random Access Memory), etc. SRAM has at least one port, such as single port, dual port, multi-port, etc. For example, 2R1W SRAM, which refers to an SRAM with two read ports and one write port, can support two read operations and one write operation at the same time, allowing two independent read operations to be performed at the same time (that is, two different addresses or the same address can be read at the same time), but only one write operation can be performed at the same time, which is suitable for application scenarios with high concurrent read operations and relatively low concurrency requirements for write operations, in order to improve read performance and throughput.
[0038] In the related art, when testing a multi-port SRAM, if a serial test method is used, although it can effectively reduce area consumption, its test time is long and needs to rely on the circuit structure of the memory; if a fault model, such as a functional fault model or a structural fault model, is used, although the functional fault model has a higher fault coverage, the test time is long, and although the structural fault model can shorten the test time, the fault coverage is average, and at the same time, since it is necessary to know the working principle and circuit structure of the memory, the threshold is high; if a customized test method is used, it cannot be adapted to different numbers of read and write ports, and cannot be independent of the circuit structure of the memory, and there are problems such as poor adaptability and low flexibility.
[0039] The disclosed embodiment provides a method for testing a memory. First, the test information is determined according to the test mode, thereby improving the accuracy of the test information. Second, by controlling the read and write ports to act simultaneously to test each port of the memory, the test time is shortened. At the same time, since it is possible to test whether there is an abnormality (e.g., interference, failure, etc.) between the read and write ports, multiple write ports, multiple read ports, etc. of the memory, the comprehensiveness of the test is improved. Finally, the memory is tested according to different test modes without relying on the circuit structure of the memory, which not only meets the diverse test requirements of different users but also improves the flexibility of the test, and since it can be compatible with the test of memories with different port numbers, the versatility and adaptability are improved. The method provided by the disclosed embodiment can be performed by an electronic device, and the electronic device can be various types of terminals such as a laptop, a tablet computer, a desktop computer, a set-top box, a mobile device (e.g., a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, a portable gaming device), etc., and can also be implemented as a server. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), as well as big data and artificial intelligence platforms.
[0040] Below, the technical solutions in the embodiments of the present disclosure will be clearly and completely described in conjunction with the drawings in the embodiments of the present disclosure.
[0041] Figure 1 A schematic diagram of an implementation process of a memory testing method provided in an embodiment of the present disclosure Figure 1 ,like Figure 1 As shown, the method includes steps S11 to S13, wherein:
[0042] Step S11, based on the test mode, determine first test information of the memory, the memory has at least one write port and at least two read ports, the memory includes at least one storage unit, and the first test information includes a first write address, first write data and a first read address.
[0043] Here, the test mode may include but is not limited to the first test mode, the second test mode, etc. The first test mode may refer to a random test mode. The random test mode refers to randomly generating test information. In implementation, the first test mode may be used to perform a large-scale stress test on the memory. The second test mode may be a direct test mode, and the direct test mode means that the test information may be pre-set. In implementation, the second test mode may be used to perform read and write tests and debugging on the addresses specified by the memory, so as to better locate the faults of the memory (for example, short circuit, open circuit, interference, etc.)
[0044] A write port refers to a port that can perform write data operations on a memory. In some embodiments, the number of the write port can be at least one. For example, 1, 2, etc. In some embodiments, the memory further includes at least one write address port, which is used to input a storage address that needs to be written, that is, a write address or a write address, and the bit width of the write address is determined by the bit width of a storage unit of the memory, and the bit width of a storage unit refers to the number of bits of a binary value that can be stored in the storage unit. In some embodiments, the memory further includes at least one write control port, which is used to input write control information for a write operation, that is, write enable information. During implementation, the write control information can be used to control the operation of the write port. The write enable information may include, but is not limited to, write, not write, etc.
[0045] A read port refers to a port that can perform a read data operation on a memory. In some embodiments, the number of the read ports can be at least two. For example, 2, 4, etc. In some embodiments, the memory further includes at least one read address port, which is used to input a storage address that needs to be read, that is, a read address or a read address, and the bit width of the read address is determined by the bit width of a storage unit of the memory. In some embodiments, the memory further includes at least one read control port, which is used to input read control information for a read operation, that is, read enable information. During implementation, the read control information can be used to control the operation of the read port. The read enable information may include, but is not limited to, read, not read, etc.
[0046] The memory has at least one storage unit, and each storage unit has a corresponding storage address.
[0047] The write address (including the first write address and other write addresses described below) may be the address of any storage unit. In implementation, the number of the write addresses is adapted to the number of write ports of the memory. For example, if the memory has one write port, then the number of the write address is one. For another example, if the memory has at least two write ports, then the number of the write address may be at least one.
[0048] The write data (including the first write data and other write data described below) may be any appropriate data to be written into a certain storage unit.
[0049] The read address (including the first read address and other read addresses described below) can be the address of any storage unit. The number of the read addresses is adapted to the number of read ports of the memory. For example, if the memory has two read ports, the number of the read addresses can be one or two. In implementation, the first read address is different from the first write address to reduce the possibility of a read-write conflict in the memory.
[0050] In some implementations, the first test information can be converted into first test information adapted to the memory according to the read / write port information of the memory, so as to be compatible with the test requirements of different memories and improve the compatibility and adaptability of the device.
[0051] In some implementations, different test modes may correspond to different first test information. For example, in the first test mode, a generator may be used to generate random test information in real time, and then the first test information may be determined based on the random test information; in the second test mode, the first test information may be obtained from the set configuration information.
[0052] In some implementations, when the test mode is the second test mode, step S11 includes step S111, wherein:
[0053] S111. Based on the second test mode, obtain first test information of the memory from configuration information.
[0054] Here, the configuration information may include but is not limited to the first test information, mode information, other information, etc. In implementation, the mode information can be obtained by parsing the configuration information. If the mode information includes the second test mode, the configuration information can be further parsed to obtain the first test information. In some embodiments, different test modes may correspond to different configuration information. For example, when the test mode is the second test mode, the configuration information may include the first test information, mode information, and other information; when the test mode is the first test mode, the configuration information may include mode information and other information.
[0055] The other information may be any appropriate information, such as delay information, read / write configuration information, test end condition, random configuration information, etc.
[0056] The delay information may be any appropriate information indicating whether a delay operation is required.
[0057] The read and write configuration information may include but is not limited to enable information, bit number information, etc. The enable information may include but is not limited to read enable information, write enable information, etc. The bit number information may be any suitable information indicating an operation on the target bit of the storage unit. The bit number information may include but is not limited to read bit number information, write bit number information, etc. For example, if the bit width of the storage unit is 128 bits (bit), 16 bytes (BYTE) can be defined to represent the read and write operations on the corresponding bits of the storage unit. For example, if the bit number information includes write bit number information 11111111100000000, that is: write operations are performed on the first 64 bits of the storage unit, and no write operations are performed on the last 64 bits. For another example, the bit number information includes read bit number information
[0058] 1111111111111111, that is, read all data stored in the storage unit. In some implementations, when the test mode is the second test mode, it is necessary to configure the read-write configuration information.
[0059] The test end condition may be any suitable condition, for example, the test number is a set number, whether the first read address is a preset read address, whether the first write address is a preset write address, etc. In some embodiments, different test modes may correspond to different test end conditions.
[0060] The random configuration information may be any appropriate information, for example, a seed value of a generator, the number of read addresses in each round, etc. During implementation, if the test mode is the first test mode, the random configuration information needs to be configured.
[0061] In the disclosed embodiment, the test information is directly obtained through the configuration information in the second test mode, which not only improves the accuracy of the test information but also shortens the time for obtaining the test information.
[0062] In some implementations, when the test mode is the first test mode, step S11 includes steps S141 to S142, wherein:
[0063] Step S141: Generate first random test information based on the first test mode, where the first random test information includes a first random write address, first random write data, and a first random read address.
[0064] Here, the random write address (including the first random write address and other random write addresses described below) may be the address of any storage unit.
[0065] The random write data (including the first random write data and other random write data described below) may be any appropriate data to be written into a certain storage unit.
[0066] The random read address (including the first random read address and other random read addresses hereinafter) may be the address of any storage unit.
[0067] The random test information (including the first random test information and other random test information described below) may be generated in any suitable manner, for example, the first random test information may be generated using a preset generator. For another example, the first random test information may be dynamically generated using a preset generation model. The generation model may be any suitable neural network model.
[0068] In some implementations, the “generating first random test information” in step S141 includes steps S1411 to S1412, wherein:
[0069] Step S1411: Use a preset generator to generate the first random write address and the first random read address respectively.
[0070] Here, the generator can be any suitable device capable of implementing this function. For example, a timer based on a single-chip microcomputer or a microprocessor and a built-in real-time clock are used to generate time-based random numbers (including a first random write address, a first random read address, etc.). For another example, a linear congruential generator is used to generate pseudo-random numbers. For another example, random numbers are generated using clock cycle jitter detection in a digital circuit. For another example, a LFSR (Linear Feedback Shift Register) is used to generate random numbers. The LFSR is usually composed of a register and a feedback circuit, which generates the next state based on the current state in the shift register and a set of specific feedback polynomials.
[0071] In some embodiments, the first random write address and the first random read address may be the same address or different addresses. In implementation, the first random write address and the first random read address may be generated by the same generator or by different generators.
[0072] Step S1412: Generate the first random write data.
[0073] Here, the first random write data may be generated in any suitable manner. For example, a mapping relationship between an address and data may be established in advance, and the first random write data corresponding to the first random write address may be obtained according to the mapping relationship. For another example, the first random write data corresponding to the first random write address may be dynamically generated by a pre-trained generative model. For another example, the first random write data may be dynamically generated by a generator.
[0074] In some implementations, the step S1412 includes step S151, wherein:
[0075] Step S151: Determine write data corresponding to the first random write address by using a preset mapping relationship, and use the write data as first random write data.
[0076] Here, the mapping relationship may be any appropriate relationship, for example, a corresponding relationship table, a hash conversion relationship, etc. In implementation, the first random write address is converted into write data using the mapping relationship, and the write data is used as the first random write data.
[0077] In this way, the write address and the write data are associated through the mapping relationship, and there is no need for a dedicated memory to store the write data separately, which not only reduces the communication consumption and resource loss between hardware, but also reduces the test cost.
[0078] In the disclosed embodiment, a generator is used to dynamically generate the first random test information, thereby improving the generation efficiency and accuracy of the first random test information.
[0079] Step S142: Determine first test information of the memory based on the first random test information.
[0080] Here, the first test information may be the first random test information or other random test information.
[0081] In some embodiments, the step S142 includes step S1421, wherein:
[0082] Step S1421: When the first random test information meets a preset condition, use the first random test information as the first test information of the memory.
[0083] Here, the preset condition may be any suitable condition, and the number of preset conditions may be at least one. For example, the first random read address is at least one of an address where data has been written, the first random read address and the first random write address are not the same (i.e., they are not the same address), etc. During implementation, the first random test information may be compared with each preset condition, and if the first random test information satisfies the preset condition, the first random test information is used as the first test information. For example, if the first random read address is an address where data has been written, and the first random read address and the first random write address are not the same address, the first random test information is used as the first test information.
[0084] In some embodiments, a first information set may be pre-established, the first information set including the storage address of at least one storage unit to which data has been written. During implementation, the first information set may be used to determine whether the first random read address has been written with data, that is, the first random read address is compared with each storage address in the first information set. If the first random read address is the same as a certain storage address, it indicates that the first random read address is an address to which data has been written; if the first random read address is different from each storage address, it indicates that the first random read address is an address to which data has not been written.
[0085] In some embodiments, a second information set may be pre-established, the second information set including the storage address of each storage unit of the memory and the storage state of each storage unit. During implementation, the second information set may be used to determine whether the first random read address has been written with data, that is, the first random read address is compared with each storage address in the second information set to determine the target storage address that is the same as the first random read address. If the storage state corresponding to the target storage address is a written state, then the first random read address is characterized as an address where data has been written; if the storage state corresponding to the target storage address is an unwritten state, then the first random read address is characterized as an address where data has not been written.
[0086] In some embodiments, if the first random test information does not meet a certain preset condition, the first random test information is discarded, the second random test information is regenerated, and the second random test information is used as the first random test information for the next round of testing. The method for determining the first test information can refer to the specific implementation of the aforementioned step S142. For example, if the first random read address is an address to which no data has been written, it is determined that the first random test information does not meet the preset condition, and then the first random test information is discarded. For another example, if the first random read address and the first random write address are the same address, it is determined that the first random test information does not meet the preset condition, and then the first random test information is discarded.
[0087] In this way, by comparing the first random test information with the preset condition to determine the first test information, the accuracy and rationality of the first test information are improved.
[0088] In the disclosed embodiment, in the first test mode, the test information is dynamically determined by generating random test information, which not only improves the accuracy of the test information, but also improves the flexibility of the test information.
[0089] Step S12, writing the first write data into a first storage unit corresponding to the first write address through a first write port, and reading first read data from a second storage unit corresponding to the first read address through a first read port, wherein the first storage unit is different from the second storage unit.
[0090] Here, the first write port is a write port of at least one write port of the memory. The number of the first write ports may be at least one. In implementation, the number of the first write ports may be adapted to the number of the first write addresses. For example, if the number of the first write addresses is one, then the number of the first write ports may also be one.
[0091] The first write port may be determined in any suitable manner, such as randomly, custom, or in a set order. For example, if the memory has m (a positive integer) write ports, a write port may be randomly selected from the m write ports as the first write port. For another example, if the previous first write port is the xth write port, then the x+1th write port may be selected as the first write port. During implementation, the first write data is written into the first storage unit under the action of a clock signal.
[0092] The first read port is a read port of at least two read ports of the memory. The number of the first read ports may be at least one. In implementation, the number of the first read ports may be adapted to the number of the first read addresses. For example, if the number of the first read addresses is two, then the number of the first read ports may also be two, wherein the two first read ports may read the same address or different addresses.
[0093] The first read port may be determined in any suitable manner, such as randomly, custom, or in a set order. For example, if the memory has n (a positive integer) read ports, a read port may be randomly selected from the n read ports as the first read port. For another example, a read port may be designated as the first read port. In implementation, the first read data is read from the second storage unit under the action of a clock signal.
[0094] In some implementations, the first test information may also include read-write configuration information. The read-write configuration information may include, but is not limited to, read enable information, write enable information, read bit number information, write bit number information, etc. During implementation, in the same clock cycle, according to the write enable information and write bit number information in the read-write configuration information, the first write data is written into the position corresponding to the first storage unit, and at the same time, according to the read enable information and read bit number information in the read-write configuration information, the first read data is read from the position corresponding to the second storage unit.
[0095] In some embodiments, step S12 includes steps S121 to S123, wherein:
[0096] Step S121, obtaining read-write configuration information; wherein the read-write configuration information includes at least one of the following: read enable information, write enable information, read bit number information, and write bit number information.
[0097] Here, the read-write configuration information may be dynamically generated by a generator or may be preset. The read-write configuration information may be obtained in any suitable manner, for example, by obtaining the read-write configuration information from a generator.
[0098] Step S122: When the write enable information indicates enable, write the first write data into a position corresponding to the first storage unit through the first write port according to the write bit number information.
[0099] Here, when the write enable information indicates that the first write port can be operated, a write operation is performed on the first storage unit according to the write bit number information.
[0100] Step S123: when the read enable signal indicates enable, read the first read data from a position corresponding to the second storage unit through the first read port according to the read bit number information.
[0101] Here, when the read enable information indicates that the first read port can be operated, the second storage unit is read according to the read bit number information.
[0102] In the disclosed embodiment, the storage unit of the memory is read and written according to the read and write configuration information, which improves the accuracy of the read and write operations and reduces the possibility of abnormal access.
[0103] Step S13: Determine a test result of the memory based on the first read data.
[0104] Here, the test results may include but are not limited to the first test results, the second test results, etc. Among them, the first test result indicates that there is an abnormality in the memory, for example, there is interference between reading and writing, between multiple reads, between multiple writes, etc., and the memory stores open circuits, short circuits and other faults. The second test result indicates that the memory is normal, that is, there is no abnormality. During implementation, the first read data and the second write data (that is, the data written by the second storage unit) can be compared. If the two are the same, it indicates that the memory is normal. Conversely, if the two are not the same, it indicates that the memory is abnormal. In some embodiments, the second write data can be stored in advance, so that the second write data can be read out for real-time comparison. In some embodiments, a mapping relationship between addresses and data can be established, then, according to the mapping relationship, the second write data corresponding to the first read address can be obtained.
[0105] In some implementations, when the number of the first read address is at least one, the test result may include a test result corresponding to each first read address.
[0106] In the embodiments disclosed herein, firstly, the test information is determined according to the test mode, thereby improving the accuracy of the test information; secondly, the test time is shortened by controlling the read and write ports to operate simultaneously to test each port of the memory, and at the same time, since it is possible to test whether there are abnormalities between the read and write ports, multiple write ports, multiple read ports, etc. of the memory, the comprehensiveness of the test is improved; finally, the memory is tested according to different test modes without relying on the circuit structure of the memory, which not only meets the diverse test requirements of different users but also improves the flexibility of the test, and since it is compatible with the testing of memories with different numbers of ports, it improves the versatility and adaptability.
[0107] In some implementations, when the test mode is the first test mode, the method further includes step S161 or step S162, wherein:
[0108] Step S161: Add the first write address to a first information set, and delete the first read address from the first information set.
[0109] Here, the first information set includes at least one storage address, and the storage unit corresponding to each storage address has been written with corresponding data. In implementation, when data is written into storage unit A, the storage address of storage unit A can be added to the first information set; when data in storage unit B is read, the storage address of storage unit B can be deleted from the first information set. In this way, through each storage address recorded in the first information set, it can be determined whether the generated random read address has written data, so as to accurately determine the test information.
[0110] Step S162: Update the storage state of the storage unit corresponding to the first write address in the second information set to a written state, and update the storage state of the storage unit corresponding to the first read address in the second information set to an unwritten state.
[0111] Here, the second information set includes the storage address of each storage unit of the memory and the storage state of each storage unit. In implementation, the second information set includes the storage address and storage state of each storage unit. When data is written to storage unit A, the storage state of storage unit A can be updated to a written state; when data in storage unit B is read, the storage state of storage unit B can be updated to an unwritten state. In this way, through the storage addresses and storage states recorded in the second information set, it can be determined whether the generated random read address has written data, so as to accurately determine the test information.
[0112] In the disclosed embodiment, the first information set or the second information set is updated in real time according to the test information to improve the accuracy of the test information.
[0113] Figure 2 A schematic diagram of an implementation process of a memory testing method provided in an embodiment of the present disclosure Figure 2 ,like Figure 2 As shown, the method includes steps S21 to S24, wherein:
[0114] Step S21, based on the test mode, determine first test information of the memory, the memory has at least one write port and at least two read ports, the memory includes at least one storage unit, and the first test information includes a first write address, first write data and a first read address.
[0115] Step S22, writing the first write data into a first storage unit corresponding to the first write address through a first write port, and reading first read data from a second storage unit corresponding to the first read address through a first read port, wherein the first storage unit is different from the second storage unit.
[0116] Here, the above steps S21 to S22 correspond to the above steps S11 to S12 respectively. When implementing, reference may be made to the specific implementation of the above steps S11 to S12.
[0117] Step S23: Acquire second write data of the second storage unit.
[0118] Here, the second write data may be obtained in any suitable manner. For example, the second write data may be read from a storage array or other storage device. For another example, the target data corresponding to the storage address of the second storage unit may be obtained through a preset mapping relationship, and the target data may be used as the second write data. For another example, the second write data sent by other devices may be received.
[0119] In some embodiments, the step S23 includes step S231 or step S232, wherein:
[0120] Step S231 : Generate the second write data based on the storage address of the second storage unit.
[0121] Here, the second write data may be generated in any suitable manner. For example, a mapping relationship between an address and data may be established in advance, and the second write data corresponding to the storage address of the second storage unit may be obtained according to the mapping relationship. The mapping relationship may be any suitable relationship, such as a corresponding relationship table, a hash conversion relationship, etc.
[0122] Step S232: Acquire the second write data from a preset storage array or other storage.
[0123] Here, the storage array can be any suitable array capable of realizing the function, for example, a FLOP array, which has the advantages of being accessible at any time and having a large read and write throughput. The other memory can be any suitable memory, for example, a standard SRAM with a single port or a dual port (one read and one write). In implementation, each time the memory is written, the standard SRAM is written at the same time, so that the second write data can be obtained.
[0124] In the disclosed embodiment, the second write data is generated by the storage address of the second storage unit, or is obtained from a pre-stored storage array or other memory, thereby accurately obtaining the second write data and broadening the method for obtaining the second write data.
[0125] Step S24: Determine a test result of the memory based on the first read data and the second write data.
[0126] Here, the test result may include but is not limited to a first test result, a second test result, etc. During implementation, the test result may be obtained by comparing the first read data with the second written data.
[0127] In some embodiments, step S24 includes at least one of steps S241 to S242, wherein:
[0128] Step S241: When the first read data is different from the second written data, use a first test result indicating an abnormality as a test result of the memory.
[0129] Here, if the first read data is different from the second written data, the first test result is used as the current round test result of the memory.
[0130] Step S242: When the first read data is the same as the second written data, use the second test result indicating normality as the test result of the memory.
[0131] Here, if the first read data is the same as the second written data, the second test result is used as the current round test result of the memory.
[0132] In some embodiments, if multiple rounds of testing are performed on the memory, the test result of the memory can be determined based on the test result of each round. For example, when the first read data is the same as the second write data, if the test end condition is met, the second test result is used as the test result of the memory; if the test end condition is not met, the test result of the memory is determined based on the second read data, the second read data is data read from the third storage unit corresponding to the second read address through the second read port, and the second read address is obtained based on the second test information.
[0133] Here, the test end condition may be any suitable condition, for example, the number of tests is a set number of times, whether the first read address is a preset read address, whether the first write address is a preset write address, etc. In some embodiments, different test modes may correspond to different test end conditions. For example, in the first test mode, the test end condition may include that the number of tests is a preset number of times; in the second test mode, the test end condition may include that the first read address is a preset read address. During implementation, first determine whether the first read data is the same as the second write data. If they are the same, then determine whether the test end condition is met. If so, the second test result is used as the test result of the memory.
[0134] The second read port is a read port among the at least two read ports of the memory. The number of the second read port may be at least one.
[0135] The second test information is similar to the first test information, and includes a second write address, third write data and a second read address. The second read port is determined in a similar manner to the first read port, and when implemented, the specific implementation of the aforementioned step S12 may be referred to.
[0136] During implementation, it can be determined whether the first read data and the second written data are the same. If they are the same, it can be determined whether the test end condition is met. If not, the test result of the memory is determined based on the next round of read data. In this way, the test result is determined based on the first read data, the second written data and the test end condition, thereby improving the accuracy of the test result.
[0137] In the disclosed embodiment, on the one hand, the accuracy of the second write data is improved by acquiring the second write data in real time; on the other hand, the test result of the memory is determined by the first read data and the second write data, thereby improving the accuracy of the test result.
[0138] Based on the above embodiments, the present disclosure also provides a memory testing device. Figure 3 A schematic diagram of the composition structure of a memory test device provided in an embodiment of the present disclosure Figure 1 ,like Figure 3 As shown, the memory test device 30 includes a configuration unit 31, a control unit 32 and a determination unit 33, wherein:
[0139] The configuration unit 31 is used to configure the configuration information of the memory;
[0140] The control unit 32 is configured to determine a test mode based on the configuration information; determine first test information of the memory based on the test mode, the memory having at least one write port and at least two read ports, the memory including at least one storage unit, the first test information including a first write address, first write data and a first read address; write the first write data into a first storage unit corresponding to the first write address through the first write port, and read first read data from a second storage unit corresponding to the first read address through the first read port, the first storage unit being different from the second storage unit;
[0141] The determining unit 33 is used to determine a test result of the memory based on the first read data.
[0142] Here, the configuration unit may be any suitable unit capable of implementing the function, such as a register. In some implementations, the configuration unit includes a plurality of registers, and the configuration information of the memory is configured by configuring the plurality of registers.
[0143] The configuration information may include mode information, first test information, other information, etc. In implementation, the test mode may be obtained through the mode information. The test mode may include but is not limited to the first test mode, the second test mode, etc. In some implementations, different test modes correspond to different configuration information. For example, when the test mode is the first test mode, the configuration information may include the test mode and other information; when the test mode is the second test mode, the configuration information may include the test mode, the first test information, and other information.
[0144] The control unit may be any suitable unit capable of implementing the function. For example, a digital circuit, an analog circuit, etc. The control unit may obtain the test mode in any suitable manner, such as broadcasting, a communication connection, etc. In some embodiments, a communication connection is pre-established between the control unit and the configuration unit to obtain the test mode, for example, the configuration unit transmits the configuration information to the control unit, or the control unit reads the configuration information from the configuration unit. During implementation, the process of the control unit determining the first test information may refer to the specific implementation of the aforementioned step S11, and the process of the control unit reading and writing the storage unit of the memory may refer to the specific implementation of the aforementioned step S12.
[0145] In some implementations, the control unit is further configured to: when the test mode is the second test mode, determine the first test information based on the configuration information.
[0146] Here, the configuration information also includes at least the first test information. In implementation, the process of the control unit determining the first test information based on the configuration information can refer to the specific implementation of the aforementioned step S111. In this way, the test information is directly obtained through the configuration information in the second test mode, which not only improves the accuracy of the test information, but also shortens the time for obtaining the test information.
[0147] Figure 4 A schematic diagram of a test state of a memory provided by an embodiment of the present disclosure Figure 1 ,like Figure 4 As shown, the memory has one write port and two read ports, where:
[0148] When the memory is not in the test, the test state of the memory is the idle state 41;
[0149] When the memory enters the test, the test state of the memory is first converted to the start state 42, and then enters various states according to the first test information, namely:
[0150] According to the first write operation in the first test information, the first execution state 431 is entered; wherein the first write operation may include "write address wx1, write data wy1, write bit information wz1 and whether to write address wx1";
[0151] After the first write operation is completed, if waiting is required, the first waiting state 441 is entered to wait for the clock cycle of the next operation. After the waiting is completed, the second execution state 432 is entered according to the second write operation in the first test information; if waiting is not required, the second execution state 432 is entered according to the second write operation in the first test information; wherein the second write operation may include "write address wx2, write data wy2, write bit information wz2, whether to write address wx2";
[0152] After the second write operation is completed, if waiting is required, the second wait state 442 is entered to wait for the clock cycle of the next operation. After the waiting is completed, the third execution state 433 is entered according to the read and write operation in the first test information; if waiting is not required, the third execution state 433 is entered according to the read and write operation in the first test information; wherein, the read and write operation may include one write and one read (i.e., read address wx1, wx2 or other written addresses) or one write and two reads (i.e., read wx1+wx2, read wx1+other written addresses, or read wx2+other written addresses, etc.), that is: "write address wx3, write data wy3, write bit information wz3, whether to write address wx3; read address rx1, read bit information ry1, whether to read address rx1; read address rx2, read bit information rr2, whether to read address rx2", "write address wx3, write data wy3, write bit information wz3, whether to write address wx3; read address rx1, read bit information ry1, whether to read address rx1" or "write address wx3, write data wy3, write bit information wz3, whether to write address wx3; read address rx2, read bit information rr2, whether to read address rx2";
[0153] After the read and write operations are completed, if waiting is required, the third waiting state 443 is entered to wait for the clock cycle of the next operation. After the waiting is completed, when the test end condition is met and / or the test result is the first test result, the test state of the memory returns to the idle state 41; if waiting is not required, when the test end condition is met and / or the test result is the first test result, the test state of the memory returns to the idle state 41.
[0154] In some implementations, the device 30 further includes a generating unit, the generating unit being configured to generate first random test information; the controlling unit being further configured to determine the first test information based on the first random test information when the test mode is the first test mode.
[0155] Here, the generating unit may be any suitable unit capable of realizing the function, for example, a generator. The generator may be any suitable generator, for example, an LFSR. In some embodiments, the generating unit may include at least one generator, and the first random test information is generated by the at least one generator. The process of the control unit determining the first test information may refer to the specific implementation of the aforementioned steps S141 to S142. In this way, the test information is dynamically determined by the generated random test information, which not only improves the accuracy of the test information, but also improves the flexibility of the test information.
[0156] In some embodiments, the generation unit includes a first generator and a second generator, the number of bits of the first generator is different from the number of bits of the second generator, the first generator is used to generate the first random test information; the second generator is used to generate read-write configuration information, the read-write configuration information includes at least one of the following: read enable information, write enable information, read bit number information, write bit number information; the control unit is also used to write the first write data to the position corresponding to the first storage unit through the first write port according to the write bit number information when the write enable information indicates enable; and read the first read data from the position corresponding to the second storage unit through the first read port according to the read bit number information when the read enable signal indicates enable.
[0157] Here, the number of bits of the first generator and the second generator can be any suitable number of bits, for example, 8 bits, 64 bits, 128 bits, etc. The first generator is mainly used to generate the first random test information. The second generator is mainly used to dynamically generate the read-write configuration information.
[0158] Figure 5 A schematic diagram of a test state of a memory provided by an embodiment of the present disclosure Figure 2 ,like Figure 5 As shown, the memory has one write port and two read ports, where:
[0159] When the memory is not in the test, the test state of the memory is the idle state 51;
[0160] When the memory enters the test, the test state of the memory is first converted to the start state 52, and then enters the random reset state 53 to wait for the generation of random test information;
[0161] According to the test information determined by the random test information, the execution state 54 is entered, and after the execution is completed, the test result of this round is generated, and the verification state 55 is entered to verify the test result of this round and the test end condition;
[0162] When the test result of this round is the second test result and the test end condition is not met, the random reset state 53 is entered;
[0163] When the test end condition is met and / or the test result of this round is the first test result, the idle state 51 is entered.
[0164] The determination unit may be any suitable unit capable of implementing the function, such as a digital circuit, an analog circuit, etc. In implementation, the process of the determination unit determining the test result of the memory may refer to the specific implementation of the aforementioned step S13 or step S24.
[0165] In the disclosed embodiment, the storage unit of the memory is read and written according to the read and write configuration information, which improves the accuracy of the read and write operations and reduces the possibility of abnormal access.
[0166] In some implementations, the determining unit is further configured to: when the test result of the memory includes a first test result, transfer the first read data and / or the first read address to the configuration unit.
[0167] Here, if the test result characterizes an abnormality (ie, read abnormality), the first read data and / or the first read address are reported to the configuration unit so that the user can know the test result of the memory. During implementation, the determination unit is connected to the configuration unit in communication. In some embodiments, if the number of the first read addresses is two or more, two or more bits can be used to represent the test result, and the test result includes the test result corresponding to each first read address. For example, if the number of the first read addresses is two and the test result is 01, the test result corresponding to the first first read address is abnormal (ie, the first test result), and the test result corresponding to the second first read address is normal. At this time, the first first read address and / or the corresponding first read data can be reported to the configuration unit.
[0168] In some implementations, the determination unit may write the test result into a result register of the configuration unit, so that the test result of the memory may be known by reading the result register.
[0169] In some implementations, the device further includes an adaptation unit, and the adaptation unit is configured to convert the first test information into first test information adapted to the memory based on the read / write port information of the memory.
[0170] Here, the adaption unit may be any suitable unit capable of realizing the function, such as a digital circuit, an analog circuit, etc. In implementation, since the read and write ports of different memories may be different, the first test information needs to be converted to adapt to the memory.
[0171] In the disclosed embodiments, the test information is converted according to the read and write port information of the memory, which can be compatible with the test requirements of different memories and improve the compatibility and adaptability of the device.
[0172] Figure 6 A schematic diagram of the composition structure of a memory test device provided in an embodiment of the present disclosure Figure 2 ,like Figure 6 As shown, the memory test device 30 includes a configuration unit 31, a control unit 32, a determination unit 33, a generation unit 34 and an adaptation unit 35, wherein:
[0173] The configuration unit 31 is used to configure the configuration information of the memory 60;
[0174] The generating unit 34 is used to obtain the configuration information; based on the configuration information, generate first random test information;
[0175] The control unit 32 is used to obtain the configuration information; determine the test mode based on the configuration information; when the test mode is the second test mode, determine the first test information of the memory 60 based on the configuration information; when the test mode is the first test mode, obtain the first random test information from the generation unit 34, and determine the first test information based on the first random test information;
[0176] The adapting unit 35 is used to convert the first test information into test information adapted to the memory 60 according to the read / write port information of the memory 60, and read and write the memory 60 using the read / write port of the memory 60 based on the test information;
[0177] The determination unit 33 is used to obtain the first read data of the second storage unit from the memory 60, and obtain a preset value (i.e., the write data of the second storage unit) from the control unit; compare the first read data with the preset value to generate a test result; when the test result includes the first test result, report the first read address and / or the first read data to the configuration unit 31.
[0178] In some embodiments, the preset value may be generated according to a mapping relationship. In implementation, the mapping relationship may be stored in a control unit or in a determination unit. If the mapping relationship is stored in a control unit, the control unit generates the preset value corresponding to the first read address according to the mapping relationship; if the mapping relationship is stored in a determination unit, the determination unit generates the preset value corresponding to the first read address according to the mapping relationship.
[0179] Figure 7 A schematic diagram of an implementation process of a memory testing method provided in an embodiment of the present disclosure Figure 3 ,like Figure 7 As shown, the method includes steps S711 to S723, wherein:
[0180] Step S711, determining a test mode of the memory based on the mode information of the configuration information;
[0181] Here, the memory includes two read ports and one write port.
[0182] Step S712, determine whether the test mode is the first test mode, if so, proceed to step S713, otherwise, proceed to step S716;
[0183] Step S713, using LFSR to generate random test information;
[0184] Step S714: determine whether the random test information meets the preset conditions, if yes, proceed to step S715, otherwise, proceed to step S713;
[0185] Step S715: Use the random test information as the test information and proceed to step S717;
[0186] Here, the test information includes a write address, write data, a first read address, and a second read address.
[0187] Step S716, obtaining test information from the configuration information, and proceeding to step S717;
[0188] Step S717, within the same clock cycle, write the write data into the first target storage unit (i.e., the storage unit corresponding to the write address) through the write port of the memory, read the first read data from the second target storage unit (i.e., the storage unit corresponding to the first read address) through the first read port, and read the second read data from the third target storage unit (i.e., the storage unit corresponding to the second read address) through the second read port;
[0189] Step S718, determining whether the first read data and the first preset value (ie, the write data of the second target storage unit) are the same, if so, proceeding to step S719, otherwise, proceeding to step S721;
[0190] Step S719, determining whether the second read data and the second preset value (ie, the write data of the third target storage unit) are the same, if so, proceeding to step S720, otherwise, proceeding to step S722;
[0191] Step S720, determine whether the test end condition is met, if so, proceed to step S723, if not and it is the first test mode, proceed to step S713, if not and it is the second test mode, proceed to step S716;
[0192] Step S721, reporting the first read data, and proceeding to step S723;
[0193] Step S722, reporting the second read data, and proceeding to step S723;
[0194] Step S723, end.
[0195] In the disclosed embodiments, firstly, the control unit determines the test information according to the test mode, thereby improving the accuracy of the test information; secondly, the control unit shortens the test time by controlling the read and write ports to operate simultaneously to test each port of the memory, and at the same time, since it is possible to test whether there are abnormalities between the read and write ports, multiple write ports, multiple read ports, etc. of the memory, the comprehensiveness of the test is improved; finally, the memory is tested according to different test modes without relying on the circuit structure of the memory, which not only meets the diverse testing needs of different users but also improves the flexibility of the test, and since it can be compatible with the testing of memories with different numbers of ports, it improves the versatility and adaptability.
[0196] Based on the above embodiments, the present disclosure provides a memory testing device. Figure 8 A schematic diagram of the structure of a memory test device provided by an embodiment of the present disclosure is shown in FIG. Figure 8 As shown, the memory test device 80 includes a first determination module 81, a read-write module 82, and a second determination module 83, wherein:
[0197] The first determination module 81 is used to determine first test information of the memory based on a test mode, the memory having at least one write port and at least two read ports, the memory including at least one storage unit, and the first test information including a first write address, first write data and a first read address;
[0198] The read / write module 82 is configured to write the first write data into a first storage unit corresponding to the first write address through a first write port, and read the first read data from a second storage unit corresponding to the first read address through a first read port, wherein the first storage unit is different from the second storage unit;
[0199] The second determination module 83 is used to determine a test result of the memory based on the first read data.
[0200] In some embodiments, when the test mode is the first test mode, the first determination module 81 is further used to: generate first random test information based on the first test mode, the first random test information including a first random write address, first random write data and a first random read address; and determine first test information of the memory based on the first random test information.
[0201] In some implementations, the first determination module 81 is further configured to: use a preset generator to respectively generate the first random write address and the first random read address; and generate the first random write data.
[0202] In some implementations, the first determination module 81 is further configured to: determine the write data corresponding to the first random write address by using a preset mapping relationship, and use the write data as the first random write data.
[0203] In some embodiments, the first determination module 81 is further used to: when the first random test information meets a preset condition, use the first random test information as the first test information of the memory; wherein the preset condition includes: the first random write address and the first random read address are not the same and the first random read address is an address where data has been written.
[0204] In some embodiments, when the test mode is the first test mode, the device also includes a processing module, and the processing module is used to: add the first write address to a first information set, delete the first read address from the first information set, the first information set includes at least one storage address, and the storage unit corresponding to each storage address has been written with corresponding data; and / or, update the storage state of the storage unit corresponding to the first write address in the second information set to a written state, and update the storage state of the storage unit corresponding to the first read address in the second information set to an unwritten state, and the second information set includes the storage address of each storage unit and the storage state of each storage unit.
[0205] In some implementations, when the test mode is the second test mode, the first determination module 81 is further configured to: obtain first test information of the memory from configuration information based on the second test mode.
[0206] In some implementations, the second determination module 83 is further configured to: obtain second write data of the second storage unit; and determine a test result of the memory based on the first read data and the second write data.
[0207] In some embodiments, the second determination module 83 is further used to: when the first read data is different from the second write data, use the first test result representing the abnormality as the test result of the memory; when the first read data is the same as the second write data, use the second test result representing the normality as the test result of the memory.
[0208] In some implementations, the second determination module 83 is further configured to: generate the second write data based on the storage address of the second storage unit; or obtain the second write data from a preset storage array or other storage device.
[0209] In some embodiments, the read-write module 82 is also used to: obtain read-write configuration information; wherein the read-write configuration information includes at least one of the following: read enable information, write enable information, read bit number information, write bit number information; when the write enable information indicates enable, according to the write bit number information, the first write data is written to the position corresponding to the first storage unit through the first write port; when the read enable signal indicates enable, according to the read bit number information, the first read data is read from the position corresponding to the second storage unit through the first read port.
[0210] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present disclosure, please refer to the description of the method embodiment of the present disclosure for understanding.
[0211] It should be noted that in the embodiments of the present disclosure, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of the present disclosure is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions to enable an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiments of the present disclosure are not limited to any specific combination of hardware and software.
[0212] An embodiment of the present disclosure provides a graphics processor, comprising any of the above-mentioned data processing devices.
[0213] An embodiment of the present disclosure provides an electronic device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and the processor implements the above method when executing the computer program.
[0214] The embodiment of the present disclosure provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented. The computer-readable storage medium may be transient or non-transient.
[0215] The present disclosure provides a computer program product, including a computer program or an instruction, wherein the computer program product includes a non-transitory computer-readable storage medium storing the computer program, and when the computer program or the instruction is executed by a processor, some or all of the steps in the above method are implemented. The computer program product can be implemented specifically by hardware, software or a combination thereof. In an optional embodiment, the computer program product is specifically embodied as a computer storage medium, and in another optional embodiment, the computer program product is specifically embodied as a software product, such as a software development kit (SDK) and the like.
[0216] It should be noted that Fig. 9 A hardware entity diagram of an electronic device provided in an embodiment of the present disclosure, such as Fig. 9 As shown, the hardware entity of the electronic device 900 includes: a processor 901, a communication interface 902 and a memory 903, wherein:
[0217] The processor 901 generally controls the overall operation of the electronic device 900 .
[0218] The communication interface 902 may enable the electronic device to communicate with other terminals or servers via a network.
[0219] The memory 903 is configured to store instructions and applications executable by the processor 901, and can also cache data to be processed or processed by the processor 901 and each module in the electronic device 900 (for example, image data, audio data, voice communication data, and video communication data), which can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM). Data transmission between the processor 901, the communication interface 902 and the memory 903 can be carried out through the bus 904.
[0220] It should be noted that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of the present disclosure, please refer to the description of the method embodiments of the present disclosure for understanding.
[0221] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present disclosure. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of the present disclosure, the size of the serial number of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure. The serial numbers of the embodiments of the present disclosure are for description only and do not represent the advantages and disadvantages of the embodiments.
[0222] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0223] In the several embodiments provided in the present disclosure, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the 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 can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0224] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; 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 scheme of this embodiment. In addition, all functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0225] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.
[0226] Alternatively, if the above-mentioned integrated unit of the present disclosure is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0227] The above description is only an implementation mode of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure, which should be included in the protection scope of the present disclosure.
Claims
1. A memory testing method, characterized in that: The method comprises: Based on the test mode, determining first test information of the memory, the memory having at least one write port and at least two read ports, the memory including at least one storage unit, the first test information including a first write address, first write data and a first read address; writing the first write data into a first storage unit corresponding to the first write address through a first write port, and reading the first read data from a second storage unit corresponding to the first read address through a first read port, the first storage unit being different from the second storage unit; Based on the first read data, a test result of the memory is determined.
2. The testing method according to claim 1, characterized in that: In a case where the test mode is the first test mode, determining first test information of the memory based on the test mode includes: Based on the first test mode, generating first random test information, the first random test information comprising a first random write address, first random write data and a first random read address; Based on the first random test information, first test information of the memory is determined.
3. The method according to claim 2, characterized in that The generating first random test information comprises: Using a preset generator, respectively generate the first random write address and the first random read address; The first random write data is generated.
4. The method according to claim 3, characterized in that The generating the first random write data comprises: The write data corresponding to the first random write address is determined by using a preset mapping relationship, and the write data is used as the first random write data.
5. The method according to claim 2, characterized in that: The determining, based on the first random test information, first test information of the memory includes: When the first random test information meets a preset condition, the first random test information is used as the first test information of the memory; wherein the preset condition includes: the first random write address and the first random read address are different and the first random read address is an address where data has been written.
6. The method according to claim 1, characterized in that In the case where the test mode is the first test mode, the method further includes: adding the first write address to a first information set, and deleting the first read address from the first information set, wherein the first information set includes at least one storage address, and corresponding data has been written into a storage unit corresponding to each storage address; and / or, The storage state of the storage unit corresponding to the first write address in the second information set is updated to a written state, and the storage state of the storage unit corresponding to the first read address in the second information set is updated to an unwritten state, wherein the second information set includes the storage address of each storage unit and the storage state of each storage unit.
7. The testing method according to claim 1, characterized in that: In a case where the test mode is the second test mode, determining first test information of the memory based on the test mode includes: Based on the second test mode, first test information of the memory is obtained from configuration information.
8. The testing method according to claim 1, characterized in that: The step of determining a test result of the memory based on the first read data includes: Acquire second write data of the second storage unit; A test result of the memory is determined based on the first read data and the second write data.
9. The testing method according to claim 8, characterized in that: The step of determining a test result of the memory based on the first read data and the second write data includes: In a case where the first read data is different from the second written data, taking a first test result indicating an abnormality as a test result of the memory; When the first read data is identical to the second written data, a second test result indicating normality is used as a test result of the memory.
10. The testing method according to claim 8, characterized in that: The obtaining the second write data of the second storage unit includes: generating the second write data based on the storage address of the second storage unit; or, The second write data is obtained from a preset storage array or other storage.
11. The testing method according to any one of claims 1 to 10, characterized in that: The step of writing the first write data into a first storage unit corresponding to the first write address through a first write port, and reading the first read data from a second storage unit corresponding to the first read address through a first read port includes: Acquire read-write configuration information; wherein the read-write configuration information includes at least one of the following: read enable information, write enable information, read bit number information, write bit number information; When the write enable information indicates enablement, writing the first write data into a position corresponding to the first storage unit through the first write port according to the write bit number information; In a case where the read enable signal indicates enable, the first read data is read from a position corresponding to the second storage unit through the first read port according to the read bit number information.
12. A memory testing device, characterized in that: The device comprises a configuration unit, a control unit and a determination unit, wherein: The configuration unit is used to configure the configuration information of the memory; The control unit is used to determine a test mode based on the configuration information; determine first test information of the memory based on the test mode, the memory having at least one write port and at least two read ports, the memory including at least one storage unit, the first test information including a first write address, first write data and a first read address; write the first write data into a first storage unit corresponding to the first write address through the first write port, and read first read data from a second storage unit corresponding to the first read address through the first read port, the first storage unit being different from the second storage unit; The determining unit is used to determine a test result of the memory based on the first read data.
13. A memory testing device, characterized in that: The device comprises: A first determining module, configured to determine first test information of the memory based on a test mode, the memory having at least one write port and at least two read ports, the memory including at least one storage unit, the first test information including a first write address, first write data and a first read address; a read / write module, configured to write the first write data into a first storage unit corresponding to the first write address through a first write port, and read the first read data from a second storage unit corresponding to the first read address through a first read port, wherein the first storage unit is different from the second storage unit; The second determining module is used to determine a test result of the memory based on the first read data.
14. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the test method according to any one of claims 1 to 11 is implemented.
15. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the testing method described in any one of claims 1 to 11 is implemented.
16. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
Citation Information
Cited By
Detection and management system for USB (Universal Serial Bus) equipment
CN120371666A
Test method for read refresh capability of memory, memory, electronic equipment and computer storage medium
CN121054073A
