Method for improving FPGA (Field Programmable Gate Array) test efficiency
By utilizing multiple interfaces in parallel to configure and erase static random access memory in FPGA testing, the problem of inability to test in parallel during Flash configuration in the prior art is solved, which improves testing efficiency and simplifies operations.
Patent Information
- Application Number
- CN202410968203.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-11-22
AI Technical Summary
In the prior art In FPGA testing, the process of configuring Flash cannot perform other test work in parallel, resulting in inefficient testing, especially the I2C interface is slower and other operations cannot be performed when erasing and writing code streams.
When configuring FPGA, static random access memory is configured and erased using various interfaces such as JTAG, SSPI, I2C, PCM and SS interfaces, and the MSPI interface is used to read the code stream from Flash to SRAM, and in different ways, the code stream is read from Flash and is transmitted to SRAM. Configuring and testing in parallel in interface mode reduces the time required for FPGA testing.
It realizes the ability to configure and erase the static random access memory in FPGA in other modes while configuring Flash, which significantly reduces the FPGA test time and improves the testing efficiency. The method is flexible and simple to operate.
Smart Images

Figure CN119003253A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of field programmable gate arrays, and in particular to a method for improving FPGA testing efficiency. Background Art
[0002] Field Programmable Gate Array (FPGA) is a product further developed on the basis of programmable devices such as PAL and GAL. The logic of FPGA is realized by loading programming data into the internal static storage unit. The value stored in the memory unit determines the logical function of the logic unit and the connection between modules or between modules and I / O, which ultimately determines the functions that FPGA can achieve.
[0003] In recent years, with the development of FPGA, the scale of FPGA devices has become larger and more complex. The equivalent gate count inside FPGA has reached millions or even tens of millions of gates, and FPGA includes high-speed I / O, embedded microprocessor, RAM, high-speed clock and other modules, which makes the challenges faced when testing FPGA devices increasingly greater.
[0004] The general test process is to place the FPGA chip on a special development board, download the configuration code stream to the chip, generate the corresponding stimulus input to the chip input pin through the signal generator, and observe whether the signal on the output pin is as expected by observing the oscilloscope or logic analyzer. FPGA is divided into various configuration modes according to different configuration interfaces. Commonly used ones are MSPI, JTAG, SS, SP, SSPI, I2C, etc. Some of these interfaces can upgrade both Flash and FPGA. When performing FPGA testing, each configuration mode must be covered. Since FPGA does not have the ability to save data after power failure, there is a mode called MSP mode. This mode writes the configuration code stream to Flash by configuring an external Flash memory, and directly configures the FPGA through Flash after the system is turned on. When the code stream is written to Flash, according to the characteristics of Flash, an erase operation must be performed first. This operation often takes a lot of time compared to writing the code stream directly to SRAM, especially the I2C interface is slower, and other testing work cannot be performed. Although the existing technology has improved the efficiency of FPGA testing by optimizing the test system, logical test structure, test platform, multi-device parallel testing, etc., it is impossible to perform other testing tasks in parallel during the Flash configuration process, resulting in low test efficiency. Summary of the invention
[0005] The purpose of this application is to provide a method for improving FPGA testing efficiency, reducing the time required for FPGA testing, and improving testing efficiency.
[0006] The present application discloses a method for improving FPGA test efficiency, wherein the FPGA includes a static random access memory, a configuration FPGA module and a flash memory interface module, wherein the static random access memory is coupled to the configuration FPGA module, and the flash memory interface module is coupled to a flash memory located outside the FPGA through an SPI interface; the configuration FPGA module and the flash memory interface module are respectively coupled to one or more of a JTAG interface, an SSPI interface, an I2C interface, a PCM interface and an SS interface, and the flash memory interface module is coupled to the configuration FPGA module through an MSPI interface; the method includes:
[0007] While the flash memory interface module uses the JTAG interface, SSPI interface or I2C interface to configure the flash memory, the configuration FPGA module uses one or more interfaces among the JTAG interface, SSPI interface, I2C interface, PCM interface and SS interface that are different from the interface used by the flash memory interface module to configure the static random access memory multiple times in sequence, and after each configuration of the static random access memory is completed, the static random access memory is erased to continue the next configuration.
[0008] In a preferred example, after the flash memory interface module completes the configuration of the flash memory using the JTAG interface, SSPI interface or I2C interface, the flash memory interface module uses the MSPI interface to read the code stream from the flash memory and sends it to the static random access memory, and the flash memory interface module continues to configure the flash memory using an interface among the JTAG interface, SSPI interface and I2C interface that is different from the previous one.
[0009] In a preferred example, when the flash memory interface module uses the JTAG interface to configure the flash memory, the configuration FPGA module first uses the PCM interface to configure the static random access memory multiple times, and then uses the SS interface to configure the static random access memory multiple times.
[0010] In a preferred example, when the flash memory interface module uses the SSPI mode to configure the flash memory, the configuration FPGA module first uses the I2C interface to configure the static random access memory multiple times, and then uses the JTAG interface to configure the static random access memory multiple times.
[0011] In a preferred example, when the flash memory interface module adopts the I2C mode to configure the flash memory, the configuration FPGA module adopts the SSPI interface to configure the static random access memory multiple times.
[0012] In a preferred example, each time after the static random access memory is configured, the FPGA enters a user mode, in which a user can selectively change the configuration of the FPGA.
[0013] In a preferred example, the time taken by the flash memory interface module to configure the flash memory using the JTAG interface, SSPI interface or I2C interface is much longer than the time taken by the configuration FPGA module to configure the static random access memory using the JTAG interface, SSPI interface, I2C interface, MSPI interface, PCM interface and SS interface.
[0014] In a preferred example, the configuration FPGA module and the flash memory interface module are also coupled to a clock interface and a data interface.
[0015] In the implementation mode of the present application, when configuring the flash memory, other modes can be performed simultaneously to configure and erase the static random access memory in the FPGA, thereby reducing the time required for FPGA testing and improving testing efficiency. The method is flexible in application, simple in operation, and easy to implement.
[0016] The specification of the present application records a large number of technical features, which are distributed in various technical solutions. If all possible combinations of technical features of the present application (i.e., technical solutions) are to be listed, the specification will be too long. In order to avoid this problem, the various technical features disclosed in the above-mentioned invention content of the present application, the various technical features disclosed in the various embodiments and examples below, and the various technical features disclosed in the accompanying drawings can be freely combined with each other to form various new technical solutions (these technical solutions should all be regarded as having been recorded in this specification), unless the combination of such technical features is technically infeasible. For example, in one example, feature A+B+C is disclosed, and in another example, feature A+B+D+E is disclosed, and features C and D are equivalent technical means that play the same role. Technically, only one can be used, and it is impossible to use them at the same time. Feature E can be combined with feature C technically. Then, the solution of A+B+C+D should not be regarded as having been recorded because it is technically infeasible, and the solution of A+B+C+E should be regarded as having been recorded. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a schematic diagram of the block diagram of the FPGA in one embodiment of the present application.
[0018] Figure 2 This is an example of actual operation according to one embodiment of the present application.
[0019] In the accompanying drawings, the symbols are as follows:
[0020] 100-FPGA;
[0021] 101- static random access memory;
[0022] 102-Configure FPGA module;
[0023] 103- flash memory interface module;
[0024] 104-Flash memory. DETAILED DESCRIPTION
[0025] In the following description, many technical details are provided to help readers better understand the present application. However, those skilled in the art can understand that the technical solution claimed in the present application can be implemented even without these technical details and various changes and modifications based on the following embodiments.
[0026] In order to make the objectives, technical solutions and advantages of the present application more clear, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0027] One embodiment of the present application relates to a method for improving FPGA testing efficiency. Figure 1The block diagram of the FPGA in an embodiment is a schematic diagram. The FPGA 100 includes a static random access memory (SRAM) 101, a configuration FPGA module 102 and a (Flash) interface module 103. The static random access memory 101 is coupled to the configuration FPGA module 102. The flash interface module 103 is coupled to a flash memory (Flash) 104 located outside the FPGA 100 through an SPI (Support Provider Interface) interface. The configuration FPGA module 102 and the flash interface module 103 are respectively coupled to one or more of a JTAG (Joint Test Action Group) interface, an SSPI (Security Support Provider Interface) interface, an I2C (I-squared-C, or IIC) interface, a PCM (Pulse Code Modulation) interface and an SS (Super Speed USB) interface. The flash interface module 103 is coupled to the configuration FPGA module 102 through an MSPI (Media Service Provider Interface) interface. The configuration FPGA module 102 and the flash interface module 103 are also respectively coupled to a clock CCLK interface and a data DATA interface.
[0028] In one embodiment, the configuration FPGA module 102 is coupled to the JTAG interface, SSPI interface, I2C interface, MSPI interface, PCM interface and SS interface at the same time. The flash memory interface module 103 is coupled to the JTAG interface, SSPI interface, I2C interface, PCM interface and SS interface at the same time to meet the different configuration and test requirements of the FPGA. It should be understood that when the SRAM is configured using the JTAG interface, SSPI interface, I2C interface, MSPI interface, PCM interface and SS interface, it can also be called JTAG mode, SSPI mode, I2C mode, MSPI mode, PCM mode and SS mode. In addition, the MSPI mode is to move data from the Flash to the SRAM. This process has no data interaction with the outside. As can be seen from the figure, the starting point of the MSPI mode is the Flash, the end point is the SRAM, and the interface of the Flash is the SPI interface.
[0029] The method includes: while the flash memory interface module 103 uses the JTAG interface, SSPI interface or I2C interface to configure the flash memory 104, the FPGA module 102 is configured to use one or more interfaces among the JTAG interface, SSPI interface, I2C interface, PCM interface and SS interface, which are different from the interface used by the flash memory interface module, to sequentially configure the static random access memory 101 multiple times. And, after each configuration of the static random access memory is completed, the static random access memory is erased to continue the next configuration. It should be understood that configuring the flash memory 104 is the process of writing the code stream that configures the FPGA into the Flash. Configuring the static random access memory 101 is the process of writing the code stream that configures the FPGA into the SRAM and executing the code stream, which can also be represented as configuring the FPGA.
[0030] For example, when the flash memory interface module 103 uses the JTAG interface to configure the flash memory 104, the configuration FPGA module 101 can use one or more of the SSPI interface, I2C interface, PCM interface and SS interface to configure the SRAM 101. When the flash memory interface module 103 uses the SSPI interface to configure the flash memory 104, the configuration FPGA module 101 can use one or more of the JTAG interface, I2C interface, PCM interface and SS interface to configure the SRAM 101. When the flash memory interface module 103 uses the I2C interface to configure the flash memory 104, the configuration FPGA module 101 can use one or more of the JTAG interface, SSPI interface, PCM interface and SS interface to configure the SRAM 101. Moreover, each interface can be configured and tested once or multiple times when configuring the SRAM 101. It should be understood that configuring the Flash is to write a code stream to the Flash (also referred to as configuring the Flash), and configuring the SRAM is to write a code stream to the SRAM (also referred to as configuring the SRAM or configuring the FPGA).
[0031] In this embodiment, the time taken by the flash memory interface module 103 to configure the flash memory 104 using the JTAG interface, SSPI interface or I2C interface is much longer than the time taken by the FPGA module 101 to configure the static random access memory 101 using the JTAG interface, SSPI interface, I2C interface, MSPI interface, PCM interface and SS interface. Therefore, while the flash memory 104 is being configured, the SRAM 101 can be configured and tested multiple times using other interfaces at the same time, thereby improving the efficiency of the FPGA test.
[0032] In one embodiment, after the flash memory interface module 103 completes the configuration of the flash memory 104 using the JTAG interface, the SSPI interface or the I2C interface, the flash memory interface module 103 uses the MSPI interface to read the code stream from the flash memory 104 and sends it to the static random access memory 101, and the flash memory interface module 103 continues to configure the flash memory 104 using an interface among the JTAG interface, the SSPI interface and the I2C interface that is different from the previous one.
[0033] It should be noted that the JTAG interface, SSPI interface, I2C interface, PCM interface and SS interface are connected to the configuration FPGA module 102 and the Flash interface module 103 at one end, and are connected to an external device (such as a host computer) at the other end. The host computer writes code streams to the SRAM or Flash through the above interfaces, and the connection is bidirectional. The host computer can also read data from the SRAM or Flash through the above interfaces. The Flash interface module is unidirectionally connected to the configuration FPGA module through the MSPI interface, thereby realizing the writing of code streams from Flash to SRAM.
[0034] In one embodiment, when the flash memory interface module 103 uses the JTAG interface to configure the flash memory 104, the configuration FPGA module 102 can first use the PCM interface to configure the static random access memory 101 multiple times, and then use the SS interface to configure the static random access memory 101 multiple times.
[0035] In one embodiment, when the flash memory interface module 103 uses the SSPI mode to configure the flash memory 104, the configuration FPGA module 102 can first use the I2C interface to configure the static random access memory 101 multiple times, and then use the JTAG interface to configure the static random access memory 101 multiple times.
[0036] In one embodiment, when the flash memory interface module 103 configures the flash memory 104 using the I2C mode, the configuration FPGA module 102 can use the SSPI interface to configure the static random access memory 101 multiple times.
[0037] In one embodiment, each time after the configuration of the static random access memory 101 is completed, the FPGA enters the user mode, in which the user can selectively change the configuration of the FPGA 100. After the process of writing the bit stream into the SRAM is completed, the FPGA enters the user mode, at which time the user can use the FPGA.
[0038] In order to better understand the technical solution of the present application, a specific example is provided below for illustration. The details listed in the example are mainly for ease of understanding and are not intended to limit the scope of protection of the present application.
[0039] The present invention mainly achieves parallel operation by optimizing the operation modes of configuring Flash and upgrading FPGA (i.e., the process of rewriting new code stream into SRAM and overwriting the original code stream to improve the FPGA function) to save time and improve test efficiency.
[0040] like Figure 1 As shown, while configuring SRAM in other modes, the JTAG interface, I2C interface or SSPI interface can be tested to erase, read and write Flash. In the JTAG interface configuration FPGA mode, the SSPI / I2C interface can be tested to perform corresponding operations on Flash. Correspondingly, in the I2C configuration FPGA mode, the SSPI / JTAG mode can be used to perform corresponding operations on Flash. Configuring SRAM and operating Flash do not affect each other and are in parallel operation mode. After entering user mode, the configuration interface will be retained. And each mode supports erasing SRAM operations when performing SRAM testing. It takes a long time to operate Flash, during which other work can be performed to improve time utilization. The following Table 1 shows the different operation modes of Flash and SRAM.
[0041]
[0042] Table 1 Different operation modes of Flash and SRAM
[0043] As shown in the table above, JTAG mode, SSPI mode and I2C mode can operate Flash memory and SRAM memory, specifically: Flash memory content can be read, written and erased; SRAM memory content can be configured, and user mode can be exited at any time. When exiting user mode, you can choose whether to change the configuration mode, reconfigure, and erase the SRAM memory, load the next case, and test in a loop. The following table 2 shows the scenarios that support parallelism in different Flash and SRAM modes.
[0044]
[0045] Table 2. Parallel support scenarios for Flash and SRAM in different modes
[0046] As shown in the table above, the two modes can be operated in parallel when running. When a configuration mode is completed, the content of SRAM needs to be read and then erased. Since the operation time of Flash is long, the entire process of other configuration modes can be completed in this device. The following table 3 shows the configuration permissions of Flash and SRAM in different interface modes.
[0047] model Configuring Flash Configuring SRAM JTAG Mode √ √ SSPI Mode √ √ <![CDATA[I 2 C Mode]]> √ √ MSPI Mode × √ PCM mode × √ SS Mode × √
[0048] Table 3 Configuration permissions of Flash and SRAM in different interface modes
[0049] The above table shows the configuration permissions of each configuration mode for the memory. When the Flash is configured in JTAG mode, I2C mode or SSPI mode, other modes can be used to configure SRAM, or after configuration, the configuration mode can be switched, and SRAM can be erased for reconfiguration. This can greatly save test time and improve test efficiency.
[0050] Figure 2 An example of actual operation in an embodiment is shown (for reference only). In the process of JTAG configuring Flash, the PCM configuration mode and the SS configuration mode are tested. For example, PCM case1 is tested and then SRAM is erased, while PCMcase2 is tested and then SRAM is erased, SS case1 is tested and then SRAM is erased, while SS case2 is tested and then SRAM is erased. It should be understood that after each interface test completes multiple instances, the next interface mode instance is tested, and there is no need to frequently switch interfaces. Afterwards, in the process of SSPI configuring Flash, the I2C configuration mode and the JTAG configuration mode are tested. As can be seen from the figure, when Flash is configured, other modes can be performed simultaneously to configure and erase SRAM, thereby reducing the time required for FPGA testing, improving test efficiency, and being flexible in application, simple in operation, and easy to implement.
[0051] It should be noted that in the application documents of this patent, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the 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, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements. In the application documents of this patent, if it is mentioned that an action is performed according to an element, it means that the action is performed at least according to the element, which includes two situations: performing the action only according to the element, and performing the action according to the element and other elements. Expressions such as multiple, multiple, and multiple include 2, 2 times, 2 kinds, and more than 2, more than 2 times, and more than 2 kinds.
[0052] The term "coupled to" and its derivatives may be used herein. "Coupled" may mean that two or more elements are in direct physical or electrical contact. However, "coupled" may also mean that two or more elements are in indirect contact with each other, but still cooperate or interact with each other, and may mean that one or more other elements are coupled or connected between the elements referred to as being coupled to each other.
[0053] This specification includes combinations of the various embodiments described herein. Individual references to an embodiment (e.g., "one embodiment" or "some embodiments" or "preferred embodiments") do not necessarily refer to the same embodiment; however, these embodiments are not mutually exclusive unless indicated as mutually exclusive or it is clear to a person skilled in the art that they are mutually exclusive. It should be noted that the word "or" is used in this specification in a non-exclusive sense unless the context clearly indicates or requires otherwise.
[0054] All documents mentioned in this specification are considered to be included in the disclosure of this application as a whole, so that they can be used as a basis for modification when necessary. In addition, it should be understood that the above is only a preferred embodiment of this specification and is not intended to limit the scope of protection of this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of this specification should be included in the scope of protection of one or more embodiments of this specification.
Claims
1. A method to improve FPGA testing efficiency, It is characterized in that The FPGA includes a static random access memory, a configuration FPGA module and a flash memory interface module, wherein the static random access memory is coupled to the configuration FPGA module, and the flash memory interface module is coupled to a flash memory located outside the FPGA through an SPI interface; the configuration FPGA module and the flash memory interface module are respectively coupled to one or more of a JTAG interface, an SSPI interface, an I2C interface, a PCM interface and an SS interface, and the flash memory interface module is coupled to the configuration FPGA module through an MSPI interface; the method includes: While the flash memory interface module uses the JTAG interface, SSPI interface or I2C interface to configure the flash memory, the configuration FPGA module uses one or more interfaces among the JTAG interface, SSPI interface, I2C interface, PCM interface and SS interface that are different from the interface used by the flash memory interface module to configure the static random access memory multiple times in sequence, and after each configuration of the static random access memory is completed, the static random access memory is erased to continue the next configuration.
2. The method according to claim 1, It is characterized in that After the flash memory interface module completes configuring the flash memory using the JTAG interface, SSPI interface or I2C interface, the flash memory interface module uses the MSPI interface to read the code stream from the flash memory and sends it to the static random access memory, and the flash memory interface module continues to configure the flash memory using an interface among the JTAG interface, SSPI interface and I2C interface that is different from the previous one.
3. The method according to claim 1, It is characterized in that When the flash memory interface module uses the JTAG interface to configure the flash memory, the configuration FPGA module first uses the PCM interface to configure the static random access memory multiple times, and then uses the SS interface to configure the static random access memory multiple times.
4. The method according to claim 1, It is characterized in that When the flash memory interface module uses the SSPI mode to configure the flash memory, the configuration FPGA module first uses the I2C interface to configure the static random access memory multiple times, and then uses the JTAG interface to configure the static random access memory multiple times.
5. The method according to claim 1, It is characterized in that When the flash memory interface module uses the I2C mode to configure the flash memory, the configuration FPGA module uses the SSPI interface to configure the static random access memory multiple times.
6. The method according to claim 1, It is characterized in that Each time after the static random access memory is configured, the FPGA enters a user mode, in which a user can selectively change the configuration of the FPGA.
7. The method according to claim 1, It is characterized in that The time taken by the flash memory interface module to configure the flash memory using the JTAG interface, SSPI interface or I2C interface is much longer than the time taken by the configuration FPGA module to configure the static random access memory using the JTAG interface, SSPI interface, I2C interface, MSPI interface, PCM interface and SS interface.
8. The method according to claim 1, It is characterized in that The configuration FPGA module and the flash memory interface module are also coupled to a clock interface and a data interface.
