Chip verification method based on SPI (Serial Peripheral Interface)

Through the SPI-based chip verification method, using the SPI bus to access chip registers, the problems of traditional methods are solved, efficient chip verification is achieved, and verification efficiency and performance are improved.

CN119065910APending Publication Date: 2024-12-03CHENGDU HEXIN SEMICONDUCTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411036571.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

As the number of internal functional modules and registers of the chip increases, the traditional method of accessing registers through the chip bus becomes complicated and error-prone, making it difficult to effectively verify the register status of the chip.

Method used

Using SPI-based chip verification method, by obtaining parameter information of modules and registers, writing test cases, and accessing registers through SPI bus, reducing dependence on chip bus and improving verification efficiency.

Benefits of technology

Dedicated to register access through the SPI bus, the probability of errors is reduced, the chip's verification efficiency and overall performance are improved, and the verification process of complex chips is simplified.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065910A_ABST
    Figure CN119065910A_ABST
Patent Text Reader

Abstract

The invention discloses a chip verification method based on an SPI (Serial Peripheral Interface). The chip verification method comprises the following steps: a, acquiring parameter information of a module of a chip to be tested and a corresponding register in the module; b, compiling a test case for the module according to the parameter information; c, the parameter information in the test case is driven to an SPI bus on the top layer of the chip to be tested through a driver, at least one register in the current module of the chip to be tested is accessed, and an access result is obtained; d, checking the access result to verify whether the current register of the current module is normal or not; e, repeating the steps b-d until verification of all registers of the current module is completed; and f, repeating the steps a-e until verification of all modules of the current chip is completed. According to the verification method, the chip bus does not need to be used for accessing the register in the chip bus, the function of the chip bus is shared, the probability of access errors is reduced, and the verification efficiency of the chip is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of chip verification, and more specifically to a chip verification method based on SPI. Background Art

[0002] At present, with the continuous improvement of chip manufacturing technology, more and more functional modules are integrated inside the chip, and more and more registers are required as a whole. The verification of the chip will become more and more complicated, and the inspection of the registers will become more and more cumbersome; and if the access methods of all registers are mixed together, the probability of error will be greatly increased, and it will be difficult to make an accurate judgment on the verification results; compared with the registers of previous chips, most of its registers are directly accessed through the configuration bus, but as the internal structure of the chip becomes more and more complex, each functional module has multiple registers of its own. If the registers of different modules are accessed in the previous way, it is easy to make mistakes, and the hierarchical logic is very chaotic, which is not suitable for verifying chips with more complex functions and structures.

[0003] Therefore, it is necessary to provide an improved verification method that does not require direct access to registers through a chip bus. The SPI-based chip verification method of the present invention is used to overcome the above-mentioned defects. Summary of the invention

[0004] The purpose of the present invention is to provide a chip verification method based on SPI. The verification method of the present invention does not need to use the chip bus to access its internal registers, shares the function of the chip bus, reduces the probability of access errors, and improves the verification efficiency of the chip.

[0005] To achieve the above-mentioned purpose, the present invention provides a chip verification method based on SPI, which includes the following steps: a. obtaining parameter information of a module of a chip to be tested and the corresponding registers therein; b. writing a test case for the module according to the parameter information; c. driving the parameter information in the test case to the top-level SPI bus of the chip to be tested through a driver, accessing at least one register inside the current module of the chip to be tested, and obtaining the access result; d. checking the access result to verify whether the current register of the current module is normal; e. repeating steps bd until the verification of all registers of the current module is completed; f. repeating steps ae until the verification of all modules of the current chip is completed.

[0006] Preferably, the SPI-based chip verification method further comprises the step of: setting in the test case whether an SPI flash device is connected to the chip to be tested.

[0007] Preferably, when a SPI flash device is connected to the chip under test, the data information on the SPI flash is loaded into the register in the current module of the chip under test by configuring the SPI host register in the chip under test.

[0008] Preferably, in step c, accessing the internal register of the current module of the chip to be tested specifically involves accessing the data on the SPI flash loaded on the register.

[0009] Preferably, when no SPI flash device is connected to the chip to be tested, accessing the internal register of the current module of the chip to be tested in step c specifically involves accessing the original data in the register.

[0010] Preferably, in step c, accessing the internal register of the current module of the chip under test specifically includes reading data on the internal register, writing data to the internal register and reading the written data.

[0011] Preferably, the access result is checked, specifically including: comparing the data read from the internal register with the original design data to determine whether they are consistent; comparing the data written to the internal register with the data read from the internal register to determine whether they are consistent.

[0012] Preferably, the parameter information includes a chip selection instruction of the module and address information of a register.

