# Patent

## Title
Sequential delay analysis by placement engines

## Abstract

Some embodiments provide a method of designing an integrated circuit (IC). The design is expressed as a graph that includes several nodes that represent several IC components. The nodes include a first set of nodes that represent a set of clocked elements. The method creates a second set of nodes by removing all nodes in the first set from the nodes that represent the IC components. The method identifies a set of edges that connect two nodes in the second set without encompassing a third node in the second set. The method assigns an event time to each node in the second set. The method assigns a cost function based on the event times of the nodes connected by each edge and the number of nodes in the first set encompassed by each edge. The method optimizes the cost function and places the components based on the cost function optimization.

## Background
FIELD OF THE INVENTION
The present invention is directed towards placement engines for integrated circuits.
BACKGROUND OF THE INVENTION
An IC is a device that includes numerous electronic components (e.g., transistors, resistors, diodes, etc.) that are embedded typically on the same substrate, such as a single piece of semiconductor wafer. These components are connected with one or more layers of wiring to form multiple circuits, such as Boolean gates, memory cells, arithmetic units, controllers, decoders, etc. An IC is often packaged as a single IC chip in one IC package, although some IC chip packages can include multiple pieces of substrate or wafer.
Electronic Design Automation (EDA) tools are automated tools used in IC design. Placement and routing are steps in automatic design of ICs in which a layout of a larger block of the circuit or the whole circuit is created from layouts of smaller sub-blocks. During placement, the positions of the sub-blocks in the design area are determined. These sub-blocks are interconnected during routing. A placer assigns exact locations for circuit components within the IC chip's core area. A placer typically has several objectives such as minimizing total wire length, timing optimization, reducing congestion, and minimizing power. The placer takes a given synthesized circuit netlist with a technology library and produces a placement layout. The layout is optimized according to a set of placer objectives.
The maximum delay through the critical path of a chip determines the clock cycle and, therefore, the speed of the chip. The timing optimization is performed to ensure that no path exists with delay exceeding a maximum specified delay.
SUMMARY OF THE INVENTION
Some embodiments provide a method of designing an integrated circuit (IC). The design is expressed as a graph that includes several nodes that represent several IC components. The nodes include a first set of nodes that represent a set of clocked elements. The method creates a second set of nodes by removing all nodes in the first set from the nodes that represent the IC components. The method identifies a set of edges that connect two nodes in the second set without encompassing a third node in the second set. The method assigns an event time to each node in the second set. The method assigns a cost function based on the event times of the nodes connected by each edge and the number of nodes in the first set encompassed by each edge. The method optimizes the cost function and places the components based on the cost function optimization.
In some embodiments, the cost function is further based on horizontal and vertical coordinates of the nodes on the graph. In some embodiments, the cost function is optimized by changing at least one of the event time and a coordinate of a node. In some embodiments, all clocked elements in the first set of nodes are retimable clocked elements. In some embodiments, the nodes in the second set include clocked elements that cannot be retimed. In some embodiments, the nodes in the second set include input and out nodes of the graph. In some embodiments, the nodes in the second set include any nodes with timing constraints. In some embodiments, the nodes in the second set include storage elements. In some embodiments, the IC is either an application-specific integrated circuit (ASIC), structured ASIC, field-programmable gate arrays (FPGA), programmable logic devices (PLD), complex programmable logic devices (CPLD), or system on chip (SOC), or system-in-package (SIP).
In some embodiments, the IC is a reconfigurable IC that includes at least one reconfigurable circuit that reconfigures during an operation of the IC. In some embodiments, at least one reconfigurable circuit can reconfigure at a first clock rate that is faster than a second clock rate which is specified for a particular design of the IC. In some embodiments, the second clock has a clock cycle that includes several sub-cycles. In these embodiments, placing the IC components includes assigning each node in the second set of nodes to a particular sub-cycle of the second clock.
Some embodiments provide a method of designing an integrated circuit (IC). The method optimizes a cost function that includes at least one time variable. The method places the IC components based on the cost function optimization. The placing is performed only once after optimizing the cost function. In some embodiments, the time variable includes several event times that are assigned to the components in the IC design. In some embodiments, the cost function further includes horizontal and vertical coordinates of each component. The cost function is optimized by changing at least one of the event time and a coordinate of a component.
Some embodiments provide a method of designing an integrated circuit (IC). The IC design is expressed as a graph that includes several edges and several nodes that represent several IC components. Each edge connects two nodes without encompassing a third node. The method assigns an event time to each node in the graph. The method assigns a cost function for each edge based on the event times of the nodes connected by each edge. The method optimizes the cost function and places the IC components based on the optimized cost function. In some embodiments, the cost function is further based on horizontal and vertical coordinates of the nodes on the graph. In some embodiments, the cost function is optimized by changing at least one of the event time and a coordinate of a node. In some embodiments, the IC is either an application-specific integrated circuit (ASIC), structured ASIC, field-programmable gate arrays (FPGA), programmable logic devices (PLD), complex programmable logic devices (CPLD), system on chip (SOC), system-in-package (SIP), or reconfigurable IC.



BRIEF DESCRIPTION OF THE DRAWINGS
The novel features of the invention are set forth in the appended claims. However, for purpose of explanation, several embodiments of the invention are set forth in the following figures.
FIG. 1 illustrates a path that includes computational and clocked elements between a source node and a target node in some embodiments.
FIG. 2 conceptually illustrates an example of a sub-cycle reconfigurable IC.
FIG. 3 illustrates an example of combinational delay computation in some embodiments.
FIG. 4 conceptually illustrates a process to compute accumulated delays in some embodiments.
FIG. 5 conceptually illustrates a process that utilizes combinational delay computation to determine whether a path has met its timing requirements in some embodiments.
FIG. 6 illustrates a path in which clocked elements are conceptually replaced with non-computational elements with negative delays.
FIG. 7 illustrates an example of sequential delay computation in some embodiments.
FIG. 8 conceptually illustrates a process that utilizes sequential delay computation to determine whether a path has met its timing requirements in some embodiments.
FIG. 9 illustrates retiming clocked elements across a path in some embodiments to meet timing requirements in all timed paths.
FIG. 10 conceptually illustrates a process performed by a placement engine to do timing analysis using sequential delay computations.
FIG. 11 illustrates an example of problems with calculation of sequential delay in a circuit with a failing loop.
FIG. 12 illustrates a table that shows the results of several iterations of sequential delay calculations for FIG. 11.
FIG. 13 illustrates a path with a source and a target node in some embodiments.
FIG. 14 conceptually illustrates a process performed by a placement engine to do timing analysis in some embodiments.
FIG. 15 illustrates a process that conceptually shows timing analysis performed by a placement engine in some embodiment using sequential delay calculation.
FIG. 16 illustrates conceptual removal of clocked elements from sequential edges in some embodiments to facilitate sequential delay calculation.
FIG. 17 conceptually illustrates a process that identifies a sub-cycle for performing each computational element in a netlist in some embodiments.
FIG. 18 illustrates a path with event times assigned to computational elements of a reconfigurable IC in some embodiments.
FIG. 19 illustrates the path of FIG. 18 after certain computational elements are moved to other operational cycles.
FIG. 20 illustrates a timeline for performing computational elements of FIG. 19.
FIG. 21 illustrates a timeline for performing computational elements of FIG. 19.
FIG. 22 illustrates an electronics system with which some embodiments of the invention are implemented.



