A FPGA delay optimization method and device based on node replication

By introducing node replication technology between the layout and wiring links of FPGA chips, the critical path delay is optimized, and the problem of limited delay optimization effect in the existing technology is solved, and more accurate delay information and smaller operations are achieved. Complexity significantly improves the delay optimization effect.

CN118194792BActive Publication Date: 2024-11-08SUZHOU YIGE TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202311824807.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-27
Publication Date
2024-11-08
Estimated Expiration
2043-12-27

AI Technical Summary

Technical Problem

In FPGA chips, the optimization effect of critical path delay is limited by the information difference and interaction cost between the synthesis, layout and wiring links, resulting in huge optimization space and limited effect.

Method used

Through node replication technology, the initial netlist and layout results are obtained for timing analysis, the critical path is determined, and the node is replicated in each iteration to optimize its position, reassign the output signal, and gradually reduce the delay until the optimal netlist is obtained with layout results.

Benefits of technology

Adding a delay optimization link between the layout and wiring links improves the accuracy of delay information, operation complexity and running time cost, and discovers unoptimized delays to a great extent, and passes random numbers and expected delays The introduction of errors and deviations is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118194792B_ABST
    Figure CN118194792B_ABST
Patent Text Reader

Abstract

The present application relates to the field of FPGA layout technology, and specifically to a method and device for optimizing FPGA delay based on node replication; the method includes: obtaining an initial netlist and layout results, and performing timing analysis on the initial netlist and layout results to obtain a critical path; performing multiple iterations on the critical path based on node deviation, and obtaining the node to be replicated on the critical path during each iteration, and determining the replication position of the node to be replicated; replicating the node to be replicated at the replication position, and reallocating the output signal of the original node corresponding to the node to be replicated to obtain the result of this iteration; and obtaining the optimal netlist and layout results based on the results of multiple iterations. The above scheme achieves the effect of reducing delay by replicating and re-layouting specific nodes on the critical path, changing the original critical path, and then achieving the effect of reducing delay.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of FPGA layout technology, and in particular to an FPGA delay optimization method and device based on node replication. Background Art

[0002] With the rapid development of information technology, modern field-programmable gate arrays (FPGAs) as a hardware programmable logic chip have been widely used. FPGA has a reprogrammable hardware structure, which enables it to adapt to a variety of application scenarios, making it the preferred solution in many fields, such as communications, image processing, industrial control, etc.

[0003] In FPGA chips, critical path delay is a core indicator used to judge the performance of mapping a given user design to an FPGA chip. Mapping a user design to an FPGA chip often requires specialized EDA tools, such as Figure 1 As shown in the figure, from user design to FPGA chip enabling, it is often necessary to go through synthesis, layout, routing, bitstream generation and other links; among them, synthesis, layout, and routing links will make relevant optimizations based on the delay information of the critical path. However, the information that can be obtained in each link is different, and the interaction cost between each link is relatively large. Therefore, the optimization effect that can be achieved only through the above synthesis, layout, and routing links is limited, and there is still a lot of room for optimization of the delay of the critical path. Summary of the invention

[0004] The present application provides a method and device for controlling air intake volume in a fluidized bed drying process, which achieves the effect of reducing delay by duplicating and rearranging specific nodes on the critical path and changing the original critical path. The technical solution is as follows.

[0005] In a first aspect, the present application provides an FPGA delay optimization method based on node replication, the method comprising:

[0006] Obtaining an initial netlist and layout results, and performing timing analysis on the initial netlist and layout results to obtain a critical path;

[0007] Performing multiple iterations on the critical path based on the node deviation, and obtaining the to-be-copied node on the critical path during each iteration, and determining the copy position of the to-be-copied node;

[0008] Copy the node to be copied to the copy position, and redistribute the output signal of the original node corresponding to the node to be copied to obtain the result of this iteration;

[0009] Based on the results of multiple iterative processes, the optimal netlist and layout results are obtained.

[0010] According to the above-mentioned technical means, the present application adds a delay optimization link between the layout link and the routing link, which can obtain more accurate delay information compared to after the synthesis link and smaller operation complexity and running time cost compared to after the routing link; in the delay optimization link, the present application uses the netlist after the synthesis link and the layout results after layout as input, and finally outputs the optimal netlist and layout results obtained after multiple rounds of iterations, which can greatly discover the unoptimized delays.

