A FPGA routing resource graph compression method and global routing module

By compressing the wiring resource diagram of the FPGA chip multi-layer diagram structure and converting the coordinate system, a single-layer two-dimensional diagram structure is formed, which solves the problem of long-term evaluation of the wiring resource diagram of the FPGA chip, and achieves fast and accurate congestion evaluation and layout optimization.

CN114065694BActive Publication Date: 2024-11-19SHANGHAI FUDAN MICROELECTRONICS GROUP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010767908.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-03
Publication Date
2024-11-19
Estimated Expiration
2040-08-03

AI Technical Summary

Technical Problem

In the design of FPGA chips, the evaluation and optimization process of wiring resource diagrams takes a long time, resulting in the inability to call the layout and wiring devices frequently, affecting the circuit performance and manufacturing output, and it is difficult for the existing technology to accurately and quickly evaluate the congestion, resulting in serious problems during the layout process. problem of crowding.

Method used

By creating a multi-layer graph data structure, using equivalence and driving properties to compress the connecting nodes, convert the coordinate system, and form a single-layer two-dimensional graph structure to realize global routing and reduce the size and evaluation time of wiring resource graphs.

Benefits of technology

The scale of the wiring resource map is reduced, the accuracy and speed of congestion evaluation is improved, the congestion evaluation and cabling operation time during the layout process are optimized, and the problem of scale effect in FPGA physical implementation is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114065694B_ABST
    Figure CN114065694B_ABST
Patent Text Reader

Abstract

The present invention discloses a FPGA wiring resource graph compression method, which compresses the initial multi-layer graph DevGraph obtained by mapping for multiple times, passes through EquGraph, FanoutGraph, RouGraph graph data structures in sequence, until the single-layer two-dimensional graph structure OneLayerGraph, and finally compresses the initial multi-layer graph to obtain a single-layer two-dimensional graph structure, and then performs global wiring on the single-layer two-dimensional graph structure through a global wiring algorithm. The present invention reduces the problem scale, accelerates the congestion evaluation and ensures the accuracy of the congestion evaluation by compressing the wiring resource graph.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of FPGA chips, and in particular to a method for compressing an FPGA wiring resource graph. Background Art

[0002] FPGA (Field Programmable Gate Array) chips are designed with a regular array (Tile) structure. There are two main types of tiles: one is the Logic type tile used to place inst (units), and the other is the Interconnect type tile used to connect Logic units.

[0003] Except for some special functional requirements (GTX, XADC, etc.) on the FPGA chip, the tile types of each column on the chip (INTER, IOB, LB, DSP, RAM, etc.) are the same, and in order to enrich the wiring resources, the Logic type tile and the Inter type tile appear in pairs, which facilitates the smooth wiring of the signal lines of the logic unit. Each type of tile contains many segments (line segments, used to describe the electrical connection relationship between arrays) for the configuration of the wire network connection between devices. In addition, each type of tile (array) also contains some type-related configuration switches, such as the Inter type tile mainly contains the switch (Switch Box) for the conversion between Path and Path, the LB type tile contains the configuration of logic resources such as the lookup table (LUT), trigger (FF), etc., the IOB type tile contains the configuration of the voltage level supply associated with the device and the outside world, and the RAM type tile contains the configuration of the storage unit, etc.

[0004] like Figure 1 As shown, the FPGA chip array structure and Tile internal logic resources, Figure 1 The left sub-image in the middle shows the distribution of tiles on the FPGA chip. The types of each column are the same, as shown by the two vertical long dashed boxes in the figure. Figure 1 The right sub-image in the middle shows the internal logic of Inter type tiles and Logic type tiles in a magnified manner. Figure 1 The sub-image in the lower right corner shows the logic resources within the Logic type LB sub-type, mainly including 4 6-input LUTs, 4 FFs, some MUX and INV logic resources and their interconnections. Figure 1 The sub-image in the upper right corner is enlarged to show the internal logical connection of Inter. The white lines surrounding the black frame are the topological structure of the segments inside Inter Tile.

[0005] All units inside the FPGA are connected through wiring resources, and the whole can be regarded as a connected graph. The wiring resources of FPGA are very rich, and can be divided into the following four types according to the process, length, width and distribution location: (1) Global wiring resources, used for global clocks and global reset / sets inside the chip; (2) Long-line resources, used to complete the distribution of high-speed signals and second global clock signals between chip banks; (3) Short-line resources, used to complete logical interconnection and wiring between basic logic units; (4) Distributed wiring resources, used for dedicated clock, reset and other control signals. A segment can pass through multiple tiles, and the number of inter tiles passed is defined as the length of the segment. The lengths of common chip segments are mainly X1, X2, X4, X6, X12 and X18, such as Figure 2 shown.

