Large-scale cluster FPGA communication method, electronic device and medium
By setting the switching module and PCL coding on the FPGA, fast and accurate communication of large-scale cluster FPGAs is achieved, solving the technical problems of large-scale cluster FPGA interconnection and communication in chip development, and improving communication efficiency and scalability.
Patent Information
- Application Number
- CN202410099617.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-24
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-01-24
AI Technical Summary
In chip development, how to realize the interconnection of large-scale cluster FPGAs and the fast and accurate communication between ultra-large cluster FPGAs has become an urgent technical problem to be solved.
By setting up a switching module and multiple ports on each FPGA, each port is configured with PCL coding, including the FPGA number where the port is located, the number of the directly connected FPGA, and the number of the farthest connected FPGA, and communication instructions are generated based on the preset protocol structure. , quickly determine the next FPGA to be processed to receive communication instructions, until the target communication FPGA is found, and the communication instructions are executed on the target FPGA.
It achieves fast and accurate communication between ultra-large-scale cluster FPGAs, improves communication efficiency, and adapts to the verification needs of ultra-large-scale chip design.
Smart Images

Figure CN117931725B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of chip technology, and in particular to a large-scale cluster FPGA communication method, electronic equipment and medium. Background Art
[0002] In the process of chip development, it is necessary to perform FPGA prototype verification on the chip before chip tape-out. FPGA prototype verification is used to verify the chip function. For large and ultra-large chip designs, a large-scale cluster FPGA prototype verification system is required for FPGA prototype verification. The large-scale cluster FPGA prototype verification system requires a huge number of FPGAs in the cluster FPGA prototype verification system. How to achieve the interconnection of large-scale cluster FPGAs used for chip prototype verification and the communication between ultra-large cluster FPGAs has become a technical problem that needs to be solved urgently. Summary of the invention
[0003] The object of the present invention is to provide a super-large-scale cluster FPGA communication method, electronic equipment and medium, which can quickly and accurately realize the communication of super-large-scale cluster FPGA.
[0004] According to a first aspect of the present invention, a super-large-scale cluster FPGA communication method is provided, wherein the super-large cluster FPGA comprises P interconnected first FPGAs {F1, F2, ..., F p ,…,F P}, where F p is the pth first FPGA, the value range of p is 1 to P, the first FPGA includes a switching module and M first ports, any two first ports can communicate through the switching module, each first port can cascade a first FPGA, and each F p At least one first port can communicate with {F1, F2, ..., F p ,…,F P} except F p For communication with any other first FPGA other than the first FPGA, each first port is provided with a corresponding PCL code, the PCL code including the first FPGA number P where the first port is located, the first FPGA number C directly connected to the first port, and the number L of the farthest first FPGA connected to the first port;
[0005] The method comprises:
[0006] Step D1: The FPGA to be processed obtains a communication instruction generated based on a preset protocol structure. The FPGA to be processed is {F1, F2, ..., F p ,…,F P}, the preset protocol structure includes {B1, B2, B5}, wherein B1 is an operation type identifier, B1=1 indicates a read instruction, B1=2 indicates a read reply instruction, B1=3 indicates a write instruction, B2 is a target first FPGA number, and B5 is a target address and target data;
[0007] Step D2, determine whether there is a first port in the FPGA to be processed that satisfies B2≥C and B≤L. If so, execute step D3. Otherwise, determine whether B2 is equal to P of the FPGA to be processed. If so, determine the current FPGA to be processed as the first target communication FPGA and execute step D5. Otherwise, determine whether B2 is less than P of the FPGA to be processed, or whether B2 is greater than L of the FPGA to be processed and B2 is not equal to P of the FPGA to be processed. If so, execute step D4.
[0008] Step D3, sending the communication instruction to the first FPGA connected to the first port, and updating the first FPGA connected to the first port as the FPGA to be processed, and returning to execute step D2;
[0009] Step D4, sending the communication instruction to the first FPGA, the parent of the FPGA to be processed, and updating the first FPGA, the parent of the FPGA to be processed, to the FPGA to be processed, and returning to execute step D2;
[0010] Step D5: executing the communication instruction based on the first target communication FPGA.
[0011] According to a second aspect of the present invention, there is provided an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being configured to execute the method described in the first aspect of the present invention.
[0012] According to a third aspect of the present invention, there is provided a computer-readable storage medium storing computer-executable instructions, wherein the computer instructions are used to execute the method described in the first aspect of the present invention.
[0013] Compared with the prior art, the present invention has obvious advantages and beneficial effects. By means of the above technical solution, the large-scale cluster FPGA communication method, electronic device and medium provided by the present invention can achieve considerable technical advancement and practicality, and has wide industrial utilization value, and has at least the following beneficial effects:
[0014] The present invention sets PCL coding at each first port, generates communication instructions based on a preset protocol structure, quickly determines the next FPGA to be processed to receive the communication instruction based on the communication instruction and the PCL coding, until the first target communication FPGA is found, and executes the communication instruction based on the first target communication FPGA, which can quickly and accurately realize the communication of ultra-large-scale cluster FPGAs. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0016] Figure 1 A schematic diagram of connecting a first FPGA to a second FPGA in a super-large-scale cluster FPGA prototype verification system provided by an embodiment of the present invention;
[0017] Figure 2 A schematic diagram of connecting a first FPGA to a second FPGA in a super-large-scale cluster FPGA prototype verification system provided by an embodiment of the present invention;
[0018] Figure 3 The ultra-large-scale cluster FPGA interconnection coding method process provided by the embodiment of the present invention;
[0019] Figure 4 A flow chart of a super-large-scale cluster FPGA communication method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0020] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0021] Embodiment 1
[0022] Embodiment 1 provides a super-large-scale cluster FPGA prototype verification system, including P interconnected first FPGAs {F1, F2, ..., F p ,…,F P} and Q second FPGAs, where F pis the pth first FPGA, and the value range of p is 1 to P. The first FPGA includes a switching module, M first ports and N second ports, and any two ports in the first FPGA can communicate through the switching module, wherein any two ports can be any two first ports, any two second ports, or any first port and any second port. Each first port can be cascaded to a first FPGA, and each second port can be connected to a second FPGA, Q≤P×N.
[0023] The second FPGA includes a third port, which is used to interconnect with the second port. The second FPGA is used to load the chip design code to be tested. The same chip design code to be tested can be divided into Q parts and stored in Q second FPGAs respectively, so as to realize prototype verification of the chip in an ultra-large-scale cluster FPGA.
[0024] Any two second FPGAs connected to the same first FPGA can communicate through the corresponding second ports and the switch module. p can be connected to {F1, F2, ..., F p ,…,F P} except F p Each connection in F p Any second FPGA on the network can communicate with {F1, F2, ..., F p ,…,F P} except F p Communicate with any second FPGA connected to any other first FPGA other than the first FPGA.
[0025] like Figure 1 In the example shown, the first FPGA includes 4 first ports and 4 second ports, and each second port is connected to a second FPGA. Figure 2 In the example shown, each first port of the first FPGA can be cascaded to a first FPGA. However, it is understandable that Figure 1 Figure 2 This is just an example. In an actual ultra-large-scale cluster FPGA, the number of second FPGAs connected to each first FPGA can be adjusted according to application requirements, and the number and structure of the first FPGA cascaded using the first port can also be adjusted according to specific application requirements.
[0026] As a preferred embodiment, the hardware structures of the first port, the second port and the third port are the same. In the first FPGA, which ports are used as the first port and which ports are used as the second port can be specified by software configuration. The first port, the second port and the third port use the same hardware structure to reduce hardware design costs and improve the interconnection efficiency and communication efficiency between ports.
[0027] As an embodiment, the system further includes a host, the host is connected to the main first FPGA, and the main first FPGA is {F1, F2, ..., F p ,…,F P} one of the FPGAs, the host communicates with any one of the first FPGA or the second FPGA through the main first FPGA.
[0028] As an embodiment, the main first FPGA is used as the root node, and the number of each first FPGA is sequentially set using a depth-first algorithm, a wide-space algorithm or a fixed coding method. Preferably, the number of each first FPGA is sequentially set using a depth-first algorithm.
[0029] As an embodiment, the first port includes a first register, a second register and a third register, the first register is used to store the number of the first FPGA where the first port is located, the second register is used to store the number of the first FPGA directly connected to the first port, and the third register is used to store the number of the farthest first FPGA connected to the first port. The value of the first register, the value of the second register and the value of the third register corresponding to each first port are combined to form the PCL code corresponding to the first port, and the PCL code corresponding to each first port can uniquely determine the address of a first port. It should be noted that if the second port and the third port have the same structure as the first port, the first register, the second register and the third register in the second port and the third port can be set to empty, or set to the initial value 0.
[0030] As an embodiment, the first FPGA further includes at least one first IP (Intellectual Property), the second FPGA further includes at least one second IP, the host sends a target communication instruction to the main first FPGA, the target communication instruction includes target address information and target communication information, the target address information includes a primary target address and a secondary target address, the primary target address is the target first FPGA number, the target first FPGA number is the number of one of the first FPGAs. The secondary target address is the target second port number, the first IP identifier, or a combination of the target second port number and the second IP identifier. It should be noted that the target first FPGA can be determined based on the target first FPGA number, the corresponding target second FPGA can be determined based on the target second port number, the target first IP corresponding to the target first FPGA can be determined based on the first IP identifier, and the second IP corresponding to the target second FPGA can be determined based on the target second port number and the second IP identifier.
[0031] As an embodiment, the system transmits the target communication information to the target first FPGA based on the primary target address and the PCL encoding of the first port, and then transmits the target communication information to the secondary target address based on the secondary target address.
[0032] The system described in the first embodiment is configured with a first FPGA that can be cascaded, the first FPGA is cascaded through a first port, and the second FPGA is connected through a second port, and the chip design code to be tested is loaded through the second FPGA. The system has strong scalability and can wirelessly expand the number of first FPGAs, so that the number of second FPGAs can also be infinitely increased, thereby realizing the interconnection of ultra-large-scale cluster FPGAs and adapting to the verification of current ultra-large-scale chip designs.
[0033] Embodiment 1 can realize the configuration of the corresponding values in the first register, the second register and the third register in the first port in any existing manner. However, due to the large scale of FPGA, how to quickly and accurately configure the corresponding values in the first register, the second register and the third register in the first port also faces challenges. Based on this, the embodiment of the present invention further proposes embodiment 2.
[0034] Embodiment 2
[0035] Embodiment 2 provides a method for interconnecting and coding a super-large-scale cluster FPGA. It should be noted that the method for interconnecting and coding a super-large-scale cluster FPGA provided in Embodiment 2 can be applied to the configuration of the corresponding values in the first register, the second register, and the third register in the first port in Embodiment 1, and can also be applied to other scenarios of large-scale FPGA interconnection coding. It can be understood that when applied to the configuration of the corresponding values in the first register, the second register, and the third register in the first port in Embodiment 1, the port described in Embodiment 2 specifically refers to the first port in Embodiment 1, and the FPGA described in Embodiment 2 specifically refers to the first FPGA in Embodiment 1.
[0036] The super-large cluster FPGA includes P interconnected FPGAs {F1, F2, ..., F p ,…,F P}, where F p is the pth FPGA, the value range of p is 1 to P, the FPGA includes a switching module and M ports, any two ports can communicate through the switching module, each port can cascade an FPGA, and each F p At least one port can communicate with {F1, F2, …, F p ,…,F P} except F p Any other FPGA communication except the port, each port includes a first register, a second register and a third register, the first register is used to store the FPGA number P where the port is located, the second register is used to store the FPGA number C directly connected to the port, and the third register is used to store the farthest FPGA number L connected to the port, and each of the first register, the second register and the third register is initially set to 0;
[0037] like Figure 3 As shown, the method includes:
[0038] Step C1, select F p As the main FPGA, the main FPGA is used as the target FPGA, and the current number value r=1 is initially set.
[0039] Among them, the main FPGA can communicate directly with the host.
[0040] Step C2, obtain the target FPGA port connection state sequence {A1, A2, ..., A m ,…,A M}, A m is the connection status information of the mth port of the target FPGA. The value range of m is 1 to M, where M is the total number of ports of the FPGA. m =(A1 m ,A2 m), A1 m A m Connection status, A2 m A m The processing status of A m =0 means A m No FPGA connected, A m =1 means A m Connected with FPGA, A2 m =0 means A m Untreated, A2 m =1 means A m Processed, A2 m The initial setting is 0.
[0041] Step C3: Determine whether A1 exists in the current target FPGA port state sequence m =1 and A2 m =0 port, if any, select one from A1 m =1 and A2 m =0 as the target port, update the FPGA connected to the target port to the target FPGA, and execute step C4; otherwise, execute step C5.
[0042] It should be noted that there is A1 in the current target FPGA port state sequence m =1 and A2 m =0, it means that there is a port in the current target FPGA that is connected to the FPGA and has not been processed.
[0043] Step C4: Update the value of all first registers in the target FPGA to r, update the value of the second register in the target port to r, update the value of the third register in the target port and all parent FPGA ports directly connected to the target port to r, and update the A2 corresponding to the target port to r. m Set to value 1, then update r=r+1, and return to execute step C2.
[0044] It should be noted that the ports of all parent FPGAs directly connected to the target port refer to all ports that the shortest path from the target port to the main FPGA passes through. Each first register and second register only need to be configured once, and the value will not change after configuration. Each third register may be configured multiple times until all FPGAs are processed to obtain the final configuration value.
[0045] Step C5: determine whether the target FPGA has a parent FPGA. If so, update the parent FPGA to the target FPGA and return to step C3. Otherwise, end the process.
[0046] As an embodiment, the main FPGA is connected to a host, and the host is used to generate corresponding operation instructions based on a preset protocol structure. The preset protocol structure includes {B1, B2, B3, B4, B5}, where B1 is an operation type identifier, B1=1 indicates a read instruction, B1=2 indicates a read reply instruction, B1=3 indicates a write instruction, B2 is the target FPGA number, B3 is the target port number, B4 is the target IP number, and B5 is the target address and target data. It should be noted that B1 can also be set to other values to indicate other types of instructions, such as write reply instructions, which can be set according to specific application requirements and are not listed here one by one. The target data in B5 can be empty. For example, when B1=1, that is, corresponding to the read instruction type, the target data is empty.
[0047] As an embodiment, the step C2 includes:
[0048] Step C21, the host sets B1 in the preset protocol structure to 1, B2 to the target FPGA number, B3 to the port number corresponding to the target FPGA in the parent FPGA, B4 to 0, and B5 to the port status register address in the target FPGA, and generates a target read instruction.
[0049] It should be noted that when the target FPGA is the master FPGA, the target FPGA is the root node, and the port number corresponding to the target FPGA in the parent FPGA is set to 0. When the target address is not an address in the IP, B4 is set to 0.
[0050] Step C22: Determine the target read FPGA based on the target read instruction.
[0051] Step C23, read the address corresponding to B5 in the target read instruction in the target read FPGA, and obtain the target read FPGA connection state sequence {A1, A2, ..., A m ,…,A M}.
[0052] Step C24, the target reads the FPGA and sets B1 in the preset protocol structure to 2, B2 to the main FPGA number, B3 to 0, B4 to the preset IP number, and B5 to {A1, A2, ..., A m ,…,A M}, generate target read return instruction.
[0053] It should be noted that all read return instructions need to be sent to the preset IP corresponding to the main FPGA. The preset IP is a pre-designated IP for receiving read return instructions. The host obtains the target data carried by the read return instruction by accessing the preset IP. When accessing the main FPGA board, B2 is set to the main FPGA number and B3 needs to be set to 0.
[0054] Step C25: Determine the target read return FPGA based on the target read return instruction.
[0055] Step C26: {A1, A2, ..., A m ,…,A M} is stored in the preset IP corresponding to the target read-back FPGA.
[0056] As an embodiment, the step C4 includes:
[0057] Step C41, the host sets B1 in the preset protocol structure to 3, B2 to the target write FPGA number, B3 to 0, B4 to 0, and B5 to the target write register address and target write value in the target write FPGA to generate a target write instruction.
[0058] Step C42: Determine the target write FPGA based on the target write instruction.
[0059] Step C43, the target write FPGA updates the value in the target write register address to the target write value.
[0060] It should be noted that in step C4, "updating the values in all first registers in the target FPGA to r", "updating the values in the second registers in the target port to r", and "updating the values in the third registers in the target port and all parent FPGA ports directly connected to the target port to r" are all implemented through steps C41 to C43.
[0061] As an embodiment, in step C4, the target write FPGA is set to the target FPGA, the target write register address is set to the first register address of the target FPGA, the target write value is set to r, and steps C41-C42 are executed to update the values in all first registers in the target FPGA to r.
[0062] As an embodiment, in step C4, the target write FPGA is set to the FPGA where the target port is located, the target write register address is set to the second register address in the target port, the target write value is set to r, and steps C41-C42 are executed to update the value in the second register in the target port to r.
[0063] As an embodiment, in step C4, the target write FPGA is set to the FPGA where the target port is located or the FPGA where the port of the parent FPGA directly connected to the target port is located, the target write register address is set to the third register address in the target port or the port of the parent FPGA directly connected to the target port, the target write value is set to r, and steps C41-C42 are executed to update the value in the third register in the target port and the ports of all parent FPGAs directly connected to the target port to r.
[0064] The main point is that the host directly accesses the preset IP and sends the A2 corresponding to the target port to the m Set to value 1.
[0065] As an embodiment, the method further includes:
[0066] Step C10: If the target instruction is a target read instruction or a target write instruction, the main FPGA is set as a receiving FPGA; if the target instruction is a target read return instruction, the target read FPGA is set as a receiving FPGA.
[0067] It should be noted that if the target instruction is a target read instruction or a target write instruction, the target instruction is generated by the host and sent from the main FPGA. If the target instruction is a target read return instruction, the target instruction is generated by the target read FPGA and sent from the target read FPGA.
[0068] Step C20, the receiving FPGA parses the target instruction and determines whether B2 is equal to the P of the receiving FPGA and B3 is not 0. If B2 is equal to the P of the receiving FPGA and B3 is not 0, step C30 is executed. If B2 is not equal to the P of the receiving FPGA and B3 is not 0, it is determined whether B2 ≥ the C of the receiving FPGA, and B2 ≤ the L of the receiving FPGA, and the P of the receiving FPGA ≠ the C of the receiving FPGA ≠ 0. If B2 ≥ the C of the receiving FPGA, and B2 ≤ the L of the receiving FPGA, and the P of the receiving FPGA ≠ the C of the receiving FPGA ≠ 0, If C of GA is not equal to 0, then execute step C40. If B2 is not equal to C of receiving FPGA, and B2 is not equal to L of receiving FPGA, and P of receiving FPGA is not equal to C of receiving FPGA and 0, then determine whether B2 is equal to P of receiving FPGA and B2 is equal to 0. If B2 is equal to P of receiving FPGA and B2 is equal to 0, then determine the current receiving FPGA as the target execution FPGA. If B2 is not equal to P of receiving FPGA and B2 is equal to 0, then determine whether B2 is equal to P of receiving FPGA and B2 is equal to 0. If B2 is equal to P of receiving FPGA and B2 is equal to 0, then determine whether B2 is equal to P of receiving FPGA and B2 is equal to 0. If B2 is equal to P of receiving FPGA and B2 is equal to 0, then execute step C50.
[0069] Step C30, update B2 and B3 in the target instruction to 0, send the updated target instruction to the corresponding next-level FPGA through the port, update the corresponding next-level FPGA to the receiving FPGA, and return to execute step C23.
[0070] Step C40, sending the target instruction to the corresponding next-level FPGA through the port, updating the corresponding next-level FPGA to the receiving FPGA, and returning to execute step C20.
[0071] Step C50, update the corresponding upper-level FPGA to the receiving FPGA, and return to execute step C20.
[0072] It should be noted that step C22, step C25 and step C42 are all implemented through the logic of step C10 to step C50.
[0073] As an embodiment, in step C22, the target instruction is set as a target read instruction, and steps C10 to C50 are executed, and the target execution FPGA is determined to be a target read FPGA.
[0074] As an embodiment, in step C25, the target instruction is set as the target read return FPGA, and steps C10 to C50 are executed, and the target execution FPGA is determined to be the target read return FPGA.
[0075] As an embodiment, in step C42, the target instruction is set as a target write instruction, and steps C10 to C50 are executed, and the target execution FPGA is determined to be a target write FPGA.
[0076] Embodiment 2 sets the first register, the second register and the third register at each port, and then iteratively configures the first register, the second register and the third register according to the connection between the FPGAs. Finally, the first register of each port stores the FPGA number P where the port is located, the second register stores the FPGA number C directly connected to the port, and the third register stores the number L of the farthest FPGA connected to the port, thereby quickly and accurately setting a unique address code for each port, thereby improving the communication efficiency of the ultra-large-scale cluster FPGA.
[0077] On the basis of the first and second embodiments, the ultra-large-scale cluster FPGA can realize communication between FPGAs. Based on this, the present invention further proposes a third embodiment.
[0078] Embodiment 3
[0079] Embodiment 3 provides a super-large-scale cluster FPGA communication method, wherein the super-large cluster FPGA includes P interconnected first FPGAs {F1, F2, ..., F p ,…,FP}, where F p is the pth first FPGA, the value range of p is 1 to P, the first FPGA includes a switching module and M first ports, any two first ports can communicate through the switching module, each first port can cascade a first FPGA, and each F p At least one first port can communicate with {F1, F2, ..., F p ,…,F P} except F p For communication with any other first FPGA other than the first FPGA, each first port is provided with a corresponding PCL code, and the PCL code includes the first FPGA number P where the first port is located, the first FPGA number C directly connected to the first port, and the number L of the farthest first FPGA connected to the first port.
[0080] like Figure 4 As shown, the method includes:
[0081] Step D1: The FPGA to be processed obtains a communication instruction generated based on a preset protocol structure. The FPGA to be processed is {F1, F2, ..., F p ,…,F P}, the preset protocol structure includes {B1, B2, B5}, wherein B1 is an operation type identifier, B1=1 indicates a read instruction, B1=2 indicates a read reply instruction, B1=3 indicates a write instruction, B2 is the target first FPGA number, and B5 is the target address and target data.
[0082] Step D2, determine whether there is a first port satisfying B2≥C and B≤L in the FPGA to be processed. If there is a first port satisfying B2≥C and B≤L, execute step D3. If there is no first port satisfying B2≥C and B≤L, determine whether B2 is equal to the P of the FPGA to be processed. If B2 is equal to the P of the FPGA to be processed, determine the current FPGA to be processed as the first target communication FPGA and execute step D5. If B2 is not equal to the P of the FPGA to be processed, determine whether B2 is less than the P of the FPGA to be processed, or whether B2 is greater than the L of the FPGA to be processed and B2 is not equal to the P of the FPGA to be processed. If so, execute step D4.
[0083] It should be noted that, usually, in step D2, it will be determined that one of the conditions is met and the corresponding steps will be executed. If none of the conditions are met, it means that there is an error, and an error is directly reported to end the process.
[0084] Step D3, sending the communication instruction to the first FPGA connected to the first port, and updating the first FPGA connected to the first port as the FPGA to be processed, and returning to execute step D2.
[0085] Step D4, sending the communication instruction to the first FPGA, the parent of the FPGA to be processed, and updating the first FPGA, the parent of the FPGA to be processed, to the FPGA to be processed, and returning to execute step D2.
[0086] It should be noted that a master FPGA is designated in the super-large cluster FPGA, and the master FPGA is used as the root node. Then, in the shortest path from the FPGA to be processed to the master FPGA, the first FPGA adjacent to the FPGA to be processed is the parent first FPGA of the FPGA to be processed.
[0087] Step D5: executing the communication instruction based on the first target communication FPGA.
[0088] It should be noted that the ultra-large-scale cluster FPGA implements full-duplex communication.
[0089] As an embodiment, the step D1 includes:
[0090] Step D11: From {F1, F2, ..., F p ,…,F P}A first FPGA is selected as the main FPGA, and the main FPGA is connected to the host.
[0091] The host communicates with any FPGA in the super-large cluster FPGA through the main FPGA.
[0092] Step D12: the host generates a communication instruction based on a preset protocol structure, sends it to the main FPGA, and sets the main FPGA as the FPGA to be processed.
[0093] As an embodiment, the super-large cluster FPGA further includes Q second FPGAs, the first FPGA further includes N second ports, any two ports in the first FPGA can communicate through the switching module, each second port can be connected to a second FPGA, Q≤P×N; the second FPGA includes a third port, the third port is used to interconnect with the second port, and the second FPGA is used to load the chip design code to be tested; any two second FPGAs connected to the same first FPGA can communicate through the corresponding second ports and the switching module. Each F p can be connected to {F1, F2, ..., F p ,…,F P} except F pEach connection in F p Any second FPGA on the network can communicate with {F1, F2, ..., F p ,…,F P} except F p Communicate with any second FPGA connected to any other first FPGA other than the first FPGA.
[0094] As an embodiment, the preset protocol structure further includes B3, where B3 is the target second port number, and the step D5 includes:
[0095] Step D51: if B3=0, execute the communication instruction in the first target communication FPGA; if B3≠0, determine the second FPGA connected to the second port corresponding to B3 in the first target communication FPGA as the second target communication FPGA.
[0096] Step D52: Send the communication instruction to the second target communication FPGA, and the second target communication FPGA executes the communication instruction.
[0097] As an embodiment, the first FPGA also includes at least one first IP, the second FPGA also includes at least one second IP, and the preset protocol structure also includes B4, B4 is the target IP number, if B3=0, then B4 is set to the first IP identifier, if B3≠0, then B4 is set to the second IP identifier. It should be noted that if B3=0, it means that the first target communication FPGA board is to be accessed. The corresponding IP is also the first target communication FPGA board IP, that is, the first IP. If B3≠0, it means that the second FPGA connected to the first target communication FPGA board is to be accessed, and the corresponding IP is the second IP.
[0098] As an embodiment, in the step D51, executing the communication instruction in the first target communication FPGA includes: step D511, the first target communication FPGA executes the operation of the corresponding type of B1 based on B5 in the first IP corresponding to B4.
[0099] As an embodiment, in the step D52, the second target communication FPGA executes the communication instruction, including: step D521, the second target communication FPGA executes the operation of the corresponding type of B1 based on B5 in the second IP corresponding to B4.
[0100] As an embodiment, if B1=1, B3=0 of the communication instruction, then step D7 is directly executed after step D5; if B1=1, B3≠0 of the communication instruction, then step D6 is executed after step D5;
[0101] Step D6, sending the target read data read by the second target communication FPGA to the first target communication FPGA, and executing step D7.
[0102] Step D7, the first target communication FPGA generates a read reply instruction based on the preset protocol structure, sets B1 in the read reply instruction to 2, B2 to the main FPGA number, B3 to 0, B4 to the number of the preset IP, the preset IP is used to interact with the host, B5 is set to the target read data, the first target communication FPGA is used as the FPGA to be processed, the read reply instruction is used as the communication instruction, and returns to execute step D2.
[0103] It should be noted that two independent preset protocol structures can be used in Example 2 and Example 3. Since the preset protocol structures corresponding to Example 2 and Example 3 differ only in the meaning of B3, they can also share the same preset protocol structure, and the preset protocol structure specifically includes {B0, B1, B2, B3, B4, B5}, where when B0=1, the preset protocol structure is set to the preset protocol structure used in Example 2, and when B0=0, the preset protocol structure is set to the data structure used in Example 3. By setting a common protocol structure for Example 2 and Example 3, development costs can be saved.
[0104] Embodiment three sets PCL coding at each first port, generates communication instructions based on a preset protocol structure, quickly determines the next FPGA to be processed to receive the communication instruction based on the communication instruction and PCL coding, until the first target communication FPGA is found, and executes the communication instruction based on the first target communication FPGA, which can quickly and accurately realize the communication of ultra-large-scale cluster FPGA.
[0105] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0106] It should be noted that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the steps as sequential processes, many of the steps can be implemented in parallel, concurrently or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0107] An embodiment of the present invention also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are configured to execute the methods described in Embodiments 2 and 3 of the present invention.
[0108] An embodiment of the present invention further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer instructions are used to execute the methods described in the second and third embodiments of the present invention.
[0109] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technician familiar with this profession can make some changes or modifications to equivalent embodiments of equivalent changes using the technical contents disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention still falls within the scope of the technical solution of the present invention.
Claims
1. A super-large-scale cluster FPGA communication method, characterized in that: The ultra-large-scale cluster FPGA includes P interconnected first FPGAs {F1, F2, . . . , F p ,…,F P }, where F p is the pth first FPGA, the value range of p is 1 to P, the first FPGA includes a switching module and M first ports, any two first ports can communicate through the switching module, each first port can cascade a first FPGA, and each F p At least one first port can communicate with {F1, F2, ..., F p ,…,F P } except F p For communication with any other first FPGA other than the first FPGA, each first port is provided with a corresponding PCL code, the PCL code including the first FPGA number P where the first port is located, the first FPGA number C directly connected to the first port, and the number L of the farthest first FPGA connected to the first port; The method comprises: Step D1: The FPGA to be processed obtains a communication instruction generated based on a preset protocol structure. The FPGA to be processed is {F1, F2, ..., F p ,…,F P }, the preset protocol structure includes {B1, B2, B5}, wherein B1 is an operation type identifier, B1=1 indicates a read instruction, B1=2 indicates a read reply instruction, B1=3 indicates a write instruction, B2 is a target first FPGA number, and B5 is a target address and target data; Step D2, determine whether there is a first port in the FPGA to be processed that satisfies B2≥C and B2≤L. If so, execute step D3. Otherwise, determine whether B2 is equal to P of the FPGA to be processed. If so, determine the current FPGA to be processed as the first target communication FPGA and execute step D5. Otherwise, determine whether B2 is less than P of the FPGA to be processed, or whether B2 is greater than L of the FPGA to be processed and B2 is not equal to P of the FPGA to be processed. If so, execute step D4. Step D3, sending the communication instruction to the first FPGA connected to the first port, and updating the first FPGA connected to the first port as the FPGA to be processed, and returning to execute step D2; Step D4, sending the communication instruction to the first FPGA, the parent of the FPGA to be processed, and updating the first FPGA, the parent of the FPGA to be processed, to the FPGA to be processed, and returning to execute step D2; A master FPGA is designated in the ultra-large-scale cluster FPGA, the master FPGA is used as a root node, and the first FPGA adjacent to the FPGA to be processed in the shortest path from the FPGA to be processed to the master FPGA is the parent first FPGA of the FPGA to be processed; Step D5: executing the communication instruction based on the first target communication FPGA.
2. The method according to claim 1, characterized in that: The step D1 comprises: Step D11: From {F1, F2, ..., F p ,…,F P } selects a first FPGA as the main FPGA, and the main FPGA is connected to the host; step D12, the host generates a communication instruction based on a preset protocol structure, sends it to the main FPGA, and sets the main FPGA as the FPGA to be processed.
3. The method according to claim 1, characterized in that The ultra-large-scale cluster FPGA also includes Q second FPGAs, the first FPGA also includes N second ports, any two ports of the first FPGA can communicate through the switching module, each second port can be connected to a second FPGA, Q≤P×N; the second FPGA includes a third port, the third port is used to interconnect with the second port, and the second FPGA is used to load the chip design code to be tested; The preset protocol structure also includes B3, where B3 is the target second port number, and the step D5 includes: Step D51, if B3=0, execute the communication instruction in the first target communication FPGA; if B3≠0, determine the second FPGA connected to the second port corresponding to B3 in the first target communication FPGA as the second target communication FPGA; Step D52, send the communication instruction to the second target communication FPGA, and the second target communication FPGA executes the communication instruction.
4. The method according to claim 3, characterized in that The first FPGA also includes at least one first IP, the second FPGA also includes at least one second IP, and the preset protocol structure also includes B4, B4 is the target IP number, if B3=0, then B4 is set to the first IP identifier, if B3≠0, then B4 is set to the second IP identifier.
5. The method according to claim 4, characterized in that In the step D51, executing the communication instruction in the first target communication FPGA includes: Step D511: The first target communication FPGA executes the operation of the corresponding type of B1 based on B5 in the first IP corresponding to B4.
6. The method according to claim 4, characterized in that In the step D52, the second target communication FPGA executes the communication instruction, including: Step D521: The second target communication FPGA performs the operation of the corresponding type of B1 based on B5 in the second IP corresponding to B4.
7. The method according to claim 3, characterized in that If B1=1, B3=0 of the communication instruction, then step D7 is directly executed after step D5; if B1=1, B3≠0 of the communication instruction, then step D6 is executed after step D5; Step D6, sending the target read data read by the second target communication FPGA to the first target communication FPGA, and executing step D7; Step D7, the first target communication FPGA generates a read reply instruction based on the preset protocol structure, sets B1 in the read reply instruction to 2, B2 to the main FPGA number, B3 to 0, B4 to the number of the preset IP, the preset IP is used to interact with the host, B5 is set to the target read data, the first target communication FPGA is used as the FPGA to be processed, the read reply instruction is used as the communication instruction, and returns to execute step D2.
8. An electronic device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, wherein the instructions are configured to execute the method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: Computer executable instructions are stored, and the computer executable instructions are used to execute the method of any one of the preceding claims 1-7.
Citation Information
Patent Citations
Method and device for checking field programmable gate array (FPGA)
CN102201022A
Port state monitoring method and apparatus
CN108848006A
Communication method and device, electronic equipment and storage medium
CN113992473A
Multi-chip joint verification method and device for large-scale ASIC (Application Specific Integrated Circuit) chips
CN114860519A
Process synchronization method, system and device based on Poll instruction and medium
CN117407182A