[0011] In combination with the first aspect, in one implementation, performing timing analysis on the initial netlist and the layout result to obtain a critical path includes:

[0012] A timing analysis is performed on the initial netlist and the layout result, and based on the timing analysis result, a path with the longest delay in the initial netlist and the layout result is determined as a critical path.

[0013] In combination with the first aspect, in one implementation, performing multiple iterations on the critical path based on the node deviation and obtaining the node to be copied on the critical path during each iteration includes:

[0014] Calculating the raw deviation of each node on the critical path;

[0015] Multiplying the original deviation by a target random number within a range to obtain a new deviation;

[0016] Based on the new deviation of each node, the node with the largest deviation on the critical path is determined as the node to be copied.

[0017] According to the above technical means, the present application dilutes the error caused by the deviation simulation delay by introducing random numbers, and retains the better solution through iteration.

[0018] In combination with the first aspect, in one implementation, calculating the original deviation of each node on the critical path includes:

[0019] For each node on the critical path, obtaining an input node and an output node of the node;

[0020] Acquire a first straight-line distance between the node and the input node, a second straight-line distance between the node and the output node, and a third straight-line distance between the input node and the output node;

[0021] For each node, addition and subtraction operations are performed on the first straight-line distance, the second straight-line distance, and the third straight-line distance to obtain the deviation of each node on the critical path.

[0022] In combination with the first aspect, in one implementation, determining the replication position of the node to be replicated includes:

[0023] Obtaining an expected delay; the expected delay is less than an initial delay of the critical path;

[0024] Obtaining the midpoint position of the line connecting the input node and the output node of the original node corresponding to the node to be copied, and determining the midpoint position as the copy position of the node to be copied;

[0025] When the delay caused by the midpoint position exceeds the expected delay, starting from the midpoint position, a copy position that meets the expected delay is searched around the midpoint position in a breadth-first manner; wherein, the copy positions whose deviations are less than the original deviations of the node to be copied are included in the search range.

[0026] According to the above technical means, the present application dilutes the deviation caused by the results of the timing analysis tool by setting the expected delay and the expected delay in a step-by-step manner, and retains the better solution through iteration.

[0027] In combination with the first aspect, in one implementation, copying the node to be copied at the copy position and reallocating the output signal of the original node corresponding to the node to be copied to obtain the current iteration result includes:

[0028] Copy the node to be copied to the copy position, and obtain each output signal of the original node corresponding to the node to be copied;

[0029] The delay of the entire critical path when each output signal is driven by the original node and the copy node is obtained, and the driving relationship with a shorter delay is retained to obtain the result of this iteration.

[0030] In combination with the first aspect, in one implementation, after reallocating the output signal of the original node corresponding to the node to be copied, the method includes:

[0031] When the copy position conflicts with the position of the allocated node in the initial netlist and the layout result, a progressive layout process is performed on the copy position to move the position of the allocated node.

[0032] According to the above technical means, the optimal netlist and layout results obtained by this application after multiple rounds of iterations can greatly discover the unoptimized delays.

[0033] In a second aspect, the present application provides an FPGA delay optimization device based on node replication, the device comprising:

[0034] A critical path acquisition module, used to acquire an initial netlist and layout results, and perform timing analysis on the initial netlist and layout results to acquire a critical path;

[0035] A replication position determination module, used to perform multiple iterations on the critical path based on the node deviation, and in each iteration process, obtain the node to be replicated on the critical path and determine the replication position of the node to be replicated;

[0036] An output signal redistribution module is used to copy the node to be copied to the copy position, and redistribute the output signals of the original node and the copy node corresponding to the node to be copied, so as to obtain the result of this iteration;

[0037] The netlist and layout result optimization module is used to obtain the optimal netlist and layout results based on multiple iterative processing results.

[0038] In a third aspect, the present application provides a computer device, comprising a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the above-mentioned FPGA delay optimization method based on node replication.

[0039] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the storage medium stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the above-mentioned FPGA delay optimization method based on node replication.

[0040] The technical solution provided by this application may have the following beneficial effects:

[0041] The present application adds a delay optimization link between the layout link and the routing link, which can obtain more accurate delay information compared to after the synthesis link and lower operation complexity and running time cost compared to after the routing link; in the delay optimization link, the present application uses the netlist after the synthesis link and the layout results after layout as input, and finally outputs the optimal netlist and layout results obtained after multiple rounds of iterations, which can greatly discover the unoptimized delays.