[0006] In addition to these routing resources, there is another concept in FPGA: Programmable Interconnect Point (PIP). PIP is a programmable multiplexer that can connect wires in the same tile together, including other wires that can be reached from this wire. Most PIPs are stored in INT Tiles (i.e. InterTile, Inter type arrays), which are designed to connect to all structural resources, such as CLB, DSP, BRAM, etc. In the routing stage, the FPGA is treated as a graph, the Segment routing resources are regarded as the vertices of the graph, and the connection relationships in the PIP are regarded as the edges of the graph. The routing problem of FPGA is the optimal route problem based on the logic netlist after layout.

[0007] Whether it is an Inter type tile or a Logic type tile, it contains one or more SwitchBoxes (switch matrices) to describe the connection relationship between segments. The connection relationship described in the Inter type SwitchBox is mostly one-to-many, while the connection relationship described in the Logic type SwitchBox is mostly one-to-one. Figure 3The topological connection inside the Inter-type tile shown in the figure includes not only some segments, but also the most important part is the switch between segments. The switch box inside the Inter-type tile describes the topological connection relationship between any segment and other segments (the slash in the figure). Each slash represents an optional PIP (configuration connection), which together with the segment constitutes a winding diagram. The winding resource diagram of the FPGA chip is a directed graph composed of the segments inside all the tiles on the chip connected by PIPs.

[0008] At present, the design process of FPGA mainly includes logic synthesis, technology mapping, packaging, layout, routing, bitstream generation and other stages. In the design process of FPGA, layout is the most complex and time-consuming stage, among which the evaluation of congestion is the most critical optimization target of layout. If the evaluation is inaccurate, it will lead to routing failure. If the evaluation is too slow, it will directly affect the performance of the layout. If the congestion target is not optimized well, it will directly affect the circuit performance, area, reliability, power and manufacturing yield.

[0009] Modern FPGA congestion-based layout faces the following four challenges: (1) FPGA routing resources are fixed, how to accelerate the evaluation of congestion and reduce the running time of the congestion evaluator; (2) How to accurately evaluate congestion and improve the accuracy of congestion target optimization; (3) How to guide layout based on the results of congestion evaluation, reduce the differences between layout and routing targets, accelerate layout convergence, and optimize the quality of the final physical implementation. At present, the industry mainly adopts the congestion-driven layout method based on advance routing. This method will call the global router in advance during the layout process, evaluate the congestion of the current stage of layout, and feed back the congestion data to the layout for the next round of optimization, so that the layout optimization targets (congestion, wire length, delay and power consumption, etc.) are minimized.

[0010] The congestion-based layout in FPGA physical implementation is a very time-consuming part of the entire design. Solving the congestion problem during the layout process is the most basic design rule in the layout and routing process. As the scale of FPGA chips increases, the routing resources also increase proportionally, and the running time of the congestion evaluator based on routing resources also increases exponentially, resulting in a long running time for the global router for each congestion evaluation, which makes it impossible for the layout and router to call the evaluation multiple times. In addition, FPGA is a chip with customized winding resources, and the global routing speed based on the entire routing resource map is very slow. It cannot be called frequently during the layout process, which leads to serious congestion problems in the layout and routing, and even the congestion problem cannot be solved in the end. How to reduce the routing resource map to speed up the running time of the global router, and increase the number of congestion evaluations in the layout, are the first problems to be solved in the optimization of congestion layout. Summary of the invention

[0011] The purpose of the present invention is to provide a FPGA wiring resource graph compression method, which reduces the problem scale, accelerates congestion evaluation and ensures the accuracy of congestion evaluation by compressing the wiring resource graph.

[0012] In order to achieve the above object, the present invention is implemented by the following technical solutions:

[0013] A method for compressing an FPGA wiring resource graph, the method comprising:

[0014] Step 1: A first type of graph data structure is created based on the specified FPGA device information, which is an initial multi-layer graph structure;

[0015] Step 2: Obtain multiple graph data structures at different stages of compression, including:

[0016] A second type of graph data structure obtained by compressing nodes connected to some pins in the FPGA according to the equivalence of the pins;

[0017] A third type of graph data structure is created according to the driving properties of the line segments in the FPGA, wherein the third type of graph data structure is obtained by compressing line segments with the same fan-out number and the same topological structure, wherein the line segments are used to describe the electrical connection relationship between arrays, and the same fan-out number means that the number of output ports of the line segments is the same;

[0018] A fourth type of graph data structure, wherein the forming method comprises: converting a device coordinate system into a wiring resource coordinate system, and compressing a plurality of Gcell data structures in the device coordinate system to form a new Gcell data structure in the wiring resource coordinate system; the Gcell data structure comprises node information of a plurality of arrays in the FPGA; wherein the first type of graph data structure, the second type of graph data structure, the third type of graph data structure and the fourth type of graph data structure are all multi-layer graph structures;

[0019] The fifth type of graph data structure is a single-layer two-dimensional graph structure obtained by compressing multiple layers of Gcell data structures with the same coordinates into a single-layer Gcell data structure;

[0020] Step three: perform global routing on the compressed single-layer two-dimensional graph structure.