DETAILED DESCRIPTION OF THE INVENTION
In the following description, numerous details are set forth for purpose of explanation. However, one of ordinary skill in the art will realize that the invention may be practiced without the use of these specific details. For instance, not all embodiments of the invention need to be practiced with the specific devices referred to below. In other instances, well-known structures and devices are shown in block diagram form in order not to obscure the description of the invention with unnecessary detail.
I. Overview
Some embodiments provide a method of designing an integrated circuit (IC). The design is expressed as a graph that includes several nodes that represent several IC components. The nodes include a first set of nodes that represent a set of clocked elements. The method creates a second set of nodes by removing all nodes in the first set from the nodes that represent the IC components. The method identifies a set of edges that connect two nodes in the second set without encompassing a third node in the second set. The method assigns an event time to each node in the second set. The method assigns a cost function based on the event times of the nodes connected by each edge and the number of nodes in the first set encompassed by each edge. The method optimizes the cost function and places the components based on the cost function optimization.
In some embodiments, the cost function is further based on horizontal and vertical coordinates of the nodes on the graph. In some embodiments, the cost function is optimized by changing at least one of the event time and a coordinate of a node. In some embodiments, all clocked elements in the first set of nodes are retimable clocked elements. In some embodiments, the nodes in the second set include clocked elements that cannot be retimed. In some embodiments, the nodes in the second set include input and out nodes of the graph. In some embodiments, the nodes in the second set include any nodes with timing constraints. In some embodiments, the nodes in the second set include storage elements. In some embodiments, the IC is either an application-specific integrated circuit (ASIC), structured ASIC, field-programmable gate arrays (FPGA), programmable logic devices (PLD), complex programmable logic devices (CPLD), or system on chip (SOC), or system-in-package (SIP).
In some embodiments, the IC is a reconfigurable IC that includes at least one reconfigurable circuit that reconfigures during an operation of the IC. In some embodiments, at least one reconfigurable circuit can reconfigure at a first clock rate that is faster than a second clock rate which is specified for a particular design of the IC. In some embodiments, the second clock has a clock cycle that includes several sub-cycles. In these embodiments, placing the IC components includes assigning each node in the second set of nodes to a particular sub-cycle of the second clock.
Some embodiments provide a method of designing an integrated circuit (IC). The method optimizes a cost function that includes at least one time variable. The method places the IC components based on the cost function optimization. The placing is performed only once after optimizing the cost function. In some embodiments, the time variable includes several event times that are assigned to the components in the IC design. In some embodiments, the cost function further includes horizontal and vertical coordinates of each component. The cost function is optimized by changing at least one of the event time and a coordinate of a component.
Some embodiments provide a method of designing an integrated circuit (IC). The IC design is expressed as a graph that includes several edges and several nodes that represent several IC components. Each edge connects two nodes without encompassing a third node. The method assigns an event time to each node in the graph. The method assigns a cost function for each edge based on the event times of the nodes connected by each edge. The method optimizes the cost function and places the IC components based on the optimized cost function. In some embodiments, the cost function is further based on horizontal and vertical coordinates of the nodes on the graph. In some embodiments, the cost function is optimized by changing at least one of the event time and a coordinate of a node. In some embodiments, the IC is either an application-specific integrated circuit (ASIC), structured ASIC, field-programmable gate arrays (FPGA), programmable logic devices (PLD), complex programmable logic devices (CPLD), system on chip (SOC), system-in-package (SIP), or reconfigurable IC.
Several more detailed embodiments of the invention are described in sections below. Before describing these embodiments further, several terms and concepts used in the disclosure are described below in Section II. This discussion is followed by the discussion in Section III of combinational and sequential delays. Next, Section IV describes several embodiments of placement engines that also perform timing analysis. Last, Section V describes an electronics system with which some of the embodiments of the invention are implemented.
II. Terms and Concepts
A. Graph Representation of IC Designs
A netlist is a graph representation of an IC design. The graph is represented by a collection of node and edges. The nodes represent components of the IC and the edges represent connections between these components. The edges connect the nodes but do not go through (i.e., do not encompass) any nodes. In an IC design, each component lies on one or more signal paths (“paths”). A path is a sequence of nodes and edges in a netlist. The starting node is referred to as the source node and the end node is referred to as the sink or target node. The source and target nodes are also referred to as endpoints of a path. The source and target designations of the endpoints are based on the direction of the signal flow through the path.
A timed path is a path whose both endpoints are timed elements. Timed elements include primary inputs (through which the circuit receives external input), primary outputs (through which the circuit sends outputs to external circuits), clocked elements, storage elements, or any node with timing constraints (e.g., a node with a fixed time, either because the node cannot be retimed or the node is specified as when it should occur).
FIG. 1 illustrates a timed path 100 between a source node 105 and a target node 110 in some embodiments. The path 100 includes six computational elements 115 (shown as circles), three clocked elements 120 (shown as rectangles), and ten edges 125. Some embodiments utilize registers or latches as clocked elements. FIG. 1 also shows other smaller timed paths. For instance, the path starting from the source node 105 and ending to clocked element 120 is also a timed path. In order for an IC design to meet timing requirements, total delay (including computation delays and signal propagation delays) on each timed path must be less than or equal to one clock period.
The arrival time of a signal is the time elapsed for a signal to arrive at a certain point. The reference, or time 0, is taken from a source node. In some embodiments, when the source node is a primary input, the reference time is taken as the arrival time of a signal received at the primary input. Also, when the source node is a clocked element, the reference time is taken as the time a clock signal is received at the clocked element.
To calculate the arrival time of a signal at a node, delay calculations for all components and edges on the path are required. The required time is the latest time at which a signal can arrive without making the clock cycle longer than desired.
The time difference between the arrival time of a signal and the required arrival time of the signal is referred to as slack. The slack for a node is expressed by the following equation (A):