[0042] In addition, the present application dilutes the error caused by the deviation simulation delay by introducing random numbers, and retains the better solution through iteration; and dilutes the deviation caused by the timing analysis tool results by setting the expected delay and the expected delay in a step-by-step manner, and retains the better solution through iteration. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0044] Figure 1 The figure shows the process flow from the current user design to the enabling of the FPGA chip.

[0045] Figure 2 It is a flowchart showing an example embodiment in which a delay optimization step is added.

[0046] Figure 3 The present invention is a method flow chart of an FPGA delay optimization method based on node replication according to an exemplary embodiment.

[0047] Figure 4 The present invention is a method flow chart of an FPGA delay optimization method based on node replication according to an exemplary embodiment.

[0048] Figure 5 The present invention is a method flow chart of an FPGA delay optimization method with a delay optimization link added according to an exemplary embodiment.

[0049] Figure 6 It is a distribution diagram of an FPGA architecture according to an exemplary embodiment.

[0050] Figure 7 The invention is a flow chart of a method for selecting a copy position of a copy point according to an exemplary embodiment.

[0051] Figure 8 It is a structural block diagram of an FPGA delay optimization device based on node replication according to an exemplary embodiment.

[0052] Fig. 9 A structural block diagram of a computer device shown in an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION

[0053] The technical solution of the present application will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.

[0054] Figure 1The figure shows the process flow diagram of each link from the current user design to the enabling of the FPGA chip. Figure 1 As shown, it includes user design, synthesis, layout, routing, bitstream generation and FPGA enabling. Among them, bitstream generation is to convert the results of the previous steps into results that can enable the FPGA chip, and does not involve optimization operations; the synthesis is to convert the user design into a netlist; the layout is to map each node on the netlist obtained in the synthesis to the specific position of the FPGA chip; the routing is to determine the specific connection method between the pins on the FPGA chip based on the position of the layout and the pin connection relationship in the netlist. The above three links all involve the optimization of critical path delays, but it can be seen that the information in the above three links is transmitted one-way, and the optimization methods of each link have great limitations, so there is still a lot of room for optimization. Please refer to Figure 2 The flowchart with the delay optimization link added is shown. In order to achieve FPGA delay optimization, the present application adds a delay optimization link between the layout link and the routing link, which can obtain more accurate delay information compared to after the synthesis link and smaller operation complexity and running time cost compared to after the routing link.

[0055] Figure 3 FIG. 1 is a flowchart of a method for optimizing FPGA delay based on node replication according to an exemplary embodiment. Figure 3 As shown, the method may include the following steps:

[0056] Step S301: Obtain an initial netlist and layout results, and perform timing analysis on the initial netlist and layout results to obtain a critical path.

[0057] In a possible implementation, the present embodiment adds a delay optimization link between the layout link and the routing link. Therefore, when performing FPGA delay optimization, the netlist result of the synthesis link and the layout result of the layout link, that is, the above-mentioned initial netlist and layout result, are first obtained, and then the synthesized netlist and the layout result after layout are used as inputs of the delay optimization link, and finally the optimal netlist and layout results obtained after multiple rounds of iterations are output; in the delay optimization link, after obtaining the initial netlist and layout results, the present embodiment first needs to find the critical path, which is the path with the longest delay, that is, the optimization target of the present embodiment.

[0058] Step S302: perform multiple iterations on the critical path based on the node deviation, and in each iteration process, obtain the node to be copied on the critical path and determine the copy position of the node to be copied.

[0059] In a possible implementation, this embodiment obtains the optimal netlist and layout results after multiple rounds of iterations. If the multiple rounds of iterations do not make the results better, the output result is the input initial netlist and layout results. The criterion for determining whether the result is better is whether the delay of the critical path is smaller. After obtaining the critical path, this embodiment needs to determine which node on the critical path (i.e., the node to be copied) is to copy a new node into the netlist, and all its pin connections are exactly the same as the original node.

[0060] After completing the node selection and copying, the step of selecting the location of the copy node (i.e. the above-mentioned copy location) is entered. Since this implementation determines the node to be copied based on the node deviation, the search range of the copy location is: the location where the deviation is less than the original deviation of the node to be copied.

[0061] Step S303: copy the node to be copied to the copy position, and redistribute the output signal of the original node corresponding to the node to be copied to obtain the result of this iteration.