[0021] Optionally, the first type of graph data structure created based on the specified FPGA device information is used as the starting stage, the first type of graph data structure is in the starting stage, and the fifth type of graph data structure is in the last stage among the different stages of compression; the second type of graph data structure, the third type of graph data structure and the fourth type of graph data structure are in the middle stage among the different stages of compression, and the order in the middle stage is any arrangement formed by the three.

[0022] Optionally, the initial multi-layer graph structure is a data structure defined according to the FPGA device, which is used to describe all the wiring resource graphs at the bottom layer of the FPGA chip; the original winding resource graph is created based on the information of the line segments and programmable multiplexers in the FPGA device, and the initial multi-layer graph structure is created according to the device coordinate system and the type of the line segment.

[0023] Optionally, the coordinate system of one or more of the second, third, and fifth types of graph data structures is consistent with the coordinate system of the graph data structure input in the previous stage.

[0024] Optionally, the second type of graph data structure is obtained by compressing a layer whose line segment type is kLUTINPUT.

[0025] Optionally, the method for compressing a layer whose line segment type is kLUTINPUT further includes: compressing the nodes of the equivalent input pins of the lookup table in the FPGA, compressing the nodes of the N input signals connected to the lookup table to form a new node, and updating the capacity of the new node; wherein the lookup table includes N input ports and one output port, N>1, the N input signals are respectively transmitted to the N input ports, and the N input signals are equivalent.

[0026] Optionally, the method of compressing line segments with the same fan-out and topological structure further includes: compressing nodes with the same number of output ports and the same starting point and end point in the line segments between Inter-type arrays.

[0027] Optionally, line segments between Inter-type arrays are divided into at least two-terminal line segments and three-terminal line segments according to the number of connection ends.

[0028] Optionally, methods for changing the device coordinate system to the wiring resource coordinate system include the following:

[0029] The device coordinates are converted into Place coordinates by using the first function and the second function, wherein the Place coordinate system is formed by various layout resources;

[0030] When the return values ​​of the first function and the second function are not -1, the third function and the fourth function are directly called to convert the device coordinates into wiring resource coordinates;

[0031] When the return values ​​of the first function and the second function are both -1, the coordinates of the array are obtained according to the information of the device coordinates, and the obtained coordinates of the array are set as the wiring resource coordinates;

[0032] The first function is: transDeviceToPlaceCoordX(int dev_x);

[0033] The second function is: transDeviceToPlaceCoordY(int dev_y);

[0034] The third function is: transDeviceToRouteCoordX(int dev_x);

[0035] The fourth function is: transDeviceToRouteCoordY(int dev_x).

[0036] The present invention also provides a global routing module based on the FPGA routing resource graph compression method as described above, comprising: a mapping submodule, which performs a mapping operation according to the FPGA device type to obtain an initial multi-layer graph structure; a compression submodule, which is used to compress the initial multi-layer graph structure at different stages to finally obtain a single-layer two-dimensional graph structure; and a global routing submodule, which is used to implement global routing on the single-layer two-dimensional graph structure.

[0037] The present invention further provides an electronic device, comprising a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the FPGA wiring resource diagram compression method described above is implemented.

[0038] The present invention further provides a storage medium, wherein a computer program is stored in the storage medium, and when the computer program is executed by a processor, the FPGA wiring resource diagram compression method described above is implemented.

[0039] Compared with the prior art, the beneficial effects of the present invention are as follows: (1) A wiring resource compression framework proposed in the present invention can compress the wiring resource graph according to different characteristics and accuracy requirements, reduce the size of the wiring resource graph, and reduce the scale of the problem; (2) A compression and decompression method proposed in the present invention decomposes a large problem into layers, and then solves small problems of corresponding granularity for each layer to obtain the final solution; (3) The compressed wiring resource graph of the present invention is used to guide the routing, reduce the scale of the congestion evaluation problem, and optimize the global routing running time of the global congestion evaluator; (4) The compressed wiring resource graph of the present invention is used to guide the evaluation of congestion in the layout stage, evaluate the congestion results at a faster speed, and feed back to the layout device for tuning; (5) The compressed wiring resource graph method of the present invention can solve the scale effect of chips in FPGA physical implementation. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is a schematic diagram of the FPGA chip array structure and the internal logic resources of the tile;

[0041] Figure 2 A schematic diagram of the types of FPGA wiring resources;

[0042] Figure 3 This is a schematic diagram of the logical connection of the Switch Box inside Inter Tile;

[0043] Figure 4 It is a flow chart of the construction method of the FPGA of the present invention;

[0044] Figure 5 A software model diagram of the layout module of the present invention;

[0045] Figure 6 A schematic diagram of the implementation process of the global wiring module of the present invention;

[0046] Figure 7 It is an overall schematic diagram of the creation and compression process of the resource graph of the present invention;

[0047] Figure 8 It is a flow chart of the wiring resource graph compression method of the present invention;

[0048] Fig. 9 A schematic diagram of the DevGraph class data structure of the present invention;

[0049] Fig.10This is a schematic diagram of the EquGraph class data structure of the present invention;