[0013] Compared with the prior art, the SPI-based chip verification method of the present invention drives the parameter information in the test case to the SPI bus at the top layer of the chip to be tested through a driver, and accesses the internal registers of the current module of the chip to be tested, that is, accesses each register through the SPI bus at the top layer of the chip, so that the chip bus is no longer needed to access each register, the function of the chip bus is shared, and the overall performance of the chip is improved; and by setting the SPI bus exclusively for accessing the register, the probability of register access errors is reduced, and the verification efficiency of the entire chip is improved.

[0014] The present invention will become more apparent from the following description taken in conjunction with the accompanying drawings, which are used to illustrate embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a flow chart of the chip verification method based on SPI of the present invention.

[0016] Figure 2 The flowchart of one embodiment of the present invention is shown in FIG. DETAILED DESCRIPTION

[0017] The embodiments of the present invention are now described with reference to the accompanying drawings, in which similar element numbers represent similar elements. As described above, the present invention provides a chip verification method based on SPI, which does not require the use of a chip bus to access its internal registers, shares the function of the chip bus, reduces the probability of access errors, and improves the verification efficiency of the entire chip.

[0018] The chip verification method based on SPI (Serial Peripheral Interface) of the present invention is mainly used to verify the chip that is provided with SPI peripheral interface and accesses registers through SPI peripheral interface. Obviously, the chip that is not provided with SPI peripheral interface or is provided with SPI peripheral interface but does not access registers through SPI peripheral interface is not suitable for verification by the scheme of the present invention. Please refer to Figure 1 , Figure 1 Flow chart of the chip verification method based on SPI of the present invention. As shown in the figure, the chip verification method based on SPI of the present invention comprises the following steps:

[0019] Step S100, obtaining parameter information of a module of the chip to be tested and the corresponding registers therein; in this step, the parameter information of one of the modules and the corresponding registers therein is obtained according to various parameter information of the chip to be tested itself, so as to facilitate subsequent access verification of the module and the corresponding registers therein; wherein the parameter information includes the chip select instruction of the module and the address information of the register and other parameter information required for verification, the chip select instruction is specifically the instruction corresponding to the current module, after the module is determined by the chip select instruction, the register to be accessed is determined by the address information of the register, and in subsequent steps, the address information can be changed to access all registers in the current module in turn.

[0020] Step S200, write a test case for the module according to the parameter information; in this step, according to the address information of the register corresponding to the current module obtained in step S100 and other parameter information required to verify the function, write a test case according to these parameter information, so as to access the register in sequence according to the address information in the subsequent steps to verify the module; wherein the parameter information includes parameter information related to the specific verification, such as read-write bit information, buffer information, data information, etc. In addition, in this step, after the test case is written, it is also possible to set whether the chip under test has an SPI flash device connected through the test case. In the test case, there is a set mark position for whether the chip under test has an SPI flash device connected. Usually, if the mark position is set to 1, it means that the chip under test has an SPI flash device connected, and if it is set to 0, it means that the chip under test has no SPI flash device connected. Therefore, it is possible to determine whether the chip under test has an SPI flash device connected by setting the digital information of the corresponding position in the test case. When it is determined that there is an SPI flash device connected to the chip to be tested, the data information on the SPI flash is loaded into the register in the current module inside the chip to be tested by configuring the SPI host register in the chip to be tested. In the present invention, the register in the chip to be tested has a host mode and a slave mode. When the data information on the SPI flash is loaded at power-on, it is in the host mode, and it automatically enters the slave mode after loading.

[0021] Step S300, the parameter information in the test case is driven to the SPI bus at the top level of the chip under test by the driver, the internal register of the current module of the chip under test is accessed, and the access result is obtained; in this step, the parameter information in the test case as mentioned above includes but is not limited to module chip select value information, register address information, read / write bit information, buffer information, data format and other parameter information related to verification, that is, through these parameter information, it is determined which register is accessed and which module is verified; and by driving each parameter information to the SPI bus, each register can be accessed through the SPI bus without accessing the register through the chip bus; in addition, as mentioned above, different chips under test have different forms of access to the SPI flash device. When there is no SPI flash device accessed to the chip under test, that is, the register in the current module is not loaded with the data on the SPI flash, the access to the register is to access the original data inside the register; and when there is an SPI flash device accessed to the test chip, the data on the SPI flash loaded on the register is accessed. In addition, whether accessing the original data inside the register or accessing the data on the SPI flash loaded on the register, the access operation specifically includes three operations: reading the data on the internal register, writing data to the internal register and reading the written data, so as to complete the read and write operations on the register; wherein the reading of the data on the internal register is to read the original data on the original register or read the data on the SPI flash loaded on the register, and writing the data to the internal register is mainly to write the verification data that has been designed and prepared in advance to the register according to the verification requirements. In addition, no matter what the specific access operation to the register is, the access result will be obtained after the access. For example, when the access operation is to read the data on the internal register, the access result obtained is the data obtained after the reading; when the access operation is to write data to the internal register and read the written data, the access result obtained is the data obtained after the reading, because the written data is the known data that has been designed and does not need to be obtained again.