[0062] In a possible implementation, this embodiment copies the corresponding node to be copied to the copy position according to the searched copy position. After completing the position selection of the copy node, its output signal needs to be redistributed. At this time, since the functions of the original node and the copy node are exactly the same, each output signal can only be driven by one of them (that is, an output signal cannot be driven by the original node and the copy node at the same time); the output signal is distributed in a step-by-step traversal, and the delay of the entire critical path is obtained when each output signal is driven by the original node and the copy node respectively, and the driving relationship with shorter delay is retained.

[0063] Step S304: Obtain the optimal netlist and layout results based on the results of multiple iterative processes.

[0064] In a possible implementation, the best result among the multiple iterative processing results is selected as the best netlist and layout result.

[0065] To summarize, the present application adds a delay optimization link between the layout link and the routing link, which can obtain more accurate delay information compared to after the synthesis link and lower operation complexity and running time cost compared to after the routing link; in the delay optimization link, the present application uses the netlist after the synthesis link and the layout results after layout as input, and finally outputs the optimal netlist and layout results obtained after multiple rounds of iterations, which can greatly discover the unoptimized delays.

[0066] In addition, the present application dilutes the error caused by the deviation simulation delay by introducing random numbers, and retains the better solution through iteration; and dilutes the deviation caused by the timing analysis tool results by setting the expected delay and the expected delay in a step-by-step manner, and retains the better solution through iteration.

[0067] Figure 4 is a method flow chart of a method for optimizing FPGA delay based on node replication according to an exemplary embodiment. The method is applied between the layout link and the routing link of FPGA design, such as Figure 4 As shown, the method may include the following steps:

[0068] Step S401: Perform timing analysis on the initial netlist and the layout result, and determine the path with the longest delay in the initial netlist and the layout result as the critical path according to the timing analysis result.

[0069] In one possible implementation, see Figure 5 The method flow chart of the FPGA delay optimization method with the delay optimization link added is shown. The acquisition of the critical path is completed by the timing analysis tool provided in the EDA tool. The timing analysis tool is not a specific link in the FPGA design process, but a tool that can be called by each link. Specifically, the accuracy of the delay information obtained by the timing analysis tool after different links is different. The accuracy after the synthesis link is the lowest, and the accuracy after the wiring link is the highest. Therefore, if the present scheme is applied to the deviation of the delay information after synthesis and before wiring, the present scheme will be distorted. However, if the present scheme is applied to wiring, the netlist needs to be modified at the same time, and the layout and wiring related information need to be arranged. The operation complexity and time cost will be greatly increased. Therefore, in this embodiment, the delay optimization link is added between the layout link and the wiring link. In the delay optimization link, the present embodiment finds the critical path through the timing analysis tool of the EDA tool itself, and determines the replication node and its position and connection relationship by selecting a node on the critical path for replication, searching for a suitable replication position, and outputting signal allocation and other links, and obtains a new layout result by resolving conflicts through the progressive layout of the EDA tool itself.

[0070] Step S402: Calculate the original deviation of each node on the critical path.

[0071] In a possible implementation, step S402 includes:

[0072] For each node on the critical path, obtain the input node and output node of the node;

[0073] Obtaining a first straight-line distance between the node and the input node, a second straight-line distance between the node and the output node, and a third straight-line distance between the input node and the output node;

[0074] For each node, the first straight-line distance, the second straight-line distance, and the third straight-line distance are added and subtracted to obtain the deviation of each node on the critical path. In this embodiment, the first straight-line distance is added to the second straight-line distance, and the third straight-line distance is subtracted from the addition result to obtain the deviation of the corresponding node.

[0075] Further, such as Figure 5 As shown, after obtaining the critical path, this embodiment needs to determine which specific node on the critical path to copy, and the specific operation method is: 1. Calculate the original deviation of each node, 2. Multiply the original deviation by a random number to obtain a new deviation, 3. Sort the nodes on the critical path based on the new deviation, and select the node with the largest deviation as the node that most needs to be copied (i.e., the node to be copied).

[0076] Among them, see Figure 6 The distribution diagram of the FPGA architecture is shown in FIG. 1 . The calculation of the node deviation depends on the FPGA architecture design, such as Figure 6 As shown, the interior of the FPGA chip is composed of a series of neatly arranged tiles. Therefore, in this embodiment, by selecting any tile (the tile is equivalent to each layout unit in the FPGA architecture) as the origin, a rectangular coordinate system can be constructed, and the position of each tile can be described by coordinates; in addition, each node in the layout result is placed in a tile, so each node corresponds to a tile that can reflect the position of the node.

