Remote FPGA hardware experiment system and working method thereof
Through the remote FPGA hardware experiment system, the serial port transceiver module and network communication is used to realize remote control and monitoring of the FPGA development board, solving the time and space limitations and management problems of traditional experiments, and reducing equipment damage and management costs.
Patent Information
- Application Number
- CN202411514250.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2024-11-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional FPGA hardware experiments have time and space limitations, and monitoring FPGA development boards requires external cameras or soldered signal lines, resulting in inconvenience in management and waste of resources.
A remote FPGA hardware experiment system is designed to monitor the status of the FPGA development board through the web front-end, proxy server, central server and Node node, and use the serial port transceiver module to realize remote control and management, avoiding the use of external cameras and welding signal lines.
It realizes effective monitoring and management of FPGA development boards without increasing network bandwidth and welding signal lines, reducing equipment damage and management costs, and improving experiment flexibility and manageability.
Smart Images

Figure CN119045388A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of hardware experiments, and in particular to a remote FPGA (Field-Programmable Gate Array) hardware experiment system and a working method thereof. Background Art
[0002] Experimental teaching plays an important role in science and engineering courses. It is conducive to verifying students' theoretical knowledge, cultivating students' engineering practice ability and scientific research thinking. In communication, electronics and computer professional courses, FPGA-based hardware experiments are widely used, while traditional FPGA hardware experiments have time and space limitations, which are inconvenient for students to use and teachers to manage. This is because traditional FPGA hardware experiments require teachers and students to go to a special offline laboratory to use a physical FPGA development board. Due to factors such as class scheduling and laboratory opening hours, teachers and students use FPGA development boards for experiments. There are time and space limitations. In addition, since traditional FPGA hardware experiments need to be conducted offline, each student needs to go to a specific laboratory to use a physical FPGA development board to complete the experiment. Although students have received training on the use of FPGA development boards, it is still difficult to avoid the situation where the FPGA development board is damaged due to improper use by students, and students privately bring the FPGA development board back to the dormitory for use. These situations cause trouble for the management of FPGA development boards.
[0003] In order to solve this problem, the remote FPGA hardware experiment system came into being. However, the current remote FPGA hardware experiment system still has the following problems: the purpose of monitoring the FPGA development board is achieved by using an external camera or welding additional signal lines. However, using an external camera to monitor the FPGA development board will consume too much network bandwidth, and using additional signal lines to monitor the FPGA development board will require welding. Summary of the invention
[0004] The purpose of this application is to provide a remote FPGA hardware experiment system and a working method thereof, which can achieve the purpose of monitoring the FPGA development board without using an external camera and welding additional signal lines.
[0005] To achieve the above objectives, this application provides the following solutions.
[0006] In a first aspect, the present application provides a remote FPGA hardware experiment system, the remote FPGA hardware experiment system comprising: a web front end, a proxy server, a central server, a Node node and an FPGA development board; wherein the Node node is a host computer; The web front end is used to receive user input information and send the user input information to the proxy server; the user input information includes user download information and user control information; the user download information includes the bit stream file generated in advance by the user, and the bit stream file includes the serial port transceiver module and the designed circuit; the user control information includes the specific operation of the user on the FPGA development board; The proxy server is connected to the web front end; the proxy server is used to send user download information to the central server and send user control information to the Node node; The central server is connected to the proxy server and the Node node respectively; the central server is used to send the user download information to the Node node after receiving the user download information; The Node node is connected to the proxy server, the central server and the FPGA development board respectively; the Node node is used to burn the bitstream file into the FPGA development board after receiving the user download information; after receiving the user control information, the FPGA development board is controlled; Among them, the FPGA development board includes a serial port transceiver module and a design circuit. The serial port transceiver module is connected to the proxy server for communication, and the design circuit is electrically connected to the serial port transceiver module. The serial port transceiver module is used to monitor the status information of the design circuit and send the status information to the Node node, which is forwarded to the user through the Node node and the proxy server.
[0007] Optionally, the proxy server is connected to the web front end via HTTP protocol or Websocket protocol; the central server is connected to the proxy server via HTTP protocol; the central server is connected to the Node node via HTTP protocol; the Node node is connected to the proxy server via Socket communication; the Node node is connected to the FPGA development board via serial port communication.
[0008] Optionally, the FPGA development board is inserted into the Node node; the Node node is also used to perform hot-swap detection on the FPGA development board.
[0009] Optionally, there are multiple Node nodes, and one Node node can connect to multiple FPGA development boards. The multiple FPGA development boards can include several FPGA development boards of the same type and several FPGA development boards of different types. The configuration information of each FPGA development board has been rewritten in advance, and the Node node stores the rewritten configuration information of each FPGA development board connected to the Node node; wherein the configuration information of the FPGA development board includes the development board vendor ID, product ID and development board serial number.
[0010] Optionally, the user input information also includes user login information; the user login information includes an account number and password input by the user; The proxy server is also used to send user login information to the central server; The central server is also used to verify the user login information when receiving it, and enable the user to log in successfully after the verification is passed.
[0011] Optionally, the user input information also includes user application information; the user application information includes the type of FPGA development board applied for by the user; The proxy server is also used to send user application information to the central server; The central server is also used to bind the user to the idle FPGA development board and set the status of the idle FPGA development board to occupied after receiving the user application information if there is an idle FPGA development board of the same type as the FPGA development board applied for by the user; at this time, after receiving the user download information, the central server sends the user download information to the Node node corresponding to the FPGA development board bound to the user.
[0012] Optionally, the Node node is also used to send the connection code required to establish a Socket connection to the central server after the bitstream file is burned into the FPGA development board; the central server is also used to set the status of the FPGA development board to communicating after receiving the connection code, and forward the connection code to the user via the proxy server; at this time, the proxy server requests the IP address of the Node node from the central server based on the connection code, establishes Socket communication with the Node node based on the IP address, and sends user control information to the Node node.
[0013] Optionally, the Node node and the proxy server are connected through the RMFP protocol; the RMFP protocol includes a magic field, an extension field, an instruction type field and a data field, the magic field is used to indicate that the current message is valid, the extension field is used to indicate the meaning of the communication data in the data field, the instruction type field is used to indicate the meaning of the current message, and the data field is used to carry communication data; the communication data includes display data and control data, the display data includes the digital tube segment selection signal and the LED light level signal in the FPGA development board, and the control data includes the level signal and the button number.
[0014] Optionally, the Node node is connected to the FPGA development board through a serial communication protocol, and the serial communication protocol adds a protocol header and a protocol tail to data transmitted in the serial port.
[0015] In a second aspect, the present application provides a working method of a remote FPGA hardware experiment system, which is applied to any of the remote FPGA hardware experiment systems described above, and the working method of the remote FPGA hardware experiment system includes: The web front end receives the user login information and sends the user login information to the proxy server; the user login information includes the account number and password entered by the user; The proxy server sends the user login information to the central server; When the central server receives the user login information, it verifies the user login information and allows the user to log in successfully after the verification; The web front end receives the user application information and sends the user application information to the proxy server; the user application information includes the type of FPGA development board applied by the user; The proxy server sends the user application information to the central server; After receiving the user's application information, if there is an idle FPGA development board of the same type as the FPGA development board applied for by the user, the central server will bind the user to the idle FPGA development board and set the status of the idle FPGA development board to occupied; The web front end receives the user download information and sends the user download information to the proxy server; the user download information includes a bit stream file generated in advance by the user, and the bit stream file includes a serial port transceiver module and a designed circuit; The proxy server sends the user download information to the central server; After receiving the user download information, the central server sends the user download information to the Node node corresponding to the FPGA development board bound to the user; After receiving the user's download information, the Node burns the bitstream file into the FPGA development board; The web front end obtains user control information and sends the user control information to the proxy server; the user control information includes the user's specific operations on the FPGA development board; The proxy server sends the user control information to the Node node; After receiving the user's control information, the Node node controls the FPGA development board; Among them, when the FPGA development board is controlled, the serial port transceiver module in the FPGA development board monitors the status information of the design circuit in the FPGA development board, and sends the status information to the Node node, which is forwarded to the user through the Node node and the proxy server.
[0016] According to the specific embodiments provided in this application, this application discloses the following technical effects: The present application provides a remote FPGA hardware experiment system and its working method, including: a web front end, a proxy server, a central server, a Node node and an FPGA development board, the web front end receives user input information, the user input information includes user download information and user control information; the proxy server sends the user download information to the central server, and sends the user control information to the Node node; after receiving the user download information, the central server sends the user download information to the Node node; after receiving the user download information, the Node node burns the bitstream file into the FPGA development board, and after receiving the user control information, controls the FPGA development board; wherein the FPGA development board includes a serial port transceiver module and a design circuit, the serial port transceiver module monitors the status information of the design circuit, and sends the status information to the Node node, which is forwarded to the user through the Node node and the proxy server. The present application remotely controls the FPGA development board through the web front end, the proxy server, the central server and the Node node, and monitors the FPGA development board using the serial port transceiver module, so as to achieve the purpose of monitoring the FPGA development board without adding an external camera or welding additional signal lines. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 A schematic diagram of the system architecture of a remote FPGA hardware experiment system provided in Example 1 of the present application.
[0019] Figure 2 A schematic diagram of the structure of the custom network communication protocol provided in Example 1 of the present application.
[0020] Figure 3 A schematic diagram of the structure of display data provided in Example 1 of the present application.
[0021] Figure 4 A schematic diagram of the structure of the control data provided in Example 1 of the present application.
[0022] Figure 5 A schematic diagram of the structure of the sampling data provided in Example 1 of the present application.
[0023] Figure 6 A schematic diagram of the workflow of a remote FPGA hardware experiment system provided in Example 1 of the present application. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0025] Example 1.
[0026] This embodiment provides a remote FPGA hardware experiment system, such as Figure 1 As shown, the remote FPGA hardware experiment system includes: a web front end, a proxy server, a central server, a Node node and an FPGA development board, wherein the Node node is a host computer.
[0027] The code of the web front end is stored in the proxy server. Users use the browser to access the page resources in the proxy server through a network connection, and access the central server or Node node through the proxy server through a network connection. The Node node is a host computer physically connected to multiple FPGA development boards. The corresponding program runs on the Node node to control the resources of the FPGA development board.
[0028] Specifically, the functions of each component are as follows.
[0029] The web front end is used to receive user input information and send the user input information to the proxy server. The user input information includes user download information and user control information. The user download information includes the bitstream file generated in advance by the user. The bitstream file includes a serial port transceiver module and a design circuit. The user control information includes the user's specific operations on the FPGA development board. In this embodiment, the source code of the bitstream file needs to include a serial port transceiver module and a design circuit. The serial port transceiver module and the design circuit are subsequently burned into the FPGA development board. The serial port transceiver module is a circuit module used to realize the interaction between the Node node and the design circuit designed by the user. When the remote FPGA hardware experiment system is running, the serial port transceiver module and the design circuit designed by the user are downloaded to the FPGA development board together.
[0030] The proxy server is connected to the web front end for communication. The proxy server is used to send user download information to the central server and send user control information to the Node node.
[0031] The central server is connected to the proxy server and the Node node for communication respectively. The central server is used to send the user download information to the Node node after receiving the user download information.
[0032] The Node node is respectively connected to the proxy server, the central server and the FPGA development board. The Node node is used to burn the bitstream file into the FPGA development board after receiving the user download information, and to control the FPGA development board after receiving the user control information.
[0033] Among them, the FPGA development board includes a serial transceiver module and a design circuit, the serial transceiver module is connected to the proxy server for communication, and the design circuit is electrically connected to the serial transceiver module. At this time, the process of the Node node interacting with the FPGA development board is: the Node node first interacts with the serial transceiver module on the FPGA development board through the UART (Universal Asynchronous Receiver / Transmitter) serial port, and then the serial transceiver module interacts with the design circuit designed by the user. Specifically, the data form in which the Node node interacts with the serial transceiver module is the signal of the serial communication protocol defined in this embodiment, and the data form in which the serial transceiver module interacts with the design circuit designed by the user is a digital circuit signal. The serial transceiver module is used to monitor the status information of the design circuit, and send the status information to the Node node, which is forwarded to the user through the Node node and the proxy server.
[0034] This embodiment allows teachers and students to use their own computers to log in to the web front end, thereby remotely accessing and using the FPGA development board on the server side, no longer subject to time and space restrictions. At the same time, if the remote FPGA hardware experiment system of this embodiment is used to complete the hardware experiment, the FPGA development board will be stored together with the server side, and students do not need to directly contact the FPGA development board, thereby effectively avoiding the problem of FPGA development board damage due to improper use by students, students privately taking the FPGA development board back to the dormitory for use, etc., reducing the workload and cost of managing and maintaining the FPGA development board. In addition, this embodiment embeds the serial port transceiver module into the FPGA development board, uses the serial port transceiver module to collect the status information of the design circuit designed by the user, and interacts with the Node node, thereby achieving the same purpose of monitoring the FPGA development board without adding an external camera or welding additional signal lines.
[0035] In this embodiment, the proxy server is connected to the web front end via HTTP protocol (HyperText TransferProtocol, Hypertext Transfer Protocol) or Websocket protocol communication, the central server is connected to the proxy server via HTTP protocol communication, the central server is connected to the Node node via HTTP protocol communication, the Node node is connected to the proxy server via Socket communication, and the Node node is connected to the FPGA development board via serial port communication. That is, the web front end is connected to the first end of the proxy server via HTTP protocol or Websocket protocol, the second end of the proxy server is connected to the first end of the Node node via Socket communication, the second end of the proxy server is also connected to the first end of the central server via HTTP protocol, the second end of the central server is connected to the first end of the Node node via HTTP protocol, and the second end of the Node node is connected to the FPGA development board via serial port communication.
[0036] In this embodiment, the FPGA development board is inserted into the Node node, and the Node node is also used to perform hot-swap detection on the FPGA development board.
[0037] The proxy server can be directly accessed by the user's browser. It provides static page resources (such as FPGA type selection page, FPGA control page, etc.), forwards HTTP messages and Websocket frames to the central server. The central server provides a series of APIs (Application Program Interface) for FPGA development board resource management and user management. Its main functions are user management (such as user registration, password modification, etc.) and FPGA development board resource management (such as monitoring the usage of each FPGA development board (i.e. status information), allocating idle FPGA development boards to users, and recycling FPGA development boards occupied by users). Therefore, the connection between the proxy server and the central server is to enable users to apply for FPGA development boards on the web front end, and to enable administrators to manage users or view the usage of FPGA development boards, allocate FPGA development boards, and recycle FPGA development boards. The Node node manages the FPGA development board connected to it through the serial port, including hot-swap detection, bitstream downloading, communication, and reporting of FPGA status information to the central server. When a user applies for an FPGA development board, the FPGA development board will be occupied by the user. When the user uses the FPGA development board for hardware experiments, it is necessary to provide input signals to the design circuit on the FPGA development board, or obtain the output signal of the design circuit on the FPGA development board. The proxy server, Node node, and the serial port transceiver module on the FPGA development board work together to realize information interaction between the user and the FPGA development board and complete the control process of the FPGA development board. Therefore, the connection between the proxy server and the Node node is to enable the web front end to more quickly realize information interaction with the FPGA development board.
[0038] In this embodiment, the FPGA development board may be Minisys or Ego1.
[0039] The current remote FPGA hardware experiment system still has the following problems: it uses a host computer (such as Raspberry Pi) to control only one FPGA development board, and the supported FPGA development board type is single. In this embodiment, the central server supports multiple Node nodes, and a single Node node supports multiple types and multiple types of FPGA development boards. By using the configuration information defined in this embodiment to rewrite the configuration information in the EEPROM (Electrically Erasable ProgrammableRead-Only Memory) of the FPGA development board, the configuration information of different FPGA development boards is stored in the Node node, and the Node node reads and identifies it, so as to achieve the purpose of one Node node identifying multiple FPGA development boards of the same type and multiple types of FPGA development boards.
[0040] In order for the remote FPGA hardware experiment system to support multiple FPGA development boards, it is necessary to ensure that the Node node in the remote FPGA hardware experiment system correctly identifies and registers the FPGA development board. Therefore, the configuration information of the FPGA development board needs to be rewritten. When the manufacturer produces the FPGA development board, it may configure the same PID (Product ID, product ID) and VID (Vendor ID, development board vendor ID) for different types of FPGA development boards using the same chip, or configure the same PID, VID and development board serial number for the same type of FPGA development board, which makes it impossible for the program to distinguish them. The configuration information is stored in the EEPROM of the FPGA development board. This embodiment designs to rewrite the EEPROM of the FPGA development board. Specifically, the program_ftdi instruction of Vivado2022 or above can be used to flash it, or other open source tools can be used to flash it. Taking Minisys as an example, the configuration information shown in Table 1 below needs to be rewritten.
[0041] Table 1 Re-write configuration information
[0042] The result of re-flashing is to re-write the configuration information of the FPGA development board to the content in Table 1. Most of the parameters in Table 1 are related to the physical parameters of the actual FPGA development board. The parameters related to this embodiment are VID, PID and Serial Number. These three parameters together form the unique identification of the FPGA development board. The more critical one is SerialNumber. M0 indicates Minisys development board, followed by ID number. After re-flashing, the configuration information of different FPGA development boards is different.
[0043] In order to enable the remote FPGA hardware experiment system to support multiple types of FPGA development boards, the configuration information of the FPGA development board will be stored in the Node node in the form of a json file. When the remote FPGA hardware experiment system is started, the Node node reads the json file. When the remote FPGA hardware experiment system is running, the Node node discovers the FPGA development board by comparing the configuration in the json file with the scanned PID and VID, and determines the development board model by the Serial Number and registers it. While ensuring that the SerialNumber is not repeated, an FPGA development board is unique in the Node node. Therefore, an independent buffer is created when in use, so that one host computer can control multiple FPGA development boards.
[0044] In this embodiment, there are multiple Node nodes, and one Node node can connect to multiple FPGA development boards. The multiple FPGA development boards can include several FPGA development boards of the same type and several FPGA development boards of different types. The configuration information of each FPGA development board has been rewritten in advance. The Node node stores the rewritten configuration information of each FPGA development board connected to the Node node, wherein the configuration information of the FPGA development board includes the development board vendor ID, product ID and development board serial number.
[0045] In this embodiment, the user input information also includes user login information, and the user login information includes the account number and password input by the user. The proxy server is also used to send the user login information to the central server. The central server is also used to verify the user login information when receiving the user login information, and allow the user to log in successfully after the verification is passed.
[0046] In this embodiment, the user input information also includes user application information, and the user application information includes the type of FPGA development board applied for by the user. The proxy server is also used to send the user application information to the central server. The central server is also used to bind the user to the idle FPGA development board if there is an idle FPGA development board of the same type as the FPGA development board applied for by the user after receiving the user application information, and set the status of the idle FPGA development board to occupied. At this time, after receiving the user download information, the central server sends the user download information to the Node node corresponding to the FPGA development board bound to the user.
[0047] In this embodiment, the Node node is also used to send the connection code required to establish a Socket connection to the central server after the bit stream file is burned into the FPGA development board. The central server is also used to set the status of the FPGA development board to communicating after receiving the connection code, and forward the connection code to the user via the proxy server. At this time, the proxy server requests the IP address of the Node node from the central server based on the connection code, establishes Socket communication with the Node node based on the IP address, and sends user control information to the Node node.
[0048] After the user uses the remote FPGA hardware experiment system to download the bitstream file to the FPGA development board, the design circuit is directly electrically connected to the peripherals (i.e. external devices, which can be selected as needed). The user sends data packets through the proxy server, Node node and serial port transceiver module, and uses different peripherals connected to the FPGA development board. After the Node node collects the signal of the peripheral through the serial port transceiver module, it sends it to the proxy server in the form of a data packet, and finally displays the status of each peripheral connected to the FPGA development board on the front end of the web page.
[0049] In addition to using the HTTP protocol, in the process of controlling the FPGA development board, this embodiment also uses a custom network communication protocol RMFP (Remote FPGA Protocol) and a custom serial port communication protocol.
[0050] The RMFP protocol structure is as follows Figure 2 As shown, the meaning of each field is as follows.
[0051] (1) magicNum (2 Bytes): Magic number field, used to indicate that the current RMFP message is valid.
[0052] (2) extra (1 Byte): An extended field used to indicate the meaning of the data carried in data.
[0053] (3) Command (1 Byte): Command type field, used to indicate the meaning of the current RMFP message.
[0054] (4) data (0~n Bytes): Data field, used to carry extra data. The meaning of the data is specified by extra.
[0055] Among them, extra can support the use of 0x01 and 0x02 to indicate whether the current operation is the Minisys development board or the Ego1 development board.
[0056] Display data and control data will be transmitted as data in the RMFP protocol data. Display data is only sent from the Node node to the user browser, while control data can be sent bidirectionally, either from the user browser to the Node node or from the Node node to the user browser. The data formats of display data and control data are as follows: Figure 3 , Figure 4 As shown, the display data is an assembly of the sampled data. The assembly is to reduce the occupancy of the network bandwidth and increase the payload ratio of the message. The display data includes the segment selection signal of the digital tube and the level signal of the LED (Light Emitting Diode). The control data includes the level signal and the button number. Since the user cannot directly contact the FPGA development board, it is impossible to directly operate the input devices such as the dip switches and push switches on the FPGA development board. Therefore, the control data is designed to simulate the user's operation of the input device on the FPGA development board. Specifically, the button number is used to select a specific dip switch or push switch and other input devices, and the level signal is used to simulate the input level signal of the selected input device. The sampled data is the information about the digital tube and LED light sent by the FPGA development board to the Node node connected to it. The data format of the sampled data is as follows: Figure 5 As shown, the sampling data includes the bit selection signal of the digital tube, the segment selection signal and the level signal of the LED lamp.
[0057] The serial communication protocol is designed to solve the problem of packet breakage and sticking in serial communication. The serial communication protocol adds a 1-Byte protocol header and a 1-Byte protocol tail to each data transmitted in the serial port.
[0058] Among them, the RMFP protocol is used as the Websocket binary frame format when the user browser communicates with the Node node, and is used in the communication process between the proxy server and the Node node. The serial communication protocol is used in the serial communication between the Node node and the serial transceiver module of the FPGA development board.
[0059] In this embodiment, the Node node and the proxy server are connected through the RMFP protocol. The RMFP protocol includes a magic number field, an extension field, an instruction type field and a data field. The magic number field is used to indicate that the current message is valid. The extension field is used to indicate the meaning of the communication data in the data field. The instruction type field is used to indicate the meaning of the current message. The data field is used to carry communication data. The communication data includes display data and control data. The display data includes the digital tube segment selection signal and the LED light level signal in the FPGA development board. The control data includes the level signal and the button number.
[0060] In this embodiment, the Node node is connected to the FPGA development board through a serial communication protocol. The serial communication protocol adds a protocol header and a protocol tail to the data transmitted in the serial port.
[0061] The typical hardware experiment process mainly includes: (1) Development: designing circuits on an IDE (Integrated Development Environment); (2) Simulation: simulating and verifying the circuit; (3) Downloading: downloading the circuit to an FPGA development board; (4) Debugging: debugging the circuit on the FPGA board. This embodiment mainly focuses on the download and control links of the hardware experiment. The user needs to complete source code writing and bitstream file generation outside the remote FPGA hardware experiment system of this embodiment, then log in to the remote FPGA hardware experiment system of this embodiment through the web front end, and finally select the FPGA development board in the web front end, and perform download operations and control operations, such as Figure 6 As shown, it shows the business process of remote downloading operations after the user logs in. When the user controls the FPGA development board, data is sent and received through the web front-end page.
[0062] like Figure 6As shown, based on the above remote FPGA hardware experiment system, this embodiment provides a business process for a user to perform a remote download operation after logging in, including the following steps.
[0063] Step 1: The user logs in through the browser and sends the login credentials (account, password) to the proxy server. The proxy server forwards the login credentials to the central server. The central server verifies the login credentials and returns the result. If the verification is successful, the token is stored in the cookie and returned. At this point, the user logs in successfully. Among them, the cookie is a plain text file written by the server to the client.
[0064] Step 2: The user sends a request to the proxy server through the browser, requesting to use a certain type of FPGA development board. The proxy server forwards the request to the central server. The central server searches whether there is an idle FPGA development board of this type. If it fails, it returns directly. If it succeeds, it binds the user ID to the FPGA development board and sets the FPGA development board status to occupied.
[0065] Step 3: After the user successfully seizes the device, the burning step begins. The user selects the pre-built bitstream file (bit file) and uploads it to the proxy server through the browser. The proxy server forwards the bitstream file to the central server. The central server forwards the bitstream file to the specified Node node based on the bitstream file and the binding status between the user and the FPGA development board. The Node node burns the bitstream file to the specific FPGA development board and returns the acKey (i.e., connection code) required to establish a Socket connection. The central server updates the FPGA development board status to communicating, binds the acKey to the FPGA development board, returns the acKey to the proxy server, and the proxy server returns the acKey to the user.
[0066] Step 4: The user carries acKey through the browser to request to establish Socket communication. The request reaches the proxy server. The proxy server obtains the IP address of the Node node based on acKey, establishes Socket communication based on the IP address, forwards the request to the Node node, and the Node node responds to the request.
[0067] Step 5: Start using the FPGA development board remotely.
[0068] To solve the problems existing in the prior art, this embodiment provides an expandable remote FPGA hardware experiment system, which has the following advantages.
[0069] (1) Support one host computer to control multiple FPGA development boards of various types.
[0070] The remote FPGA hardware experiment system of this embodiment realizes that one host computer controls multiple FPGA development boards of various types, and data transmission and reception are based on NIO (Non-Blocking IO, synchronous non-blocking IO), and the FPGA development boards controlled by the same host computer do not affect each other.
[0071] (2) Dynamically monitor and report the status of the FPGA development board.
[0072] The remote FPGA hardware experiment system of this embodiment realizes the dynamic monitoring function based on event monitoring and the FPGA development board status reporting function based on scheduled tasks, supports hot plugging of FPGA development boards, and can take any Node node or FPGA development board offline at any time without affecting the overall stability of the system, thereby improving the ease of use of the system.
[0073] (3) Good expansion capability.
[0074] (3.1) FPGA development board scalability: The remote FPGA hardware experiment system of this embodiment realizes the function of the Node node to burn and control different FPGA development boards based on the configuration information, and can support multiple FPGA development boards for use as system resources; based on the serial communication protocol and network communication protocol defined in this embodiment, it supports the same FPGA development boards loaded with different peripherals for use as system resources.
[0075] (3.2) Protocol scalability: When there are non-web applications such as desktop applications and mobile applications, the network communication protocol defined in this embodiment supports data transmission as an application layer protocol.
[0076] (3.3) Operating system type scalability: The central server and Node nodes mentioned in this embodiment can be deployed in the form of pure binary files on Linux x64 system, Linux AArch64 system, macOS x64 system, macOSAArch64 system, and Windows x64 system.
[0077] Example 2.
[0078] This embodiment provides a working method of a remote FPGA hardware experiment system, which is applied to the remote FPGA hardware experiment system described in Embodiment 1. The working method of the remote FPGA hardware experiment system includes the following steps.
[0079] (1) The web front end receives the user login information and sends it to the proxy server; the user login information includes the account number and password entered by the user; the proxy server sends the user login information to the central server; when the central server receives the user login information, it verifies the user login information and allows the user to log in successfully after the verification is passed.
[0080] (2) The web front end receives the user application information and sends the user application information to the proxy server; the user application information includes the type of FPGA development board applied for by the user; the proxy server sends the user application information to the central server; after receiving the user application information, if there is an idle FPGA development board of the same type as the FPGA development board applied for by the user, the central server binds the user to the idle FPGA development board and sets the status of the idle FPGA development board to occupied.
[0081] (3) The web front end receives the user download information and sends the user download information to the proxy server; the user download information includes the bit stream file generated in advance by the user, and the bit stream file includes the serial port transceiver module and the designed circuit; the proxy server sends the user download information to the central server; after receiving the user download information, the central server sends the user download information to the Node node corresponding to the FPGA development board bound to the user; after receiving the user download information, the Node node burns the bit stream file into the FPGA development board.
[0082] (4) The web front end obtains user control information and sends the user control information to the proxy server; the user control information includes the user's specific operations on the FPGA development board; the proxy server sends the user control information to the Node node; after receiving the user control information, the Node node controls the FPGA development board.
[0083] Among them, when the FPGA development board is controlled, the serial port transceiver module in the FPGA development board monitors the status information of the design circuit in the FPGA development board, and sends the status information to the Node node, which is forwarded to the user through the Node node and the proxy server.
[0084] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0085] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A remote FPGA hardware experiment system, It is characterized in that The remote FPGA hardware experiment system includes: a web front end, a proxy server, a central server, a Node node and an FPGA development board; wherein the Node node is a host computer; The web front end is used to receive user input information and send the user input information to the proxy server; the user input information includes user download information and user control information; the user download information includes the bit stream file generated in advance by the user, and the bit stream file includes the serial port transceiver module and the designed circuit; the user control information includes the specific operation of the user on the FPGA development board; The proxy server is connected to the web front end; the proxy server is used to send user download information to the central server and send user control information to the Node node; The central server is connected to the proxy server and the Node node respectively; the central server is used to send the user download information to the Node node after receiving the user download information; The Node node is connected to the proxy server, the central server and the FPGA development board respectively; the Node node is used to burn the bitstream file into the FPGA development board after receiving the user download information; after receiving the user control information, the FPGA development board is controlled; Among them, the FPGA development board includes a serial port transceiver module and a design circuit. The serial port transceiver module is connected to the proxy server for communication, and the design circuit is electrically connected to the serial port transceiver module. The serial port transceiver module is used to monitor the status information of the design circuit and send the status information to the Node node, which is forwarded to the user through the Node node and the proxy server.
2. The remote FPGA hardware experiment system according to claim 1, It is characterized in that The proxy server is connected to the web front end via HTTP protocol or Websocket protocol; the central server is connected to the proxy server via HTTP protocol; the central server is connected to the Node node via HTTP protocol; the Node node is connected to the proxy server via Socket communication; the Node node is connected to the FPGA development board via serial port communication.
3. The remote FPGA hardware experiment system according to claim 1, It is characterized in that The FPGA development board is inserted into the Node node; the Node node is also used to perform hot-swap detection on the FPGA development board.
4. The remote FPGA hardware experiment system according to claim 1, It is characterized in that There are multiple Node nodes, and one Node node can connect to multiple FPGA development boards. The multiple FPGA development boards can include several FPGA development boards of the same type and several FPGA development boards of different types. The configuration information of each FPGA development board has been rewritten in advance, and the Node node stores the rewritten configuration information of each FPGA development board connected to the Node node; wherein the configuration information of the FPGA development board includes the development board vendor ID, product ID and development board serial number.
5. The remote FPGA hardware experiment system according to claim 1, It is characterized in that User input information also includes user login information; user login information includes the account number and password entered by the user; The proxy server is also used to send user login information to the central server; The central server is also used to verify the user login information when receiving it, and enable the user to log in successfully after the verification is passed.
6. The remote FPGA hardware experiment system according to claim 4, It is characterized in that The user input information also includes user application information; the user application information includes the type of FPGA development board applied by the user; The proxy server is also used to send user application information to the central server; The central server is also used to bind the user to the idle FPGA development board and set the status of the idle FPGA development board to occupied after receiving the user application information if there is an idle FPGA development board of the same type as the FPGA development board applied for by the user; at this time, after receiving the user download information, the central server sends the user download information to the Node node corresponding to the FPGA development board bound to the user.
7. The remote FPGA hardware experiment system according to claim 2, It is characterized in that The Node node is also used to send the connection code required to establish a Socket connection to the central server after the bitstream file is burned into the FPGA development board; the central server is also used to set the status of the FPGA development board to communicating after receiving the connection code, and forward the connection code to the user via the proxy server; at this time, the proxy server requests the IP address of the Node node from the central server based on the connection code, establishes Socket communication with the Node node based on the IP address, and sends user control information to the Node node.
8. The remote FPGA hardware experiment system according to claim 2, It is characterized in that The Node node and the proxy server are connected through the RMFP protocol; the RMFP protocol includes a magic field, an extension field, an instruction type field and a data field. The magic field is used to indicate that the current message is valid, the extension field is used to indicate the meaning of the communication data in the data field, the instruction type field is used to indicate the meaning of the current message, and the data field is used to carry communication data; the communication data includes display data and control data. The display data includes the digital tube segment selection signal and the LED light level signal in the FPGA development board, and the control data includes the level signal and the button number.
9. The remote FPGA hardware experiment system according to claim 2, It is characterized in that The Node node is connected to the FPGA development board through the serial communication protocol. The serial communication protocol adds a protocol header and a protocol tail to the data transmitted in the serial port.
10. A working method of a remote FPGA hardware experiment system, applied to the remote FPGA hardware experiment system according to any one of claims 1 to 9, It is characterized in that The working method of the remote FPGA hardware experiment system includes: The web front end receives the user login information and sends the user login information to the proxy server; the user login information includes the account number and password entered by the user; The proxy server sends the user login information to the central server; When the central server receives the user login information, it verifies the user login information and allows the user to log in successfully after the verification; The web front end receives the user application information and sends the user application information to the proxy server; the user application information includes the type of FPGA development board applied by the user; The proxy server sends the user application information to the central server; After receiving the user's application information, if there is an idle FPGA development board of the same type as the FPGA development board applied for by the user, the central server will bind the user to the idle FPGA development board and set the status of the idle FPGA development board to occupied; The web front end receives the user download information and sends the user download information to the proxy server; the user download information includes a bit stream file generated in advance by the user, and the bit stream file includes a serial port transceiver module and a designed circuit; The proxy server sends the user download information to the central server; After receiving the user download information, the central server sends the user download information to the Node node corresponding to the FPGA development board bound to the user; After receiving the user's download information, the Node burns the bitstream file into the FPGA development board; The web front end obtains user control information and sends the user control information to the proxy server; the user control information includes the user's specific operations on the FPGA development board; The proxy server sends the user control information to the Node node; After receiving the user's control information, the Node node controls the FPGA development board; Among them, when the FPGA development board is controlled, the serial port transceiver module in the FPGA development board monitors the status information of the design circuit in the FPGA development board, and sends the status information to the Node node, which is forwarded to the user through the Node node and the proxy server.
Citation Information
Patent Citations
Board system and FPGA (Field Programmable Logic Array) online update method of communication interface cards
CN103559053A
A remote transmission loading multi-node FPGA program loading management circuit
CN109669704A
Parallel working FPGA online configuration system and method based on high-speed serial port
CN112148319A
System-on-chip design and verification method based on remote FPGA experimental platform
CN112163386A
Cloud environment-oriented FPGA hardware design capability evaluation system and method
CN114661614A
