Clock Tree Balancing Methods

By replacing the medium-granularity clock gating unit with a disconnectable discrete clock gating unit in the chip design, the problem of timing adjustment difficulty is solved, longer public paths and shorter non-public paths are achieved, and timing is simplified convergence process.

CN117744573BActive Publication Date: 2024-08-23沐曦科技(成都)有限公司
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

During the chip design process, because the medium-granularity clock gating unit is close to the root node, the public path of the clock tree is shorter and the non-public path is longer, making timing adjustment more difficult, and the differences between subtrees are large, affecting timing convergence. .

Method used

By obtaining the discrete clock gating unit and configuring it to disconnect the preset internal path, the medium-grained clock gating unit in the chip design is replaced, and after disconnection, it is regarded as a non-clock gating unit, avoiding the construction of sub-units. tree, thereby reducing the length of non-public paths, maintaining clock signal transmission, and reducing the difficulty of timing closure adjustments.

Benefits of technology

It effectively reduces the length of non-public paths on the clock path, increases the length of the common path, simplifies the timing adjustment process, ensures the function and timing convergence of the chip design, and reduces the difficulty of adjustment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117744573B
    Figure CN117744573B
Patent Text Reader

Abstract

The present application provides a clock tree balancing method, which relates to the field of integrated circuit design. The clock tree balancing method includes: obtaining a discrete clock gating unit; the discrete clock gating unit is configured to disconnect the connection of a preset internal path; after disconnecting the connection of the preset internal path, the discrete clock gating unit can maintain the transmission of the clock signal, and make the discrete clock gating unit be regarded as a non-clock gating unit by the clock tree synthesis tool; based on the discrete clock gating unit, replace the medium-granularity clock gating unit in the chip design file; the medium-granularity clock gating unit is a clock gating unit with a granularity between fine granularity and coarse granularity; build a target clock tree based on the replaced chip design file. The above-mentioned clock tree balancing method can increase the length of the common clock path, reduce the timing difference on the clock path, and reduce the difficulty of adjusting the timing convergence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of integrated circuit design, and in particular, to a clock tree balancing method. Background Art

[0002] The chip design process includes clock tree synthesis, which is used to build a clock tree for the chip design and use the clock tree to determine the timing of the chip design so that designers can adjust the design to achieve timing convergence.

[0003] The clock gating units of the clock tree include leaf nodes and root nodes. The clock gating units between the root node and the leaf node are distinguished by granularity, which can be divided into coarse granularity, medium granularity, and fine granularity. The closer to the root node, the more circuits the gated clock unit controls, the "coarser" it is. The closer to the leaf node length CG, the fewer circuits it controls, and the "finer" it is. The medium-granularity clock gating unit is between coarse granularity and fine granularity, and is also closer to the root node.

[0004] The clock tree includes the main clock tree and subtrees. In the clock tree, the more common paths there are, the easier it is to adjust to convergence. Subtrees are the cause of non-common paths in the clock tree. Medium-granularity clock gating units often become the starting point of non-common paths.

[0005] Since the medium-granularity clock gating unit is relatively close to the root node, if a subtree is constructed at the medium-granularity clock gating unit, the common path will be shorter and the non-common path will be longer, resulting in large differences between the constructed subtrees and the timing verification environment, making it difficult to adjust the timing to convergence. Summary of the invention

[0006] In view of this, the present application aims to provide a clock tree balancing method to reduce the non-common path length on the clock path, thereby reducing the difficulty of timing convergence adjustment.

[0007] An embodiment of the present application provides a clock tree balancing method, including: obtaining a discrete clock gating unit; the discrete clock gating unit is constructed as a code module; the discrete clock gating unit is configured to disconnect a preset internal path; after disconnecting the preset internal path, the discrete clock gating unit can maintain the transmission of the clock signal, and the discrete clock gating unit is regarded as a non-clock gating unit by a clock tree synthesis tool; replacing the medium-granularity clock gating unit in a chip design file of the chip design based on the discrete clock gating unit; the medium-granularity clock gating unit is a clock gating unit with a granularity between fine granularity and coarse granularity; and constructing a target clock tree based on the replaced chip design file.