[0050] Fig.11 A schematic diagram of the FanoutGraph class data structure of the present invention;

[0051] Fig.12 A schematic diagram of the RouGraph class data structure of the present invention;

[0052] Fig.13 This is a schematic diagram of the OneLayerGraph class data structure of the present invention. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0054] like Figure 4 As shown, this embodiment provides a method for constructing an FPGA, comprising the following steps:

[0055] S1. Logic synthesis: convert a given circuit into a logic gate level netlist, which is a logic netlist consisting of basic logic units such as AND, OR, NOT gates, triggers, RAM, etc. obtained after comprehensive optimization and simulation;

[0056] S2, technology mapping: mapping LUTs and FFs of different specifications into LUTs and FFs of unified specifications;

[0057] S3, packaging: packing the LUTs and FFs of uniform specifications obtained in step S2 into logic components such as CLBs, DSPs, and BRAMs;

[0058] S4, layout: used to place the packaged logic components at the appropriate location on the FPGA;

[0059] S5, wiring: used to allocate wiring resources to determine the connection relationship between logical components;

[0060] S6. Generate bitstream: used to program the FPGA.

[0061] The main function of the layout is to automatically layout the unit modules on the circuit diagram according to the optimization target and determine the position of the logic unit, where the logic component contains the logic unit, and determining the position of the logic component is equivalent to determining the position of the logic unit; the main function of the wiring is to determine the connection between the logic units according to the optimization target and the topological structure of the layout, using various connection resources inside the FPGA, that is, to connect the logic units after layout using the wiring resources in the FPGA, so that the line length and delay of the line network are as small as possible or meet the constraints. The quality of the layout has a great impact on the final result of the FPGA design, including the impact on the wiring, the speed and time of the design, etc.

[0062] The layout input includes the synthesized logic netlist (NetList), the user-specified physical constraint file (UCF) and the user-specified delay constraint information (SDC). The logic netlist contains logic units and wire nets. The layouter automatically layouts the logic units according to the information input by the user and the static delay analyzer (STA), places the logic units in appropriate positions, and transmits the corresponding position information (i.e. the position of the logic unit after layout) to the router for routing. Among them, the automatic layout means that after the user provides the corresponding file, the layouter (software) will place the logic unit in a position that meets the constraints set by the user.

[0063] The layout model is as follows Figure 5 As shown, the placement stage places the logic cells in the NetList according to UCF and SDC (processed by the Timer module in the software. The Timer module is a timing analysis module used to evaluate the timing performance of the circuit. Timing is a goal of layout optimization and optimizes the circuit running speed). The logic cells are placed in a legal position that meets the physical and delay constraints. In order to obtain a layout result with better congestion, a global routing module (Global Route) is designed and implemented in the placement stage. Through it, the congestion of the layout is quickly and accurately evaluated and feedback is given to the layout. Finally, the layout result is obtained, and then the specific routing operation (Detailed Route) is performed.

[0064] In step S5, the FPGA routing method provided in this embodiment is divided into two steps: global routing and detailed routing. Correspondingly, the router includes a global routing module and a detailed routing module. In addition to being applied to the routing stage, the global routing module also has another main purpose of providing a global routing result based on the current layout result with less time consumption in the layout stage, providing the congestion distribution, and providing feedback information to the layout module to further optimize the layout result.

[0065] The main function of the global routing module (Global Route) is to give accurate congestion distribution with less time resources based on the information after layout. In this embodiment, the routing resource graph module mainly stores the signal routing resources that can be configured on the FPGA chip, and then compresses its data to reduce the size of the routing resource graph (Graph), speeding up the search speed of the router. There are many FPGA routing resources. First, an initial multi-layer graph is constructed according to the type of FPGA device (FPGA Device), which contains the most native and accurate routing resource graph on the FPGA device. Secondly, the initial multi-layer graph is gradually compressed according to various compression characteristics. By merging similar and identical features, merging the routing information on the resource graph, and reducing the size of the routing resource graph, the purpose of accelerating routing is achieved, thereby giving accurate congestion information in less time and feeding it back to the layout link to continue layout optimization.

[0066] For example, the global routing module includes: a graph building submodule, which performs a graph building operation (BuildGraph, which refers to the construction of a routing resource graph) according to the identified FPGA device type to obtain an initial multi-layer graph (DevGraph); a compression submodule, which is used to perform multiple compression operations on the initial multi-layer graph to obtain a single-layer two-dimensional graph structure; a global routing submodule, which is used to implement global routing operations on the single-layer two-dimensional graph structure to obtain a global routing result. In addition, the global routing is followed by a detailed routing module, which is used for the allocation operation of nodes (Node) on the graph structure in the detailed routing process after the global routing. The detailed routing further subdivides the winding resources according to the optimization target, optimizes the routing results, and generates the final legal routing information.