[0022] Step S400, check the access result to verify whether the current register of the current module is normal; in this step, it is mainly verified whether the reading and writing of the current register are normal; Figure 2 As shown, according to the different access operations in step S300, checking the access result specifically includes the following steps:

[0023] Step S410, compare the data on the internal register obtained by reading with the original design data to determine whether they are consistent; in this step, because the chip to be tested has two forms, one connected to the SPI flash device and the other not connected to the SPI flash device, the data on the internal register also has two forms, namely, the original data on the register or the data on the SPI flash after loading. The two forms of data are compared with the original design data to determine whether they are consistent. If they are consistent, it indicates that the read operation on the register is correct. If they are inconsistent, an error correction operation is performed on the read operation of the register after the verification is completed;

[0024] Step S420, compare the data written to the internal register with the data read from the internal register to determine whether they are consistent; in this step, the data written to the register is verification data that has been designed and prepared in advance according to the verification requirements, and is known data; the data written to the register is read out again, and the written and read data are compared to determine whether they are consistent, so as to determine whether there is an error in writing or reading the register; if they are consistent, it indicates that the register can be written or read normally, and if they are inconsistent, it indicates that there is an error in reading or writing the register, and subsequent error correction operations are arranged for the read and write operations of the register.

[0025] Step S500, repeat steps S200-S400 until the verification of all registers of the current module is completed; as mentioned above, the verification process of the read and write functions of at least one register of the current module has been completed. If the current module has multiple registers, then steps S200-S400 can be repeated in this step, and the number of times the number of registers in the current module is repeated until the verification of all registers of the current module is completed; of course, if the current module has only one register, no repetition is required; wherein, in the repetition process, the writing of the test case only needs to change the address information of the register, that is, the address of the last register that has been accessed is changed to the address of the next register to be accessed in the test case.

[0026] Step S600, repeat steps S100-S500 until the verification of all modules of the current chip is completed; as mentioned above, the verification process of all functions of a module of the chip to be tested has been completed. If the chip to be tested has multiple modules, steps S100-S500 can be repeated in this step, and the number of steps is the same as the number of modules of the chip to be tested, until the verification of all modules of the chip to be tested is completed; of course, if the chip to be tested has only one module, there is no need to repeat.

[0027] As described above, in the SPI-based chip verification method of the present invention, access to the registers of the chip to be tested can be achieved only through the SPI bus, and no longer relies on the chip bus for access operations, thereby sharing the function of the chip bus, so that the chip bus can perform other operations on the chip more efficiently, thereby improving the overall performance of the chip; in addition, in the present invention, the SPI bus is dedicated to accessing registers, which greatly reduces the probability of errors in register access compared to the chip bus's access to registers, thereby improving the verification efficiency of the entire chip.

[0028] The present invention has been described above in conjunction with the best embodiments, but the present invention is not limited to the embodiments disclosed above, but should cover various modifications and equivalent combinations based on the essence of the present invention.

Claims

1. A chip verification method based on SPI, characterized in that: The steps include: a. Obtain parameter information of a module of the chip under test and its corresponding registers; b. Write test cases for the module according to the parameter information; c. Drive the parameter information in the test case to the SPI bus at the top level of the chip under test through a driver, access at least one register inside the current module of the chip under test, and obtain the access result; d. Check the access result to verify whether the current register of the current module is normal; e. Repeat steps bd until all registers of the current module are verified; f. Repeat steps ae until all modules of the current chip are verified.

2. The SPI-based chip verification method according to claim 1, characterized in that: The step is also included: setting in the test case whether an SPI flash device is connected to the chip under test.

3. The SPI-based chip verification method according to claim 2, characterized in that: When a SPI flash device is connected to the chip under test, the data information on the SPI flash is loaded into the register in the current module of the chip under test by configuring the SPI host register in the chip under test.

4. The SPI-based chip verification method according to claim 3, characterized in that: In the step c, the internal register of the current module of the chip to be tested is accessed specifically by accessing the data on the SPI flash loaded on the register.

5. The SPI-based chip verification method according to claim 2, characterized in that: When there is no SPI flash device connected to the chip under test, accessing the internal register of the current module of the chip under test in step c specifically involves accessing the original data in the register.

6. The SPI-based chip verification method according to any one of claims 4 or 5, characterized in that: In the step c, the internal register of the current module of the chip under test is accessed by reading data on the internal register, writing data to the internal register and reading the written data.

7. The SPI-based chip verification method according to claim 6, characterized in that: Verify the visit results, including: Compare the data read from the internal register with the original design data to determine whether they are consistent; Compare the data written to the internal register with the data read from the internal register to determine whether they are consistent.

8. The SPI-based chip verification method according to claim 1, characterized in that: The parameter information includes the chip selection instruction of the module and the address information of the register.