[0008] After the clock tree synthesis tool identifies the medium-granularity clock gating unit, it will construct a clock tree subtree with the medium-granularity clock gating unit. In the embodiment of the present application, the medium-granularity clock gating unit is replaced by a discrete clock gating unit. Since the discrete clock gating unit is configured to disconnect the connection of the preset internal path, and after the disconnection, it can be regarded as a non-clock gating unit by the clock tree synthesis tool, the clock tree synthesis tool will not construct a subtree with the discrete clock gating unit, thereby effectively reducing the length of the non-common path, and since the discrete clock gating unit can still maintain the transmission of the clock signal after the disconnection, the replaced chip design file can be used normally for the construction of the clock tree without affecting the function and timing of the chip design, and the constructed clock tree can still be used for the adjustment of timing convergence. Therefore, compared with the clock tree constructed by the medium-granularity clock gating unit, the common path of the clock path of the clock tree constructed by the discrete clock gating unit is longer, and the length of the non-common path is shorter, thereby reducing the difficulty of adjusting the timing to convergence.

[0009] In one embodiment, the chip design file is an RTL (Register-Transfer Level) code, and the target clock tree is constructed based on the replaced chip design file, including: performing logic synthesis on the replaced RTL code to obtain a gate-level netlist; the gate-level netlist includes the connection relationship between each device in the chip design; disconnecting the connection of the preset internal path of the discrete clock gating unit in the gate-level netlist; performing clock tree synthesis on the gate-level netlist after disconnecting the discrete clock gating unit to obtain the target clock tree.

[0010] The clock tree is generated based on the gate-level netlist, which summarizes the connection relationship between the various devices in the chip design, making it easier for users to obtain the required information. Therefore, in the embodiment of the present application, logic synthesis can be performed first to obtain a gate-level netlist, which can effectively improve the efficiency of finding the preset internal path of the discrete clock gating unit and disconnecting the connection compared to directly finding the connection relationship from the RTL code.

[0011] In one embodiment, before disconnecting the connection of the preset internal path of the discrete clock gating unit through the discrete clock gating unit in the gate-level netlist, the method further includes: combining the standard cells in the discrete clock gating unit to constrain the physical distance between the standard cells in the discrete clock gating unit to be within a preset distance range; and performing layout and routing based on the combined discrete clock gating unit.

[0012] The discrete clock gating unit is obtained by combining multiple standard units. In the embodiment of the present application, the physical distance between the standard units in the discrete clock gating unit is constrained within a preset distance range by combining the standard units in the discrete clock gating unit. Thus, the influence of layout and routing on the timing of the path where the discrete clock gating unit is located can be effectively reduced or avoided, so that the clock tree constructed based on the discrete clock gating unit can be used normally for timing adjustment, reducing the influence of layout and routing on timing convergence adjustment.

[0013] In one embodiment, the combining of standard cells in the discrete clock gating unit includes: combining the standard cells in the discrete clock gating unit using a group command of an automatic layout and routing tool; the group command is used to constrain the physical distance between the standard cells of the discrete clock gating unit within a preset distance range.

[0014] In this embodiment, clock tree synthesis is performed after layout and routing. Before clock tree synthesis, the group command of the automatic layout and routing tool can be used to combine standard cells of discrete clock gating cells without manual modification one by one in the netlist, thereby effectively improving the combination efficiency.

[0015] In one embodiment, disconnecting the connection of the preset internal path of the discrete clock gating unit in the gate-level netlist includes: disconnecting the connection of the preset internal path of the discrete clock gating unit in the gate-level netlist based on an ECO (Engineering Change Order) command of an automatic layout and routing tool; or modifying the code description of the connection of the preset internal path of the discrete clock gating unit in the gate-level netlist so as to disconnect the connection of the preset internal path of the discrete clock gating unit.

[0016] In this embodiment, the code describing the connection of the preset internal path of the discrete clock gating unit in the gate-level netlist can be modified to achieve the purpose of disconnection. It can also be modified using the ECO instruction of the automatic layout and routing tool without the need for adjustment one by one, thereby achieving the purpose of fast batch disconnection.

[0017] In one embodiment, the chip design file is a gate-level netlist corresponding to the RTL code, and the method of replacing the medium-granularity clock gating unit in the chip design file based on the discrete clock gating unit includes: replacing the medium-granularity gating unit in the gate-level netlist based on the discrete clock gating unit, so as to construct a target clock tree based on the replaced gate-level netlist.