[0067] like Figure 6 As shown, the implementation process of the global routing module of this embodiment is as follows: (T1) Perform a graph building operation (BuildGraph) according to the identified FPGA device type, initialize the graph data structure that describes the FPGA device information, and obtain an initial multi-layer graph; (T2) Form a single-layer two-dimensional graph structure by performing multiple compression operations on the initial multi-layer graph; (T3) Perform global routing on the single-layer two-dimensional graph structure using a global routing algorithm to obtain the result of global routing; (T4) The result of global routing can be used to evaluate the degree of congestion in the layout stage and determine whether layout optimization is needed; on the other hand, the result of global routing is distributed to the structure of the initial multi-layer graph to achieve detailed routing. Figure 7As shown, Gcell is a custom data structure that contains node information of one or more tiles in the FPGA chip. The final result of multiple compressions in this embodiment is to compress a multi-layer graph structure into a single-layer graph structure, and compress multiple layers with the same coordinates into one layer (refer to the following process e for details); the multiple compressions include compressing multiple nodes with the same attributes into one node (refer to the following processes b, c, and d for details), for example, compressing multiple nodes with the same starting and ending points in each layer into one node, thereby reducing the data scale and reducing the complexity of the global routing algorithm.

[0068] like Figure 8 As shown, this embodiment proposes a general wiring resource graph compression method as follows:

[0069] Customize multiple graph data structures at different stages of compression, including the following processes:

[0070] a. DevGraph class: the initial graph structure created based on the FPGA device information specified by the user, which is always the first graph structure initialized;

[0071] b. EquGraph class: In FPGA, some pins are equivalent. According to the equivalence of these pins, the nodes (Pin Wire) connected to these pins are compressed to obtain the EquGraph class;

[0072] c. FanoutGraph class: Create FanoutGraph according to the different driver properties of Segment in FPGA;

[0073] d. RouGraph class: FPGA contains multiple coordinate systems, including the Device coordinate system (device coordinate system), the Place coordinate system (layout resource coordinate system, the Place coordinate system is composed of various layout resources) and the Route coordinate system (wiring resource coordinate system). According to the coordinate system conversion rule, the Device coordinate system is converted into the Route coordinate system, and the corresponding relationship is one-to-one or many-to-one; this embodiment constructs RouGraph by compressing one or more Gcells in the Device coordinate system into new Gcells in the Route coordinate system; the process d is to perform the same coordinate system transformation operation on each layer of the multi-layer graph;

[0074] e. OneLayerGraph class: compresses multiple layers of the same coordinates into one layer, that is, compresses multiple layers of Gcells with the same coordinates (here the Gcells are the Gcells in the upper-level Graph) into one Gcell (contained in OneLayerGraph), and finally a single-layer two-dimensional graph structure (OneLayer2D-Graph) can be obtained; here, multiple layers of Gcells with the same coordinate attributes are compressed into the Gcell of a single-layer Graph, and the Graph data structure contains several instances of Gcell data structures.

[0075] The current graph in each of the above processes is constructed based on the graph or FPGA device of the previous level. It is worth noting that Figure 8 The new DevGraph(fpga_), new EquGraph(dev_graph), newFanoutGraph(equ_graph), new RouGraph(fanout_graph), new OneLayerGraph(graph), doCompress(), etc. are all code implementations. DevGraph, EquGraph, FanoutGraph, RouGraph, OneLayerGraph, etc. are class names in the code implementation and are not used as restrictions on the graph data structures created in each step.

[0076] (ii) Finally, based on the compressed OneLayerGraph, the GlobalRoute algorithm can perform pathfinding on a single-layer two-dimensional graph.

[0077] DevGraph:

[0078] In an example, DevGraph refers to a data structure customized according to an FPGA device (FPGA Device), which is recorded as a first-class graph data structure and is used to describe a complete wiring resource graph at the bottom layer of an FPGA chip. It creates an original wiring resource graph based on the Segment and PIP information in the FPGA Device, and creates a multi-layer grid graph based on the Device coordinate system and the Segment type (CostCode), including all wiring resources in the FPGA, such as Fig. 9As shown in the figure, an FPGA Device contains many resources. In the layout and routing stage, the objects of layout and routing are mainly Place resources (resources that can be laid out) and Route resources (routing resources). In the FPGA Device, the Device coordinate system is composed of columns (Column) and rows (Row); various layout resources, such as CLB, DSP, BRAM, etc., constitute the Place coordinate system; various routing resources, such as INT Tile, etc., constitute the Route coordinate system.

[0079] EquGraph:

[0080] In an example, EquGraph is obtained by performing a compression operation doCompress() on a multi-layer layer whose CostCode is kLUTINPUT. It mainly compresses the nodes of the equivalent input Pin of the LUT (Look-Up Table) in the FPGA. EquGraph is recorded as the second type of graph data structure. Figure 7 As shown, for a LUT5, it has five input ports and one output port, that is, there are 5 input signals and 1 output signal; if the drain end of a line network is the input of LUT5, for the signal IN[0-4], they are logically equivalent, and any signal in the signal IN[0-4] can be selected to be transmitted to the input port of LUT5, so the Node connected to these signals IN[0-4] can be compressed and represented by a new Node (the new Node is a collection of multiple old Nodes before compression), and the capacity of the new Node is updated at the same time. Taking LUT5 as an example, create a new Node, add IN[0-4] to the child_nodes of the new Node, and set the capacity of the new Node to 5. The coordinate system of EquGraph is consistent with the coordinate system of Graph before compression. Among them, the capacity of Node refers to the number of nodes in it. During the compression process, multiple Nodes are compressed into one Node according to the rules. Here, 5 Nodes are compressed into one Node, and the capacity of the new Node will be set to 5, and the capacity of the original Node is 1.

[0081] FanoutGraph:

[0082] In this embodiment, FanoutGraph is obtained by compressing segments with the same number of fanouts and the same topological structure, mainly including compressing the segment nodes between INT tiles, and FanoutGraph is recorded as the third type of graph data structure. Because segments have different numbers of output ports, the same Fanout here means the same number of output ports. According to the line length, Segments can be divided into the following categories: (1) kSINGLE: EL1, ER1, WL1, WR1, NL1, NR1, SL1, SR1, line length is 1; (2) kDOUBLE: EE2, WW2, NN2, SS2, NE2, NW2, SE2, SW2, line length is 2; (3) kHQUAD: EE4, WW4 (horizontal direction), line length is 4; (4) kBENTQUAD: NE6, NW6, SE6, SW6; kVQUAD: NN6, SS6, line length is 6; (5) kHLONG: LH12, kVLONG12: LV12, line length is 12; (6) kVLONG: LV18, line length is 18; (7) Others: BYP_BOUNCE, FAN_BOUNCE, etc. These segments can be divided into two-end segments and three-end segments according to the number of connection ends. The nodes with the same number of ports and the same starting and ending points are compressed, such as Figure 8 As shown in the figure: EE2BEG[0-3] is represented by one Segment after compression, and SS2BEG[0-3] is represented by two Segments SS2BEG0 and SS2BEG3 after compression, where the capacity of SS2BEG0 is updated from 1 to 3, and the capacity of SS2BEG3 remains unchanged at 1, and the compressed FanoutGraph is obtained. The coordinate system of FanoutGraph is consistent with the coordinate system of the incoming pre-compression Graph (i.e., the coordinate system of EquGraph). In this embodiment, the construction of the current Graph depends on the upper-level Graph. Except for RouGraph, which converts the Device coordinate system to the Route coordinate system, the coordinate systems of other Graphs remain consistent with those of the upper-level Graph.

[0083] RouGraph:

[0084] For example, RouGraph is mainly obtained by converting the Graph in the Device coordinate system into the Graph in the Route coordinate system. The RouGraph is recorded as the fourth type of graph data structure. Among them, multiple Gcells in the Device coordinate system (device coordinate system) are compressed into a Gcell in the Route coordinate system through coordinate mapping. The coordinate system is changed to the Route coordinate system (wiring resource coordinate system). It is mainly implemented through the following functions:

[0085]

[0086] Among them, functions (1) and (2) convert the device coordinates into place coordinates. The return value -1 indicates an illegal place coordinate. The illegal place coordinate refers to an incorrect place coordinate, that is, the device coordinate system has no corresponding place coordinate system. If the return value of functions (1) and (2) is not -1, directly call functions (3) and (4) to convert the device coordinates into route coordinates. Otherwise, obtain the coordinates of the tile according to the information of the device coordinates, and set the coordinates of the obtained array (tile) as the route coordinates. Through the above method, the coordinates (col, row) in the device coordinate system are converted into the coordinates (x, y) in the route coordinate system, as shown in Fig. 9 As shown: multiple Device coordinates correspond to one Route coordinate.

[0087] In the Device coordinate system, the nodes of each logic unit are stored in their corresponding Gcells; the graph data structure stores the existing connection relationship, and the logic unit corresponds to the starting Node and the end Node in the graph. The wiring is to find the best connection line in the existing connection relationship; after RouGraph compression, the Device coordinates are converted into Route coordinates through coordinate conversion, and the CLB, DSP, BRAM and other logical resources and the nearest INT Tile are merged into a Gcell. The coordinates of the cross-row logical resources such as BRAM and DSP are based on the coordinates of the bottom row. Each Graph of the present invention (such as DevGraph, EquGraph, FanoutGraph, RouGraph and OneLayerGraph) contains several Gcell instances.

[0088] OneLayerGraph:

[0089] In this embodiment, OneLayerGraph means compressing a multi-layer grid graph to obtain a single-layer two-dimensional graph structure (OneLayer2D-Graph), simplifying the 3D search problem to a 2D search problem, allowing the routing algorithm to perform routing (Route) on the 2D-Graph instead of on the multi-layer graph structure. The single-layer two-dimensional graph structure is recorded as the fifth type of graph data structure. The coordinate system of OneLayerGraph is consistent with the coordinate system of the incoming Graph, because in this embodiment, the construction of the current Graph depends on the upper-layer Graph. Except for RouGraph, which converts the Device coordinate system to the Route coordinate system, other Graphs keep the coordinate system consistent with the upper-layer Graph.