slack=required arrival time−arrival time  (A)

A positive (or zero) slack at a node indicates that the node has met its timing requirements. A positive slack also implies that the arrival time of the signal at that node may be increased by the value of the slack without affecting the overall delay of the circuit. Conversely, a negative slack implies that a path is too slow. Therefore, the path must be sped up (or the reference signal delayed) if the whole circuit is to work at the desired speed. A critical path is defined as a timed path with largest negative slack.

B. Configurable IC's
A configurable IC is a circuit that can “configurably” perform a set of operations. Specifically, a configurable circuit receives “configuration data” that specifies the operation that the configurable circuit has to perform from the set of operations that it can perform. In some embodiments, the configuration data is generated outside of the configurable IC. In these embodiments, a set of software tools converts a high-level IC design description (e.g., a circuit representation or a hardware description language design) into a set of configuration data that can configure the configurable IC (or more accurately, the configurable circuits of the configurable IC) to implement the IC design.
C. Reconfigurable IC's
A reconfigurable IC is a configurable IC that has at least one circuit that reconfigures during runtime. In other words, a reconfigurable IC is an IC that has reconfigurable logic circuits and/or reconfigurable interconnect circuits, where the reconfigurable logic and/or interconnect circuits are configurable logic and/or interconnect circuits that can “reconfigure” more than once at runtime. A configurable logic or interconnect circuit reconfigures when it receives a different set of configuration data. Some embodiments of the invention are implemented in reconfigurable ICs that are sub-cycle reconfigurable (i.e., can reconfigure circuits on a sub-cycle basis). In some embodiments, a reconfigurable IC has a large number of logic and interconnect circuits (e.g., hundreds, thousands, etc. of such circuits). Some or all of these circuits can be reconfigurable.
In some embodiments, runtime reconfigurability means reconfiguring without resetting the reconfigurable IC. Resetting a reconfigurable IC entails in some cases resetting the values stored in the state elements of the IC, where state elements are elements like latches, registers, and non-configuration memories (e.g., memories that store the user signals as opposed to the memories that store the configuration data of the configurable circuits). In some embodiments, runtime reconfigurability means reconfiguring after the reconfigurable IC has started processing of the user data. Also, in some embodiments, runtime reconfigurability means reconfiguring after the reconfigurable IC has powered up. These definitions of runtime reconfigurability are not mutually exclusive. Examples of configurable and reconfigurable ICs are described in detail in U.S. patent application Ser. No. 11/081,859, now U.S. Pat. No. 7,342,415, entitled “Configurable IC with Interconnect Circuits that also Perform Storage Operations”, filed on Mar. 15, 2005.
D. Sub-Cycle Reconfigurable IC
FIG. 2 conceptually illustrates an example of a sub-cycle reconfigurable IC. Specifically, in its top left hand corner, this figure illustrates an IC design 205 that operates at a clock speed of X MHz. Typically, an IC design is initially specified in a hardware description language (HDL), and a synthesis operation is used to convert this HDL representation into a circuit representation. After the synthesis operation, the IC design includes numerous electronic circuits, which are referred to below as “components.”
As further illustrated in FIG. 2, the operations performed by the components in the IC design 205 can be partitioned into four sets of operations 210-225, with each set of operations being performed at a clock speed of X MHz. FIG. 2 then illustrates that these four sets of operations 210-225 can be performed by one sub-cycle reconfigurable IC 230 that operates at 4X MHz. In some embodiments, four cycles of the 4X MHz clock correspond to four sub-cycles within a cycle of the X MHz clock. Accordingly, this figure illustrates the reconfigurable IC 230 reconfiguring four times during four cycles of the 4X MHz clock (i.e., during four sub-cycles of the X MHz clock). During each of these reconfigurations (i.e., during each sub-cycle), the reconfigurable IC 230 performs one of the identified four sets of operations. In other words, the faster operational speed of the reconfigurable IC 230 allows this IC to reconfigure four times during each cycle of the X MHz clock, in order to perform the four sets of operations sequentially at a 4X MHz rate instead of performing the four sets of operations in parallel at an X MHz rate.
III. Combinational and Sequential Delays
A. Combinational Delay
Combinational delay computation is performed on a path that starts from a clocked element source node and ends to a clocked element target node without encompassing any other clocked elements. Alternatively, the path can either start with any timed element and end to a clocked element or start with a clocked element and end to a timed element without encompassing any other clocked elements. The delay starts at zero and is accumulated as the path is traversed in the signal direction from a source node to a target node.
FIG. 3 illustrates a path 300 in some embodiments. As shown, path 300 starts from a primary input node 305 and ends to a primary output node 310. The path includes six computational elements (shown as circles) and three clocked elements (shown as rectangles). For this example, the clock period is assumed to be four time units. Also, for simplicity it is assumed that each computational element takes two time units to perform its operation.
Furthermore, for simplicity, it is assumed that there are no delays attributed to wiring lengths in this example. Alternatively, the delays attributed to wiring lengths between two endpoints can be added to the delay of the target node. As shown in FIG. 3, path 300 includes four smaller paths that either (1) start from a clocked element source node and end to a clocked element target node, (2) start from a timed element source node and end to a clocked element target node, or (3) start from a clocked element source node and end to a timed element target node. None of these paths encompass any other clocked elements. These four paths are the paths between (1) timed element 305 and clocked element 315, (2) clocked element 315 and clocked element 320, (3) clocked element 320 and clocked element 325, and (4) clocked element 325 and timed element 310. The combinational delay for each of these paths is the accumulated delays between the source and target nodes and is calculated by adding all computation and propagation delays between the source and target nodes.
Calculation of accumulated delays for each path is described by reference to FIGS. 4 and 5. FIG. 4 conceptually illustrates a process 400 for calculating accumulated delays for a path that starts with a source node and ends with a target node. As shown in FIG. 4, the process identifies (at 405) the source and target nodes of the path. Next, the process sets (at 410) the accumulated delay at the source node to zero.
Next, the process accumulates delays from the source node to the target node by adding the delays for each computational element. If the delays caused by interconnect wire lengths are not negligible, the process also adds (at 415) these delays to the accumulated delays. Also, when a node has more than one input, the delay of the input path with maximum delay is considered in computation of the sequential delay.
FIG. 5 conceptually illustrates a process 500 that utilizes combinational delay computation to determine whether a path has met its timing requirements in some embodiments. As shown, the process determines (at 505) whether the accumulated delay is more than the required time for the signal to get from the source node to the target node. In the example of FIG. 3, the required time for each of the four identified paths is one clock period (or four time units). When the accumulated delay is more than the required time, the process determines (at 510) that the path does not meet its timing requirements. On the other hand, when the delay is less than or equal to the required time, the process determines (at 515) that the path meets its timing requirements.
Utilizing process 400, the combinational delays for the elements of the four paths identified on FIG. 3 are computed and the results are displayed on top of each element. Utilizing process 500, it is determined whether each path meets its timing requirements. As shown, when the combinational delay computations are compared with the required times for each target node, the timing requirements for the first target node (315) fails and the timing requirement for the other three target nodes (320, 325, and 310) pass. Since the path between 305 and 315 fails the timing requirement, the overall path 300, which includes the failed path, also fails the timing requirements.
B. Sequential Delay
Sequential delay computation is similar to combinational delay computation, except sequential delay computation accounts for paths that can go through clocked elements. FIG. 6 illustrates a path 600 in some embodiments. This path is similar to path 300. As shown in FIG. 6, the clocked elements 605 are conceptually replaced by non-computational elements 610 with a negative delay equal to one clock period which accounts for the fact that the required time between two adjacent clocked elements (or a clocked element and an adjacent primary input or output) is one clock period. In FIG. 6, the delays associated with each node are shown under each node. In some embodiments, a path can also start from or end to a clocked element that cannot be retimed. In these embodiments, the outputs of the clocked elements that cannot be retimed are considered to occur at time zero.
FIG. 7 illustrates the results of sequential delay computation for path 600 shown in FIG. 6. Process 400, shown in FIG. 4 (which was discussed in reference to computing combinational delays) is also utilized to compute sequential delays. For the example of FIG. 7, process 400 identifies (at 400) node 705 as the source node and node 710 as the target node. The process does not identify any of the clocked elements as source or target nodes. In other words, the delays are not reset to zero after each clocked element. Instead a delay equal to one clock period is subtracted from the accumulated delay to account for each clocked element. Specifically, process 400 sets (at 410) the accumulated delay for the source node 705 to 0.
Next, the delays are accumulated (at 415) through the clocked elements. Since clocked elements are assigned negative delays, the effect of each clocked element is subtraction of one clock period from the accumulated delay. The delay is accumulated until the target node 710 is reached. The results of these computations for each node are shown on top of the nodes in FIG. 7.
FIG. 8 illustrates a process 800 that utilizes sequential delay computation to determine whether a path meets its timing requirements. As shown, the process determines (at 805) whether the accumulated delay of the target node is more than one clock period. When the accumulated delay of the target node is more than one clock period, the process determines (at 810) that the path from the source node to the target node cannot meet its timing requirements with the given clock period. On the other hand, when the accumulated delay of the target node is less than or equal to one clock period, the process determines (at 815) that the path can meet its timing requirements.
For instance, in FIG. 7, the accumulated delay of the target node 710 is zero. This accumulated delay is the sequential delay of path 700 that starts from the source node 705 and ends to the target node 710. The sequential delay being less than one clock period indicates that there exists a retiming of the clocked elements such that all elements meet their required timing. In the example of FIG. 7, since the accumulated delay for the target node is zero and the clock period is 4 time units, the path 700 can be retimed by moving the clocked elements across the path until the path meets its timing requirement.
C. Retiming
FIG. 9 illustrates the retiming of path 700 shown in FIG. 7 to make the path meet its timing requirements. In this example, the timing requirements are met when every path that either (1) starts from a clocked element and ends to a clocked element, (2) starts from a timed element and ends to a clocked element, or (3) starts from a clocked element ends to a timed element, without encompassing any other clocked elements meets its timing requirements (i.e., the arrival time of a signal at a target node is less than or equal to its required time).
As shown in FIG. 9, clocked element 725 which was originally between computational elements 725 and 730 is retimed to be between computational elements 715 and 720. In effect this clocked element is moved to an earlier point in time. As a result, the path between the source node 705 and clocked element 725 will have one computational element. Similarly, clocked element 740 that was originally between computational elements 735 and 745 is moved between computational elements 725 and 730. As a result the path between clocked elements 725 and 740 includes two computational elements. Further, clocked element 750 that was between computational element 745 and the target node 710 is moved between computational elements 730 and 735. As a result, the path between clocked element 750 and the target node 710 includes two computational elements.
Utilizing process 400, the combinational delays for the elements of the four paths (705 to 725, 725 to 740, 740 to 750, and 750 to 710) are computed and the results are displayed on top of each element. These four paths are the paths between two clocked elements or a clocked element and a non-clock timed element. None of the paths encompasses another clocked element other than the source and/or the target nodes.
Utilizing process 500, combinational delays are compared with required times for the signals to get from source to target nodes in each path. As shown in FIG. 9, when the combinational delay computations are compared with the required times for each target node, the timing requirements for all target nodes (725, 740, 750, and 710) are met. Since every path between two clocked elements or between one clocked element and the source or target nodes meets its timing requirement, the overall path 700 also passes the timing requirements (i.e., the path can be performed using the current clock period).
IV. Placement Engines that Perform Timing Analysis
In some embodiments, the timing analysis is performed by the placement engine while the placement engine is optimizing other costs (such as wiring lengths and congestion) of the netlist. However, calculating sequential delays can be very time consuming. FIG. 10 illustrates a process 1000 that computes sequential delays and performs timing analysis for the netlist. As shown, the process identifies (at 1005) a cost function to optimize during placement operation. The cost function includes a time variable to optimize. The cost function also includes one or more other variables such as wiring length and congestion to optimize.
Next, the process optimizes (at 1010) the cost function by changing one or more of the variables. Next, the process performs (at 1015) sequential delay timing analysis for each path from a source node to a target node in the netlist. These paths can go through clocked elements. The process then determines (at 1020) whether the target nodes in each path meet their timing requirements. When at least one target does not meet the timing requirements, the process proceeds to 1040 which is described below.
Otherwise, the process determines (at 1025) whether a shorter clock period can be examined to further improve the clock period. The process may utilize a binary search to find shorter values for clock period until a clock period acceptable by the circuit design is reached or the clock period cannot be improved any further. When the process determines that the clock period cannot be improved any further, the process proceeds to 1065 which is described below. Otherwise, the process saves at 1030) the current clock period as a clock period that has met the timing requirements. Next, the process decreases (at 1035) the clock period and proceeds to 1010 which was described above.
When the test at 1020 fails, the process determines (at 1040) whether all target nodes had met their timing requirements in a previous iteration. If not, the process increases (1045) the clock period and proceeds to 1010 that was described above. The process may utilize a binary search to find the next value for the clock period.
After 1040, when the process determines that all target nodes have met the timing requirements, the process determines (at 1050) whether a different clock period can be examined to further improve the clock period. Although the current clock period satisfies the timing requirements of all target nodes, some circuit designs may set a goal of further improving the clock period until a certain number of iterations are performed, the clock period becomes smaller than a certain value, the improvement in the clock period becomes negligible after certain number of iterations, or other criteria is met.
When (after 1050) the process determines that the clock period can be further improved, a new clock period which is longer than the current clock period but shorter than the previously acceptable period is selected (at 1055). The process then proceeds to 1010 that was described above.
On the other hand, when (after 1045) the process determines that the clock period cannot be improved any further, the process restores (at 1060) the best value of the clock period that met the timing requirements in a previous iteration. Finally, the process analyzes (at 1065) each path in the netlist and retimes the clocked elements between computational elements to make the delays between each two adjacent clocked elements or between each timed element and its adjacent clocked elements less than or equal to a clock period. As shown in FIG. 10, the process has to repeatedly calculate sequential timing analysis for each path in the netlist to determine whether the timing requirements are met or whether a shorter clock period can be identified.
A. Failing Loops
Sequential delay computation is an expensive computation. When a netlist includes a loop and the clock period is relatively small, the sequential delay computation for the given clock period may not converge. FIG. 11 illustrates an example of a netlist 1100 with such a failing loop. As shown, computational element 1115 receives two inputs. One input from computational element 1110 and another input from clocked element 1145. The sequential delay of node 1115 is the maximum sequential delay of its inputs plus the computational delay of computational element 1115. In the example of FIG. 11, the clock period is assumed to be four time units and all computational elements are assumed to have a delay of two time units.
Utilizing process 400, an initial value for the sequential delays of the nodes in netlist 1100 is computed. FIG. 12 illustrates a Table 1200 that shows the results of sequential delay computations after several iterations. Initially, the sequential delay of node 1145 is not known. Therefore, the sequential delay for node 1115 is computed as the total of two time units for node 1110 delay and two time units for node 1115 delay. The results of the initial computation for sequential delays of the nodes in netlist 1100 are shown in Table 1200. As shown, after the initial iteration, the sequential delay of node 1145 is computed to be four time units. The sequential delay of node 1115 can now be updated to be four time units (which is the maximum delay of its input paths) plus two time units (which is the delay attributed to the node itself and its associated wiring).
After all sequential delays are updated node 1145 will have a sequential delay of six time units as shown for the second iteration in Table 1200. This new value of delay for 1145 results in an updated value of eight time units for the sequential delay of node 1115 in the third iteration. As shown in Table 1200, the sequential delay values do not converge for the given clock period. The value of the clock period has to be increased in order for the sequential delay values to converge. In a complicated netlist in which loops are not easily detectable, the sequential delay computation will be very time consuming and will take a long time to find an appropriate value of clock period for which all sequential delays converge.
B. Timing Driven Placement Engines that Assign Event Times to Nodes in the Netlist
Typically, placement engines model the netlist by assigning a horizontal and a vertical coordinate (x and y location) to each node in the graph. In some embodiments, a new dimension is added to the placement engine by assigning an event time to each node in the netlist. In these embodiments, the placement engine performs a three dimensional placement.
FIG. 13 illustrates an edge 1300 between a source node 1305 and a target node 1310. In FIG. 13, in addition to the horizontal and vertical coordinates of a node, the placement engine has assigned an event time to each node. In some embodiments, the event time of a node is the arrival time of the signal to the node. In some embodiments, the event time of a node is the time a stable output signal is available at the output of the node. As shown, the source node 1305 is represented by three space-time values (x0, y0, t0) and the target node 1310 is represented by three space-time values (x1, y1, t1). The placement engine will optimize the functions of Δx, Δy, and Δt.
FIG. 14 conceptually illustrates a process 1400 utilized by a placement engine of some embodiments to perform timing analysis using assigned event times. As shown, the process assigns (at 1410) an event time to the source and target nodes of each edge in the netlist. As described above, each node will be represented by three variables x, y, and t representing horizontal coordinate, vertical coordinate, and time respectively. Next, the process defines a delay function that produces estimated interconnect delays. In some embodiments, the delay function for an edge is represented as d(Δx, Δy), where Δx and Δy are the differences between the horizontal and vertical coordinates of the target and source nodes of the edge as shown in FIG. 13.
Next, the process defines (at 1420) a cost function for the netlist. In some embodiments, the cost function is a function of the interconnect delays and the event times of the source and target nodes. In these embodiments, the cost function is expressed by the following equation (B):