[0077] The deviation of each node can be calculated by the following formula:

[0078] deviation(i)=dist(prev(i),i)+dist(i,next(i))-dist(prev(i),next(i));

[0079] Where deviation(i) represents the deviation of node i, prev(i) represents the input node of node i, next(i) represents the output node of node i, and dist is calculated as the straight-line distance between two nodes.

[0080] by Figure 6 For example, assuming that the distance between every two adjacent tiles is 1, then the distance between Tile0 and Tile1 is 1, and the distance between Tile0 and Tile5 is It can be seen that the deviation calculation of each node depends on the input node and output node of the node. Therefore, the deviation of each node can be obtained by traversing each node along the critical path starting from the input or output. It can be seen that the idea behind this deviation calculation method is that the sum of the two sides of a triangle is greater than the third side. Therefore, placing three consecutive points on a straight line can obtain the minimum deviation. The larger the deviation, the larger the deviation that can be corrected, which means the larger the delay that can be optimized.

[0081] However, the inside of the FPGA chip is not continuous, but an array based on tiles. Therefore, the direct line often cannot reflect the delay on the FPGA chip very well. For example, the direct line between Tile0 and Tile1 does not pass through any tile. Therefore, in order to make the deviation better reflect the delay, this solution obtains a new deviation by multiplying the original deviation by a random number within a certain range. In addition, the introduction of randomness also makes subsequent iterations possible, so that each iteration can select different nodes for replication and select the best result among multiple iterations. In the process of selecting the replication node, this embodiment uses random numbers to dilute the error caused by the deviation simulation delay. Its characteristic is that the nodes selected for replication in each round of iteration may be different.

[0082] Step S403: multiply the original deviation by a target random number within a determined range to obtain a new deviation.

[0083] Step S404: Based on the new deviation of each node, the node with the largest deviation on the critical path is determined as the node to be copied.

[0084] Step S405: Obtain an expected delay; the expected delay is less than the initial delay of the critical path.

[0085] Step S406: Obtain the midpoint position of the line connecting the input node and the output node of the original node corresponding to the node to be copied, and determine the midpoint position as the copy position of the node to be copied;

[0086] In a possible implementation, when the delay caused by the midpoint position exceeds the expected delay (i.e., when the delay caused by the midpoint position being determined as the replication position of the node to be replicated exceeds the expected delay), starting from the midpoint position, a replication position satisfying the expected delay is searched around the midpoint position in a breadth-first manner; wherein, the replication positions whose deviation is less than the original deviation of the node to be replicated are all included in the search range. If the delay caused by all positions in the search range exceeds the expected delay, the expected delay is reset, and the expected delay is increased in sequence, and a fixed value can be increased each time.

[0087] For further information, see Figure 7 The flowchart of the method for selecting the copy position of the copy point is shown. After completing the node selection and copying, this embodiment enters the link of selecting the position of the copy node. In order to determine the copy position of the copy node, this embodiment first needs to set an expected delay, which is less than the initial delay of the original critical path. Then, the midpoint of the line connecting the input node and the output node of the original node is used as the starting position (exemplarily, for example, the midpoint of Tile0 and Tile2 is Tile1, and the midpoint between Tile0 and Tile7 can be any one of Tile1, Tile2, Tile5, and Tile6), and it is determined whether the set expected delay is met (that is, it is determined whether the delay caused by determining the midpoint position as the copy position of the node to be copied exceeds the expected delay. If it does not exceed, it is full, and if it exceeds, it is not male), if it does not meet, then look for a possible position around in a breadth-first manner. For example, if Tile1 does not meet, then continue to search Tile2, Tile5, and Tile6.

[0088] If no node in the search range satisfies the requirement, the expected delay is reset (it can be understood as increasing the expected delay by a fixed value each time). If the expected delay exceeds the delay of the original critical path, it means that there is no better solution in the search range, so the failure of this iteration does not change. If it does not exceed the requirement, continue to search for a location that meets the expected delay from the center point. The search range includes all nodes with a deviation less than the original node deviation. For example, assuming that the original node is in Tile10, its input node is in Tile1, and its output node is in Tile3, then the center selected initially is Tile2. If the node in Tile2 does not meet the conditions, Tile6 can be further tried. If it still does not meet the conditions, Tile5 or Tile7 will be tried, but Tile9 and Tile11 will not be further tried (here, Tile10 is the origin, Tile9 and Tile11 are the estimated copy positions of the origin Tile10. Based on the above deviation formula, determining the copy node at the position of Tile9 or Tile11 will make the deviation greater than the original deviation of the origin Tile10, so Tile9 and Tile11 will not be considered).

