A method of placing a programmable logic device
By grouping and weighting the circuit network, the placement order of programmable logic device resources is optimized, solving the wiring congestion problem in the prior art and realizing the rational distribution of wiring resources.
Patent Information
- Application Number
- CN202211047403.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-29
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2042-08-29
AI Technical Summary
Existing legalized layout schemes are prone to cabling congestion among layout resources, failing to effectively consider the legalized layout of cabling resources.
By classifying the circuit network into Class I and Class II networks, setting the weights of loads and drive units within the groups, and performing a legitimate layout based on the global layout results, the placement order and location of layout resources are optimized, reducing wiring congestion.
It effectively reduces wiring congestion among layout resources and balances the wiring resource density in all directions and locations of programmable logic devices.
Smart Images

Figure CN115630604B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of integrated circuits, and relates to a programmable logic device method. BACKGROUND
[0002] The layout basic flow of the programmable logic device includes global layout, legalization layout and detailed layout. The global layout is used for allocating an initial position for each layout resource, the legalization layout is used for determining a legal layout position for each layout resource, and the detailed layout is used for adjusting the position of the laid-out resource to optimize the timing of the layout resource. In the existing legalization layout scheme, the main basis for performing layout according to the result of the global layout is the density of the layout resource for legalization layout. Although the equalization of the density of the layout resource in the legalization layout can reduce the wiring congestion between the layout resources to a certain extent, the existing legalization layout method does not consider the wiring resource for legalization layout, and the problem of high wiring density between the layout resources after layout still easily occurs, thereby leading to wiring congestion. SUMMARY
[0003] The present application aims to provide a programmable logic device layout method to solve the technical problem of the wiring congestion between the layout resources caused by the existing legalization layout scheme.
[0004] To solve the above technical problem, the technical scheme of the present application is as follows:
[0005] The present application provides a programmable logic device layout method, comprising:
[0006] Step S10: According to the fan-out value of the circuit network, the circuit network is divided into a first type network and a second type network, the load and the driving unit of the first type network are obtained, and the load of the second type network is obtained. The connection relationship between the ports in the user design is the circuit network, the driving unit is the port that sends signals in the circuit network, and the load is the port that receives signals in the circuit network;
[0007] Step S20: According to the result of the global layout, the load and the driving unit are set as a plurality of groups;
[0008] Step S30: The weight of the load and the driving unit in each group is obtained;
[0009] Step S40: According to the result of the global layout, the load and the driving unit of each group are placed in turn in any order, and the placement order of the load and the driving unit of each group is determined according to the weight of the load and the driving unit of each group.
[0010] Further, the step S10 comprises:
[0011] distinguishing the circuit network with the fan-out value not exceeding a first fan-out threshold as the first type of network, obtaining the load and the driving unit of the first type of network, and distinguishing the circuit network with the fan-out value exceeding the first fan-out threshold as the second type of network, obtaining the load of the second type of network.
[0012] Further, the step S20 comprises:
[0013] Step S21: dividing the coordinates corresponding to the load and the driving unit into a plurality of coordinate sets;
[0014] Step S22: setting the load or the driving unit corresponding to the coordinates in each of the coordinate sets as a group.
[0015] Further, the step S21 comprises:
[0016] Step S210: setting any of the coordinates as a center coordinate;
[0017] Step S220: setting the coordinate set according to the center coordinate and a first bandwidth, the coordinate set comprising the center coordinate and all the coordinates within a first bandwidth from the center coordinate;
[0018] Step S230: obtaining a drift value of the coordinate set, the drift value being an average of vector distances between the center coordinate and each of the coordinates in the coordinate set;
[0019] Step S240: updating the center coordinate according to the drift value, the updated center coordinate = the previous center coordinate + the drift value;
[0020] Step S250: judging whether the drift value is smaller than a drift threshold, if the drift value is smaller than the drift threshold, turning to step S260; if the drift value is not smaller than the drift threshold, turning to step S220.
[0021] Step S260: judging whether the distance between the center coordinates of any two of the coordinate sets is smaller than the drift threshold, if the distance between the center coordinates of two of the coordinate sets is smaller than the drift threshold, merging the two of the coordinate sets into one coordinate set, and turning to step S270; if the distance between the center coordinates of two of the coordinate sets is not smaller than the drift threshold, turning to step S270.
[0022] Step S270: judging whether there is any coordinate not belonging to any of the coordinate sets, if there is any coordinate not belonging to any of the coordinate sets, turning to step S220; otherwise, turning to step S280.
[0023] Step S280: detecting the same coordinate belonging to at least two of the coordinate sets, dividing the coordinate into the coordinate set with merging.
[0024] Further, the step S30 comprises:
[0025] Step S310: setting a distance weight according to the distance between the coordinates corresponding to the load and the driving unit located in the same group;
[0026] Step S320: setting a connection weight according to the connection between the loads and the connection between the loads and the driving unit;
[0027] Step S330: setting a module similarity weight according to the module to which the load and the driving unit belong;
[0028] Step S340: setting the weight of the load and the driving unit in each group according to the distance weight, the connection weight and the module similarity weight, the weight = distance weight + connection weight + module similarity weight.
[0029] Further, the step S310 comprises:
[0030] The distance between the coordinates corresponding to the load and the driving unit located in the same group is inversely proportional to the distance weight.
[0031] Further, the step S320 comprises:
[0032] The connection weight of the connection between the loads is less than the connection weight of the connection between the loads and the driving unit.
[0033] Further, the step S330 comprises:
[0034] The weight of the load or the driving unit belonging to the same module is greater than the weight of the load or the driving unit belonging to different sub-modules of the same module;
[0035] The weight of the load or the driving unit belonging to different sub-modules of the same module is greater than the weight of the load or the driving unit belonging to different modules.
[0036] Further, the step S40 further comprises:
[0037] Step S410: placing the load or the driving unit in the same attempt position when the coordinate position corresponding to the load or the driving unit cannot place the load or the driving unit, the attempt position being a new position assigned to the load or the driving unit when the coordinate position corresponding to the load or the driving unit cannot place the load or the driving unit;
[0038] Step S420: placing the load or the driving unit in the same row or the same column of the attempt position when the attempt position cannot place the load or the driving unit.
[0039] Further, the step S40 further comprises:
[0040] judging whether the wiring density of the position selected by the load or the driving unit exceeds a density threshold value, reselecting the position where the load or the driving unit is placed if the wiring density of the position selected by the load or the driving unit exceeds the density threshold value, and placing the load or the driving unit if the wiring density of the position selected by the load or the driving unit does not exceed the density threshold value.
[0041] Compared with the prior art, the application has the following beneficial effects:
[0042] The legalization layout method of the programmable logic device provided by the embodiment of the application considers the wiring density between layout resources when performing layout, sets a group for the layout resources, sets the weight of each layout resource in the group, and performs legalization layout according to the group and the weight of the layout resources, so that the load resources or driving unit resources of the same circuit network can be placed in the same programmable logic unit (CLB) or in the same row or the same column of the programmable logic unit (CLB), the wiring congestion between the layout resources is reduced, and the wiring resources in each direction and each position of the programmable logic device are balanced. BRIEF DESCRIPTION OF DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.
[0044] Figure 1 The flowchart of the legalization layout of the programmable logic device provided by the embodiment of the application
[0045] Figure 2 The flowchart of the division of the coordinate set provided by the embodiment of the application. DETAILED DESCRIPTION
[0046] The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application. It should be clear that the described embodiments are only some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0047] The terms "first", "second", and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be exchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein.
[0048] Before the embodiments of the present application are described, the terms used in the embodiments of the present application are explained, wherein for programmable logic devices such as CPLD, FPGA, the connection relationship between the ports in the user design in the device is called a circuit network (net); different signals are transmitted in each circuit network (net), the port from which the signal is sent is called the driver of the circuit network (net), and the port receiving the signal is called the load of the circuit network (net).
[0049] The embodiments of the present application provide a layout method of a programmable logic device, Figure 1 The flowchart of the legal layout of the programmable logic device provided by the embodiments of the present application is shown as Figure 1 The method comprises:
[0050] Step S10: According to the fan-out value of the circuit network, the circuit network is divided into a first type network and a second type network, the load resource and the driver unit resource of the first type network are obtained, and the load resource of the second type network is obtained; that is, by analyzing the design netlist of the programmable logic device, circuit networks with different fan-out values are screened out, the screened circuit networks are divided into a first type network and a second type network, and the distribution of the load resource and the driver unit resource of the screened circuit networks is analyzed.
[0051] The first type of network is a circuit network with a small fan-out, and the load resources and the driving unit resources of the circuit network are collected. The second type of network is a circuit network with a large fan-out, and only the load resources of the circuit network are collected. Generally, an empirical value is set to compare with the fan-out values of different circuit networks to determine the type of the circuit network. When the fan-out value of a circuit network does not exceed a first fan-out threshold, it indicates that the fan-out of the circuit network is small, and the load resources and the driving unit resources of the circuit network are collected. When the fan-out value of a circuit network exceeds the first fan-out threshold, it indicates that the fan-out of the circuit network is large, and only the load resources of the circuit network are collected. The first fan-out threshold is the empirical value. For the circuit network with a large fan-out, the driving unit resources of the circuit network are connected to a large number of load resources. If the positions of the driving unit resources are moved in the legalization layout stage, the influence on the load resources connected to the driving unit resources is large. Therefore, the positions of the driving unit resources are still placed according to the positions allocated by the global layout.
[0052] Step S20: According to the result of the global layout, the load resources and the driving unit resources are set as a plurality of groups to facilitate subsequent placement of the load resources and the driving unit resources according to the groups, and to keep the relative positions of the load resources and the driving unit resources in each group consistent.
[0053] The embodiment of the present application groups the load resources and the driving unit resources according to the result of the global layout. In essence, the coordinates allocated to the load resources and the driving unit resources by the global layout are grouped. After the coordinates are grouped, the load resources and the driving unit resources corresponding to the coordinates are set as a group. Therefore, the step of grouping the load resources and the driving unit resources in step S20 specifically includes:
[0054] Step S21: The coordinates corresponding to the load resources and the driving unit resources are divided into a plurality of coordinate sets.
[0055] Step S22: The load resources or the driving unit resources corresponding to the coordinates in each coordinate set are set as a group.
[0056] For step S21, the embodiment of the present application uses the mean shift clustering algorithm to divide the coordinates into a plurality of coordinate sets according to the result of the global layout. Figure 2 The flowchart provided by the embodiment of the present application for dividing the coordinate sets is shown in FIG. 2. Figure 2 The step S21 specifically includes:
[0057] Step S210: Set any coordinate as a center coordinate, and regard the coordinates not belonging to the coordinate sets as unmarked coordinates and regard the coordinates belonging to the coordinate sets as marked coordinates. The initial center coordinate is a randomly selected unmarked coordinate.
[0058] Step S220: setting a coordinate set according to the center coordinate and the first bandwidth, the coordinate set including the center coordinate and all coordinates within a first bandwidth from the center coordinate; that is, all coordinates within a circle (including the edge of the circle) with the center coordinate as the center and the first bandwidth as the radius are divided into a coordinate set, and the first bandwidth is an empirical value set by a setting personnel according to the coordinate distribution of the current legalization layout. For different global layout results, the value of the first bandwidth will also be different;
[0059] Step S230: obtaining a shift value of the coordinate set, the shift value being an average value of the vector distance between the center coordinate and each coordinate in the coordinate set; that is, the distance from the center coordinate to each coordinate in the set is calculated, the sum of each distance is calculated, and the average value is calculated, and the result will be a vector value including a direction;
[0060] Step S240: updating the center coordinate according to the shift value, the updated center coordinate = the center coordinate before updating + the shift value; that is, the updated center coordinate is: center(k+1) = center(k) + shift, where center(k+1) represents the updated center coordinate, center(k) represents the center coordinate before updating, shift represents the shift value, and K is a natural number greater than zero, such as center(1) representing the initial center coordinate, center(2) representing the center coordinate after the first update, center(3) representing the center coordinate after the second update, and so on;
[0061] Step S250: determining whether the shift value is less than a shift threshold value, if the shift value is less than the shift threshold value, turning to step S260; if the shift value is not less than the shift threshold value, turning to step S220; that is, repeating steps S220-S240 until the shift value reaches the shift threshold value, and the shift threshold value is an empirical value. For different global layout results, the shift threshold value may also be set to different values according to the coordinate distribution, and the greater the shift value, the lower the density of the coordinates at this time;
[0062] Step S260: judging whether the distance between the center coordinates of any two coordinate sets is less than the drift threshold value, if the distance between the center coordinates of any two coordinate sets is less than the drift threshold value, merging the two coordinate sets into one coordinate set, and turning to step S270, if the distance between the center coordinates of any two coordinate sets is not less than the drift threshold value, turning to step S270; the result of step S260 can be achieved by judging the distance between the latest center coordinate and other center coordinates, when the distance between the latest center coordinate and any center coordinate is less than the drift threshold value, merging the two coordinate sets in which the two center coordinates are located into a new coordinate set, and the center coordinate of the new coordinate set is the midpoint of the original two center coordinates; when the distance between the latest center coordinate and all other center coordinates is greater than the drift threshold value, not performing any operation, and ending step S260.
[0063] Step S270: judging whether there is a coordinate not belonging to any coordinate set, if there is a coordinate not belonging to any coordinate set, turning to step S220, otherwise, turning to step S280; the purpose of step S270 is to make every coordinate be divided into a coordinate set, i.e. repeating steps S220-S260 until all coordinates are marked by a coordinate set, and the purpose of step S270 is to make every coordinate be divided into a coordinate set.
[0064] Step S280: detecting the same coordinate belonging to at least two coordinate sets, and dividing the coordinate into the coordinate set with merging; for example, when a part of coordinates are marked by set M1, set M2 and set M3, but set M3 and set M2 are finally merged into set M4, the part of coordinates are divided into set M4.
[0065] Step S30: acquiring the weight of each load resource and driving unit resource in each group, and setting the weight according to the distance, connection and module similarity of the load resource and the driving unit resource, and step S30 specifically includes:
[0066] Step S310: setting the distance weight according to the distance between the coordinates corresponding to the load resource and the driving unit resource in the same group; wherein the distance between the coordinates corresponding to the load resource and the driving unit resource in the same group is inversely proportional to the distance weight, i.e. the closer the distance between the coordinates corresponding to the load resource and the driving unit resource in the same group, the greater the distance weight.
[0067] Step S320: setting the connection weight according to the connection between the load resources and the connection between the load resource and the driving unit resource; wherein the connection weight of the connection between the load resources is less than the connection weight of the connection between the load resource and the driving unit resource.
[0068] Step S330: setting module similarity weight according to the module to which the load resource and the driving unit resource belong; wherein the weight of the load resource or the driving unit resource belonging to the same module is greater than the weight of the load resource or the driving unit resource belonging to different sub-modules of the same module; and the weight of the load resource or the driving unit resource belonging to different sub-modules of the same module is greater than the weight of the load resource or the driving unit resource belonging to different modules.
[0069] Step S340: setting the weight of each load resource and driving unit resource in each group according to the distance weight, the connection weight and the module similarity weight; weight = distance weight + connection weight + module similarity weight.
[0070] Step S40: placing the load resource and the driving unit resource of each group in turn according to the result of the global layout in any order, and determining the placement order of the load resource and the driving unit resource of each group according to the weight of the load resource and the driving unit resource of each group.
[0071] In the conventional legalization layout stage, the load resource and the driving unit resource are not grouped, and the load resource and the driving unit resource are placed in any order in the legalization layout stage. However, this layout method has the following defects: the relative position relationship between the load resource and the driving unit resource cannot be guaranteed. Therefore, the load resource and the driving unit resource are placed according to the group in the embodiment of the present application, and the relative position relationship between the load resource and the driving unit resource is maintained.
[0072] In the embodiment of the present application, step S40 should further include:
[0073] Step S410: when the corresponding coordinate position of the load resource or the driving unit resource cannot place the corresponding load resource or the corresponding driving unit resource, placing the load resource or the driving unit resource in the same attempt position, wherein the attempt position is a new position allocated to the load resource or the driving unit resource when the corresponding coordinate position of the load resource or the driving unit resource cannot place the load resource or the driving unit resource;
[0074] Step S420: when the attempt position still cannot place the load resource or the driving unit resource, placing the load resource or the driving unit resource in the same row or the same column of the attempt position.
[0075] When placing the load resources and the driving unit resources according to the coordinate positions allocated to the load resources and the driving unit resources in the global layout, the coordinate position corresponding to part of the load resources or the driving unit resources can be occupied by other load resources or driving unit resources, so the coordinate position cannot place the part of the load resources or the driving unit resources, at this time, a new placement position, i.e. a trial position, needs to be found for the part of the load resources or the driving unit resources around the corresponding coordinate position. The embodiments of the present application prefer to place the load resources and the driving unit resources of the same group in the same trial position when the result of the global layout is invalid, and secondly place the load resources and the driving unit resources in the same row or the same column of the trial position, so as to ensure the rationality of the layout of the load resources or the driving unit resources.
[0076] It should be clear that the load resources or the driving unit resources which cannot be placed in the steps S410 and S420 should be repeatedly placed in the steps S410 and S420, i.e. a new trial position is found for placement on the basis of the first trial position, and the same row or the same column of the new trial position is used for placement, until the load resources or the driving unit resources are placed.
[0077] In the embodiments of the present application, the step S40 should further include:
[0078] It is judged whether the wiring density of the selected position of the load resources or the driving unit resources exceeds the density threshold value, if the wiring density of the selected position of the load resources or the driving unit resources exceeds the density threshold value, the position of the load resources or the driving unit resources is reselected, if the wiring density of the selected position of the load resources or the driving unit resources does not exceed the density threshold value, the load resources or the driving unit resources are placed; i.e. when placing the load resources or the driving unit resources, the position with small wiring density is preferentially selected, and the density threshold value should be set according to experience, rather than a fixed value.
[0079] The existing legalization layout stage only considers the density of the layout resources in the layout process, and preferentially places the layout resources in the position with high density according to the density of the layout resources. However, the existing legalization layout does not consider the density of the wiring resources. Even if the layout resources are placed according to the density of the layout resources, the wiring congestion between the layout resources can be reduced to a certain extent, but the wiring density between the layout resources after the layout is still high, which leads to the problem of wiring congestion. The legalization layout method provided by the embodiments of the present application considers the wiring density between the layout resources when the layout is performed, the layout resources are set into groups, the weight of each layout resource in the group is set, the legalization layout is performed according to the group and the weight of the layout resource, the load resources or the driving unit resources of the same circuit network are placed in the same programmable logic unit (CLB) of the programmable logic device, the wiring congestion between the layout resources is reduced, and the wiring resources in each direction and each position of the programmable logic device are balanced.
[0080] The above description is further to the detailed description of the present application in conjunction with specific embodiments, and cannot be deemed to limit the specific implementation of the present application only to these descriptions. For those of ordinary skill in the art to which the present application belongs, several simple deductions or replacements can be made without departing from the concept of the present application, and all of them shall be regarded as the protection scope of the present application.
Claims
1. A method of placing programmable logic devices, characterized by, The method comprises the following steps: Step S10: distinguishing the circuit network into a first type network and a second type network according to the fan-out value of the circuit network, obtaining the load and the driving unit of the first type network, and obtaining the load of the second type network, wherein the circuit network is the connection relationship between ports in user design, the driving unit is the port sending signal in the circuit network, and the load is the port receiving signal in the circuit network; Step S20: setting the load and the driving unit into several groups according to the result of global layout; Step S30: obtaining the weight of the load and the driving unit in each group; Step S40: placing the load and the driving unit of each group in turn according to the result of global layout in any order, and determining the placement order of the load and the driving unit of each group according to the weight of the load and the driving unit of each group; The step S30 comprises: Step S310: setting the distance weight according to the distance between the coordinates corresponding to the load and the driving unit in the same group; Step S320: setting the connection weight according to the connection between the loads and the connection between the load and the driving unit; Step S330: setting the module similarity weight according to the module to which the load and the driving unit belong; Step S340: setting the weight of the load and the driving unit in each group according to the distance weight, the connection weight and the module similarity weight, wherein the weight = distance weight + connection weight + module similarity weight.
2. The method of placing programmable logic devices of claim 1, wherein, The step S10 comprises: distinguishing the circuit network with the fan-out value less than a first fan-out threshold value into the first type network, obtaining the load and the driving unit of the first type network, and distinguishing the circuit network with the fan-out value more than the first fan-out threshold value into the second type network, obtaining the load of the second type network.
3. The method of placing programmable logic devices of claim 1, wherein, The step S20 comprises: Step S21: dividing the coordinates corresponding to the load and the driving unit into several coordinate sets; Step S22: setting the load or the driving unit corresponding to the coordinates in each coordinate set into a group.
4. The method of placing programmable logic devices of claim 3, wherein, The step S21 comprises: Step S210: setting any coordinate as a center coordinate; Step S220: setting the coordinate set according to the center coordinate and a first bandwidth, wherein the coordinate set comprises the center coordinate and all the coordinates within the first bandwidth from the center coordinate; Step S230: obtaining the drift value of the coordinate set, wherein the drift value is the average value of the vector distance between the center coordinate and each coordinate in the coordinate set; Step S240: updating the center coordinate according to the drift value, wherein the updated center coordinate = the center coordinate before updating + the drift value. Step S250: judging whether the drift value is less than a drift threshold value, if the drift value is less than the drift threshold value, turning to step S260; if the drift value is not less than the drift threshold value, turning to step S220; Step S260: judging whether the distance between the center coordinates of any two of the coordinate sets is less than the drift threshold value, if the distance between the center coordinates of any two of the coordinate sets is less than the drift threshold value, merging the two coordinate sets into one coordinate set, and turning to step S270; if the distance between the center coordinates of any two of the coordinate sets is not less than the drift threshold value, turning to step S270; Step S270: judging whether there is a coordinate not belonging to any of the coordinate sets, if there is a coordinate not belonging to any of the coordinate sets, turning to step S220; otherwise, turning to step S280; Step S280: detecting the same coordinate belonging to at least two of the coordinate sets, and dividing the coordinate into the coordinate set with merging.
5. The method of placing programmable logic devices of claim 1, wherein, The step S310 comprises: The distance between the load and the corresponding coordinate of the driving unit in the same group is inversely proportional to the distance weight.
6. The method of placing programmable logic devices of claim 1, wherein, The step S320 comprises: The connection weight between the loads is less than the connection weight between the load and the driving unit.
7. The method of placing programmable logic devices of claim 1, wherein, The step S330 comprises: The weight of the load or the driving unit belonging to the same module is greater than the weight of the load or the driving unit belonging to different sub-modules of the same module; The weight of the load or the driving unit belonging to different sub-modules of the same module is greater than the weight of the load or the driving unit belonging to different modules.
8. The method of placing programmable logic devices of claim 1, wherein, The step S40 further comprises: Step S410: when the coordinate position corresponding to the load or the driving unit cannot place the load or the driving unit, placing the load or the driving unit in the same attempt position, the attempt position being a new position assigned to the load or the driving unit when the coordinate position corresponding to the load or the driving unit cannot place the load or the driving unit; Step S420: when the attempt position cannot place the load or the driving unit, placing the load or the driving unit in the same row or the same column of the attempt position.
9. The method of placing programmable logic devices of claim 8, wherein, The step S40 further comprises: judging whether the wiring density of the position selected by the load or the driving unit exceeds a density threshold value, if the wiring density of the position selected by the load or the driving unit exceeds the density threshold value, reselecting the position where the load or the driving unit is placed, if the wiring density of the position selected by the load or the driving unit does not exceed the density threshold value, placing the load or the driving unit.
Citation Information
Patent Citations
I / O cell layout method and device for programmable logic device, medium and device
CN109086467A
Wiring method, device and equipment for editable logic array and storage medium
CN114781300A