A FPGA Packing Method Based on Instance Logic Associativity

Through the method based on instance logical correlation, the problem of poor boxing effect in the existing FPGA boxing method is solved, and the rational grouping and unified boxing of logically related instances is realized, which improves the efficiency of the design process and the overall design quality.

CN115719048BActive Publication Date: 2024-11-12WUXI ESIONTECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211524243.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-01
Publication Date
2024-11-12
Estimated Expiration
2042-12-01

AI Technical Summary

Technical Problem

The existing FPGA boxing method depends on the large correlation between the connectivity between instances during the boxing stage, resulting in poor boxing effect, affecting the subsequent layout and wiring efficiency and the entire design process cycle.

Method used

Using a boxing method based on instance logical association, by determining the logical associated instance group in the same data path, uniformly boxing it as a unit, and randomly allocating instances to the box when the resource constraints are met, ensuring logic The associated instance is in the same box, and the packing results are optimized.

Benefits of technology

Improve the packing effect, enable logically associated instances to form a reasonable data flow, optimize the efficiency of subsequent design processes, and shorten the entire design cycle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115719048B_ABST
    Figure CN115719048B_ABST
Patent Text Reader

Abstract

The present application discloses an FPGA packing method based on instance logical association, which relates to the field of FPGA. The method groups the instances to be packed according to their logical association, and uniformly packs the instances to be packed that are located in the same data path and have logical association, so as to be concentrated in the same box as much as possible. The boxes formed by the various logically associated instances to be packed can be consistent with the data flow direction of the data path, so as to achieve the most effective and optimal arrangement, thereby optimizing the packing results, and then improving the efficiency of the subsequent design process and shortening the entire design process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of FPGA, and in particular to an FPGA packing method based on instance logic association. Background Art

[0002] The design process of FPGA (Field Programmable Gate Array) mainly includes multiple steps such as synthesis, binning, layout, routing, and bitstream generation. In the binning stage, the instances in the synthesized netlist are divided into multiple bins according to the hardware resources of the FPGA, so that each bin can correspond to a hardware resource unit inside the FPGA, such as a Slice unit, and at the same time, the resource constraints must be met to ensure that the logic of this bin can be implemented within the hardware resource unit on this chip. Then, in the layout stage, each bin is mapped to a resource unit at a specific location inside the FPGA, and constraints and specific goals are met, such as timing and routing pass rate.

[0003] At present, the practice of the binning stage is usually as follows: first, seed instances are selected from the instances in the netlist, and each seed instance forms a bin. Then, according to the connectivity correlation between the instances, the instances in the netlist that are not placed in the bin and have the largest connectivity correlation with the instances already in this bin are added to this bin. This process is repeated until the resources in this bin are occupied by the instances in the bin or the specific constraints are no longer satisfied and no more instances can be added. Then the next selected seed instance is processed until all instances in the netlist are packed into the bin. In this process, the connectivity correlation between instances with connection relationships is large, while the connectivity correlation between directly connected instances is the largest. The binning principle is relatively simple, and often cannot achieve a good binning effect, which in turn affects the effect of subsequent layout and routing, and affects the cycle and efficiency of the entire FPGA design process. Summary of the invention

[0004] In view of the above problems and technical requirements, the applicant proposes an FPGA packing method based on instance logic association. The technical solution of this application is as follows:

[0005] An FPGA packing method based on instance logic association, the method comprising:

[0006] Determine the to-be-boxed instances belonging to the same associated instance group in the to-be-boxed logic netlist, the to-be-boxed instances are instances in the logic netlist that have not been boxed into any box, and multiple to-be-boxed instances belonging to the same associated instance group are located in the same data path and have logical association;

[0007] All instances to be packed in an associated instance group are packed uniformly.

[0008] A further technical solution is that there is no connection relationship between multiple to-be-packed instances belonging to the same associated instance group.

[0009] A further technical solution is that a method for determining instances to be packaged that belong to the same associated instance group in a logic netlist to be packaged includes:

[0010] Multiple instances to be packaged that belong to the same associated instance group are determined according to the instance names of all the instances to be packaged.

[0011] A further technical solution is to determine multiple instances to be packed that belong to the same associated instance group according to the instance names of all instances to be packed, including:

[0012] Parse the instance name of each to-be-packed instance and identify the predetermined separator contained in the instance name, the portion of the instance name before the predetermined separator is the name type, and the portion of the instance name after the predetermined separator is the name suffix;

[0013] It is determined that the name types of multiple to-be-packed instances belonging to the same associated instance group are the same, and the name types of any two to-be-packed instances belonging to different associated instance groups are different.

[0014] A further technical solution is that a method for determining multiple to-be-packed instances belonging to the same associated instance group includes:

[0015] Multiple instances to be packed that have the same name type and a name suffix that is a pure numeric string are assigned to the same associated instance group.

[0016] A further technical solution is that a method for determining multiple instances to be packed belonging to the same associated instance group according to the instance names of the instances to be packed includes:

[0017] According to the instance name of the to-be-packed instance whose instance type belongs to the register, multiple to-be-packed instances belonging to the same associated instance group are determined.

[0018] A further technical solution is that a method for uniformly packing all instances to be packed in an associated instance group includes:

[0019] When the packing resources in a box meet the resource requirements of all the instances to be packed in the associated instance group, all the instances to be packed in the associated instance group are packed in the same box. One associated instance group occupies one box.

[0020] When the resource requirements of all instances to be packed in an associated instance group exceed the packing resources in one box, some instances to be packed in the associated instance group are randomly selected and packed into one box, and some instances to be packed in the remaining instances are randomly selected and packed into another box, while satisfying the constraint of the packing resources in one box, until all instances to be packed in the associated instance group are packed into the corresponding boxes. One associated instance group occupies multiple boxes.

[0021] A further technical solution is that an associated instance group includes multiple sub-instance groups, each sub-instance group corresponds to a register type, different sub-instance groups correspond to different register types, and each sub-instance group includes one or more to-be-packed instances belonging to the corresponding register type in the associated instance group;

[0022] The method for uniformly packing all instances to be packed in the associated instance group includes for each sub-instance group:

[0023] When the packing resources in a box meet the resource requirements of all the instances to be packed in the sub-instance group, all the instances to be packed in the sub-instance group are packed into the same box, and the sub-instance group occupies one box;

[0024] When the resource requirements of all instances to be packed in a sub-instance group exceed the packing resources in one box, some instances to be packed in the sub-instance group are randomly selected to be packed in one box, and some instances to be packed in the remaining instances are randomly selected to be packed in another box, until all instances to be packed in the sub-instance group are packed in the corresponding boxes, and the sub-instance group occupies multiple boxes;

[0025] Instances to be boxed in different sub-instance groups occupy different boxes.

[0026] A further technical solution is that the to-be-boxed instances in different associated instance groups are respectively boxed into different boxes.

[0027] Its further technical solution is that the method further comprises:

[0028] The to-be-packed instances whose instance names do not contain a predetermined separator, or whose instance names contain a predetermined separator but whose name suffix is ​​not a pure numeric string, are regarded as independent to-be-packed instances. The independent to-be-packed instances are to-be-packed instances that do not belong to any associated instance group in the to-be-packed logic netlist.

[0029] After all associated instance groups are packed, the remaining independent instances to be packed in the logic netlist are packed in order of connectivity association from large to small. When there are at least two identical connectivity associations, the independent instances to be packed with higher criticality are packed first according to timing criticality.

[0030] Its further technical solution is that the method further comprises:

[0031] After all the to-be-packed instances in the to-be-packed logic netlist are packed and the packing results are obtained, when the total resource requirements of all the packing results exceed the total hardware resources provided by the FPGA, the unfilled boxes are merged, and there is at least one unfilled box containing the to-be-packed instances belonging to the associated instance group and is merged with the unfilled box containing the independent to-be-packed instances.