[0018] In this embodiment, logic synthesis of the RTL code can obtain a gate-level netlist, and clock tree synthesis is based on the gate-level netlist to build a clock tree. If the RTL code is to replace the medium-granularity clock gating unit, discrete clock gating units can also be used to replace the medium-granularity gating units in the gate-level netlist at the gate-level netlist stage. Similarly, the clock tree synthesis does not construct a subtree with medium-granularity gating units, thereby reducing the length of non-common paths.

[0019] In one embodiment, after constructing the target clock tree based on the replaced chip design file, the method further includes: restoring the connection of a preset internal path in the discrete clock gating unit; and verifying the timing of the chip design based on the discrete clock gating unit and the clock tree after the restored connection.

[0020] In an embodiment of the present application, the connection of the preset internal path is restored so that the discrete clock gating unit can function normally as a clock gating unit, thereby enabling the target clock tree to be normally used for timing convergence adjustment. Moreover, since the non-public paths of the subtrees of the target clock tree are shorter, it is easier to adjust the timing of the chip design to convergence.

[0021] In one embodiment, before replacing the medium-granularity clock gating unit in the RTL code of the chip design based on the discrete clock gating unit, the method also includes: constructing an initial clock tree based on the RTL code; determining a subtree in the clock tree whose timing cannot converge; and determining the clock gating unit that constructs the subtree that cannot converge as the medium-granularity clock gating unit.

[0022] There will be more clock gating units in the RTL code. Some clock gating units are required to normally construct the clock tree subtree. For some subtrees that cannot converge, it may be caused by medium-granularity clock gating units. Therefore, the reason why the timing cannot converge can be determined and adjusted. Therefore, in an embodiment of the present application, the RTL code can be used to construct the initial clock tree, determine the subtree that cannot converge, and then determine the clock gating unit that can construct the subtree, and determine it as a medium-granularity clock gating unit for detection, so as to re-adjust the timing convergence of only the subtree that cannot converge.

[0023] In one embodiment, the discrete clock gating unit includes: a logic gate and a latch; the logic gate and the latch are connected to the clock signal end of the same transmission clock signal; the latch and the logic gate are configured to be able to output the clock signal to the next device; the output end of the logic gate is configured to be disconnectable from the next device to stop outputting the clock signal.

[0024] In an embodiment of the present application, the logic gate and the latch are connected to the clock signal end of the same transmission clock signal, and the logic gate and the latch can both transmit the clock signal to the next device. When the connection between the latch and the next device is disconnected, the clock signal can still be transmitted to the next device through the logic gate, and at this time the latch plays a storage role, then the latch will be regarded as a buffer by the clock tree synthesis tool, and thus is not used to construct the clock tree subtree. Thus, the function of the above-mentioned discrete clock gating unit can be realized through logic gates and latches. Logic gates and latches are widely used and simple in structure, which can effectively reduce the difficulty of constructing discrete clock gating units.

[0025] In one embodiment, the logic gate includes an AND gate, and the latch includes a low-pass latch; the input end of the low-pass latch is connected to the clock signal end; the output end of the low-pass latch is connected to an input end of the AND gate, and the connection is configured to be disconnectable; the other input end of the AND gate is connected to the clock signal end.

[0026] In the embodiment of the present application, the input end of the low-pass latch and one input end of the AND gate are connected to the clock signal end, and the output end of the low-pass latch is connected to the other input end of the AND gate, then the clock signal can be output from the AND gate through the low-pass latch or directly output from the AND gate. The connection between the output end of the low-pass latch and the AND gate is configured to be disconnectable. After disconnection, the low-pass latch will not transmit the clock signal, and the clock tree synthesis tool will regard it as a buffer. Therefore, the low-pass latch and the AND gate can realize the functions required by the discrete clock gating unit through this connection method.

[0027] In one embodiment, a discrete clock gating unit includes: a logic gate and a register; the logic gate and the register are connected to a clock signal end of the same transmission clock signal; the register and the logic gate are configured to both be able to output the clock signal to a next device; the output end of the register is configured to be disconnectable from the next device to stop outputting the clock signal.

[0028] In this embodiment, the properties of the register and the latch are similar. When the connection is not disconnected, the register and the logic gate can transmit the clock signal normally. After the connection is disconnected, the register will be regarded as a buffer by the clock tree synthesis tool, and the clock signal is output through the logic gate. Therefore, the combination of the register and the logic gate can achieve an effect similar to that of the clock gating unit when the internal path connection is not disconnected, and will not be constructed into a clock tree subtree by the clock tree synthesis tool after disconnection, thereby effectively reducing the length of the non-public path of the clock path. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0030] Figure 1 A flowchart of a clock tree balancing method provided in one embodiment of the present application;

