Automatic assembly method for cable connection in FPGA (Field Programmable Gate Array) system, electronic equipment and medium
By optimizing cable connections in the FPGA system and performing automatic assembly methods using processors and memory, the problem of inefficient cable connections in the FPGA system is solved, and more efficient system performance and verification efficiency are achieved.
Patent Information
- Application Number
- CN202310523268.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-10
- Publication Date
- 2024-11-12
AI Technical Summary
The default assembly solution for cable connections in existing FPGA systems cannot meet the characteristics and style differences of each chip design, resulting in low operating efficiency and inability to achieve optimal performance.
By setting the chip design to be verified in the FPGA system, obtaining the number of signals and the cable time-sharing multiplex weight value, determining the objective function to optimize the number of cable assembly, using the processor and memory to perform automatic assembly methods, adjusting the cable connection to improve System performance.
It realizes reasonable assembly of cable connections in the FPGA system, improves system operation efficiency, and improves verification efficiency of chip design to be verified.
Smart Images

Figure CN118940695A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of chip technology, and in particular to an automatic assembly method, electronic equipment and medium for cable connection in an FPGA system. Background Art
[0002] Field-Programmable Gate Array (FPGA) systems typically provide a default cable assembly solution that balances the use of cable connection resources between FPGAs. However, different chip designs have diverse characteristics and styles, and requirements such as the type and number of cables connecting FPGAs, as well as the pin assignment of user-designed top-level ports on the FPGA, may vary. The default cable assembly solution often fails to achieve optimal performance, reducing the operating efficiency of the FPGA system. Therefore, how to achieve reasonable cable assembly in FPGA systems and improve their operating efficiency has become a technical problem that needs to be solved urgently. Summary of the Invention
[0003] The present invention aims to provide an automatic assembly method, electronic equipment and medium for cable connections in an FPGA system, thereby achieving reasonable assembly of cable connections in the FPGA system and improving the operating efficiency of the FPGA system.
[0004] According to a first aspect of the present invention, a method for automatically assembling cable connections in an FPGA system is provided, wherein the FPGA system includes K FPGA pairs (F i ,F j ), F i is the i-th FPGA in the FPGA system, F j is the j-th FPGA in the FPGA system, the values of i and j both range from 1 to N, N is the total number of FPGAs in the FPGA system, and i≠j;
[0005] The method comprises:
[0006] Step S1: Set the chip design to be verified in the FPGA system and obtain F i to F j Number of signals between A ij and F j to F i Number of signals between A ji ;
[0007] Step S2: Run the chip design to be verified in the FPGA system to obtain F i to F j The cable time-division multiplexing weight value a between ij and Fj to F i The cable time-division multiplexing weight value a between ji ;
[0008] Step S3, based on all (F i ,F j ), A ij 、A ji 、a ij and a ji Determine the objective function f(x):
[0009]
[0010] Among them, M k For the kth pair (F i ,F j ) The corresponding cable time-division multiplexing parameters, x k For the kth pair (F i ,F j ) corresponds to the number of assembled cables C ij k The value range of k is 1 to K, K is the total number of FPGA pairs with interconnected relationships in the FPGA system, For the kth pair (F i ,F j ) corresponds to the cable time division multiplexing rate, M k =a ij k *A ij k +a ji k *A ji k , a ij k For the kth pair (F i ,F j ) corresponds to a ij , A ij k For the kth pair (F i ,F j ) corresponds to A ij , a ji k For the kth pair (F i ,F j ) corresponds to a ji , A ji k For the kth pair (F i ,F j ) corresponds to A ji ;
[0011] Step S4: Each pair of F i and Fj The default number of assembled cables between the corresponding X k The initial value of Set as constraint conditions, Q is the preset maximum number of cables for each FPGA, solve f(x), and obtain the target x1, x2…, x K , so that f(x) takes the minimum value.
[0012] According to a second aspect of the present invention, an electronic device is provided, 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.
[0013] According to a third aspect of the present invention, a computer-readable storage medium is provided, wherein the computer instructions are used to execute the method described in the first aspect of the present invention.
[0014] The present invention has significant advantages and beneficial effects compared to existing technologies. By utilizing the above-described technical solution, the present invention provides an automatic assembly method, electronic device, and medium for cable connections in an FPGA system, which achieves considerable technological advancement and practicality, and has wide industrial application value, with at least the following beneficial effects:
[0015] The present invention can realize reasonable assembly of cable connections in an FPGA system based on the chip design to be verified, thereby improving the operating efficiency of the FPGA system. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] 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.
[0017] Figure 1 A schematic diagram of an FPGA system provided in an embodiment of the present invention;
[0018] Figure 2 This is a flow chart of the automatic assembly method for cable connections in an FPGA system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0019] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 making any creative efforts shall fall within the scope of protection of the present invention.
[0020] An embodiment of the present invention provides an automatic assembly method for cable connection in an FPGA system, wherein the FPGA system includes K FPGA pairs (F i ,F j ), F i is the i-th FPGA in the FPGA system, F j is the jth FPGA in the FPGA system, the value range of i and j is 1 to N, N is the total number of FPGAs in the FPGA system, and i≠j. Figure 1 The FPGA system shown, Figure 1 Each node represents an FPGA, each edge represents a cable connection between FPGAs, and the thickness of the edge represents the number of cable connections. There are 16 FPGAs, that is, N = 16, and there are 28 interconnected FPGA pairs, that is, K = 16. The interconnected FPGA pairs include (F1, F2), (F9, F 11 )、(F8,F 16 ) and so on, no longer list them one by one.
[0021] like Figure 2 As shown, the method includes the following steps:
[0022] Step S1: Set the chip design to be verified in the FPGA system and obtain F i to F j Number of signals between A ij and F j to F i Number of signals between A ji .
[0023] The chip design to be verified may include multiple modules, and the multiple modules may be set in the same FPGA of the FPGA system, or the same larger module may be divided into multiple sub-modules and set in different FPGAs. The specific setting is based on the resources required by the chip design module to be verified and the resources corresponding to each FPGA. Since the signal of the chip design to be verified may be unidirectional or bidirectional, the F i to F j The number of signals between j to F i The number of signals may be different and need to be calculated separately.
[0024] Step S2: Run the chip design to be verified in the FPGA system to obtain F i to F j The cable time-division multiplexing weight value a between ij and F j to F i The cable time-division multiplexing weight value a between ji .
[0025] After the chip design to be verified is set in the FPGA system, the chip design to be verified can be simulated by running the FPGA system, and the cable time-division multiplexing weight value is determined based on the running status of the chip design to be verified.
[0026] Step S3, based on all (F i ,F j ), A ij 、A ji 、a ij and a ji Determine the objective function f(x):
[0027]
[0028] Among them, M k For the kth pair (F i ,F j ) The corresponding cable time-division multiplexing parameters, x k For the kth pair (F i ,F j ) corresponds to the number of assembled cables C ij k , the value range of k is 1 to K, K is the total number of FPGA pairs with interconnected relationships in the FPGA system, For the kth pair (F i ,F j ) corresponds to the cable time division multiplexing rate. The greater the cable time division multiplexing rate, the slower the interconnection between FPGAs and the lower the system performance. Therefore, it is necessary to minimize the f(x) value as much as possible to improve system performance. k =a ij k *A ij k +a ji k *A ji k , a ij k For the kth pair (F i ,F j ) corresponds to a ij , A ijk For the kth pair (F i ,F j ) corresponds to A ij , a ji k For the kth pair (F i ,F j ) corresponds to a ji , A ji k For the kth pair (F i ,F j ) corresponds to A ji .
[0029] Step S4: Each pair of F i and F j The default number of assembled cables between the corresponding X k The initial value of Set as constraint conditions, Q is the preset maximum number of cables for each FPGA, solve f(x), and obtain the target x1, x2…, x K , so that f(x) takes the minimum value.
[0030] It should be noted that the FPGA system is equipped with F i and F j The default number of assembly cables between FPGAs is usually set based on the purpose of balancing the use of cable connection resources between FPGAs. The final generated target x1, x2…, x K The target number of assembly cables is set based on the specific chip design to be verified. This makes the number of assembly cables between FPGAs more reasonable, improves the operating efficiency of the FPGA system, and thus improves the verification efficiency of the chip design to be verified. It is understandable that due to port limitations, each FPGA has a maximum number of cables, Q.
[0031] As an example, step S2 includes:
[0032] Step S21: setting the chip design to be verified in the FPGA system.
[0033] Step S22: Based on F i to F j The clock frequency corresponding to each signal between the two is obtained by F i to F j The target running time corresponding to each signal between j to F i The clock frequency corresponding to each signal between the two is obtained by F j to F i The target running time corresponding to each signal between.
[0034] It should be noted that the frequency of each signal in the chip design to be verified is known. Based on the clock frequency corresponding to each signal and the specific FPGA architecture, the target runtime corresponding to each signal can be obtained. However, it is understandable that during the operation process, due to the influence of many other factors, the actual runtime is usually not equal to the target runtime.
[0035] Step S23: Run the chip design to be verified in the FPGA system to obtain F i to F j The actual running time of each signal between j to F i The actual running time corresponding to each signal.
[0036] Among them, all existing algorithms for obtaining the actual running time of the signal fall within the protection scope of the present invention. For example, it can be directly obtained from the generated operation report, and the specific acquisition method will not be repeated here.
[0037] Step S24: Based on F i to F j The target running time and actual running time corresponding to each signal are determined by F i to F j The time delay between each signal is based on F j to F i The target running time and actual running time corresponding to each signal are determined by F j to F i The time delay between each signal.
[0038] Step S25: Determine F based on the time delay corresponding to each signal. i to F j The cable time-division multiplexing weight value a between ij and F j to F i The cable time-division multiplexing weight value a between ji .
[0039] Among them, the time delay is positively correlated with the size of the cable time-division multiplexing weight value.
[0040] As an embodiment, step S25 includes:
[0041] Step S251: F i to F j The maximum time delay between i to F j The cable time-division multiplexing weight parameter G ij , F j to F iThe maximum time delay between j to F i The cable time-division multiplexing weight parameter G ji .
[0042] It is understandable that in step S251, the time delay corresponding to the worst timing is determined as F j to F i The cable time-division multiplexing weight parameter G ji , which is suitable for application scenarios that pay more attention to the worst-case timing.
[0043] Step S252: All G ij and G ji Perform normalization to generate the corresponding a ij and a ji .
[0044] As another embodiment, step S25 includes:
[0045] Step C251, F i to F j The mean of all time delays between i to F j The cable time-division multiplexing weight parameter G ij , F j to F i The mean of all time delays between j to F i The cable time-division multiplexing weight parameter G ji .
[0046] It should be noted that step C251 focuses more on the overall delay and is suitable for application scenarios that focus on the overall delay.
[0047] Step C252: All G ij and G ji Perform normalization to generate the corresponding a ij and a ji .
[0048] It should be noted that step S252 and step C252 are to further improve the acquisition of target x1, x2…, x K Accuracy, all G ij and G ji Perform normalization and transform all a ij and a ji Controlled in the range of 0 to 1.
[0049] Each pair of F in step S4 i and F jThe default number of assembled cables between the corresponding X k As input, the initial value of It is set as a constraint condition, and an existing solver can be used to solve f(x) so that the value of f(x) is minimized, thereby making the cable time-division multiplexing rate in the FPGA system the highest and the system performance the best. Specifically, a preset linear solver or conjugate gradient algorithm solver can be used to execute step S4, and a numerical approximation algorithm can also be used to execute step S4. The specific algorithm will not be described in detail here. It should be noted that the adjustment principle is that if the cable resources between the current FPGA pair are more than the ideal resources, the cables between them are reduced. If the cable resources between the current FPGA pair are less than the ideal resources, the idle or reduced cables are used to increase them. In addition to the above-mentioned solver, an embodiment of the present invention also proposes a specific solution method for implementing step S4. As an embodiment, step S4 includes:
[0050] Step S41: Construct an equivalent function G of f(x):
[0051]
[0052] Wherein, λ is the first intermediate parameter, S is the second intermediate parameter, and S≤NQ / 2.
[0053] Step S42: Take partial derivative of the equivalent function G to obtain x1, x2…, x K and an expression for λ.
[0054] Wherein, the step S42 specifically includes:
[0055]
[0056] Step S43: According to x1, x2…, x K And the expression of λ determines the target x1,x2…,x K .
[0057] Wherein, the step S43 includes:
[0058] Step S431: According to x1, x2…, x K And the expression of λ determines x k The calculation expression is:
[0059]
[0060] Step S432: Substitute S=N*Q / 2 into x k The calculation expression generates the target x1, x2…, x K .
[0061] It should be noted that in order to utilize as many cables as possible, it is preferred that S=N*Q / 2.
[0062] The method described in the embodiment of the present invention can realize the reasonable assembly of cable connections in the FPGA system based on the chip design to be verified, thereby improving the operating efficiency of the FPGA system and further improving the verification efficiency of the chip design to be verified.
[0063] It should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the steps as sequential processes, many of the steps can be performed in parallel, concurrently, or simultaneously. In addition, the order of the steps can be rearranged. A process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. A process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0064] 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 method described in the embodiment of the present invention.
[0065] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer instructions are used to execute the method described in the embodiment of the present invention.
[0066] The above description is merely a preferred embodiment of the present invention and does not constitute any form of limitation to the present invention. Although the present invention has been disclosed as a preferred embodiment, it is not intended to limit the present invention. Any technician familiar with the present profession can make slight changes or modifications to equivalent embodiments using the technical contents disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modifications, equivalent changes and modifications 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 are still within the scope of the technical solution of the present invention.
Claims
1. An automatic assembly method for cable connection in an FPGA system, It is characterized in that The FPGA system includes K FPGA pairs (F i ,F j ), F i is the i-th FPGA in the FPGA system, F j is the jth FPGA in the FPGA system, the value range of i and j is 1 to N, N is the total number of FPGAs in the FPGA system, and i≠j; The method comprises: Step S1: Set the chip design to be verified in the FPGA system and obtain F i to F j Number of signals between ij and F j to F i Number of signals between ji ; Step S2: Run the chip design to be verified in the FPGA system to obtain F i to F j The cable time-division multiplexing weight value a ij and F j to F i The cable time-division multiplexing weight value a ji ; Step S3: Based on all (F i ,F j ), A ij , A ji 、a ij and a ji Determine the objective function f(x): Among them, M k For the kth pair (F i ,F j ) The corresponding cable time-division multiplexing parameters, x k For the kth pair (F i ,F j ) corresponds to the number of assembled cables C ij k , the value range of k is 1 to K, K is the total number of FPGA pairs with interconnected relationship in the FPGA system,, For the kth pair (F i ,F j ) corresponds to the cable time division multiplexing rate, M k =a ij k *A ij k +a ji k *A ji k , a ij k For the kth pair (F i ,F j ) corresponds to a ij , A ij k For the kth pair (F i ,F j ) corresponds to A ij , a ji k For the kth pair (F i ,F j ) corresponds to a ji , A ji k For the kth pair (F i ,F j ) corresponds to A ji ; Step S4: each pair of F i and F j The default number of assembled cables between the corresponding X k The initial value of Set as constraint condition, Q is the preset maximum number of cables for each FPGA, solve f(x) and obtain the target x 1 ,x 2 …,x K , so that f(x) takes the minimum value.
2. The method according to claim 1, It is characterized in that The step S2 comprises: Step S21, setting the chip design to be verified in the FPGA system; Step S22: Based on F i to F j The clock frequency corresponding to each signal between the two is obtained by i to F j The target running time corresponding to each signal between j to F i The clock frequency corresponding to each signal between the two is obtained by j to F i The target running time corresponding to each signal; Step S23: Run the chip design to be verified in the FPGA system to obtain F i to F j The actual running time of each signal between j to F i The actual running time corresponding to each signal; Step S24: Based on F i to F j The target running time and actual running time corresponding to each signal are determined by F i to F j The time delay between each signal is based on F j to F i The target running time and actual running time corresponding to each signal are determined by F j to F i The time delay corresponding to each signal between them; Step S25: Determine F based on the time delay corresponding to each signal i to F j The cable time-division multiplexing weight value a ij and F j to F i The cable time-division multiplexing weight value a ji .
3. The method according to claim 2, It is characterized in that The step S25 comprises: Step S251: F i to F j The maximum time delay between i to F j The cable time-division multiplexing weight parameter G ij , F j to F i The maximum time delay between j to F i The cable time-division multiplexing weight parameter G ji ; Step S252: All G ij and G ji Perform normalization to generate the corresponding a ij and a ji .
4. The method according to claim 2, It is characterized in that The step S25 comprises: Step C251: F i to F j The mean of all time delays between i to F j The cable time-division multiplexing weight parameter G ij , F j to F i The mean of all time delays between j to F i The cable time-division multiplexing weight parameter G ji ; Step C252: All G ij and G ji Perform normalization to generate the corresponding a ij and a ji .
5. The method according to claim 1, It is characterized in that Step S4 includes: Step S41, construct an equivalent function G of f(x): Wherein, λ is the first intermediate parameter, S is the second intermediate parameter, S≤NQ / 2; Step S42: Take the partial derivative of the equivalent function G to obtain x 1 ,x 2 …,x K And the expression for λ: Step S43: According to x 1 ,x 2 …,x K and the expression of λ determines the target x 1 ,x 2 …,x K .
6. The method according to claim 5, It is characterized in that The step S42 specifically includes:
7. The method according to claim 6, It is characterized in that The step S43 comprises: Step S431: According to x 1 ,x 2 …,x K And the expression of λ determines x k The calculation expression is: Step S432: Substitute S=N*Q / 2 into x k The calculation expression of the target x is generated 1 ,x 2 …,x K .
8. An electronic device, It is 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, It is 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.