[0032] The beneficial technical effects of this application are:

[0033] The present application discloses an FPGA packing method based on instance logical association, which groups the instances to be packed according to their logical association, and uniformly packs the instances to be packed that are located in the same data path and have logical association, so as to be concentrated in the same box as much as possible, so that the boxes formed by the various logically associated instances to be packed can be consistent with the data flow direction of the data path, thereby achieving the most effective and optimal arrangement, thereby optimizing the packing results, and then improving the efficiency of the subsequent design process and shortening the entire design process. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a method flow chart of an FPGA packaging method according to an embodiment of the present application.

[0035] Figure 2 It is a logical schematic diagram of assigning the to-be-packed instance to the corresponding associated instance group or to an independent to-be-packed instance in one embodiment of the present application. DETAILED DESCRIPTION

[0036] The specific implementation of the present application is further described below in conjunction with the accompanying drawings.

[0037] This application discloses an FPGA packing method based on instance logic association, please refer to Figure 1 The method comprises the following steps:

[0038] Step S1, obtaining a logic netlist to be boxed, wherein the obtained logic netlist to be boxed includes a plurality of instances to be boxed, and the instances to be boxed are instances in the logic netlist that have not yet been boxed into any box.

[0039] In this application, the logic netlist to be boxed is the logic netlist corresponding to the user design after synthesis processing and boxing preprocessing. Synthesis processing is an operation performed in the synthesis stage, which is not introduced in detail in this application. The synthesized logic netlist is passed to the boxing stage. In order to facilitate the consistency of the boxing code processing, the synthesized logic netlist is generally first boxed preprocessed, including the following types of boxing preprocessing:

[0040] (1) Perform logical equivalent replacement on some instances in the synthesized logic netlist. Common cases include the following: Perform logical equivalent replacement on the MUX unit in the synthesized logic netlist with a lookup table LUT. Perform logical equivalent replacement on the carry chains in various forms in the synthesized logic netlist with MUX and XOR. According to the on-chip hardware resource unit of the FPGA, there are IOB resources and BUFG resources on the input port. Therefore, the instance BUFGP in the synthesized logic netlist is replaced with the instance IBUFG and the instance BUFG. The instance IBUFG corresponds to the IOB resource of the FPGA, and the instance BUFG corresponds to the BUFG resource of the FPGA.

[0041] (2) Perform logic optimization on the wire nets in the synthesized logic netlist. Common cases include: perform logic optimization on the redundant wire nets at the input of the lookup table LUT in the synthesized logic netlist. Also, perform a series of connection relationship preprocessing on other macro modules in the synthesized logic netlist. Common macro modules include clock modules, IOB modules, BRAM modules, and DSP modules.

[0042] After the binning preprocessing operation is performed on the synthesized logic netlist to obtain the initial binning netlist in the binning stage, the binning process can be started. The purpose of binning is to pack all the instances in the initial binning netlist into their corresponding boxes. The resources and connection specifications of the boxes must meet the requirements of the basic hardware units on the FPGA chip. For example, it is common to correspond each box to the basic hardware unit SLICEL on the FPGA chip. A SLICEL consists of LUT (lookup table), MUX (multiplexer), CARRY4 (carry chain) and FF (register memory), where MUX corresponds to MUXF7 instance and MUXF8 instance in the initial binning netlist. CARRY4 is used to implement addition and subtraction operations. There are two forms of expression in the initial binning netlist, one is the instance of CARRY4, and the other is the corresponding 4 pairs of MUXCY instances and XORCY (exclusive OR gate) instances, corresponding to the register instance and latch instance in the initial binning netlist.

[0043] When packing the instances in the initial packing netlist, some instances are special and generally need to be packed first, including the following categories:

[0044] (1) Special instances with specific user constraints. If the user specifies user constraints for some special instances, these special instances are packed first, with the instances with user constraints as the processing objects, and the resources inside the on-chip hardware resources are packed according to the type and connection relationship of the objects.