[0090] Based on the above, in this embodiment, a multi-layer graph can be compressed into a single-layer graph by compressing the Gcells represented by the same coordinates in the multi-layer graph into one Gcell, and saving the node information in the multi-layer Gcell. Based on the above, after a series of graph construction and compression, a two-dimensional Route coordinate system Graph with a greatly reduced number of nodes compared to the original Graph can be obtained, which can complete the global routing more quickly and give a congestion assessment. Among them, the graph data structure (Graph data structure) contains several instances of Gcell data structures, and whether it is a single-layer graph data structure (OneLayer2D-Graph) needs to be judged by the properties of the Graph.

[0091] The first type of graph data structure, the second type of graph data structure, the third type of graph data structure and the fourth type of graph data structure of the present invention are all multi-layer graph structures. The compression involved in them is to compress each layer of the multi-layer graph separately, and the final result is still a multi-layer graph structure.

[0092] The order of the process of the general wiring resource graph compression method in the present invention can be adjusted, as long as the initial multi-layer graph structure DevGraph and the final graph structure OneLayerGraph are guaranteed. The order of related operations of the graph structures of the EquGraph class, FanoutGraph class, and RouGraph class obtained in the intermediate process can be changed at will, and the present invention does not impose any restrictions on this.

[0093] It should be noted that those skilled in the art may understand that, for the sake of brevity and convenience in description, the specific working process and related instructions of the data storage device and the processing device described above may refer to the corresponding process in the aforementioned method embodiment, and therefore will not be repeated here.

[0094] Those skilled in the art should be able to appreciate that the examples, methods, and steps of each module described in the embodiments disclosed in the present application can be implemented by computer software, electronic hardware, or a combination of the two. The program code corresponding to the relevant software modules, methods, and steps can be stored in a storage medium including a memory, a read-only memory ROM, a random access memory RAM, an electrically programmable ROM, an electrically erasable programmable ROM, a hard disk, a removable hard disk, an optical disk, a register, a floppy disk, a magnetic tape, or any other form of storage medium in the technical field. In the foregoing description, the steps and components of each example are generally described according to the function to clearly illustrate the interchangeability of software and electronic hardware. The aforementioned functions are executed or implemented with software or electronic hardware, depending on the corresponding technical solutions and specific application scenarios and design requirements constraints. Those skilled in the art can choose to use different methods according to the specific requirements of the application scenario to implement the described functions, but such implementation should not be considered to exceed the scope of the present invention.

[0095] The term "comprising" or any similar term is intended to cover non-exclusive inclusion, such that a method, process, article, apparatus / equipment that comprises a series of elements includes not only the described elements, but also other related elements not explicitly listed, or elements inherent to such method, process, article, apparatus / equipment.

[0096] In summary, the FPGA wiring resource map compression method proposed in the present invention can effectively solve the congestion constraints and heterogeneity constraints of FPGA, and evenly place all modules in the legal positions of FPGA to obtain the optimal line length and congestion, leaving enough optimization space for the subsequent stages of FPGA physical design. The method extracts the common features of resources in the wiring resource map, gradually compresses and stores wiring resources, and obtains a smaller wiring resource map. The method can construct an arbitrarily small wiring resource map according to size requirements, and by compressing the wiring resource map, the scale of the congestion evaluation problem is reduced and the congestion evaluation is accelerated. The method can construct a wiring resource map as small as possible according to the accuracy requirements, and the accuracy of the congestion evaluation is guaranteed by extracting and compressing the winding resources through accurate equivalent features. The method constructs a DevGraph compression method, constructs the most basic winding resource map at the bottom layer based on the FPGA chip, and prepares for subsequent compression and congestion evaluation. The method constructs an EquGraph compression method, which is compressed based on the equivalent logic pins (Pin) on the FPGA chip, and prepares for subsequent compression and congestion evaluation. This method constructs a compression method for FanoutGraph, which compresses based on the regular Segment topology on the FPGA chip, in preparation for subsequent compression and congestion evaluation. This method constructs a compression method for RouGraph, which compresses based on the correspondence between the Device and Route coordinate systems on the FPGA chip, in preparation for subsequent compression and congestion evaluation. This method constructs a compression method for OneLayerGraph, which compresses based on the hierarchical structure of the Segment type on the FPGA chip, in preparation for subsequent compression and congestion evaluation. This method can be used in any stage without physical implementation, not limited to the evaluation of congestion in layout. This method decomposes the original congestion problem into a hierarchical problem, with each layer focusing only on the details of the current layer, and accurately evaluates congestion through a multi-level architecture of compression, global routing, and decompression. This method automatically adjusts the scale of the routing resource graph according to the accuracy and speed requirements of the layout, realizes accurate and fast congestion evaluation layout, and optimizes the matching of the resource information seen in the routing stage.

