Remote online configuration and debugging method for Intel SoC FPGA
Technical Field
The invention relates to the technical field of debugging in the FPGA development process, in particular to a remote online configuration and debugging method of an Intel SoC FPGA.
Background
An FPGA (Field-Programmable Gate Array), i.e. a Field Programmable Gate Array, is a new SoC chip that is released by an Intel PSG (original Altera) and integrates an HPS (Hardware Processor System) hard core Processor and FPGA logic resources on a single chip. The HPS is based on an ARM core-A9 dual-core processor, and is also integrated with various high-performance peripherals such as an MMU (memory management unit), a DDR3 controller, a Nand FLASH controller and the like, and the HPS can run a Linux operating system. The HPS and the FPGA can work independently, and high-speed broadband data communication can be realized through high-performance AXI bus bridging. The Intel SoC FPGA not only has the flexible and efficient data operation and transaction processing capability of the ARM processor, but also integrates the high-speed parallel processing advantage of the FPGA.
As shown in fig. 1, a general configuration and debugging method of an Intel SoC FPGA includes: and connecting the PC with the FPGA device to be debugged by using a JTAG cable, and then debugging by using a debugging tool integrated in a Quartus development kit. However, in SoC FPGA hardware system development, multiple persons commonly cooperate to develop the method, and developers may be distributed in different places. In consideration of the fact that SoC FPGA development equipment is expensive, in order to save cost, one set of SoC FPGA development equipment cannot be guaranteed. In addition, in the FPGA teaching experiment, the student FPGA experiment operation can only be completed in the FPGA laboratory, and the experiment effect is low due to the development time of the laboratory. Therefore, it is a need to remotely configure and debug the FPGA system online via a network. The configuration and debugging mode of the conventional FPGA system is limited by the length of a JTAG cable, so that remote operation is difficult to realize.
At present, the existing method for remote debugging of an FPGA, for example, patent application No. 20151103058.7 describes a system and a method for remote debugging of an FPGA/CPLD, which mainly solve the problem that only pin signals can be observed, but internal signals of a chip cannot be observed to complete on-line logic analysis. For example, the patent application No. 201710252578.X describes an FPGA remote debugging system and a remote debugging method, which only support logic analysis and additionally require a target PC to be remotely located.
Most of the FPGA remote configuration and debugging methods on the market have single function, complex operation steps and redundant structures. The bottom layer depends on JATG protocol, JTAG is converted into USB or parallel port, an Intel JTAG simulator is required to be connected with FPGA point to point, universality is low, and time-sharing configuration and debugging of a plurality of PCs to the same FPGA cannot be realized.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: aiming at the problems, the remote online configuration and debugging method of the Intel SoC FPGA is provided, and the remote online configuration and debugging of the FPGA without using a JTAG connector can be realized.
The technical scheme adopted by the invention is as follows:
a remote online configuration and debugging method for an Intel SoC FPGA comprises the following steps:
s1, configuring an SLD application program and an Ethernet controller for realizing data interaction with a PC (personal computer) through a TCP/IP (transmission control protocol/Internet protocol) on an HPS (host platform system) side of an Intel SoC FPGA (field programmable gate array);
s2, carrying out Intel SoC FPGA design on the PC, adding SLD debugging information by using an SLD debugging tool after the design is finished, obtaining a configuration file containing the SLD debugging information through compiling, and downloading and configuring the configuration file into the Intel SoC FPGA;
s3, an SLD Hub controller of the Intel SoC FPGA converts SLD debugging information in the configuration file into an Avalon-ST data packet so as to bridge bottom hardware and an SLD application program of the Intel SoC FPGA;
s4, bridging an SLD Hub controller and an Ethernet controller of the Intel SoC FPGA through an SLD application program, and enabling an SLD debugging tool of the PC to perform data interaction with the Intel SoC FPGA through a TCP/IP protocol;
and S5, accessing the SLD application program running on the HPS side of the Intel SoC FPGA in a network mode through the PC to perform online debugging.
Further, the method of S5 includes:
s51, connecting the PC and the Intel SoC FPGA through an Ethernet, so that the PC and the Intel SoC FPGA are in the same network segment;
s52, starting a design experiment, designing an Intel SoC FPGA on a PC, adding SLD debugging information by using an SLD debugging tool after the design is finished, obtaining a configuration file containing the SLD debugging information by compiling, downloading the configuration file and configuring the configuration file into the Intel SoC FPGA;
s53, starting remote debugging service, executing a remote debugging script command in SoC EDS software, and establishing remote connection;
s54, selecting an SLD Hub Controller System at a Hardware position in an SLD debugging tool, and starting debugging after successful loading;
and S55, verifying the designed experimental result, if the expected requirement is not met, skipping to the step S2, and after the PC machine modifies the Intel SoC FPGA design, re-executing the steps S52-S55.
In summary, due to the adoption of the technical scheme, the invention has the beneficial effects that:
the invention combines the SLD debugging tool of the PC with the SLD Hub controller of the Intel SoC FPGA through a non-JTAG channel chain, namely an Ethernet TCP/IP protocol, provides hardware support, allows a plurality of nodes to share the access to a user debugging interface, is superior to the point-to-point debugging of the traditional JTAG mode, and has high universality.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a block diagram of a conventional JTAG configured and debugged system.
Fig. 2 is a system block diagram of the remote online configuration and debugging method of the Intel SoC FPGA of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the detailed description and specific examples, while indicating embodiments of the invention, are given by way of illustration only, not by way of limitation, i.e., the embodiments described are intended as a selection of the best mode contemplated for carrying out the invention, not as a full mode. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
The features and properties of the present invention are described in further detail below with reference to examples. In the embodiment, a PC and an Intel SoC FPGA are used for remote online configuration and debugging, wherein an SLD debugging tool adopted on the PC is an SLD System-level debugging tool In the query software, and the SLD debugging tools supported by the PC comprise a SignalTap II logic analyzer, an In-System resources and Probes System internal Signal source and Probe, a Memory Content Editor and a Signal Probe Signal Probe.
Example 1
The remote online configuration and debugging method for the Intel SoC FPGA provided by the embodiment comprises the following steps:
s1, configuring an SLD application program and an Ethernet controller for realizing data interaction with a PC (personal computer) through a TCP/IP (transmission control protocol/Internet protocol) on an HPS (host platform system) side of an Intel SoC FPGA (field programmable gate array); as shown in FIG. 2, at the HPS side of the Intel SoC FPGA, link APP is configured as SLD application, EMMC/Driver is configured as Ethernet controller, and another Driver is used for connecting the HPS of the Intel SoC FPGA with the FPGA. The SLD application is an application designed in a common programming language, and runs on an operating system on the HPS side. Preferably, the SLD application is set to run automatically upon power up.
S2, carrying out Intel SoC FPGA design on the PC, adding SLD debugging information by using an SLD debugging tool after the design is finished, obtaining a configuration file containing the SLD debugging information through compiling, and downloading and configuring the configuration file into the Intel SoC FPGA; generally, the configuration file is in the rbf format, and configuration software, such as an FPGA manager peripheral of the HPS, may be used to download and configure the configuration file into the Intel SoC FPGA.
S3, an SLD Hub controller of the Intel SoC FPGA converts SLD debugging information in the configuration file into an Avalon-ST data packet so as to bridge bottom hardware and an SLD application program of the Intel SoC FPGA;
s4, bridging an SLD Hub controller and an Ethernet controller of the Intel SoC FPGA through an SLD application program, and enabling an SLD debugging tool of the PC to perform data interaction with the Intel SoC FPGA through a TCP/IP protocol; after the SLD debugging tool of the PC and the Intel SoC FPGA can perform data interaction through a TCP/IP protocol, the SLD application program can pack data generated by the SLD Hub controller into a TCP/IP data packet, and the data is transmitted through the socket. Therefore, in the embodiment, the non-JTAG channel chain, i.e., the ethernet TCP/IP protocol, is used to combine the SLD debug tool of the PC with the SLD Hub controller of the Intel SoC FPGA, so as to provide hardware support, allow multiple nodes to share access to the user debug interface, and have better point-to-point debugging than the conventional JTAG method and high universality.
And S5, accessing an SLD application program running on an HPS side of the Intel SoC FPGA in a network mode through an SLD debugging tool of the PC to perform online debugging. The configuration of the Intel SoC FPGA is completed through the steps S1-S4, and when the Intel SoC FPGA is needed to be used for debugging, the remote online debugging can be realized by utilizing the SLD debugging tool only after the PC is connected with the Intel SoC FPGA through the Ethernet. The specific address, the method of S5 includes:
s51, connecting the PC with the Intel SoC FPGA through an Ethernet, so that the PC and the Intel SoC FPGA are in the same network segment;
s52, starting a design experiment, designing an Intel SoC FPGA on a PC, adding SLD debugging information by using an SLD debugging tool after the design is finished, obtaining a configuration file containing the SLD debugging information by compiling, downloading the configuration file and configuring the configuration file into the Intel SoC FPGA;
s53, starting remote debugging service, executing a remote debugging script command in SoC EDS software, and establishing remote connection;
s54, selecting an SLD Hub Controller System at a Hardware position in an SLD debugging tool, and starting debugging after successful loading;
and S55, verifying the designed experimental result, if the expected requirement is not met, skipping to the step S2, and after the PC machine modifies the Intel SoC FPGA design, re-executing the steps S52-S55.
The above description is intended to be illustrative of the preferred embodiment of the present invention and should not be taken as limiting the invention, but rather, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the invention.