[0045] (2) Macro modules: The macro modules in the initial binning netlist are classified and mapped into bins according to their characteristics.

[0046] (3) Other special instances, such as some instances with special connections and special positions. Common other special instances include MUXF7 instance, MUXF8 instance, MUXCY instance and XORCY instance. These special instances are boxed according to the connection relationship.

[0047] In the boxing method implemented in the present application, these special instances are still boxed preferentially according to the existing method. The boxing method of the present application is mainly aimed at other instances except these special instances. Therefore, further, the logic netlist to be boxed obtained in this step is a boxing preprocessing operation on the integrated logic netlist passed into the boxing stage to obtain the initial boxing netlist, and then the boxed logic netlist is completed for the special instances in the initial boxing netlist. At this time, the logic implementation and expression of the logic netlist to be boxed are composed of complex connections of LUT (lookup table) and FF (register). Therefore, the instance type of the instance to be boxed in the logic netlist to be boxed is a lookup table LUT or a register FF. The connection relationship between these instances to be boxed is also ever-changing, and there is no fixed rule to follow. The quality of the boxing result is largely related to the boxing method of LUT and FF.

[0048] Step S2, determining the to-be-packed instances in the to-be-packed logic netlist that belong to the same associated instance group.

[0049] Multiple to-be-packed instances belonging to the same associated instance group are located in the same data path and have logical association. However, multiple to-be-packed instances belonging to the same associated instance group often do not have a connection relationship or the connectivity association is not strong. Multiple to-be-packed instances located in the same data path, such as instances corresponding to signals on the same group of bus signals, such as instances corresponding to Q[7] and Q[6] in bus signal Q[7:0], have logical association.

[0050] Each associated instance group contains at least two instances to be packaged. All instances to be packaged in the logic netlist to be packaged can be assigned to one or more associated instance groups. Each instance to be packaged belongs to a corresponding associated instance group. In addition to the instances to be packaged that belong to their respective associated instance groups, the logic netlist to be packaged often also includes several independent instances to be packaged. Independent instances to be packaged refer to instances to be packaged that do not belong to any associated instance group in the logic netlist to be packaged.

[0051] The method for determining the instances to be packed that belong to the same associated instance group is: traverse all the instances to be packed in the logic netlist to be packed, and parse the instance name of each instance to be packed, and then determine the multiple instances to be packed that belong to the same associated instance group according to the instance names of all the instances to be packed. As mentioned above, the instance types of the instances to be packed in the logic netlist to be packed in the present application include two types: lookup table and register. When determining the instances to be packed that belong to the same associated instance group, this step traverses the instances to be packed whose instance type belongs to the register, and parses the instance names of each instance to be packed whose instance type belongs to the register, and then determines the multiple instances to be packed that belong to the same associated instance group. Therefore, it is determined that the instance types of the instances to be packed in each associated instance group all belong to the register.

[0052] Methods for dividing associated instance groups according to the instance names of the instances to be packaged include: Figure 2 :

[0053] (1) Parse the instance name of each to-be-packed instance and identify the predetermined separator contained in the instance name. The portion of the instance name before the predetermined separator is the name type, and the portion of the instance name after the predetermined separator is the name suffix.

[0054] The instance names of multiple instances to be boxed in the same data path have a specific format, including three parts: name type, predetermined separator and name suffix. The name types of multiple instances to be boxed in the same data path are the same. For example, the instance names of the instances corresponding to Q[7], Q[6]...Q[0] in the bus signal Q[7:0] are Q_7, Q_6...Q0 respectively.

[0055] For any traversed to-be-packed instance, when the instance name of the to-be-packed instance is parsed and it is determined that the instance name does not contain a predetermined separator, it can be directly determined that the to-be-packed instance is an independent to-be-packed instance.

[0056] (2) After parsing the instance names of all the instances to be packed, classify them according to their name types. Therefore, the name types of multiple instances to be packed belonging to the same associated instance group are determined to be the same, and the name types of any two instances to be packed belonging to different associated instance groups are different.