Σedges,ifn(Δti,d(Δxi,Δyi))  (B)

where for each edge, i, Δti is the difference between the event times of the target and the source nodes; Δxi is the difference between the x coordinates of the target and the source nodes; and Δyi is the difference between the y coordinates of the target and the source nodes.

Finally, the process optimizes (at 1425) the cost function based on given criteria for clock period, interconnect wiring length, congestion, etc. The process places (at 1430) the IC components after timing requirements are met. The placement meets timing requirements when:

Σedges,i(Δti≧d(Δxi,Δyi))  (C)

where for each edge, i, Δti is the difference between the event times of the target and the source nodes and d(Δxi, Δyi) is the delay function for edge i.

Since the cost function in equation (B) is based on edges of the graph, when the placement engine changes the event time of a particular node to optimize the cost function, only the time difference, Δt, for the edges that start or end on that particular node are affected. The placement engine does not have to recalculate the delays throughout the netlist.
C. Timing Driven Placement Engines that Compute Sequential Delays
In some embodiments, the placement engine performs sequential delay computation as a part of its timing analysis. FIG. 15 conceptually illustrates a process 1500 utilized by placement engine of some embodiments for performing sequential delays computation for a netlist. As shown, the process identifies (at 1505) source nodes and target nodes in the netlist. The process selects computational elements and timed elements as source and target nodes. In some embodiments, the process also identifies clocked elements that cannot be retimed as the source and target nodes. However, the process does not consider retimable clocked elements as source or target nodes. The process then identifies “sequential edges” which are paths that go from a source, through these unconsidered clocked elements, ending at a target. The sequential edges do not include any other intervening source or target nodes.
Next, the process assigns (at 1510) an event time to each source and target node which is on a sequential edge. As described above, in some embodiments each node is represented by three variables x, y, and t representing horizontal coordinate, vertical coordinate, and time respectively. In some embodiments, the event times are absolute values given from a time when the execution of the netlist will start during runtime.
Next, the process counts (at 1515) the number of clocked elements located on each sequential edge. FIG. 16 illustrates a technique that some embodiments employ to count the number of clocked elements on each sequential edge. As shown, path 1600 starts from a source node 1605 and ends at a target node 1610. Path 1600 has four computational elements 1615-1630 and three clocked elements 1635-1645. In this example, the source and target nodes are a primary input 1605 and a primary output 1610 respectively. As shown, path 1600 includes several smaller paths. Each one of these paths starts from a timed element or a computational element as the source node and ends to the next immediate timed element or computational element as the target node. For instance, the path from 1605 to 1615 is between a primary input and a computational element and the path from 1625 to 1640 is between a computational element and a clocked element.
In some embodiments, a placement engine conceptually transforms a path such as 1600 to a path such as 1650 in which the clocked elements are not considered as source or target nodes of the smaller paths. Instead, in path 1650, the smaller paths are sequential edges that start from either timed elements (other than retimable clocked element) or computational elements as source nodes and end to the next timed element (other than a retimable clocked element) or computational element. In other words, the sequential edges are allowed to go through the retimable clocked elements. The number of clocked elements on each sequential edge is counted and is used in computation of sequential delay as indicated further below. For example, the sequential edge between computational elements 1620 and 1625 goes through one clocked element while the sequential edge between computational elements 1625 and 1630 goes through two clocked elements. The number of clocked elements (when more than zero) are shown on top of each node in FIG. 16.
Referring back to FIG. 15, the process defines (at 1520) a delay function that produces estimated interconnect delays. In some embodiments, the delay function for a sequential edge is represented as d(Δx, Δy), where Δx and Δy are the difference between the horizontal and vertical coordinates of the target and source nodes of the sequential edge.
Next, the process defines (at 1525) a cost function for all sequential edges in the netlist. In some embodiments, the cost function for a sequential edge is a function of (1) the interconnect delay, d(Δx, Δy), of the sequential edge and (2) the difference between the event times of the source and target nodes of the sequential edge. In these embodiments, the cost function is expressed by the following equation (D):