[0031] Figure 2 A schematic diagram of the structure of a discrete clock gating unit provided in one embodiment of the present application;

[0032] Figure 3 A flowchart of the target clock tree construction and use provided in one embodiment of the present application.

[0033] Icon: low-pass latch 210; AND gate 220. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0035] Before describing the solution of the present application, a medium-granularity clock gating unit and an existing clock tree synthesis tool are first introduced.

[0036] A medium-grained clock gating unit is a clock gating unit whose granularity is between fine-grained and coarse-grained clock gating units. In clock tree synthesis, fine-grained gated clocks are mainly used as leaf nodes of the clock tree, and coarse-grained clock gating units are mainly used as root nodes of the clock tree. In the process of clock tree synthesis for chip design, the clock tree synthesis tool will construct a clock tree subtree with some clock gating units between the leaf nodes and the root node. The clock gating unit used by this type of clock tree synthesis tool to construct the clock tree subtree is the medium-grained clock gating unit of this application.

[0037] Compared with fine-grained nodes, medium-grained clock gating units are located closer to the root node of the clock tree. Therefore, during the adjustment process of timing convergence, the common path between the clock tree subtrees constructed by medium-grained clock gating units is shorter, which makes it difficult to fix timing violations. If there is a timing violation in the subtree constructed by the medium-grained clock gating unit, it is often necessary to modify the code of the logic function where the medium-grained clock gating unit is located in the chip design to meet the timing requirements, which may cause the logic function to be abnormal.

[0038] Therefore, the present application provides a clock tree balancing method, which replaces the medium-granularity clock gating unit in the clock tree synthesis stage with a discrete clock gating unit, reduces or even avoids the construction of clock tree subtrees caused by the medium-granularity clock gating unit in the clock tree synthesis, thereby increasing the length of the common path between the subtrees and reducing the length of the non-common path, thereby reducing the difficulty of timing convergence adjustment.

[0039] See also Figure 1 , is a flow chart of a clock tree balancing method provided in an embodiment of the present application. The clock tree balancing method includes:

[0040] S110, obtaining a discrete clock gating unit.

[0041] S120, replacing the medium-granularity clock gating unit in the chip design file based on the discrete clock gating unit.

[0042] S130, constructing a target clock tree based on the replaced chip design file.

[0043] Next, the clock tree balancing method provided in the present application will be described in detail.

[0044] For S110, in an embodiment of the present application, the discrete clock gating unit includes two states. In the first state, the discrete clock gating unit can play a function similar to or the same as the clock gating unit. By using the discrete clock gating unit in the replacement chip design, the normal verification work of the original chip design can be not greatly affected. When the discrete clock gating unit is in the second state, the discrete clock gating unit can play the function of other devices that do not affect the timing. For example, the discrete clock gating unit can play the role of a buffer, so that the discrete clock gating unit will be identified as a non-clock gating unit by the clock tree synthesis tool.

[0045] Therefore, the discrete clock gating unit can be used to replace the medium-granularity clock gating unit in the chip design, so that it will not be identified as a non-clock gating unit in the clock tree synthesis stage, and then the clock tree subtree will not be built, avoiding the problem that the timing cannot be adjusted to convergence due to the medium-granularity gating unit.

[0046] In an embodiment of the present application, the discrete clock gating unit is configured to disconnect the connection of the preset internal path to achieve switching between two states. For example, when normally connected, the discrete clock gating unit implements a function similar to that of a clock gating unit, and after the discrete clock gating unit disconnects the connection of the preset internal path, the discrete clock gating unit can maintain the transmission of the clock signal and make the discrete clock gating unit be regarded as a non-clock gating unit by the clock tree synthesis tool.

[0047] The above-mentioned discrete clock gating unit can be implemented in a variety of ways. For example, in one embodiment of the present application, the discrete clock gating unit may include: a logic gate and a latch, the logic gate and the latch are connected to the clock signal end of the same transmission clock signal; the latch and the logic gate are configured to both be able to output the clock signal to the next device, wherein the output end of the logic gate is configured to be disconnected from the next device to stop outputting the clock signal.

[0048] The clock gating unit is mainly used to adjust the clock signal so that the clock signal meets the timing requirements. The latch can temporarily store the clock signal to achieve the purpose of adjusting the timing. Therefore, using the latch, a structure with similar functions to the clock gating unit can be constructed.