[0057] In addition to the same name type, multiple instances to be packed in the same data path also have a feature of having a name suffix, which is a pure numeric string. Therefore, in addition to ensuring that the name types of multiple instances to be packed belonging to the same associated instance group are the same, it is also necessary to ensure that the name suffixes of the instances to be packed in each associated instance group are pure numeric strings. After parsing the instance names, multiple instances to be packed with the same name type and a pure numeric string suffix are assigned to the same associated instance group.

[0058] For any instance to be packed, when the instance name of the instance to be packed contains a predetermined separator but the name suffix is ​​not a pure numeric string, the instance to be packed can also be directly regarded as an independent instance to be packed.

[0059] Step S3, one or more associated instance groups can be determined through step S2, and then all the instances to be boxed in the associated instance group are uniformly boxed with one associated instance group as a unit, and all the instances to be boxed in the same associated instance group are boxed into the same or multiple boxes as much as possible. When boxing is performed based on connectivity association according to the conventional boxing method, these instances to be boxed that are located in the same data path and have logical associations are often not boxed in the same box, but these instances to be boxed belong to the same data flow. When they are boxed in the same box, the boxes formed by the related instances can be consistent with the data flow direction, so as to achieve the most effective and optimized arrangement.

[0060] In specific applications, the same register may be implemented in different ways, and the register types of the to-be-boxed instances of the final synthesized instance type may also be different. The register types of the to-be-boxed instances loaded into the same box must also be consistent. Common register types include FD, FDRE, FDCE, etc.

[0061] Then in an example, when the register types of all the instances to be boxed in an associated instance group are the same, the method for uniformly boxing the instances to be boxed in the associated instance group includes: when the boxing resources in a box meet the resource requirements of all the instances to be boxed in the associated instance group, all the instances to be boxed in the associated instance group are boxed in the same box, and the associated instance group occupies one box. When the resource requirements of all the instances to be boxed in the associated instance group exceed the boxing resources in one box, some of the instances to be boxed in the associated instance group are randomly selected to be boxed in one box under the constraint of satisfying the boxing resources in one box, and some of the instances to be boxed in the remaining instances to be boxed are randomly selected to be boxed in another box, until all the instances to be boxed in the associated instance group are boxed in the corresponding boxes, and one associated instance group occupies multiple boxes.

[0062] In the above packing process, the packing resources within a box also need to be satisfied. This part is similar to the packing constraints that need to be satisfied by the conventional packing algorithm, and this application will not describe it in detail. For example, in actual applications, four instances to be packed are usually grouped into one box, so that a box will not be overfilled and reduce the flexibility of the subsequent layout and the efficiency and feasibility of the wiring. When an associated instance group contains no more than four instances to be packed, they are all packed into one box. When an associated instance group contains no more than eight instances to be packed, four of the instances to be packed are packed into one box, and the remaining instances to be packed are packed into another box, and so on.

[0063] In the above packing process, some instances to be packed are randomly selected from the associated instance group and packed into one box. This is because when designing an application, multiple instances to be packed in the same data path may perform different logical operations separately, or may be used in a predetermined order. Therefore, the application of multiple instances to be packed in the same associated instance group is unpredictable. There is no way to select specific instances to be packed and pack them into one box according to the application situation. In order to adapt to various designs, random packing is more effective.

[0064] After the instances to be packed in an associated instance group are uniformly packed, the last box to be packed may be fully packed or not fully packed. For example, taking the example of packing 4 instances to be packed into one box, in one example, the register types of the 8 instances to be packed Q_7, Q_6...Q_0 corresponding to the bus signal Q[7:0] and belonging to the same associated instance group are all FD, then the associated instance group is packed into two boxes and both boxes are filled. In another example, the register types of the 6 instances to be packed P_7, P_6...P_0 corresponding to the bus signal P[5:0] and belonging to the same associated instance group are all FDRE, then 4 instances to be packed are randomly selected from them, and after filling one box, only 2 instances to be packed are packed in the second box and it is not full. Even if it is not full, the box that has been filled with the instances to be packed in the associated instance group will no longer be filled with the instances to be packed in other associated instance groups, and the instances to be packed in other associated instance groups will be packed into the new box. Then, the to-be-packed instances in different associated instance groups are packed into different boxes respectively, and the to-be-packed instances in multiple associated instance groups will not be packed into the same box, so as to avoid poor results on the timing.

