Memory chip test method and test system based on FPGA (Field Programmable Gate Array)
By encapsulating memory chip specifications in FPGAs and displaying test results using upper computers, the complex and time-consuming problem of memory chip verification and testing in the prior art is solved, and a fast and simplified test process and efficient verification process are achieved.
Patent Information
- Application Number
- CN202411016176.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-27
- Publication Date
- 2024-11-29
AI Technical Summary
In the prior art, the memory chip verification and testing process is complex and time-consuming, especially when using FPGA for testing and verification, it requires tedious wiring processes and inefficient waveform grabbing, resulting in low verification efficiency.
By encapsulating the memory chip specifications to be tested in the FPGA, analyzing and matching the test function instructions, generating corresponding operation instructions, and using the upper computer to display the test results, simplifying the test process and improving efficiency.
It realizes faster memory chip test verification, is scalable, simplifies the test architecture, and saves significant time and displays more intuitive test results.
Smart Images

Figure CN119049530A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of integrated circuits, and in particular to a memory chip testing method and testing system based on FPGA. Background Art
[0002] Serial Peripheral Interface (SPI) Flash or NOR Flash is a non-volatile memory chip widely used in embedded systems, digital devices, communication equipment and other fields.
[0003] When testing and verifying SPI or NOR Flash, you need to read the chip SPEC (specification) first to understand the relevant instructions and operation timing. If FPGA is used for testing and verification, the test module (corresponding to the test socket and Flash chip) needs to be connected to the corresponding input and output IO ports of the FPGA, and the Verilog code needs to be written and downloaded to the FPGA. The waveform is captured through an oscilloscope, logic analyzer, or the in-system logic analyzer (ILA) in the corresponding electronic design automation (EDA) software. The wiring of the oscilloscope and logic analyzer is cumbersome. Although the waveform capture using ILA avoids the cumbersome wiring process, it is necessary to balance the FPGA resources with the type and length of the captured waveform. When performing functional verification, the waveform needs to be captured repeatedly, and the verification efficiency is low. Therefore, a simple and fast memory chip testing method is needed. Summary of the invention
[0004] In view of the deficiencies in the prior art, the present invention provides a memory chip testing method and testing system based on FPGA, which solves the problem that the memory chip verification test process in the prior art is complicated and time-consuming.
[0005] In a first aspect, according to an embodiment of the present invention, a memory chip testing method based on FPGA is provided, comprising the following steps: S1, a host computer obtains a test function instruction and forwards it to an FPGA main control module; S2, the FPGA main control module parses and matches the received test function instruction based on the specification of the memory chip to be tested encapsulated therein to obtain an operation instruction corresponding to the test function instruction; S3, an operation is performed on the memory chip to be tested according to the obtained operation instruction, and the result of the operation is returned to the host computer via the FPGA main control module.
[0006] According to an embodiment of the present invention, the test function instructions include dynamic burn-in test instructions and verification test instructions.
[0007] According to an embodiment of the present invention, the FPGA main control module parses and matches the received test function instruction based on the specification of the memory chip to be tested encapsulated therein, including the following steps: S21, selecting the first address mode or the second address mode according to the test function instruction; S22, selecting to load the default address or to load the custom address; S23, enabling one of the preset serial peripheral interface SPI mode, two-wire serial peripheral interface DPI mode or four-wire serial peripheral interface QPI mode according to the test function instruction.
[0008] According to an embodiment of the present invention, the first address mode is a 3-byte mode, and the second address mode is a 4-byte mode.
[0009] According to an embodiment of the present invention, the default address is a 24-bit 0 address or a 32-bit 0 address according to any address mode.
[0010] According to an embodiment of the present invention, when the two-wire serial peripheral interface DPI mode is enabled, the digital input DI port and the digital output DO port in the FPGA master control module serve as bidirectional input and output IO ports.
[0011] According to an embodiment of the present invention, when the four-wire serial peripheral interface QPI mode is enabled, the digital input DI port, digital output DO port, write protection WP port and hold HOLD port in the FPGA master control module serve as bidirectional input and output IO ports.
[0012] In a second aspect, according to another embodiment of the present invention, there is provided an FPGA-based memory chip testing system, which adopts an FPGA-based memory chip testing method described in the first aspect to perform memory chip testing, including: a host computer, used to obtain test function instructions and forward the test function instructions to the FPGA main control module, and obtain test results from the FPGA main control module; the FPGA main control module, used to receive the test function instructions from the host computer, parse and match the received test function instructions based on the specifications of the memory chip to be tested encapsulated therein to obtain operation instructions corresponding to the test function instructions, and perform operations on the memory chip to be tested according to the obtained operation instructions; a test module, used to accommodate the memory chip to be tested.
[0013] According to another embodiment of the present invention, the FPGA main control module includes: an instruction and information transceiver submodule, which is used to receive instructions from the host computer and transmit test results between the host computer and the memory chip to be tested; an instruction parsing submodule, which is used to parse and match the instructions received from the host computer to obtain operation instructions corresponding to the test function instructions; and an instruction control submodule 123, which performs operations on the memory chip to be tested according to the obtained operation instructions.
[0014] According to another embodiment of the present invention, the instruction and information receiving and sending submodule includes: a first-in-first-out FIFO data buffer submodule, which is used for data buffering; a universal asynchronous receiver and transmitter UART serial communication bus submodule, which includes a CH340 conversion chip, a TYPE-C socket and a USB TYPE-C connection cable, which is used for communicating with a host computer.
[0015] The technical principle of the present invention is: the memory chip specification to be tested is encapsulated in the FPGA, so that the FPGA can directly parse and match according to the received test function instructions to obtain the corresponding instruction operation; in addition, the test results are further displayed by the host computer, which makes it more convenient to verify the test results.
[0016] Compared with the prior art, the present invention has the following beneficial effects: by adopting the specifications of the memory chip to be tested encapsulated in the FPGA for parsing and matching, the memory chip test verification can be performed faster than directly writing the test program based on the specifications; in addition, it also has certain scalability and is easier to convert to the verification of other types of memory chips; in addition, by adopting the host computer to display the test results, the display is more intuitive, the test architecture is simpler, and it saves more time. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 Flow chart of a memory chip testing method according to an embodiment of the present invention.
[0018] Figure 2 FIG. 4 is a block diagram of a memory chip testing system according to another embodiment of the present invention.
[0019] Figure 3 This is a block diagram of an FPGA master control module according to another embodiment of the present invention.
[0020] Figure 4 This is a block diagram of an instruction and information receiving and sending submodule according to another embodiment of the present invention. DETAILED DESCRIPTION
[0021] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0022] As the background technology, the existing technology has the problem that the memory chip verification test process is complicated and time-consuming. Figure 1 As shown, an embodiment of the present invention proposes a memory chip testing method based on FPGA, comprising the following steps: S1, a host computer obtains a test function instruction and forwards it to an FPGA main control module; S2, the FPGA main control module parses and matches the received test function instruction based on the specification of the memory chip to be tested encapsulated therein, so as to obtain an operation instruction corresponding to the test function instruction;
[0023] S3. Execute the operation on the memory chip to be tested according to the obtained operation instruction, and return the result of the operation to the host computer via the FPGA main control module. By adopting the specification of the memory chip to be tested encapsulated in the FPGA for parsing and matching, the memory chip test verification can be performed faster than directly writing the test program based on the specification; in addition, it also has certain scalability and is easier to convert to the verification of other types of memory chips; in addition, by adopting the host computer for displaying the test results, the display is more intuitive, the test architecture is simpler, and it saves more time.
[0024] According to an embodiment of the present invention, the test function instructions include dynamic burn-in test instructions and verification test instructions. The test function instructions also include other functions supported by the memory chip, such as two-way reading, two-way writing, and the like.
[0025] In detail, according to an embodiment of the present invention, the FPGA main control module parses and matches the received test function instruction based on the specification of the memory chip to be tested encapsulated therein, including the following steps: S21, select the first address mode or the second address mode according to the test function instruction; S22, select to load the default address or load the custom address; S23, enable one of the preset serial peripheral interface SPI mode, two-wire serial peripheral interface DPI mode or four-wire serial peripheral interface QPI mode according to the test function instruction. Among them, the first address mode is a 3-byte mode, and the second address mode is a 4-byte mode. In detail, after the storage capacity of the NOR FLASH chip exceeds 128Mbit, a 4-BYTE address needs to be used. If the storage unit operated is located in the part with a storage capacity exceeding 128Mbit, the 4-BYTE address mode needs to be enabled. The default address is a 24-bit 0 address or a 32-bit 0 address according to any address mode, and the custom address can be input according to demand. In addition, when the two-wire serial peripheral interface DPI mode is enabled, the digital input DI port and the digital output DO port in the FPGA main control module are used as bidirectional input and output IO ports. In addition, when the four-wire serial peripheral interface QPI mode is enabled, the digital input DI port, digital output DO port, write protection WP port and hold HOLD port in the FPGA master control module serve as bidirectional input and output IO ports.
[0026] In detail, the commonly used dynamic aging test is used as an example to illustrate the entire test process. First, the dynamic aging test instruction is input to the host computer. Subsequently, after being forwarded to the FPGA main control module by the host computer, the dynamic aging test instruction is parsed and matched to determine the address mode, custom address and serial peripheral interface SPI mode, as well as specific operation instructions. In detail, according to the storage capacity of the NOR FLASH chip, the upper limit address is set to ensure that full address coverage can be completed. At the same time, according to the upper limit address length (128Mbit), the address mode and initial address are confirmed. At the same time, it is determined that the operation instructions involved are erase, write, and read. In addition, data verification is completed by the host computer. In detail, the NOR FLASH chip needs to be erased before performing the write operation, and the operating device sets the polling status register to the BUSY bit, and jumps to the next step after the erase is completed. Then, data writing is started according to the initial address (or default) set previously. After the write is completed, the current address data is read. After the read is completed, the read current address data is compared with the written data, and the current address is recorded if there is a difference. If the current address is not the upper limit address, the write and read operations have not yet traversed the memory chip, the address increments to the next page, and the write, read, and data verification operations are performed cyclically; if the current address is the upper limit address, the traversal of the memory chip is completed. After completing the traversal of the storage space, it will be determined whether the host computer has an end loop instruction input. If there is no end loop instruction input, the chip erase operation is executed and a new round of storage space write and read operation traversal begins. If there is an end loop instruction input, the address with an error in the data is output to the host computer, ending the self-loop mode.
[0027] like Figure 2 As shown, according to another embodiment of the present invention, a memory chip test system 100 based on FPGA is provided, which adopts a memory chip test method based on FPGA as described above to perform memory chip test, including: a host computer 110, which is used to obtain test function instructions and forward the test function instructions to the FPGA main control module 120, and obtain test results from the FPGA main control module 120; the FPGA main control module 120 is used to receive the test function instructions from the host computer 110, parse and match the received test function instructions based on the specification of the memory chip to be tested encapsulated therein, so as to obtain operation instructions corresponding to the test function instructions, and perform operations on the memory chip to be tested according to the obtained operation instructions; a test module 130 is used to accommodate the memory chip to be tested. In addition, the test module 130 also includes a test fixture (not shown). In addition, a temperature box can also be included for dynamic aging testing.
[0028] According to another embodiment of the present invention, Figure 3As shown, the FPGA main control module 120 includes: an instruction and information receiving and sending submodule 121, which is used to receive instructions from the host computer 110 and transmit test results between the host computer 110 and the memory chip to be tested; an instruction parsing submodule 122, which is used to parse and match the instructions received from the host computer 110 to obtain operation instructions corresponding to the test function instructions; and an instruction control submodule 123, which performs operations on the memory chip to be tested according to the obtained operation instructions.
[0029] refer to Figure 4 According to another embodiment of the present invention, the instruction and information receiving and sending submodule 121 includes: a first-in-first-out FIFO data buffer unit 127, used for data buffering; a universal asynchronous receiver and transmitter UART serial communication bus unit 128, including a CH340 conversion chip, a TYPE-C socket and a USB TYPE-C connection line, used for communicating with the host computer 110.
[0030] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution of the present invention, which should be included in the scope of the claims of the present invention.
Claims
1. A memory chip testing method based on FPGA, characterized in that: The following steps are involved: S1, the host computer obtains the test function instruction and forwards it to the FPGA main control module; S2, the FPGA main control module parses and matches the received test function instruction based on the specification of the memory chip to be tested encapsulated therein, so as to obtain an operation instruction corresponding to the test function instruction; S3. Execute the operation on the memory chip to be tested according to the obtained operation instruction, and return the operation result to the host computer via the FPGA main control module.
2. A memory chip testing method based on FPGA as claimed in claim 1, characterized in that: The test function instructions include dynamic aging test instructions and verification test instructions.
3. The memory chip testing method based on FPGA as claimed in claim 1, characterized in that: The FPGA master control module parses and matches the received test function instruction based on the specification of the memory chip to be tested encapsulated therein, including the following steps: S21, selecting the first address mode or the second address mode according to the test function instruction; S22, select to load the default address or load the custom address; S23, enabling one of the preset serial peripheral interface SPI mode, two-wire serial peripheral interface DPI mode or four-wire serial peripheral interface QPI mode according to the test function instruction.
4. A memory chip testing method based on FPGA as claimed in claim 3, characterized in that: The first address mode is a 3-byte mode, and the second address mode is a 4-byte mode.
5. A memory chip testing method based on FPGA as claimed in claim 4, characterized in that: The default address is either the 24-bit 0 address or the 32-bit 0 address according to either address mode.
6. A memory chip testing method based on FPGA as claimed in claim 5, characterized in that: When the two-wire serial peripheral interface DPI mode is enabled, the digital input DI port and digital output DO port in the FPGA master control module act as bidirectional input and output IO ports.
7. The memory chip testing method based on FPGA as claimed in claim 5, characterized in that: When the four-wire serial peripheral interface QPI mode is enabled, the digital input DI port, digital output DO port, write protection WP port and hold HOLD port in the FPGA master control module serve as bidirectional input and output IO ports.
8. A memory chip testing system based on FPGA, using a memory chip testing method based on FPGA according to any one of claims 1 to 7 to perform memory chip testing, characterized in that: include: The host computer is used to obtain the test function instruction and forward the test function instruction to the FPGA main control module, and obtain the test result from the FPGA main control module; The FPGA master control module is used to receive the test function instruction from the host computer, parse and match the received test function instruction based on the specification of the memory chip to be tested encapsulated therein to obtain an operation instruction corresponding to the test function instruction, and perform an operation on the memory chip to be tested according to the obtained operation instruction; The test module is used to accommodate the memory chip to be tested.
9. The memory chip testing system based on FPGA as claimed in claim 8, characterized in that: The FPGA master control module includes: The command and information transceiver submodule is used to receive commands from the host computer and transmit test results between the host computer and the memory chip to be tested; The instruction parsing submodule is used to parse and match the instructions received from the host computer to obtain the operation instructions corresponding to the test function instructions; The instruction control submodule 123 executes the operation on the memory chip to be tested according to the obtained operation instruction.
10. The memory chip testing system based on FPGA as claimed in claim 9, characterized in that: The instruction and information receiving and sending submodule includes: First-in-first-out FIFO data buffer submodule, used for data buffering; The universal asynchronous receiver / transmitter (UART) serial communication bus submodule includes a CH340 conversion chip, a TYPE-C socket and a USBTYPE-C connection line, which are used for communication with a host computer.
Citation Information
Cited By
Chip testing method, device, system and medium
CN119044739A
Test system and test method for memory chip
CN119559997A
Chip test platform and system based on FPGA
CN120123162A
A chip testing platform and system based on FPGA
CN120123162B