[0049] In this embodiment, the logic gate and the latch are connected to the clock signal end of the same transmission clock signal, and the latch and the logic gate are configured to be able to output the clock signal to the next device. Therefore, even if the output end of the logic gate is configured to be disconnectable from the next device, after disconnection, the logic gate can still transmit the clock signal normally. After disconnection, the latch will not be able to transmit the clock signal, and the clock tree synthesis tool will only regard it as a buffer, and the clock tree subtree will not be constructed with the discrete clock gating unit. Therefore, through logic gates and latches, the discrete clock gating unit described in this application can be constructed and the corresponding functions can be realized.

[0050] For example, in one embodiment of the present application, see Figure 2 , Figure 2 A schematic diagram of a discrete gated clock gating unit provided in an embodiment of the present application, wherein CK represents a clock signal and EN represents an enable signal. In this embodiment, the logic gate may be an AND gate 220, and the latch may be a low-pass latch 210. The enable signal EN is normally input into the low-pass latch 210, and the input end of the low-pass latch 210 is connected to the clock signal end of the input clock signal; the output end of the low-pass latch 210 is connected to an input end of the AND gate 220 (as shown in the dotted line portion in the figure), and the connection is configured to be disconnectable; the other input end of the AND gate 220 is connected to the clock signal end.

[0051] In the discrete gated clock gating unit, the connection path between the output end of the low-pass latch 210 and an input end of the AND gate is a preset internal path, which can be disconnected. When it is not disconnected, the clock signal can be output to the AND gate 220 through the output end of the low-pass latch, and then output by the AND gate, or the clock signal can be directly output by the AND gate. When the preset internal path is disconnected, the low-pass latch can only act as a buffer, and the clock signal is directly output through the AND gate. Therefore, the discrete gated clock gating unit will be regarded as a non-clock gating unit by the clock tree synthesis tool. Therefore, the clock tree synthesis tool will not build a subtree at the discrete gated clock gating unit to reduce the length of the non-common path on the clock path.

[0052] The clock signal end may be a previous device or a clock generator, which is not limited here and is connected according to the actual circuit of the chip design.

[0053] In addition, there are many types of latches and logic gates. Selecting different devices will result in different connection methods, but the principles of using other logic gates and latches are similar to those of the above embodiments, and the connection methods of different devices will not be expanded one by one here.

[0054] In the above-mentioned discrete clock gating unit, the logic gate and latch can also be replaced by other devices. For example, in one embodiment of the present application, the discrete clock gating unit can also include: a logic gate and a register. The logic gate and the register are connected to the clock signal end of the same transmission clock signal; the register and the logic gate are configured to be able to output the clock signal to the next device; the output end of the register is configured to be disconnected from the next device to stop outputting the clock signal.

[0055] For another example, in some embodiments, the logic gate can also be replaced by a two-choice gate. A clock signal is input to one input of the gate, and the other input is connected to the output of a register or latch. When the connection between the latch and the gate is not disconnected, the gate is configured to output the clock signal of the branch where the latch or register is located. When the connection between the latch and the gate is disconnected, the gate directly outputs the clock signal. At this time, the latch and register are still recognized as buffers by the clock tree synthesis tool, so that the subtree will not be built. Among them, since the discrete clock gating unit is a code module, the control signal of the gate can be directly defined.

[0056] It can be understood that there are many ways to implement the discrete clock gating unit, and the above is only an example and should not be a limitation to the present application.

[0057] For S120, clock tree synthesis is based on the gate-level netlist of chip design, and the gate-level netlist is obtained by logic synthesis of RTL code. Therefore, replacing the medium-granularity clock gating unit in the chip design file based on discrete clock gating units can be replacing the code of the medium-granularity clock gating unit in the RTL code or replacing the medium-granularity clock gating unit in the gate-level netlist.

[0058] In this embodiment, when the RTL code is replaced, the discrete clock gating unit is constructed as a code module, that is, the standard unit and the connection relationship in the discrete clock gating unit are described by using a hardware description language.

[0059] For example, the description of the medium-granularity clock gating unit in a chip design is:

[0060] medium_grain_cg (

[0061] Q (medium_grain_cgQ),

[0062] CK(medium_grain_cg_clock_buf_out),

[0063] EN(medium_grain_cg_update _X),

[0064] SE(medium_grain_cg_update_X).

[0065] In the above description, medium_grain_cg represents a medium-grain clock gating unit, CK (medium_grain_cg_clock_buf_out) represents that a clock signal terminal is connected to clock_buf_out of the medium-grain clock gating unit medium_grain_cg, EN (medium_grain_cg_update _X) represents that an enable signal terminal is connected to the update _X terminal of the medium-grain clock gating unit medium_grain_cg, and SE (medium_grain_cg_update_X) represents an output terminal.

[0066] The description after replacing the discrete clock gating unit is:

[0067] C_g140 (

[0068] Q(en_pipe), G(clock), D(en));

[0069] D_g141(

[0070] X(clock_out),A1(clock),A2(en_pipe));

[0071] In the above description, C_g140 represents a latch, G is connected to the clock signal, Q is the output terminal, D_g141 is an AND gate, A1 and A2 are two input terminals, X is the output terminal, A1 and G are connected to the same clock terminal, and Q is connected to A2.

[0072] By replacing the code description of the medium-granularity clock gating unit with the code module description using the discrete clock gating unit, the medium-granularity clock gating unit in the RTL code can be replaced to replace the role of the medium-granularity clock gating unit in the clock tree synthesis.

[0073] If the gate-level netlist corresponding to the RTL code is replaced, the medium-granularity gating cells in the gate-level netlist can be replaced based on the discrete clock gating cells, so as to construct the target clock tree based on the replaced gate-level netlist. Since clock tree synthesis constructs the clock tree based on the gate-level netlist, the medium-granularity gating cells in the gate-level netlist can also be replaced.

[0074] Before replacing the medium-granularity clock gating unit, the medium-granularity clock gating unit can also be determined first. In some embodiments of the present application, the method of determining the medium-granularity clock gating unit may include: constructing an initial clock tree based on the RTL code; determining a subtree in the clock tree whose timing cannot converge; and determining the clock gating unit that constructs the subtree that cannot converge as a medium-granularity clock gating unit.

[0075] At present, in the chip design process, the RTL code is usually used to perform logic synthesis, layout and routing, and clock tree synthesis to build a clock tree. Only when it is determined that the timing in the clock tree cannot be adjusted to converge, the cause of the problem will be determined. Therefore, in this embodiment, the initial clock tree constructed by the RTL code of the unreplaced discrete clock gating unit can be obtained, and the subtree whose timing cannot converge can be determined, and the clock gating unit that constructs the subtree that cannot converge can be determined. The clock gating unit is the medium-granularity clock gating unit described in the embodiment of the present application.

[0076] For S130, in this embodiment, based on the replaced RTL code, the connection of the internal path in the discrete clock gating unit can be disconnected, and a target clock tree can be constructed. After obtaining the target clock tree, the connection of the internal path in the discrete clock gating unit can be restored to adjust the timing convergence.

[0077] In some embodiments of the present application, if a medium-granularity clock gating unit in the RTL code is replaced with a discrete clock gating unit, constructing a target clock tree based on the replaced RTL code may include: performing logic synthesis on the replaced RTL code to obtain a gate-level netlist; disconnecting the connection of the preset internal path of the discrete clock gating unit in the gate-level netlist; and performing clock tree synthesis on the gate-level netlist of the data path where the discrete clock gating unit is located to obtain a target clock tree.

[0078] Before clock tree synthesis, logic synthesis, layout and routing and other processes are required. After logic synthesis, a gate-level netlist can be obtained. Compared with the RTL code, the gate-level netlist is a file that is easy for designers to consult. In the gate-level netlist, the number of devices and connection relationships in the RTL code will be fully described, making it easier for designers to obtain the required information.

[0079] Therefore, in this embodiment, after performing logic synthesis on the RTL code that replaces the discrete clock gating unit to obtain a gate-level netlist, the discrete clock gating unit can be found in the gate-level netlist and the connection of the preset internal path of the discrete clock gating unit can be disconnected. Compared with finding the discrete clock gating unit in the RTL code, the efficiency of finding the discrete clock gating unit and disconnecting the connection can be effectively improved.

[0080] If the medium-granularity clock gating unit in the gate-level netlist is replaced with a discrete clock gating unit, the code description of the connection of the discrete clock gating unit to the preset internal path can be directly modified in the gate-level netlist to disconnect it.

[0081] In the embodiments of the present application, there may be different ways to disconnect the preset internal path of the discrete clock gating unit.

[0082] For example, in one embodiment, the code description of the connection of the discrete clock gating unit to the preset internal path in the gate-level netlist may be directly modified to disconnect the connection of the preset internal path of the discrete clock gating unit.

[0083] Clock tree synthesis is based on the construction of the clock tree at the gate level netlist, and the connection relationship described in the logic netlist can be modified directly. Therefore, in this embodiment, the description of the preset internal path connection of the discrete clock gating unit is found through the gate level netlist, and the description is directly modified to disconnect the connection.

[0084] For another example, an automatic placement and routing tool has an ECO instruction, which disconnects a preset internal path of a discrete clock gating unit in a gate-level netlist based on the ECO command.

[0085] The ECO instruction is usually used for small-scale modifications in the later stage of chip design to maintain the verified functions and timing as much as possible. Therefore, in this embodiment, the ECO instruction can be used to disconnect the preset internal paths of the discrete clock gating units in the gate-level netlist in batches to improve the efficiency of disconnection.

[0086] In some embodiments of the present application, before disconnecting the preset internal path, the standard cells in the discrete clock gating unit can also be combined to constrain the physical distance between the standard cells in the discrete clock gating unit to within a preset distance range; and layout and routing are performed based on the combined discrete clock gating unit.

[0087] Before clock tree synthesis, layout and routing will also be performed. The discrete clock gating unit is actually composed of different standard units, which can be registers, latches, logic gates, etc. It is not an independent device. The layout and routing stage will identify it as a different device for adaptive layout and routing, which may change the distance between different standard units in the discrete clock gating unit, thereby affecting the transmission of the clock signal in the discrete clock gating unit, affecting the timing, and making it difficult to adjust the timing to convergence.

[0088] In this embodiment, the standard cells in the discrete clock gating unit are combined, and the physical distance between the standard cells in the discrete clock gating unit is constrained within a preset distance range. This can effectively reduce or avoid the situation where the layout and wiring cause abnormal transmission of the clock signal in the discrete clock gating unit, so that the constructed clock tree can accurately describe the timing of the chip design, so that the timing can be accurately adjusted to converge.

[0089] In the embodiment of the present application, the standard cells in the discrete clock gating cells may be combined using a group command of an automatic placement and routing tool.

[0090] The group command is mainly used to group multiple standard cells together to constrain the physical distance of each standard cell during automatic layout and routing. In this embodiment, this instruction can be used to constrain the physical distance between standard cells of discrete clock gating cells within a preset distance range. Since the group command is set in many automatic layout and routing tools, there is no need for additional design or manual setting of physical distance constraints between standard cells of discrete clock gating cells, thereby improving the efficiency of building a clock tree based on discrete clock gating cells.

[0091] After the above process, the target clock tree can be built based on the disconnected and place-and-route completed files.

[0092] In an embodiment of the present application, after obtaining the target clock tree, the connection of the preset internal path in the discrete clock gating unit can be restored; and the timing of the chip design can be verified based on the discrete clock gating unit and the clock tree after the restored connection.

[0093] Since the discrete clock gating unit after disconnection functions as a non-clock gating unit, if the timing needs to be verified normally, it is necessary to restore the connection of the preset internal path so that it can realize the function of the clock gating unit. Therefore, in this embodiment, after obtaining the target clock tree, it can be reconnected and the timing of the chip design can be verified with the restored clock tree. Among them, the clock tree file is similar to the gate-level netlist, so the restoration of the connection can be directly modified or the ECO command can be used.

[0094] It should be noted that the processes of logic synthesis, clock tree synthesis, layout and routing mentioned in this application can refer to the existing technology and will not be expanded here.

[0095] For ease of understanding, the processes from S130 onwards are described in order. Figure 3 As shown, Figure 3 A flowchart of the target clock tree construction and use provided in one embodiment of the present application.

[0096] First, after obtaining the RTL code for replacing the discrete clock gating unit, the code can be logically synthesized to obtain a gate-level netlist.

[0097] Then, the group instruction is used to combine the standard cells that replace the discrete clock gating cells in the gate-level netlist. To disconnect the preset internal path of the discrete clock gating cell, the gate-level netlist can be modified directly or disconnected using the ECO instruction.

[0098] Finally, clock tree synthesis is performed on the gate-level netlist after combination and disconnection adjustment to obtain the target clock tree, and the connection of the preset internal path of the discrete clock gating unit in the target clock tree is restored to verify the timing.

[0099] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0100] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