[0065] In another example, an associated instance group includes multiple sub-instance groups, each sub-instance group corresponds to a register type, different sub-instance groups correspond to different register types, and each sub-instance group includes one or more to-be-boxed instances belonging to the corresponding register type in the associated instance group. When all to-be-boxed instances in the associated instance group are uniformly boxed, each sub-instance group included in the associated instance group is boxed separately, and the to-be-boxed instances in different sub-instance groups occupy different boxes. The boxing method for each sub-instance group includes: when the boxing resources in a box meet the resource requirements of all to-be-boxed instances in the sub-instance group, all to-be-boxed instances in the sub-instance group are boxed in the same box, and the sub-instance group occupies one box. When the resource requirements of all instances to be packed in a sub-instance group exceed the packing resources in one box, some instances to be packed are randomly selected from the sub-instance group and packed into one box, and some instances to be packed are randomly selected from the remaining instances to be packed and packed into another box, until all instances to be packed in the sub-instance group are packed into the corresponding boxes, and the sub-instance group occupies multiple boxes.

[0066] For example, in one example, the eight to-be-boxed instances Q_7, Q_6, ... Q_0 corresponding to the bus signal Q[7:0] and belonging to the same associated instance group constitute three sub-instance groups: the register types of the to-be-boxed instances Q_7, Q_6, Q_3, Q_2, and Q_1 included in sub-instance group 1 are all FDRE, the register types of the to-be-boxed instances Q_5 and Q_4 included in sub-instance group 2 are all FDCE, and the register type of the to-be-boxed instance Q_0 included in sub-instance group 3 is FD. When boxing sub-instance group 1, 4 to-be-boxed instances are randomly selected from sub-instance group 1 and loaded into box 1, and the remaining one to-be-boxed instance is loaded into box 2. When boxing sub-instance group 2, all two to-be-boxed instances in sub-instance group 2 are loaded into box 3. When boxing sub-instance group 3, all one to-be-boxed instance in sub-instance group 3 is loaded into box 4.

[0067] After all associated instance groups are packed, the remaining independent instances to be packed in the logic netlist are packed in order of connectivity association from large to small. That is, according to the conventional packing method, a seed instance is selected and packed into a new box, and then the remaining independent instances to be packed are packed in order of connectivity association from large to small with the independent instances to be packed in the box, until the packing resources in one box are reached. On this basis, when there are at least two independent instances to be packed that have the same connectivity association as the independent instances to be packed in the box, the independent instances to be packed with higher criticality are packed first according to the timing criticality. Until all independent instances to be packed are packed.

[0068] After the packing of all associated instance groups and all independent instances to be packed is completed to obtain the packing results. In one embodiment, the total resource requirements of all packing results do not exceed the total hardware resources provided by the FPGA, then the packing is completed directly and the final packing result is obtained. At this time, as mentioned above, some boxes may contain instances to be packed in a certain associated instance group but are not full, and some boxes may contain independent instances to be packed but are not full. In another embodiment, when the total resource requirements of all packing results exceed the total hardware resources provided by the FPGA, it is necessary to merge the unfilled boxes. As mentioned above, considering the timing, the packing results of multiple associated instance groups are generally not merged. In general, the packing results of a certain associated instance group are merged with the packing results of the independent instances to be packed, resulting in at least one box containing instances to be packed belonging to the associated instance group and not full being merged with the box containing independent instances to be packed and not full.

Claims