[0089] It can be seen that this embodiment does not adopt the method of traversing all possible positions to find the position with the smallest delay when selecting the copy node position, but sets an expected delay and gradually increases the expected delay until a position that meets the expected delay is found. The advantage of this embodiment is that it dilutes the deviation between the result given by the timing analysis tool and the actual result after the final wiring. Its feature is that by setting different expected delays and the increment size each time, different positions can be obtained even for the same copy node, and the optimal result can be selected in multiple rounds of iterations.

[0090] Step S407: copy the node to be copied to the copy position, and redistribute the output signal of the original node corresponding to the node to be copied.

[0091] In a possible implementation, step S407 includes:

[0092] Copy the node to be copied to the copy position, and obtain each output signal of the original node corresponding to the node to be copied;

[0093] The delay of the entire critical path when each output signal is driven by the original node and the copy node is obtained, and the driving relationship with shorter delay is retained to obtain the result of this iteration.

[0094] Furthermore, after completing the location selection of the duplicate node, its output signal needs to be redistributed. If the delay of the entire path is shorter when the output signal is driven by the original node, the signal is driven by the original node, otherwise the output signal is driven by the duplicate node.

[0095] For example, suppose that an output pin of the original node has three output signals connected to three pins A, B, and C respectively. When the node is copied, the copied node (the copied node corresponds to the original node one-to-one) also has an output pin and is connected to three pins A, B, and C. Afterwards, a comparison is performed one by one when determining the output signal allocation. For example, if the delay of the entire path connecting the original node to pin A is 10ns, and the delay of the entire path connecting the copied node to pin A is only 5ns, then the connection relationship between the output pin of the copied node and pin A is retained, and the connection relationship between the output pin of the original node and pin A is deleted; the same operation is performed for pins B and C. If all output signals in the original node are allocated to the copied node, the original node is deleted. After the allocation is completed, the number of nodes in the netlist is greater than or equal to the number of nodes in the original netlist.

[0096] Step S408: When there is a conflict between the copy position and the position of the allocated node in the initial netlist and the layout result, a progressive layout process is performed on the copy position to move the position of the allocated node.

[0097] Furthermore, after completing the distribution of the output signal, the present embodiment also needs to determine whether there is a conflict in the position selected for the copy node, because the present embodiment is applied after the layout phase of the FPGA design, so the selected copy position may have been allocated to other nodes in the layout phase, which is a position conflict. If there is no conflict, the copy node can be directly placed at the selected copy position and enter the subsequent phase. If there is a conflict, the conflict needs to be resolved. The method for resolving the conflict is implemented through the progressive layout provided by the EDA tool itself, which is used to deal with the problem of multiple nodes at one position. In the present embodiment, the copy node is fixed at the selected copy position, and the progressive layout will perform a local re-layout by moving the original node of the copy position and its surrounding nodes, and finally obtain a new layout result that does not affect the position of the copy node. So far, the present embodiment reduces the delay of the critical path by node replication and achieves an optimization effect.

[0098] Step S409: Obtain the optimal netlist and layout results based on the results of multiple iterative processes.

[0099] To summarize, the present application adds a delay optimization link between the layout link and the routing link, which can obtain more accurate delay information compared to after the synthesis link and lower operation complexity and running time cost compared to after the routing link; in the delay optimization link, the present application uses the netlist after the synthesis link and the layout results after layout as input, and finally outputs the optimal netlist and layout results obtained after multiple rounds of iterations, which can greatly discover the unoptimized delays.

[0100] In addition, the present application dilutes the error caused by the deviation simulation delay by introducing random numbers, and retains the better solution through iteration; and dilutes the deviation caused by the timing analysis tool results by setting the expected delay and the expected delay in a step-by-step manner, and retains the better solution through iteration.

[0101] Figure 8 This is a structural block diagram of an FPGA delay optimization device based on node replication according to an exemplary embodiment. The device includes:

[0102] The critical path acquisition module 801 is used to acquire the initial netlist and layout results, and perform timing analysis on the initial netlist and layout results to acquire the critical path;

