An FPGA that facilitates timing closure
By introducing a second clock tree with the same path as the first global clock tree in the FPGA, a phase-shifted clock signal is provided, which solves the clock offset problem caused by the transmission delay of the global clock signal, and achieves timing convergence and design efficiency improvement of the FPGA. .
Patent Information
- Application Number
- CN202211303085.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-24
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-10-24
AI Technical Summary
In FPGAs, the transmission delay of the global clock signal causes clock offsets, making it difficult to achieve timing synchronization within the entire chip. Especially when designing in large-scale FPGAs, clock offsets have a significant impact on the clock cycle, resulting in extended design cycles.
Introduce a second clock tree into the FPGA, which is the same path as the first global clock tree, provides a phase-shifted clock signal, and adjusts the clock signal of the target resource module to reduce clock offset until timing closure conditions are met. By traversing the path to be optimized, the clock signal selection and phase difference of the target resource module are adjusted to meet the time constraints of the transmission path.
Through the support of the second clock tree, timing closure is achieved, the design process is simplified, the design cycle is reduced, and the efficiency of FPGA design is improved.
Smart Images

Figure CN115933457B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of FPGA, and in particular to an FPGA that is convenient for realizing timing closure. Background Art
[0002] FPGA (Field Programmable Gate Array) contains a large number of resource modules such as CLB, BRAM, DSP, IOB, etc. These resource modules are usually arranged in rows and columns to form a two-dimensional array. The clock signals required for these resource modules to work come from multiple preset global clock trees. The global clock tree is a clock network structure that is connected to the clock input ports of different resource modules through a preset bus structure, so that the global clock tree can provide clock signals for multiple resource modules inside the FPGA.
[0003] When implementing user designs, a global clock signal is generally used as a synchronization signal, which means that a global clock signal is required to be connected to each resource module via a global clock tree, and the rising edge or falling edge of the global clock signal must be able to reach the clock input port of each resource module at the same time. However, the global clock tree has a large coverage area and long wiring. When the global clock signal is transmitted in the global clock tree, a transmission delay will occur, resulting in the rising edge or falling edge of the global clock signal being difficult to reach the clock input port of each resource module at the same time. Especially in a large FPGA, the global clock signal asynchrony caused by the transmission delay of the global clock tree is more obvious, which also generates clock skew.
[0004] The maximum allowable clock skew in the whole chip is an important design parameter of FPGA. When designing FPGA circuits, in order to better meet the requirements of clock skew, in theory, the global clock tree can be designed by using circuit techniques such as differential signal transmission and increasing driving capability. However, this approach will lead to problems such as increased circuit area or increased power consumption. Therefore, in order to balance various aspects of performance, the maximum allowable clock skew in the whole chip cannot be reduced at will. This leads to the impact of the high proportion of clock skew on the clock cycle becoming more obvious, especially in advanced FPGA devices, where user designs are complex and clock frequency paths are high. In addition, with complex large FPGA user designs, it is not easy to fully meet all timings at once after completing layout and routing. Generally, there will be a few paths that do not meet the timing requirements. For this reason, it is often necessary to repeatedly debug these local problems, resulting in a long design cycle. Summary of the invention
[0005] In view of the above problems and technical requirements, the inventors have proposed an FPGA that facilitates the realization of timing closure. The technical solution of the present invention is as follows:
[0006] The present application discloses an FPGA that facilitates timing closure, characterized in that, in the FPGA, a global clock signal is connected to clock input ports of multiple target resource modules via a first global clock tree; a phase-shifted clock signal of the global clock signal is also connected to the clock input ports of each target resource module via a second clock tree, the path direction of the second clock tree is the same as that of the first global clock tree, and each target resource module obtains the global clock signal or the phase-shifted clock signal as a module clock signal;
[0007] When the initial layout and routing of the FPGA is completed and all target resource modules obtain the corresponding global clock signal as the module clock signal but timing convergence has not been achieved, at least one target resource module is adjusted to obtain a phase-shifted clock signal as the module clock signal and the phase difference of the phase-shifted clock signal relative to the global clock signal is adjusted until timing convergence is achieved.
[0008] Its further technical solution is to adjust at least one target resource module to obtain a phase-shifted clock signal as a module clock signal and adjust the phase difference of the phase-shifted clock signal relative to the global clock signal until the clock offset between the module clock signals of any two target resource modules does not exceed a predetermined offset threshold, and the establishment time and holding time of the transmission path formed between any two target resource modules meet the corresponding time constraints.
[0009] A further technical solution is that the method for adjusting the module clock signal of at least one target resource module comprises:
[0010] After completing the initial layout and routing of the FPGA, a timing analysis is performed to determine the paths to be optimized that do not meet the setup time constraint or the hold time constraint between any two target resource modules;
[0011] Each path to be optimized is traversed and processed in turn, and for each traversed path to be optimized, the target resource module at the input end of the path to be optimized is adjusted to obtain a phase-shifted clock signal as the module clock signal, or the target resource module at the output end of the path to be optimized is adjusted to obtain a phase-shifted clock signal as the module clock signal, and the phase difference of the phase-shifted clock signal relative to the global clock signal is adjusted, so that all the traversed paths to be optimized meet the setup time constraint and the hold time constraint.
[0012] Its further technical solution is, when adjusting the module clock signal of a target resource module, to ensure that the transmission path of the input end of the target resource module meets the time constraints corresponding to the setup time and the hold time, and to ensure that the transmission path of the output end of the target resource module meets the time constraints corresponding to the setup time and the hold time.
[0013] Its further technical solution is that when traversing and processing each path to be optimized in sequence, the paths to be optimized that do not meet the retention time constraint are processed first, and then the paths to be optimized that do not meet the establishment time constraint are processed in sequence.
[0014] Its further technical solution is that, when there are multiple paths to be optimized that do not meet the hold time constraint, each path to be optimized is traversed and processed in turn according to the order of the timing margin of the hold time from small to large; when there are multiple paths to be optimized that do not meet the setup time constraint, each path to be optimized is traversed and processed in turn according to the order of the timing margin of the setup time from small to large.
[0015] A further technical solution is that a phase-shifted clock signal is generated at a predetermined position of the first global clock tree and connected to the input end of the second clock tree through a phase shifter, and the phase difference between the phase-shifted clock signal and the global clock signal is adjusted through the phase shifter.
[0016] A further technical solution is that the first global clock tree includes a clock trunk line, a plurality of clock branch lines that are sequentially connected from the clock trunk line to form several levels, and a clock terminal line connected between the clock branch line at the last level and the corresponding target resource module;
[0017] The predetermined position of the first global clock tree is located on a clock trunk line, or on a clock branch line, or on a clock end line.
[0018] Its further technical solution is that the user signal generates a global clock signal through a phase-locked loop to connect to the input end of the first global clock tree, and generates a phase-shifted clock signal to connect to the input end of the second clock tree, and adjusts the phase difference between the phase-shifted clock signal and the global clock signal through the phase-shift adjustment function of the phase-locked loop.
[0019] Its further technical solution is that multiple different phase-shifted clock signals of the global clock signal are connected to the clock input ports of each target resource module via multiple different second clock trees respectively, and there is at least one target resource module connected to the first global clock tree and multiple second clock trees at the same time, and the target resource module obtains the global clock signal or one of the phase-shifted clock signals as the module clock signal; the phase differences of the multiple phase-shifted clock signals relative to the global clock signal are different.
[0020] The beneficial technical effects of the present invention are:
[0021] The present application discloses an FPGA that is convenient for achieving timing convergence. A second clock tree having the same path direction as a first global clock tree is added to the FPGA as hardware support, so that each target resource module can have multiple clock signals to select as the module clock signal, and the delay difference at the corresponding position of the second clock tree and the first global clock tree is consistent and easy to adjust. Therefore, local debugging is performed by adjusting the module clock signal of the local target resource module, so that timing convergence can be achieved more conveniently, which is conducive to speeding up the design process. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a schematic diagram of the architecture of multiple first global clock trees included in the FPGA of the present application.
[0023] Figure 2 It is a schematic diagram of a clock tree structure of a second clock tree added to a first global clock tree in an embodiment of the present application.
[0024] Figure 3 This is another clock tree structure schematic diagram of a second clock tree added to a first global clock tree in another embodiment of the present application.
[0025] Figure 4 This is another clock tree structure schematic diagram of a second clock tree added to a first global clock tree in another embodiment of the present application.
[0026] Figure 5 This is another clock tree structure schematic diagram of a second clock tree added to a first global clock tree in another embodiment of the present application.
[0027] Figure 6 It is a schematic diagram of transmission delay when both target resource modules M1 and M2 use the global clock signal CLK1, and a schematic diagram of transmission delay when M1 changes to use the phase-shifted clock signal CLK2. DETAILED DESCRIPTION
[0028] The specific implementation of the present invention will be further described below in conjunction with the accompanying drawings.
[0029] The present application discloses an FPGA that facilitates timing closure. The FPGA is optimized based on the existing FPGA architecture. Therefore, the FPGA also includes several resource modules and a global clock tree. Figure 1As shown, resource modules such as CLB, BRAM, DSP, IOB, etc. are arranged in rows and columns inside the FPGA to form a two-dimensional array. The global clock signal CLK1 is connected to the clock input ports of multiple target resource modules via the first global clock tree. In this application, the target resource module corresponding to the first global clock tree refers to the resource module connected to the first global clock tree.
[0030] Among them, the first global clock tree includes a clock trunk line GC, multiple clock branch lines HC that are sequentially connected from the clock trunk line GC to form several levels, and a clock end line LC connected between the clock branch line HC of the last level and the corresponding target resource module. The multiple clock branch lines HC of each level generally include multiple lines to cover different areas of the two-dimensional array, and the clock end line LC also generally includes multiple lines to cover different areas of the two-dimensional array. The clock branch line HC of the first level is connected to the clock trunk line GC, the clock branch line HC of the second level is connected to the clock branch line HC of the first level, and so on, until the clock branch line HC of the last level is connected to the target resource module through the clock end line LC. The first global clock tree can adopt various existing clock tree structures, Figure 1 An exemplary structure of a first global clock tree is shown, in which a clock trunk line GC is arranged in the center of a two-dimensional array and along a vertical direction, thereby covering the entire two-dimensional array in the vertical direction. Figure 1 The example shown only includes one level of clock branch lines HC, each clock branch line HC is arranged at a row of the two-dimensional array and is arranged along the horizontal direction to connect the clock trunk line GC, thereby covering multiple columns of resource modules in the entire row in the horizontal direction. A clock end line LC is arranged at a column of resource modules covered by each clock branch line HC to connect the clock branch line HC and the clock input port of the resource module (i.e., the target resource module) of the corresponding column. The same clock end line LC can be forked upward and / or downward to cover multiple target resource modules on the same column, such as forking upward to cover 20 target resource modules. The global clock signal CLK1 is finally output to the clock input port of the target resource module via the clock trunk line GC, the clock branch line HC and the clock end line LC in the first global clock tree, that is, the present application defaults that the global clock signal CLK1 is located at the input end of the signal upstream of the first global clock tree.
[0031] In actual applications, multiple clock trunks are set inside the FPGA. For example, a common setting has 32 clock trunks with different paths written as GC1, GC2...GC32. These multiple clock trunks are set in parallel in the center of a two-dimensional array. Figure 1As shown. Multiple clock branch lines with different paths are set in parallel at each row of resource modules in the two-dimensional array. For example, 10 clock branch lines are commonly set, namely HC1, HC2...HC10. The clock branch lines of each path are connected to the clock trunk lines of each path. Each target resource module is connected to the clock branch lines of each path in the row through the clock end line LC1. Therefore, the clock end line LC1 connected to a target resource module M1 can select one of the clock branch lines of each path to connect, and the clock branch line of each path can select one of the clock trunk lines of each path to connect.
[0032] Therefore, it can be considered that multiple first global clock trees are formed inside the FPGA, and each global clock tree includes a clock trunk line, multiple clock branch lines of several levels, and a clock terminal line to form a path direction. The path directions of the clock branch lines and / or clock trunk lines in two different first global clock trees are different, so that the two different first global clock trees have different path directions. For example, based on Figure 1 For example, a first global clock tree includes GC1, HC1 and LC1, another first global clock tree includes GC1, HC3 and LC1, and another first global clock tree includes GC5, HC1 and LC1.
[0033] Different first global clock trees have different path directions, and different first global clock trees may be connected to different resource modules. The same resource module can be connected to multiple different first global clock trees to obtain different global clock signals CLK1. The goal of this application is to quickly achieve timing convergence. The most important thing is to achieve synchronization design between resource modules in the same clock domain to achieve timing convergence. Therefore, this application introduces a first global clock tree and several target resource modules connected to it. The target resource modules referred to in this application are multiple resource modules connected to the first global clock tree with the same path direction to obtain the same global clock signal CLK1. These multiple target resource modules can be connected to the same clock end line and clock branch line, or they can also be connected to clock end lines and clock branch lines with the same path direction in different regions. For example, comparing Figure 1Taking the clock branch line containing only one level as an example, each row of resource modules covers a row of clock branch lines HC1, the clock branch line HC1 of the first row is connected to each resource module in the first row through LC1, and the clock branch line HC1 of the second row is connected to each resource module in the second row through LC1. Although the resource module M1 in the first row and the resource module M2 in the second row are actually connected to LC1 and HC1 in different rows, the paths of the connected HC1 and LC1 are the same, so the resource module M1 in the first row and the resource module M2 in the second row are still connected to the same first global clock tree. It can be understood by those skilled in the art that for multiple first global clock trees inside the FPGA, the design provided in this application can be implemented separately for each first global clock tree.
[0034] Please refer to Figure 2 For a first global clock tree and several target resource modules connected to it, the phase-shifted clock signal CLK2 of the global clock signal CLK1 obtained by the first global clock tree is also connected to the clock input port of each target resource module via the second clock tree, so that each target resource module can obtain the global clock signal CLK1 or the phase-shifted clock signal CLK2 as its own module clock signal. The timing of the phase-shifted clock signal CLK2 is ahead or behind the timing of the global clock signal CLK1. The path direction of the second clock tree is the same as that of the first global clock tree, so the delay difference at the corresponding point of the second clock tree is consistent with that of the first global clock tree, and the delay difference is determined by the delay difference between the global clock signal CLK1 and the phase-shifted clock signal CLK2, thereby forming an adjustable delay difference.
[0035] (1) In one embodiment, a phase-shifted clock signal CLK2 is generated at a predetermined position of the first global clock tree and connected to the input end of the second clock tree through a phase shifter, and the phase difference between the phase-shifted clock signal and the global clock signal CLK1 is adjusted through the phase shifter. In one implementation, the phase shifter can be implemented using the phase shift adjustment function of a phase-locked loop.
[0036] In this embodiment, when a signal is led out from a predetermined position of the first global clock tree and connected to a phase shifter, the predetermined position of the signal on the first global clock tree is located on a clock trunk line, or on a clock branch line, or on a clock end line:
[0037] When the predetermined position of the lead-out signal on the first global clock tree is located on the clock trunk line, the architecture of the second clock tree is similar to that of the first global clock tree, that is, the second clock tree also includes the clock trunk line GCE2, and several levels of clock branch lines HCE2 connected in sequence to the clock trunk line GCE2. Each level of clock branch lines HCE2 includes multiple clock branch lines HCE2 covering different areas, and each clock branch line HCE2 is connected to the clock input ports of multiple different target resource modules through multiple clock end lines LCE2. In this case, the phase-shifted clock signal CLK2 is connected to the position on the clock branch line HCE2 corresponding to the predetermined position on the first global clock tree. The second clock tree can cover target resource modules connected to multiple rows and columns, such as Figure 2 shown.
[0038] When the predetermined position of the lead-out signal on the first global clock tree is located on one of the clock branch lines, the architecture of the second clock tree is a local clock tree architecture, that is, the second clock tree includes a clock branch line HCE2 at the corresponding row of the two-dimensional array, and the clock branch line HCE2 is connected to the clock input ports of multiple different target resource modules through multiple clock end lines LCE2. In this case, the phase-shifted clock signal CLK2 is connected to the position on the clock branch line HCE2 corresponding to the predetermined position on the first global clock tree, and the second clock tree can be connected to the target resource modules located in different columns in the several rows it covers, such as Figure 3 .
[0039] When the predetermined position of the lead-out signal on the first global clock tree is located on one of the clock end lines LC1, the architecture of the second clock tree is a local clock tree architecture, that is, the second clock tree includes a clock end line LCE2 connected to the clock input ports of multiple different target resource modules. In this case, the phase-shifted clock signal CLK2 is connected to the position on the clock end line LCE2 corresponding to the predetermined position on the first global clock tree, and the second clock tree can cover the target resource modules located in the same column in the rows it covers, such as Figure 4 The signal derived from one of the clock end lines LC1 is taken as an example, and not all of them are shown.
[0040] It can be seen that when the predetermined position of the lead-out signal on the first global clock tree is different, the architecture of the second clock tree is also different, and the number and distribution range of the target resource modules that can be covered are also different. The closer the predetermined position of the lead-out signal on the first global clock tree is to the upstream of the signal, the larger the scale of the second clock tree is, the wider the distribution range of the target resource modules that can be covered, and the greater the number.
[0041] (2) In another embodiment, no additional phase shifter is required, such as Figure 2As shown, in a conventional FPGA, the user signal CLK0 generates a global clock signal CLK1 through a phase-locked loop PLL and connects to the input end of the first global clock tree, as shown in FIG. Figure 5 As shown, the clock trunk line GC1 is connected. In this embodiment, the phase-locked loop for generating the global clock signal CLK1 is directly multiplexed, and the phase-shift adjustment function of the phase-locked loop is used to generate not only the global clock signal CLK1 connected to the input end of the first global clock tree, but also the phase-shifted clock signal CLK2 connected to the input end of the second clock tree. The phase-shift adjustment function of the phase-locked loop can adjust and control the phase difference between the phase-shifted clock signal CLK2 and the global clock signal CLK1.
[0042] In this embodiment, since the phase-shifted clock signal CLK2 is generated by the user signal CLK0 through a phase-locked loop, which is equivalent to being located at the most upstream position of the signal of the first global clock tree, the architecture of the second clock tree and the target resource modules that can be connected in this embodiment are similar to the situation in the above-mentioned embodiment where the predetermined position of the lead-out signal on the first global clock tree is located on the clock trunk line, and this embodiment will not be described in detail.
[0043] Regardless of the method used to generate the phase-shifted clock signal CLK2, and regardless of the clock tree architecture used by the second clock tree, in the design process of the FPGA of the present application, the FPGA is firstly initially laid out and routed, and this step is the same as the initial layout and routing of the existing FPGA, so that all target resource modules obtain the corresponding global clock signal CLK1 as the module clock signal. If the timing convergence state has been reached at this time, the design is completed, but due to the complex internal structure of the FPGA, the timing convergence is often not achieved after the initial layout and routing. According to the conventional FPGA design process, local repeated debugging is required at this time, and the problem of the debugging process recorded in the background part being too time-consuming will occur. However, the second clock tree is added to the FPGA of the present application to provide hardware support, and a target resource module is not fixed to only select the global clock signal CLK1, but can also select the phase-shifted clock signal CLK2. When the timing does not converge, at least one target resource module is adjusted to obtain the phase-shifted clock signal CLK2 as the module clock signal, and the phase difference of the phase-shifted clock signal CLK2 relative to the global clock signal CLK1 is adjusted, so that the timing convergence can be achieved relatively quickly.
[0044] There are two main situations in which the timing between multiple target resource modules connected to the same first global clock tree does not converge. For any two target resource modules M1 and M2, when acquiring CLK1:
[0045] (1) When the global clock signal CLK1 is transmitted on the first global clock tree, there will be a transmission delay, resulting in each target resource module obtaining the global clock signal CLK1 as a module clock signal. The actual clock signal obtained is the clock signal of CLK1 after the transmission delay. Assume that the module clock signal obtained by the target resource module M1 is clk1, and the module clock signal obtained by the target resource module M2 is clk2. Since the positions of the target resource modules M1 and M2 in the two-dimensional array are different, the transmission delays of the global clock signal CLK1 when transmitted to M1 and M2 are different, resulting in the clock offset between the rising edge of clk1 obtained by the target resource module M1 and the rising edge of clk2 obtained by the target resource module M2 exceeding the predetermined offset threshold, and failing to meet the timing convergence requirement.
[0046] (2) When there is signal transmission between the target resource modules M1 and M2, the target resource modules M1 and M2 need to meet the time constraints corresponding to the setup time and hold time. Please refer to Figure 6 , signal S1 is connected from the output of target resource module M1 to the input of target resource module M2. As above, assuming that the module clock signal obtained by M1 is clk1 and the module clock signal obtained by M2 is clk2, the following setup time constraints need to be met:
[0047] d1+T(CK1→Q1)+T(p1)+Tsetup(M2)<d2+Period(CLK1);
[0048] And the following hold time constraints need to be met:
[0049] d1+T(CK1→Q1)+T(p1)>d2+Thold(M2);
[0050] Wherein, d1 represents the transmission delay of the global clock signal CLK1 transmitted to the target resource module M1 via the first global clock tree, T(CK1→Q1) represents the transmission delay from the clock terminal CK1 of the target resource module M1 to the output Q terminal, T(p1) represents the transmission delay between the output of the target resource module M1 and the input of the target resource module M2, and Tsetup(M2) represents the setup time of the target resource module M2. d2 represents the transmission delay of the global clock signal CLK1 transmitted to the target resource module M2 via the first global clock tree, Period(CLK1) represents the clock period of the global clock signal CLK1, and Thold(M2) represents the hold time of the target resource module M2.
[0051] After the initial layout and routing is completed, the layout positions of the target resource modules M1 and M2 are fixed, which is equivalent to that d1 and d2 are fixed. Therefore, due to the inappropriate layout positions of some target resource modules, it may be difficult to meet the above-mentioned setup time constraints and hold time constraints. The conventional approach requires repeated debugging, which is time-consuming and may require re-localization.
[0052] In view of the above two situations where timing does not converge, the present application adjusts at least one target resource module to obtain the phase-shifted clock signal CLK2 as the module clock signal, and adjusts the phase difference of the phase-shifted clock signal CLK2 relative to the global clock signal CLK1, with the goal of adjusting until the clock offset between the module clock signals of any two target resource modules does not exceed the predetermined offset threshold, and the setup time and hold time of the transmission path formed between any two target resource modules meet the corresponding time constraints. By adding a second clock tree, when the target resource module M2 is changed to obtain the phase-shifted clock signal CLK2 as the module clock signal, Figure 6 The following setup time constraints need to be met:
[0053] d1+T(CK1→Q1)+T(p1)+Tsetup(M2)<Tps+d3+Period(CLK1);
[0054] And the following hold time constraints need to be met:
[0055] d1+T(CK1→Q1)+T(p1)>Tps+d3+Thold(M2);
[0056] Among them, Tps represents the phase difference between the global clock signal CLK1 and the phase-shifted clock signal CLK2, which can be positive or negative. d3 represents the transmission delay of the phase-shifted clock signal CLK2 to the target resource module M2 via the second clock tree. After the initial layout and routing are completed to determine the layout positions of the target resource modules M1 and M2, it is equivalent to that d1 and d3 are fixed, but Tps is easy to adjust, so it is easier to adjust to achieve the above constraints.
[0057] In order to achieve the above-mentioned requirements of timing convergence of setup time and hold time, the method for adjusting the module clock signal of at least one target resource module includes: performing timing analysis after completing the initial layout and routing of the FPGA and determining the paths to be optimized that do not meet the setup time constraints or the hold time constraints between any two target resource modules, and traversing and processing each path to be optimized in turn.
[0058] In one embodiment, when traversing and processing each path to be optimized in sequence, the paths to be optimized that do not meet the hold time constraint are processed first, and then the paths to be optimized that do not meet the setup time constraint are processed in sequence. Because the hold time constraint is relatively more difficult to achieve than the setup time constraint, the hold time constraint problem is solved first.
[0059] In another embodiment, when there are multiple paths to be optimized that do not meet the hold time constraint, each path to be optimized is traversed and processed in order of the timing margin of the hold time from small to large, that is, the smaller the timing margin of the hold time, the less the path meets the hold time constraint, and the higher the priority is. When there are multiple paths to be optimized that do not meet the setup time constraint, each path to be optimized is traversed and processed in order of the timing margin of the setup time from small to large, that is, the smaller the timing margin of the setup time, the less the path meets the setup time constraint, and the higher the priority is.
[0060] Regardless of the order in which the paths to be optimized are traversed and processed in sequence, for each path to be optimized that is traversed and processed: the target resource module at the input end of the path to be optimized is adjusted to obtain the phase-shifted clock signal CLK2 as the module clock signal, or the target resource module at the output end of the path to be optimized is adjusted to obtain the phase-shifted clock signal CLK2 as the module clock signal. That is, for example, Figure 6 , assuming that the path of signal S1 is the path to be optimized, the target resource module M1 can be modified to obtain the phase-shifted clock signal CLK2 as the module clock signal, or the target resource module M2 can be modified to obtain the phase-shifted clock signal CLK2 as the module clock signal. And adjust the phase difference Tps of the phase-shifted clock signal CLK2 relative to the global clock signal CLK1, so that all the paths to be optimized that have been traversed and processed previously meet the setup time constraint and the hold time constraint. Traverse in sequence until all the paths to be optimized are traversed and processed, so that all the paths to be optimized can meet the constraints of setup time and hold time, and the final phase difference Tps between CLK2 and CLK1 can be determined.
[0061] In addition, the input and output of each target resource module are connected to signals. For a path to be optimized that is transmitted from M1 to M2, when the path to be optimized is always adjusted to meet the constraints of the setup time and the hold time, if the module clock signal clk1 of M1 arrives ahead of the module clock signal clk2 of M2, it is conducive to achieving the constraint of the hold time of the path to be optimized, but not conducive to achieving the constraint of the setup time of the path to be optimized. If the module clock signal clk1 of M1 arrives later than the module clock signal clk2 of M2, it is conducive to achieving the constraint of the setup time of the path to be optimized, but not conducive to achieving the constraint of the hold time of the path to be optimized. By switching M1 to obtain CLK2 and adjusting Tps, the module clock signal clk1 of M1 can be advanced or delayed to meet the constraint of the path to be optimized from M1 to M2, but after the module clock signal clk1 of M1 is advanced or delayed, it will affect the path transmitted to M1 by other target resource modules. If M2 is switched to obtain CLK2 and adjust Tps, it is similar.
[0062] Therefore, when adjusting the module clock signal of a target resource module, it is necessary to consider not only the path to be optimized connected to the input or output of the target resource module, but also the path to be optimized relative to the other end. That is, it is necessary to ensure that not only the transmission path of the input end of the target resource module meets the time constraints corresponding to the setup time and the hold time, but also the transmission path of the output end of the target resource module meets the time constraints corresponding to the setup time and the hold time.
[0063] In the above process of traversing the path to be optimized, the problem of clock offset between some target resource modules exceeding the predetermined offset threshold is likely to be solved at the same time. If the clock offset of some target resource modules still exceeds the predetermined offset threshold, one of the target resource modules is selected to obtain the phase-shifted clock signal CLK2 as the module clock signal, and the phase difference Tps between CLK2 and CLK1 is adjusted. Generally, the clock offset requirement can be met smoothly, and the constraints of the relative setup time and hold time will be easier to achieve.
[0064] In another embodiment, a plurality of different phase-shifted clock signals CLK2 of the global clock signal CLK1 are respectively connected to the clock input ports of each target resource module via a plurality of different second clock trees, and there is at least one target resource module connected to the first global clock tree and a plurality of second clock trees at the same time, and each second clock tree is respectively derived from a predetermined position of the first global clock tree and generated by a phase shifter, or generated by a user signal CLK0 through a phase-locked loop. The relevant technical features are as described above, and this embodiment will not be repeated. The phase-shifted clock signals CLK2 connected to each second clock tree can be derived from different predetermined positions of the first global clock tree, and the phase difference of each phase-shifted clock signal relative to the global clock signal is different. Then the target resource module obtains the global clock signal CLK1 or one of the phase-shifted clock signals CLK2 as the module clock signal, thereby making it easier to achieve timing convergence through multiple second clock trees.
Claims
1. An FPGA that facilitates timing closure, characterized in that: In the FPGA, a global clock signal is connected to clock input ports of a plurality of target resource modules via a first global clock tree; The phase-shifted clock signal of the global clock signal is also connected to the clock input port of each target resource module via a second clock tree, the path direction of the second clock tree is the same as that of the first global clock tree, and each target resource module obtains the global clock signal or the phase-shifted clock signal as a module clock signal; When the initial layout and routing of the FPGA is completed and all target resource modules obtain the corresponding global clock signal as the module clock signal but timing convergence has not been achieved, at least one target resource module is adjusted to obtain a phase-shifted clock signal as the module clock signal and the phase difference of the phase-shifted clock signal relative to the global clock signal is adjusted until timing convergence is achieved.
2. The FPGA according to claim 1, characterized in that: Adjust at least one target resource module to obtain a phase-shifted clock signal as a module clock signal and adjust the phase difference of the phase-shifted clock signal relative to the global clock signal until the clock offset between the module clock signals of any two target resource modules does not exceed a predetermined offset threshold, and the setup time and hold time of the transmission path formed between any two target resource modules meet the corresponding time constraints.
3. The FPGA according to claim 2, characterized in that: The method for adjusting a module clock signal of at least one target resource module comprises: After completing the initial layout and routing of the FPGA, a timing analysis is performed to determine a path to be optimized that does not satisfy a setup time constraint or a hold time constraint between any two target resource modules; Each path to be optimized is traversed and processed in turn, and for each traversed path to be optimized, the target resource module at the input end of the path to be optimized is adjusted to obtain a phase-shifted clock signal as a module clock signal, or the target resource module at the output end of the path to be optimized is adjusted to obtain a phase-shifted clock signal as a module clock signal, and the phase difference of the phase-shifted clock signal relative to the global clock signal is adjusted, so that all the traversed paths to be optimized meet the setup time constraint and the hold time constraint.
4. The FPGA according to claim 3, characterized in that: When adjusting the module clock signal of a target resource module, ensure that the transmission path of the input end of the target resource module meets the time constraints corresponding to the setup time and the hold time, and ensure that the transmission path of the output end of the target resource module meets the time constraints corresponding to the setup time and the hold time.
5. The FPGA according to claim 3, characterized in that: When traversing and processing each path to be optimized in sequence, the paths to be optimized that do not meet the retention time constraint are processed first, and then the paths to be optimized that do not meet the establishment time constraint are processed in sequence.
6. The FPGA according to claim 5, characterized in that: When there are multiple paths to be optimized that do not meet the hold time constraint, each path to be optimized is traversed and processed in order of the hold time timing margin from small to large; when there are multiple paths to be optimized that do not meet the setup time constraint, each path to be optimized is traversed and processed in order of the setup time timing margin from small to large.
7. The FPGA according to claim 1, characterized in that: The phase-shifted clock signal is led out at a predetermined position of the first global clock tree and is generated by a phase shifter and connected to an input end of the second clock tree. The phase difference between the phase-shifted clock signal and the global clock signal is adjusted by the phase shifter.
8. The FPGA according to claim 2, characterized in that: The first global clock tree includes a clock trunk line, a plurality of clock branch lines sequentially connected from the clock trunk line to form several levels, and a clock terminal line connected between the clock branch line at the last level and the corresponding target resource module; The predetermined position of the first global clock tree is located on a clock trunk line, or on a clock branch line, or on a clock end line.
9. The FPGA according to claim 1, characterized in that: The user signal generates the global clock signal connected to the input end of the first global clock tree through a phase-locked loop, and generates the phase-shifted clock signal connected to the input end of the second clock tree, and the phase difference between the phase-shifted clock signal and the global clock signal is adjusted by the phase-shift adjustment function of the phase-locked loop.
10. The FPGA according to claim 1, characterized in that: A plurality of different phase-shifted clock signals of the global clock signal are respectively connected to the clock input ports of the respective target resource modules via a plurality of different second clock trees, and there is at least one target resource module connected to the first global clock tree and a plurality of second clock trees at the same time, and the target resource module obtains the global clock signal or one of the phase-shifted clock signals as a module clock signal; The phase differences of the multiple phase-shifted clock signals relative to the global clock signal are different.
Citation Information
Patent Citations
System on chip (soc), method of operating the soc, and system having the soc
CN103389952A
Clock tree resource allocation method and clock tree configuration
CN105653748A