[0097] Although the content of the present invention has been described in detail through the above preferred embodiments, it should be appreciated that the above description should not be considered as a limitation of the present invention. After reading the above content, it will be apparent to those skilled in the art that various modifications and substitutions of the present invention will occur. Therefore, the protection scope of the present invention should be limited by the appended claims.

Claims

1. A method for compressing an FPGA wiring resource graph, characterized in that: The method includes: Step 1: A first type of graph data structure is created based on the specified FPGA device information, which is an initial multi-layer graph structure; Step 2: Obtain multiple graph data structures at different stages of compression, including: A second type of graph data structure obtained by compressing nodes connected to some pins in the FPGA according to the equivalence of the pins; A third type of graph data structure is created according to the driving properties of the line segments in the FPGA, wherein the third type of graph data structure is obtained by compressing line segments with the same fan-out number and the same topological structure, wherein the line segments are used to describe the electrical connection relationship between arrays, and the same fan-out number means that the number of output ports of the line segments is the same; A fourth type of graph data structure, wherein the forming method comprises: converting a device coordinate system into a wiring resource coordinate system, and compressing a plurality of Gcell data structures in the device coordinate system to form a new Gcell data structure in the wiring resource coordinate system; the Gcell data structure comprises node information of a plurality of arrays in the FPGA; wherein the first type of graph data structure, the second type of graph data structure, the third type of graph data structure and the fourth type of graph data structure are all multi-layer graph structures; The fifth type of graph data structure is a single-layer two-dimensional graph structure obtained by compressing multiple layers of Gcell data structures with the same coordinates into a single-layer Gcell data structure; Step three: perform global routing on the compressed single-layer two-dimensional graph structure.

2. The FPGA routing resource map compression method according to claim 1, characterized in that: The first type of graph data structure created based on the specified FPGA device information is used as the starting stage, the first type of graph data structure is in the starting stage, and the fifth type of graph data structure is in the last stage of the different stages of compression; The second type of graph data structure, the third type of graph data structure and the fourth type of graph data structure are in an intermediate stage among different stages of the compression, and their order in the intermediate stage is any arrangement formed by the three.

3. The FPGA routing resource map compression method according to claim 1, characterized in that: The initial multi-layer graph structure is a data structure defined according to the FPGA device, and is used to describe all the wiring resource graphs at the bottom layer of the FPGA chip; An original routing resource graph is created based on information about line segments and programmable multiplexers in the FPGA device, and the initial multi-layer graph structure is created according to the device coordinate system and the type of line segments.

4. The FPGA routing resource map compression method according to claim 1, characterized in that: The coordinate system of one or more of the second, third, and fifth types of graph data structures is consistent with the coordinate system of the graph data structure input in the previous stage.

5. The FPGA routing resource map compression method according to claim 1, characterized in that: The second type of graph data structure is obtained by compressing the layer whose line segment type is kLUTINPUT, which further includes: Compressing the nodes of the pins of the equivalent input of the lookup table in the FPGA, compressing the nodes of the N input signals connected to the lookup table to form a new node, and updating the capacity of the new node; The lookup table includes N input ports and one output port, N>1, N input signals are respectively transmitted to the N input ports, and the N input signals are equivalent.

6. The FPGA routing resource map compression method according to claim 1, characterized in that: The method for compressing line segments with the same fan-out number and the same topological structure further comprises: compressing nodes with the same number of output ports and the same starting point and end point in line segments between arrays of Inter type and arrays of Inter type; The line segments between Inter-type arrays include two-terminal line segments and three-terminal line segments.

7. The FPGA routing resource map compression method according to claim 1, characterized in that: The method of changing the device coordinate system to the wiring resource coordinate system includes the following: Convert device coordinates into layout resource coordinates using the first function and the second function; When the return values ​​of the first function and the second function are not -1, the third function and the fourth function are directly called to convert the device coordinates into wiring resource coordinates; When the return values ​​of the first function and the second function are both -1, the coordinates of the array are obtained according to the information of the device coordinates, and the obtained coordinates of the array are set as the wiring resource coordinates; The first function is: transDeviceToPlaceCoordX(int dev_x); The second function is: transDeviceToPlaceCoordY(int dev_y); The third function is: transDeviceToRouteCoordX(int dev_x); The fourth function is: transDeviceToRouteCoordY(int dev_x).

8. A global routing module based on the FPGA routing resource map compression method according to any one of claims 1 to 7, characterized in that: Include: The map building submodule performs map building operations according to the FPGA device type to obtain the initial multi-layer map structure; A compression submodule, used for compressing the initial multi-layer graph structure at different stages to finally obtain a single-layer two-dimensional graph structure; The global routing submodule is used to implement global routing on the single-layer two-dimensional graph structure.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the FPGA wiring resource diagram compression method according to any one of claims 1 to 7 is implemented.

10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the FPGA wiring resource diagram compression method according to any one of claims 1 to 7 is implemented.