Σsequential edges,ifn(Δti,d(Δxi,Δyi))  (D)

where Δxi is the difference between the x coordinates of the target and the source nodes, Δyi is the difference between the y coordinates of the target and the source nodes, and Δti is the difference between the event times of the target and the source nodes.

However, when there are retimable clocked elements on a sequential edge, the difference between the event times of the target node and the source node of the edge is increased by the number of clocked elements on the edge multiplied by the clock period. The cost function is, therefore, expressed by the following equation (E):

Σsequential edges,ifn((Δti+(# of clock elements on the sequential edges*clock period)),d(Δxi,Δyi))  (E)

Next, the process optimizes (at 1530) the cost function based on given criteria for clock period, interconnect wiring length, congestion, and other optimization criteria. The process analyzes (at 1535) the netlist and moves the clocked elements (if necessary) between the computational elements to make the delays between each two adjacent clocked elements less than or equal to a clock period. Finally, the process places the IC components.
D. Placement Engines for Reconfigurable ICs
The embodiments disclosed in previous sections are applicable to any kind of ICs such as application-specific integrated circuits (ASICs), structured ASICs, field-programmable gate arrays (FPGAs), programmable logic devices (PLDs), complex programmable logic devices (CPLDs), system on chips (SOCs), system-in-packages (SIPs), reconfigurable ICs (e.g., space-time machines), etc. The embodiments disclosed in this section are applicable to reconfigurable ICs and the reconfigurable portions of SOCs, SIPs, etc. As described below, some embodiments are implemented to perform placement for reconfigurable ICs. In some embodiments with a sub-cycle reconfigurable IC, the placement engine determines which sub-cycle each computational element falls into.
FIG. 17 conceptually illustrates a process 1700 that determines which sub-cycle a computational element falls into. As shown, the process retimes (at 1705) the netlist by retiming clocked elements until all nodes meet their timing requirements. In some embodiments, the process uses one of the techniques described above to perform the retiming operation.
Next, for each node other than a retimable clocked element, the process determines (at 1710) the user clock cycle in which the element will be executed during the operation of the IC. In some embodiments, the placement engine determines the cycle for the node by performing the following equation (F):

user cycle in which a node is executed=event time of the node\clock period  (F)

where \ denotes an integer division and the event time of the node is measured in absolute time. Next, the process determines (at 1720) the particular sub-cycle in which the node will be executed by determining the relative time from the beginning the user cycle and the time the node is executed. In some embodiments, the placement engine determines the relative time from the beginning of the user cycle by performing the following equation (G):

execution time of the node relative to the beginning of the user clock cycle=the event time of the node Modulo clock period  (G)

In some embodiments equations (F) and (G) are part of the same integer division operation. The operation divides the event time of the node by the clock period where the quotient is shown in equation (F) and the remainder is shown in equation (G).

FIGS. 18-21 illustrate an example of assignment of sub-cycles to computational elements of a netlist in some embodiments. The clock period is assumed to be eight time units. As shown, the event time of node 1805-1820 are assigned by the placement engine to be 38.2, 42.5, 45, and 50.6 units of time. The event times are given in absolute values starting from a time when the execution of the netlist will begin during runtime.
FIG. 19 illustrates the user cycles to which each one of nodes 1805-1820 are assigned after performing equation operations (F) and (G). The execution time of each node is normalized relative to the beginning of the user cycle. The placement engine assigns node 1805 to 6.2 time units from the start of user cycle four (integer division of 38.2 by 8 results in a quotient of 4 and a remainder of 6.2). The placement engine assigns nodes 1810 and 1815 to 2.5 and 5 time units from the start of user cycle five (integer division of 42.5 and 45 by 8 results in a quotient of 5 and remainders of 2.5 for 1810 and 5 for 1815). Finally, node 1820 is assigned to 2.6 time units from the start of user cycle six (integer division of 50.6 by 8 results in a quotient of 6 and a remainder of 2.6).
FIG. 20 illustrates a time line that shows placements of nodes 1805-1820. As shown, node 1805 is placed in user cycle four 2005, nodes 1810-1815 are placed in user cycle five 2010, and node 1820 is placed in user cycle six 2015.
FIG. 21 illustrates a time line that shows the assignment of nodes 1805-1820 to sub-cycles for a reconfigurable IC in which the user clock has four sub-cycles. The four sub-cycles of user cycle five are sub-cycles 2105-2120. This user cycle precedes by another cycle which also has four sub-cycles (only the last sub-cycle 2125 is shown). Also as shown, user cycle five is followed by another cycle that also has four sub-cycles (the first two sub-cycles 2130-2135 are shown). As shown, node 1805 is assigned to the last sub-cycle 2125 of the user cycle four.
Similarly, node 1820 is assigned to the second sub-cycle 2135 of the user cycle six, as shown in FIG. 21. The other two nodes 1810 and 1815 are assigned to user cycle five. The relative times of these nodes from the start of user cycle five places node 1810 in sub-cycle two 2110 and node 1815 in sub-cycle three 2115 of user cycle five, as shown.
V. Electronics System
FIG. 22 conceptually illustrates a more detailed example of an electronics system 2200 that implements some of the above described inventions. The system 2200 can be a stand-alone computing device, or it can be part of another electronic device. As shown in FIG. 22, the system 2200 includes a processor 2205, a bus 2210, a system memory 2215, a non-volatile memory 2220, a storage device 2225, input devices 2230, output devices 2235, and communication interface 2240. In some embodiments, the non-volatile memory 2220 stores configuration data and re-loads it at power-up.
The bus 2210 collectively represents all system, peripheral, and chipset interconnects (including bus and non-bus interconnect structures) that communicatively connect the numerous internal devices of the system 2200. For instance, the bus 2210 communicatively connects the processor 2205 with the non-volatile memory 2220, the system memory 2215, and the permanent storage device 2225.
From these various memory units, the processor 2205 receives data for processing and retrieves from the various memory units, instructions to execute. The non-volatile memory 2220 stores static data and instructions that are needed by the processor 2205 and other modules of the system 2200. The storage device 2225 is read-and-write memory device. This device is a non-volatile memory unit that stores instruction and/or data even when the system 2200 is off. Like the storage device 2225, the system memory 2215 is a read-and-write memory device. However, unlike storage device 2225, the system memory is a volatile read-and-write memory, such as a random access memory. The system memory stores some of the instructions and/or data that the processor 2205 needs at runtime.
The bus 2210 also connects to the input and output devices 2230 and 2235. The input devices enable the user to enter information into the system 2200. The input devices 2230 can include touch-sensitive screens, keys, buttons, keyboards, cursor-controllers, microphone, etc. The output devices 2235 display the output of the system 2200.
Finally, as shown in FIG. 22, bus 2210 also couples system 2200 to other devices through a communication interface 2240. Examples of the communication interface include network adapters that connect to a network of computers, or wired or wireless transceivers for communicating with other devices. One of ordinary skill in the art would appreciate that any other system configuration may also be used in conjunction with the invention, and these system configurations might have fewer or additional components.
Some embodiments include electronic components, such as microprocessors, storage, and memory that store computer program instructions (such as instructions for performing operations of a placement engine) in a machine-readable or computer-readable medium. Examples of machine-readable media or computer-readable media include, but are not limited to magnetic media such as hard disks, memory modules, magnetic tape, optical media such as CD-ROMS and holographic devices, magneto-optical media such as optical disks, and hardware devices that are specially configured to store and execute program code, such as application specific integrated circuits (ASICs), field-programmable gate arrays (FPGA), programmable logic devices (PLDs), ROM, and RAM devices. Examples of computer programs or computer code include machine code, such as produced by a compiler, and files including higher-level code that are executed by a computer, an electronic component, or a microprocessor using an interpreter.
While the invention has been described with reference to numerous specific details, one of ordinary skill in the art will recognize that the invention can be embodied in other specific forms without departing from the spirit of the invention. Thus, one of ordinary skill in the art would understand that the invention is not to be limited by the foregoing illustrative details, but rather is to be defined by the appended claims.

## Claims

1. A method of designing an integrated circuit (IC), the IC design expressed as a graph comprising a plurality of edges and a plurality of nodes representing a plurality of IC components, each edge connecting two nodes without encompassing a third node, the method comprising:
defining a cost function that has a component for each edge that is based on (i) a spatial relationship comprising a difference in horizontal and vertical coordinates of the two nodes of the edge and (ii) a temporal relationship comprising a difference between event times of the two nodes of the edge;
optimizing, by a computer, the IC design by changing at least one of an event time and a coordinate of a node and modifying the IC design to satisfy a set of constraints on each component of the cost function such that, for each edge, a difference between the event times of the nodes connected by the edge is not less than a signal propagation delay caused by the spatial relationship between the two nodes connected by the edge; and
placing the IC components based on the optimized IC design.

2. The method of claim 1, wherein the IC includes at least one reconfigurable circuit that reconfigures during an operation of the IC.

3. The method of claim 2, wherein at least one reconfigurable circuit is for reconfiguring at a first clock rate that is faster than a second clock rate specified for a particular design of the IC.

4. The method of claim 3, wherein the second clock comprises a clock cycle comprising a plurality of sub-cycles, wherein placing the IC components comprises assigning each node in the second set of nodes to a particular sub-cycle of the second clock.

5. A method of designing an integrated circuit (IC), wherein the IC design is expressed as a graph comprising a plurality of edges and a plurality of nodes representing a plurality of IC components, each edge connecting two nodes without encompassing a third node, the method comprising:
assigning an event time to each node in the graph, each event time associated with availability of a signal at a corresponding node;
defining a cost function that has a cost expression for each edge that is based on the event times of the nodes connected by the edge and a spatial distance between the nodes connected by the edge, wherein the spatial distance is based on horizontal and vertical coordinates of the two nodes of the edge;
identifying, by a computer, a placement solution for the IC components by changing at least one of an event time and a coordinate of a node in the cost function and modifying the IC design to satisfy a set of constraints on each component of the cost function such that, for each edge, a difference between the event times of the nodes connected by the edge is not less than a signal propagation delay caused by the spatial relationship between the two nodes connected by the edge; and
placing the IC components based on the identified placement solution.

6. The method of claim 5, wherein the placement solution is identified by changing at least one of an event time and a coordinate of a node.

7. The method of claim 5, wherein the IC is one of an application-specific integrated circuit (ASIC), a structured ASIC, a field-programmable gate array (FPGA), a programmable logic device (PLD), a complex programmable logic device (CPLD), a system on chip (SOC), a system-in-package (SIP), and a reconfigurable IC.

8. The method of claim 5, wherein the identified placement solution meets a timing requirement on the cost expression of the cost function for each edge such that a difference between the event times of the nodes connected by the edge is not less than a signal propagation delay caused by the spatial distance.

9. A method of designing an integrated circuit (IC), wherein the IC design is expressed as a graph comprising a plurality of nodes representing a plurality of IC components, the plurality of nodes comprising a first set of nodes representing a set of clocked elements, the method comprising:
identifying a second set of nodes that comprises nodes in the plurality of nodes that are not in the first set of nodes, the second set of nodes not comprising any node from the first set of nodes;
identifying a set of edges, each identified edge connecting two nodes in the second set of nodes while encompassing at least one node from the first set of nodes;
assigning an event time to each node in the second set of nodes;
defining a cost function that has a component for each edge that is based on (i) the event times of the two nodes connected by the edge, (ii) a spatial distance based on a difference in horizontal and vertical coordinates of the two nodes connected by the edge, and (iii) a number of nodes in the first set encompassed by the edge;
optimizing, by a computer, the IC design; and
placing the IC components based on the optimized IC design by modifying the IC design to satisfy a set of constraints on each component of the cost function such that, for each edge, a difference between the event times of the nodes connected by the edge is not less than a signal propagation delay caused by the spatial relationship between the two nodes connected by the edge.

10. The method of claim 9, wherein optimizing the IC design comprises changing at least one of an event time and a coordinate of a node.

11. The method of claim 9, wherein the clocked elements represented by the first set of nodes are retimable clocked elements.

12. The method of claim 9, wherein the nodes in the second set comprise clocked elements that cannot be retimed.

13. The method of claim 9, wherein the nodes in the second set comprise input and output nodes of the graph.

14. The method of claim 9, wherein the nodes in the second set comprise nodes with timing constraints.

15. The method of claim 9, wherein the nodes in the second set comprise storage elements.

16. The method of claim 9, wherein the IC is one of an application-specific integrated circuit (ASIC), a structured ASIC, a field-programmable gate array (FPGA), a programmable logic device (PLD), a complex programmable logic device (CPLD), a system on chip (SOC), and a system-in-package (SIP).

17. The method of claim 9, wherein the IC includes at least one reconfigurable circuit that reconfigures during an operation of the IC.

18. The method of claim 17, wherein at least one reconfigurable circuit is for reconfiguring at a first clock rate that is faster than a second clock rate specified for a particular design of the IC.

19. The method of claim 18, wherein the second clock comprises a clock cycle comprising a plurality of sub-cycles, wherein placing the IC components comprises assigning each node in the second set of nodes to a particular sub-cycle of the second clock.

20. The method of claim 9, wherein optimizing the IC design comprises modifying the IC design to meet a timing requirement based on a relationship between the event times and the spatial distance for each edge.

21. A non-transitory computer readable medium storing a computer program for designing an integrated circuit (IC), the IC design expressed as a graph comprising a plurality of edges and a plurality of nodes representing a plurality of IC components, each edge connecting two nodes without encompassing a third node, the computer program for execution by at least one processor, the computer program comprising sets of instructions for:
defining a cost function that has a cost expression for each edge that is based on (i) a spatial relationship comprising a difference in horizontal and vertical coordinates of the two nodes of the edge and (ii) a temporal relationship comprising a difference between event times of the two nodes of the edge;
optimizing the IC design based by changing at least one of an event time and a coordinate of a node and modifying the IC design to satisfy a set of constraints on each component of the cost function such that, for each edge, a difference between the event times of the nodes connected by the edge is not less than a signal propagation delay caused by the spatial relationship between the two nodes connected by the edge; and
placing the IC components based on the optimized IC design.

22. The non-transitory computer readable medium of claim 21, wherein the IC includes at least one reconfigurable circuit that reconfigures during an operation of the IC.

23. The non-transitory computer readable medium of claim 22, wherein at least one reconfigurable circuit is for reconfiguring at a first clock rate that is faster than a second clock rate specified for a particular design of the IC.

24. The non-transitory computer readable medium of claim 23, wherein the second clock comprises a clock cycle comprising a plurality of sub-cycles, wherein the set of instructions for placing the IC components comprises a set of instructions for assigning each node in the second set of nodes to a particular sub-cycle of the second clock.

25. A method of designing an integrated circuit (“IC”), wherein the IC design is expressed as a graph comprising a plurality of edges and a plurality of nodes representing a plurality of IC components, each edge connecting two nodes without encompassing a third node, the method comprising:
defining a cost function that has a component for each edge that is based on (i) signal temporal values for the two nodes of the edge, and (ii) a spatial relationship comprising a difference between coordinates of the two nodes of the edge;
by a computer, iteratively examining different placement solutions by changing at least one of a signal temporal value and a coordinate of a node and modifying the IC design to satisfy a set of constraints on each component of the cost function such that, for each edge, a difference between the temporal values of the nodes connected by the edge is not less than a signal propagation delay caused by the spatial relationship between the two nodes connected by the edge; and
placing the IC components based on an optimal placement solution according to the cost function.

26. The method of claim 25, wherein the placing is performed only once after the examining of different placement solutions.

27. The method of claim 25, wherein the optimal placement solution is identified by satisfying a set of constraints on the component of the cost function for each edge.

28. The method of claim 27, wherein the set of constraints for an edge is satisfied when a difference between the signal temporal values of the nodes of the edge is not less than a signal propagation delay caused by a spatial distance between the two nodes of the edge.