Claims

1. A clock tree balancing method, characterized in that: include: Get discrete clock gating unit; The discrete clock gating unit is configured to disconnect a preset internal path; After disconnecting the preset internal path, the discrete clock gating unit can maintain the transmission of the clock signal, and the discrete clock gating unit is regarded as a non-clock gating unit by a clock tree synthesis tool; Replacing the medium-granularity clock gating unit in the chip design file based on the discrete clock gating unit; the medium-granularity clock gating unit is a clock gating unit with a granularity between fine granularity and coarse granularity; the medium-granularity clock gating unit is a clock gating unit for constructing a subtree of a clock tree that cannot converge; Build a target clock tree based on the replaced chip design file; The chip design file is an RTL code, and the target clock tree is constructed based on the replaced chip design file, including: performing logic synthesis on the replaced RTL code to obtain a gate-level netlist; the gate-level netlist includes the connection relationship between each device in the chip design; disconnecting the connection of the preset internal path of the discrete clock gating unit in the gate-level netlist; performing clock tree synthesis on the gate-level netlist after disconnecting the discrete clock gating unit to obtain the target clock tree.

2. The clock tree balancing method according to claim 1, characterized in that: Before disconnecting a connection of a preset internal path of the discrete clock gating unit through the discrete clock gating unit in the gate-level netlist, the method further includes: Combining the standard cells in the discrete clock gating unit to constrain the physical distance between the standard cells in the discrete clock gating unit to be within a preset distance range; Perform placement and routing based on the combined discrete clock gating cells.