1. An FPGA packing method based on instance logic association, characterized in that: The method comprises: Determine the to-be-boxed instances belonging to the same associated instance group in the to-be-boxed logic netlist, the to-be-boxed instances are instances in the logic netlist that have not been boxed into any box, and multiple to-be-boxed instances belonging to the same associated instance group are located in the same data path and have logical association; Taking an associated instance group as a unit, all instances to be packed in the associated instance group are packed uniformly; The method for determining the to-be-packed instances belonging to the same associated instance group in the to-be-packed logic netlist includes: parsing the instance names of each to-be-packed instance whose instance type belongs to a register and identifying a predetermined separator contained in the instance name, the part of the instance name located before the predetermined separator is the name type, the part of the instance name located after the predetermined separator is the name suffix, and multiple to-be-packed instances with the same name type and a name suffix that is a pure numeric string are assigned to the same associated instance group, and it is determined that the name types of multiple to-be-packed instances belonging to the same associated instance group are the same, and the name types of any two to-be-packed instances belonging to different associated instance groups are different.

2. The method according to claim 1, characterized in that There is no connection relationship between multiple to-be-packed instances belonging to the same associated instance group.

3. The method according to claim 1, characterized in that If the register types of all the to-be-packed instances in an associated instance group are the same, then a method for uniformly packing all the to-be-packed instances in the associated instance group includes: When the packing resources in one box meet the resource requirements of all the to-be-packed instances in the associated instance group, all the to-be-packed instances in the associated instance group are packed into the same box, and one associated instance group occupies one box; When the resource requirements of all instances to be packed in the associated instance group exceed the packing resources in one box, some instances to be packed in the associated instance group are randomly selected and packed into one box, and some instances to be packed in the remaining instances are randomly selected and packed into another box under the constraint of satisfying the packing resources in one box, until all instances to be packed in the associated instance group are packed into the corresponding boxes. One associated instance group occupies multiple boxes.

4. The method according to claim 1, characterized in that: An associated instance group includes multiple sub-instance groups, each sub-instance group corresponds to a register type, different sub-instance groups correspond to different register types, and each sub-instance group includes one or more to-be-packed instances belonging to the corresponding register type in the associated instance group; The method for uniformly packing all the to-be-packed instances in the associated instance group comprises for each sub-instance group: When the packing resources in one box meet the resource requirements of all the instances to be packed in the sub-instance group, all the instances to be packed in the sub-instance group are packed into the same box, and the sub-instance group occupies one box; When the resource requirements of all the instances to be packed in the sub-instance group exceed the packing resources in one box, some of the instances to be packed in the sub-instance group are randomly selected to be packed in one box, and some of the remaining instances to be packed are randomly selected to be packed in another box, until all the instances to be packed in the sub-instance group are packed in the corresponding boxes, and the sub-instance group occupies multiple boxes; Instances to be boxed in different sub-instance groups occupy different boxes.

5. The method according to claim 1, characterized in that The to-be-packed instances in different associated instance groups are packed into different boxes respectively.

6. The method according to claim 1, characterized in that The method further comprises: The to-be-packed instances whose instance names do not contain a predetermined separator, or whose instance names contain a predetermined separator but whose name suffix is ​​not a pure numeric string, are regarded as independent to-be-packed instances, wherein the independent to-be-packed instances are to-be-packed instances that do not belong to any associated instance group in the to-be-packed logic netlist; After all associated instance groups are boxed, the remaining independent instances to be boxed in the logic netlist are boxed in order of connectivity association from large to small. When there are at least two identical connectivity associations, the independent instances to be boxed with higher criticality are boxed first according to timing criticality.

7. The method according to claim 6, characterized in that The method further comprises: After completing the binning of all the instances to be binned in the logic netlist to be binned and obtaining the binning results, when the total resource requirements of all the binning results exceed the total hardware resources provided by the FPGA, the unfilled bins are merged, and there is at least one unfilled bin containing instances to be binned belonging to an associated instance group and is merged with a unfilled bin containing independent instances to be binned.