[0103] The replication position determination module 802 is used to perform multiple iterations on the critical path based on the node deviation, and in each iteration process, obtain the node to be replicated on the critical path and determine the replication position of the node to be replicated;

[0104] The output signal reallocation module 803 is used to copy the node to be copied to the copy position, and reallocate the output signals of the original node and the copy node corresponding to the node to be copied, so as to obtain the result of this iteration;

[0105] The netlist and layout result optimization module 804 is used to obtain the optimal netlist and layout results according to the results of multiple iterative processes.

[0106] In a possible implementation manner, the critical path acquisition module 801 is further used to:

[0107] A timing analysis is performed on the initial netlist and the layout result, and based on the timing analysis result, a path with the longest delay in the initial netlist and the layout result is determined as a critical path.

[0108] In a possible implementation manner, the replication position determination module 802 is further configured to:

[0109] Calculate the raw deviation of each node on the critical path;

[0110] Multiply the original deviation by a target random number within a range to obtain a new deviation;

[0111] Based on the new deviation of each node, the node with the largest deviation on the critical path is determined as the node to be copied.

[0112] In a possible implementation manner, the replication position determination module 802 is further configured to:

[0113] For each node on the critical path, obtain the input node and output node of the node;

[0114] Obtaining a first straight-line distance between the node and the input node, a second straight-line distance between the node and the output node, and a third straight-line distance between the input node and the output node;

[0115] For each node, addition and subtraction operations are performed on the first straight-line distance, the second straight-line distance, and the third straight-line distance to obtain the deviation of each node on the critical path.

[0116] In a possible implementation manner, the replication position determination module 802 is further configured to:

[0117] Obtaining an expected delay; the expected delay is less than an initial delay of the critical path;

[0118] Obtaining the midpoint position of the line connecting the input node and the output node of the original node corresponding to the node to be copied, and determining the midpoint position as the copy position of the node to be copied;

[0119] When the delay caused by the midpoint position exceeds the expected delay, starting from the midpoint position, a breadth-first search is conducted around the midpoint position for a replication position that meets the expected delay; wherein, replication positions whose deviations are less than the original deviation of the node to be replicated are included in the search range.

[0120] In a possible implementation manner, the output signal reallocation module 803 is further configured to:

[0121] Copy the node to be copied to the copy position, and obtain each output signal of the original node corresponding to the node to be copied;

[0122] The delay of the entire critical path when each output signal is driven by the original node and the copy node is obtained, and the driving relationship with shorter delay is retained to obtain the result of this iteration.

[0123] In a possible implementation, the device is also used for:

[0124] When the copy position conflicts with the position of the allocated node in the initial netlist and the layout result, a progressive layout process is performed on the copy position to move the position of the allocated node.

[0125] To summarize, the present application adds a delay optimization link between the layout link and the routing link, which can obtain more accurate delay information compared to after the synthesis link and lower operation complexity and running time cost compared to after the routing link; in the delay optimization link, the present application uses the netlist after the synthesis link and the layout results after layout as input, and finally outputs the optimal netlist and layout results obtained after multiple rounds of iterations, which can greatly discover the unoptimized delays.

[0126] In addition, the present application dilutes the error caused by the deviation simulation delay by introducing random numbers, and retains the better solution through iteration; and dilutes the deviation caused by the timing analysis tool results by setting the expected delay and the expected delay in a step-by-step manner, and retains the better solution through iteration.

[0127] See also Fig. 9 , which is a schematic diagram of a computer device provided according to an exemplary embodiment of the present application, the computer device includes a memory and a processor, the memory is used to store a computer program, and when the computer program is executed by the processor, the above-mentioned FPGA delay optimization method based on node replication is implemented.

[0128] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0129] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the method in the implementation of the present application. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory, that is, implementing the method in the above method implementation.

[0130] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0131] In an exemplary embodiment, a computer-readable storage medium is also provided, which is used to store at least one computer program, and the at least one computer program is loaded and executed by a processor to implement all or part of the steps in the above method. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.