3. The clock tree balancing method according to claim 2, characterized in that: The combining of the standard cells in the discrete clock gating unit comprises: The standard cells in the discrete clock gating unit are combined using a group command of an automatic layout and routing tool; the group command is used to constrain the physical distance between the standard cells of the discrete clock gating unit to be within a preset distance range.

4. The clock tree balancing method according to claim 1, characterized in that: Disconnecting a preset internal path of the discrete clock gating unit in the gate-level netlist includes: Disconnecting a preset internal path of the discrete clock gating unit in the gate-level netlist based on an ECO command of an automatic placement and routing tool; Or modify the code description of the connection of the discrete clock gating unit to the preset internal path in the gate-level netlist to disconnect the connection of the preset internal path of the discrete clock gating unit.

5. The method according to claim 1, characterized in that The chip design file is a gate-level netlist corresponding to the RTL code, and the method of replacing the medium-granularity clock gating unit in the chip design file based on the discrete clock gating unit includes: The medium-granularity gating cells in the gate-level netlist are replaced based on the discrete clock gating cells, so as to construct a target clock tree based on the replaced gate-level netlist.

6. The clock tree balancing method according to claim 1, characterized in that: After constructing the target clock tree based on the replaced chip design file, the method further includes: Restoring the connection of a preset internal path in the discrete clock gating unit; The timing of the chip design is verified based on the restored connected discrete clock gating units and the clock tree.

7. The clock tree balancing method according to claim 1, characterized in that: Before replacing the medium-granularity clock gating unit in the RTL code of the chip design based on the discrete clock gating unit, the method further includes: Building an initial clock tree based on the RTL code; Determine a subtree in the clock tree whose timing cannot converge; The clock gating unit that constructs the subtree that cannot converge is determined to be the medium-granularity clock gating unit.

8. The clock tree balancing method according to any one of claims 1 to 7, characterized in that: The discrete clock gating unit comprises: A logic gate and a latch; the logic gate and the latch are connected to a clock signal terminal of the same transmission clock signal; the latch and the logic gate are configured to both output the clock signal to the next device; The output terminal of the latch is configured to be disconnected from the next device to stop outputting the clock signal.

9. The clock tree balancing method according to claim 8, characterized in that: The logic gate comprises an AND gate, and the latch comprises a low-pass latch; The input terminal of the low-pass latch is connected to the clock signal terminal; The output terminal of the low-pass latch is connected to an input terminal of the AND gate, and the connection is configured to be disconnectable; The other input terminal of the AND gate is connected to the clock signal terminal.

10. The clock tree balancing method according to any one of claims 1 to 7, characterized in that: The discrete clock gating unit comprises: A logic gate and a register; the logic gate and the register are connected to a clock signal terminal of the same transmission clock signal; the register and the logic gate are configured to both output the clock signal to the next device; The output terminal of the register is configured to be disconnected from the next device to stop outputting the clock signal.