[0132] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0133] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A FPGA delay optimization method based on node replication, characterized in that: The method comprises: Obtaining an initial netlist and layout results, and performing timing analysis on the initial netlist and layout results to obtain a critical path; Performing multiple iterations on the critical path based on the node deviation, and obtaining the to-be-copied node on the critical path during each iteration, and determining the copy position of the to-be-copied node; Copy the node to be copied to the copy position, and redistribute the output signal of the original node corresponding to the node to be copied to obtain the result of this iteration; Obtain the optimal netlist and layout results based on multiple iterative processing results; The step of performing multiple iterations on the critical path based on the node deviation and obtaining the node to be copied on the critical path during each iteration includes: Calculating the raw deviation of each node on the critical path; Multiplying the original deviation by a target random number within a range to obtain a new deviation; Based on the new deviation of each node, determining the node with the largest deviation on the critical path as the node to be copied; Determining the replication position of the node to be replicated includes: Obtaining an expected delay; the expected delay is less than an initial delay of the critical path; Obtaining the midpoint position of the line connecting the input node and the output node of the original node corresponding to the node to be copied, and determining the midpoint position as the copy position of the node to be copied; When the delay caused by the midpoint position exceeds the expected delay, starting from the midpoint position, a copy position that meets the expected delay is searched around the midpoint position in a breadth-first manner; wherein, the copy positions whose deviations are less than the original deviations of the node to be copied are included in the search range.

2. The method according to claim 1, characterized in that The performing timing analysis on the initial netlist and the layout result to obtain the critical path includes: A timing analysis is performed on the initial netlist and the layout result, and based on the timing analysis result, a path with the longest delay in the initial netlist and the layout result is determined as a critical path.

3. The method according to claim 1, characterized in that The calculating the original deviation of each node on the critical path includes: For each node on the critical path, obtaining an input node and an output node of the node; Acquire a first straight-line distance between the node and the input node, a second straight-line distance between the node and the output node, and a third straight-line distance between the input node and the output node; For each node, addition and subtraction operations are performed on the first straight-line distance, the second straight-line distance, and the third straight-line distance to obtain the deviation of each node on the critical path.

4. The method according to claim 1, characterized in that: The step of copying the node to be copied to the copy position and redistributing the output signal of the original node corresponding to the node to be copied to obtain the result of this iteration includes: Copy the node to be copied to the copy position, and obtain each output signal of the original node corresponding to the node to be copied; The delay of the entire critical path when each output signal is driven by the original node and the copy node is obtained, and the driving relationship with a shorter delay is retained to obtain the result of this iteration.

5. The method according to any one of claims 1 to 4, characterized in that: After reallocating the output signal of the original node corresponding to the node to be copied, the method includes: When the copy position conflicts with the position of the allocated node in the initial netlist and the layout result, a progressive layout process is performed on the copy position to move the position of the allocated node.

6. An FPGA delay optimization device based on node replication, characterized in that: The device comprises: A critical path acquisition module, used to acquire an initial netlist and layout results, and perform timing analysis on the initial netlist and layout results to acquire a critical path; A replication position determination module, used to perform multiple iterations on the critical path based on the node deviation, and in each iteration process, obtain the node to be replicated on the critical path and determine the replication position of the node to be replicated; An output signal redistribution module is used to copy the node to be copied to the copy position, and redistribute the output signals of the original node and the copy node corresponding to the node to be copied, so as to obtain the result of this iteration; Netlist and layout result optimization module, used to obtain the optimal netlist and layout results based on multiple iterative processing results; The replication position determination module is further used for: Calculating the raw deviation of each node on the critical path; Multiplying the original deviation by a target random number within a range to obtain a new deviation; Based on the new deviation of each node, determining the node with the largest deviation on the critical path as the node to be copied; Obtaining an expected delay; the expected delay is less than an initial delay of the critical path; Obtaining the midpoint position of the line connecting the input node and the output node of the original node corresponding to the node to be copied, and determining the midpoint position as the copy position of the node to be copied; When the delay caused by the midpoint position exceeds the expected delay, starting from the midpoint position, a copy position that meets the expected delay is searched around the midpoint position in a breadth-first manner; wherein, the copy positions whose deviations are less than the original deviations of the node to be copied are included in the search range.

7. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement an FPGA delay optimization method based on node replication as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the FPGA delay optimization method based on node replication as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Single-task and multi-core scheduling method based on critical path and task duplication

    CN103034614A

  • Layout optimization method and deice, terminal and storage medium

    CN107315863A

  • Circuit highest working frequency test method based on key path replication

    CN110222388A

  • Integrated circuit design method and device, electronic equipment and readable storage medium

    CN113486612A

  • Image noise suppression method, device, calculation equipment and storage medium

    CN113781354A