Chip clock design method, chip, device and related equipment

By designing synchronous clocks with the same phase and different frequencies in the chip, the problem of increasing the number of asynchronous clocks in large-scale chips is solved, the negative impact on performance, power consumption and area is reduced, and the correctness of the timing constraints of asynchronous signals is ensured.

CN114546030BActive Publication Date: 2024-09-24HYGON INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210138605.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-15
Publication Date
2024-09-24
Estimated Expiration
2042-02-15

AI Technical Summary

Technical Problem

In large-scale chip design, the increase in the number of asynchronous clocks leads to negative impacts on performance, power consumption, and area, and the correctness of the timing constraints of asynchronous signals is difficult to guarantee.

Method used

By designing the first clock generation logic, synchronous clocks of the same phase and different frequencies are generated for multiple functional modules, avoiding the design of asynchronous clocks, reducing the number of asynchronous clocks, and providing each functional module with a clock adapted to its clock frequency through unified clock generation logic. .

Benefits of technology

It reduces the negative impact of asynchronous clock on chip performance, power consumption and area, reduces the timing constraint workload of asynchronous signals, and ensures the correctness of timing constraints of asynchronous signals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114546030B
    Figure CN114546030B
Patent Text Reader

Abstract

The embodiment of the present application provides a clock design method, chip, device and related equipment for a chip, wherein the method includes: designing a first clock generation logic for providing clocks for multiple functional modules of the chip, wherein the first clock generation logic is configured to generate multiple functional clocks of the same phase but different frequencies according to the clock frequencies used by the multiple functional modules; and designing the correspondence between the multiple functional clocks and the multiple functional modules, wherein one functional clock corresponds to at least one functional module using the frequency of the functional clock. The embodiment of the present application can reduce the number of asynchronous clocks in the chip and reduce the negative impact of asynchronous clocks on the performance, power consumption and area of ​​the chip. Furthermore, the embodiment of the present application can also ensure the correctness of the timing constraints of the signal and optimize the processing of cross-clock signals.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of processor technology, and specifically to a chip clock design method, chip, device and related equipment. Background Art

[0002] With the development of integrated circuits and the improvement of technology, the integration of chips is constantly improving, and large-scale chip design has become the mainstream. Large-scale chips need to integrate multiple functional modules and realize communication between functional modules. The clock signal (referred to as clock) is the basis for the work of functional modules. How to design clocks for functional modules in the chip during chip design has become a technical problem that technicians in this field need to solve urgently. Summary of the invention

[0003] In view of this, the embodiments of the present application provide a chip clock design method, chip, device and related equipment to reduce the number of asynchronous clocks in the chip, reduce the negative impact of asynchronous clocks on the performance, power consumption and area of ​​the chip, and provide a basis for ensuring the correctness of the timing constraints of asynchronous signals.

[0004] To achieve the above objectives, the embodiments of the present application provide the following technical solutions.

[0005] In a first aspect, an embodiment of the present application provides a clock design method for a chip, comprising:

[0006] A first clock generation logic designed to provide clocks for multiple functional modules of the chip, wherein the first clock generation logic is configured to generate multiple functional clocks with the same phase but different frequencies according to the clock frequencies used by the multiple functional modules;

[0007] And the corresponding relationship between the multiple functional clocks and the multiple functional modules is designed, and one functional clock corresponds to at least one functional module using the frequency of the functional clock.

[0008] In a second aspect, an embodiment of the present application provides a chip, comprising: a plurality of functional modules, and a first clock generation logic;

[0009] The first clock generation logic is used to generate multiple functional clocks with the same phase but different frequencies according to the clock frequencies used by the multiple functional modules; and provide the functional clocks to the corresponding functional modules, wherein one functional clock corresponds to at least one functional module using the frequency of the functional clock.

[0010] In a third aspect, an embodiment of the present application provides a clock design device, including:

[0011] A clock generation logic design unit, used for designing a first clock generation logic for providing clocks for multiple functional modules of the chip, wherein the first clock generation logic is configured to generate multiple functional clocks with the same phase but different frequencies according to the clock frequencies used by the multiple functional modules;

[0012] The relationship design unit is used to design the corresponding relationship between the multiple functional clocks and the multiple functional modules, and one functional clock corresponds to at least one functional module using the frequency of the functional clock.

[0013] In a fourth aspect, an embodiment of the present application provides a computer device comprising at least one memory and at least one processor, wherein the at least one memory stores one or more computer executable instructions, and the at least one processor calls the one or more computer executable instructions to execute the clock design method of the chip as described in the first aspect above.

[0014] In a fifth aspect, an embodiment of the present application provides a storage medium, wherein the storage medium stores one or more computer executable instructions, and when the one or more computer executable instructions are executed, the clock design method of the chip as described in the first aspect above is implemented.

[0015] In a sixth aspect, an embodiment of the present application provides an electronic device, comprising the chip as described in the second aspect above.

[0016] The clock design method of the chip provided in the embodiment of the present application can design a first clock generation logic when designing clocks for multiple functional modules using different clock frequencies in the chip; based on the clock frequencies used by the multiple functional modules, the embodiment of the present application can design the first clock generation logic to generate multiple functional clocks with the same phase and different frequencies, and design the corresponding relationship between the multiple functional clocks and the multiple functional modules so that one functional clock corresponds to the functional module using the frequency of the functional clock, thereby configuring the functional clocks adapted to the clock frequency of each functional module to each functional module, so as to implement the design of clocks for multiple functional modules using different clock frequencies. In the embodiment of the present application, since the multiple functional clocks generated by the first clock generation logic are in phase with different frequencies, the multiple functional clocks are synchronous clocks, that is, the embodiment of the present application can realize the design of clocks for multiple functional modules using different clock frequencies through the multiple synchronous clocks generated by the first clock generation logic, avoiding the design of asynchronous clocks for the multiple functional modules, and reducing the number of asynchronous clocks in the chip, thereby reducing the negative impact of the asynchronous clock on the performance, power consumption and area of ​​the chip. At the same time, since the number of asynchronous clocks is reduced, the embodiments of the present application can reduce the workload of timing constraints for asynchronous signals, providing a basis for ensuring the correctness of timing constraints for asynchronous signals. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0018] Figure 1 This is an example diagram of the chip's clock design.

[0019] Figure 2A Flowchart of the clock design method for the chip.

[0020] Figure 2B Another flow chart of the clock design method for the chip.

[0021] Figure 3A This is another example diagram of clock design for the chip.

[0022] Figure 3B The following is an example of a waveform of clocks with the same phase and multiple frequencies.

[0023] Figure 3C The following is an example of the waveform of clocks with the same phase and non-multiple frequencies.

[0024] Figure 4A A flow chart of a method for designing a first clock generation logic.

[0025] Figure 4B This is a diagram showing an example structure of the first clock generation logic.

[0026] Figure 4C Another structural example diagram of the first clock generation logic.

[0027] Figure 4D The following is a waveform example.

[0028] Figure 5 This is another clock design example diagram for the chip.

[0029] Fig. 6A Flowchart of the method for designing timing constraints.

[0030] Figure 6B A flow chart of a method for designing cross-clock signal processing logic.

[0031] Figure 7 Design a block diagram for the clock.

[0032] Fig. 8A The following is an example diagram of the chip structure.

[0033] Figure 8B Another structural example diagram of the chip.

[0034] Figure 8C FIG. 4 is another structural example diagram of a chip.

[0035] Fig.8D FIG. 4 is another structural example diagram of a chip.

[0036] Fig. 9 This is an example diagram of the chip implementation. DETAILED DESCRIPTION

[0037] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0038] The clock design of the chip is mainly divided into synchronous timing design and asynchronous timing design.

[0039] Synchronous timing design means that all functional modules in the chip use the same clock, that is, the chip has a global unified clock, and all triggers in the chip update the triggers at the same time on the rising edge (or falling edge) of the clock to achieve logical operations and outputs. It should be noted that the clock of the chip is provided by the clock generation logic, for example, the clock generation circuit (an implementation of the clock generation logic) generates and provides clock signals for the functional modules in the chip; the functional modules of the chip can be devices that implement functions in the chip, such as the CPU (Central Processing Unit) core, memory controller, accelerator, etc. in the chip.

[0040] Asynchronous timing design refers to the use of multiple different clocks in chip design. Each functional module in the chip generally has its own design requirements (for example, each functional module has its own performance requirements). Different design requirements may have different clock requirements. Therefore, when multiple functional modules in the chip have multiple different clock requirements, it is necessary to design multiple clocks for multiple functional modules in the chip based on the asynchronous timing design method.

[0041] The multiple clocks designed in the chip are mainly divided into synchronous clocks and asynchronous clocks. Multiple clocks with fixed phase relationships are generally synchronous clocks, and multiple clocks with non-fixed phase relationships are generally asynchronous clocks. The non-fixed phase relationship between clocks may be due to the fact that there is no constraint on the phase relationship between clocks, resulting in the inability to determine the phase relationship between clocks; for example, clocks generated by different clock generation logics in the chip and clocks generated by the same clock generation logic without phase relationship constraints are generally asynchronous clocks. It should be noted that a complete clock cycle is a 360-degree phase. If a clock starts from the rising edge, it is called a 0-degree phase. If a clock starts from the falling edge, it is called a 180-degree phase, and so on.

[0042] When designing the clock according to the clock requirements of the functional modules, if multiple functional modules in the chip require different clock frequencies, the current main method is to design a corresponding number of multiple asynchronous clocks for the multiple functional modules in the chip to meet the clock frequency requirements of the multiple functional modules; that is, according to the number of clocks with different frequencies required by the multiple functional modules, a corresponding number of asynchronous clocks are designed in the chip. Among them, the sequential logic in the chip is synchronized by the clock, and the clock frequency refers to the frequency of the clock used by the sequential logic.

[0043] More specifically, when designing a clock for a functional module in a chip, the functional module's requirements for the clock are mainly divided into the following three situations.

[0044] In the first case, it is necessary to design a clock of corresponding frequency for the functional module based on the performance requirements of the functional module itself, and the clock frequency of the functional module is adjusted according to the performance requirements of the functional module itself. For the first case, the clock of the functional module in the first case is currently mainly designed as an asynchronous clock. For example, the clocks between different functional modules in the first case are asynchronous clocks, and the clocks of the functional modules in the first case and the functional modules in the second and third cases described later are all asynchronous clocks.

[0045] In the second case, based on the rigid requirements of protocols, standards or third-party IP (intellectual property), the functional module needs to design a clock with specific frequency, duty cycle and other parameters; at this time, since the functional module needs to comply with the rigid requirements of protocols, standards or third IP, the functional module can only design a clock with a specific frequency according to these rigid requirements; for the second case, the clock can be designed for the functional module in the second case according to the design method of asynchronous clock, for example, the functional module in the second case can be designed with a clock that is asynchronous with other functional modules. It should be noted that when the clocks of two functional modules are asynchronous clocks, the two functional modules need to perform asynchronous signal processing when exchanging signals.

[0046] In the third case, the functional module itself has no requirements for the clock, for example, the functional module itself has no requirements for the clock frequency; at this time, the overall performance requirements and process conditions of the chip can be considered to select a fixed-frequency clock for the functional module in the third case.

[0047] According to the clock design methods of the above three situations, Figure 1 The clock design example diagram of the chip is shown as an example. Figure 1 As shown, the chip includes functional modules 110, 120, 130 and 140. Functional modules 110 and 120 correspond to the first case above. Based on the performance requirements of functional modules 110 and 120, clocks 111 and 121 of corresponding frequencies need to be designed for functional modules 110 and 120 respectively. Clocks 111 and 121 are asynchronous clocks. Functional module 130 corresponds to the second case above. Based on the hard requirements of the protocol, standard or third IP, a clock 131 of a specific frequency needs to be designed for functional module 130. Clock 131 is an asynchronous clock with clocks 111 and 121. Functional module 140 corresponds to the third case above. Functional module 140 has no requirements for the clock. Based on the overall performance requirements and process conditions of the chip, a clock 141 of a fixed frequency can be designed for functional module 140. Clock 141 is an asynchronous clock with clocks 111, 121 and 131.

[0048] Depend on Figure 1 As can be seen from the example, when multiple functional modules in a chip require different clock frequencies, currently, multiple asynchronous clocks of the corresponding number are designed for the multiple functional modules in the chip. However, as the chip scale increases and the integrated functions become more complex, the number of different functional modules in the chip requiring clocks of different frequencies will increase, which will lead to an increase in the number of asynchronous clocks in the chip. The increase in the number of asynchronous clocks will have a negative impact on the performance, power consumption and area of ​​the chip.

[0049] Furthermore, the increase in the number of asynchronous clocks will make it difficult to ensure the correctness of the timing constraints of asynchronous signals. Asynchronous signals refer to signals transmitted between asynchronous clocks. At present, the timing constraints of asynchronous signals in chips are generally added by designers. As the number of asynchronous clocks increases, the workload of designers to add timing constraints for asynchronous signals also increases sharply, which increases the possibility of designers adding incorrect timing constraints for asynchronous signals, thereby affecting the correctness of the timing constraints of asynchronous signals.

[0050] It should be noted that asynchronous timing design can be used when signals are transmitted from one clock to another. When a chip is designed with multiple clocks, timing constraints are required for signals that cross clocks. The timing constraints for asynchronous signals described above are a type of timing constraints for signals that cross clocks.

[0051] It can be seen from the above description that designing a corresponding number of asynchronous clocks for multiple functional modules in the chip according to the different clock frequencies required by the multiple functional modules in the chip will lead to an increase in the number of asynchronous clocks in the chip as the chip scale increases and the integrated functions become more complex, thereby causing a series of problems.

[0052] The inventor of the present application has found through research that, for the above three situations, although there are differences in the clock frequencies required by the functional modules in each situation, from the perspective of chip design, when multiple functional modules require different clock frequencies, synchronous clocks with the same phase but different frequencies can be designed for multiple functional modules, thereby avoiding designing the clocks of multiple functional modules as asynchronous clocks, thereby achieving the effect of reducing the number of asynchronous clocks in the chip. For example, the embodiment of the present application can comprehensively consider the clocks of the functional modules in the above multiple situations, and design the clocks of the functional modules in multiple situations as synchronous clocks with the same phase but different frequencies, and the synchronous clocks with the same phase but different frequencies are generated by the same clock generation logic, thereby avoiding designing the clocks of the functional modules in multiple situations as asynchronous clocks.

[0053] Based on the above ideas, the embodiments of the present application provide an improved clock design scheme to reduce the number of asynchronous clocks in the chip, reduce the negative impact of asynchronous clocks on the performance, power consumption and area of ​​the chip, and reduce the workload of timing constraints of asynchronous signals, thereby providing a basis for ensuring the correctness of the timing constraints of asynchronous signals.

[0054] As an optional implementation, Figure 2A An optional flow chart of a chip clock design method is shown as an example. The method flow can be implemented by design software, for example, by executing the design software by a computer device (such as a host) used for chip design to implement the method flow. Figure 2A The method flow may include the following steps.

[0055] In step S210 , multiple functional modules of a chip are determined, and the multiple functional modules use different clock frequencies.

[0056] When designing clocks for multiple functional modules of a chip, the embodiments of the present application can determine multiple functional modules that need to design clocks. For example, the CPU, multiple buses, DDR PHY, etc. in the chip that need to design clocks; DDR is the abbreviation of Double Data Rate SDRAM, which means double data rate synchronous dynamic random access memory, and PHY is the abbreviation of Physical, which means the port physical layer.

[0057] In some embodiments, multiple functional modules using different clock frequencies may correspond to the functional modules of the above-mentioned multiple situations. For example, the multiple functional modules may include a functional module corresponding to the above-mentioned first situation, and a functional module corresponding to the above-mentioned second situation. For another example, the multiple functional modules may include a functional module corresponding to the above-mentioned first situation, and a functional module corresponding to the above-mentioned third situation. For another example, the multiple functional modules may include a functional module corresponding to the above-mentioned first situation, a functional module corresponding to the above-mentioned second situation, and a functional module corresponding to the above-mentioned third situation.

[0058] In other embodiments, the multiple functional modules using different clock frequencies may also be only the functional modules corresponding to the first case above. For example, the multiple functional modules are the multiple functional modules in the first case, and each functional module uses a clock of a different frequency based on its own performance requirements.

[0059] In step S211, a first clock generation logic is designed to provide clocks for the multiple functional modules, and the first clock generation logic is configured to generate multiple functional clocks with the same phase but different frequencies according to the clock frequencies used by the multiple functional modules.

[0060] In step S212, the correspondence between the plurality of functional clocks and the plurality of functional modules is designed, and one functional clock corresponds to at least one functional module using the frequency of the functional clock.

[0061] Different from the method of designing asynchronous clocks for multiple functional modules using different clock frequencies, the embodiments of the present application can design multiple functional clocks with the same phase but different frequencies for the multiple functional modules according to the clock frequencies used by the multiple functional modules respectively (since the multiple functional clocks have the same phase but different frequencies, the multiple functional clocks are synchronous clocks), and configure the functional clocks that adapt to the clock frequency of each functional module to each functional module for use, thereby reducing the number of asynchronous clocks in the chip.

[0062] Based on this, the embodiment of the present application can uniformly design the first clock generation logic for multiple functional modules using different clock frequencies, generate multiple functional clocks with the same phase but different frequencies by designing the first clock generation logic, and design the correspondence between the multiple functional clocks and the multiple functional modules, so that one functional clock corresponds to the functional module using the frequency of the functional clock, so that the functional clocks that adapt to the clock frequency of each functional module are respectively configured for use by each functional module. In some embodiments, the multiple functional clocks correspond to the number of clock frequencies used by the multiple functional modules. Since the embodiment of the present application designs clocks for multiple functional modules through multiple functional clocks belonging to synchronous clocks, it is possible to avoid designing asynchronous clocks for multiple functional modules using different clock frequencies, thereby achieving the effect of reducing the number of asynchronous clocks in the chip.

[0063] The clock design method of the chip provided in the embodiment of the present application can design a first clock generation logic when designing clocks for multiple functional modules using different clock frequencies in the chip; based on the clock frequencies used by the multiple functional modules, the embodiment of the present application can design the first clock generation logic to generate multiple functional clocks with the same phase and different frequencies, and design the corresponding relationship between the multiple functional clocks and the multiple functional modules so that one functional clock corresponds to the functional module using the frequency of the functional clock, thereby configuring the functional clocks adapted to the clock frequency of each functional module to each functional module, so as to implement the design of clocks for multiple functional modules using different clock frequencies. In the embodiment of the present application, since the multiple functional clocks generated by the first clock generation logic are in phase with different frequencies, the multiple functional clocks are synchronous clocks, that is, the embodiment of the present application can realize the design of clocks for multiple functional modules using different clock frequencies through the multiple synchronous clocks generated by the first clock generation logic, avoiding the design of asynchronous clocks for the multiple functional modules, and reducing the number of asynchronous clocks in the chip, thereby reducing the negative impact of the asynchronous clock on the performance, power consumption and area of ​​the chip. At the same time, since the number of asynchronous clocks is reduced, the embodiments of the present application can reduce the workload of timing constraints for asynchronous signals, providing a basis for ensuring the correctness of timing constraints for asynchronous signals.

[0064] In some embodiments, Figure 2A The multiple functional modules using different clock frequencies in the process shown can correspond to the functional modules in the various situations described above. As an optional implementation, Figure 2B Another optional flow chart of a chip clock design method is shown as an example. Figure 2B The method flow may include the following steps.

[0065] In step S220, multiple functional modules of the chip are determined, and the multiple functional modules use different clock frequencies. The multiple functional modules include a first functional module and a second functional module; wherein the first functional module uses a clock with a frequency corresponding to its own performance requirements, and the second functional module uses a clock with a specific frequency.

[0066] In the embodiment of the present application, for the convenience of explanation, the functional module corresponding to the first case above is referred to as the first functional module, that is, the first functional module determines the frequency of the clock based on its own performance requirements, and the first functional module adjusts the clock frequency used as the performance requirements change. As an optional implementation, the chip may have multiple first functional modules. When the number of first functional modules is multiple, the multiple first functional modules may use the same frequency clock or different frequency clocks based on their respective performance requirements; for example, the performance requirements of each first functional module may correspond to a clock of the same frequency; for another example, the performance requirements of different first functional modules correspond to clocks of different frequencies. In this case, multiple first functional modules need to use multiple clocks of different frequencies, and the number of the multiple clocks of different frequencies corresponds to the number of clock frequencies corresponding to the performance requirements of the multiple first functional modules.

[0067] The second functional module is a functional module whose clock uses a specific frequency as referred to in the embodiment of the present application. For example, the second functional module may be a functional module corresponding to the second case described above, and the second functional module uses a clock of a specific frequency based on the rigid requirements of the protocol, standard or third IP. For another example, the second functional module may also be a functional module corresponding to the third case described above, and the second functional module may use a fixed-frequency clock based on the overall performance requirements and process conditions of the chip in the absence of a clock requirement, and the fixed-frequency clock may also be regarded as a fixed specific-frequency clock.

[0068] In step S221, a first clock generation logic is designed, where the first clock generation logic is configured to generate a plurality of functional clocks with the same phase but different frequencies according to the clock frequencies used by the first functional module and the second functional module.

[0069] In step S222, a functional clock adapted to the clock frequency of the first functional module is designed, and its corresponding relationship with the first functional module; and a functional clock adapted to the specific frequency is designed, and its corresponding relationship with the second functional module.

[0070] The embodiment of the present application can uniformly configure the first clock generation logic for the first functional module and the second functional module, generate multiple functional clocks with the same phase but different frequencies by designing the first clock generation logic, and design the correspondence between the functional clock and the first functional module and the second functional module, so that the functional clocks that are respectively adapted to the clock frequencies of the first functional module and the second functional module are respectively configured to the first functional module and the second functional module, so that the clocks are designed for the first functional module and the second functional module respectively through multiple functional clocks belonging to the synchronous clock, thereby achieving the effect of reducing the number of asynchronous clocks in the chip.

[0071] As an optional implementation, when designing the correspondence between the functional clock and the first functional module and the second functional module, the embodiment of the present application may configure the functional clock corresponding to the clock frequency used by the first functional module to the first functional module, and establish the correspondence between the functional clock and the first functional module; configure the functional clock corresponding to the clock frequency used by the second functional module to the second functional module, and establish the correspondence between the functional clock and the second functional module. It should be noted that during the design, the frequency of each functional clock generated by the first clock generation logic can be adjusted based on the clock frequency required by the corresponding functional module. The embodiment of the present application only needs to ensure that the frequency of the functional clock corresponding to the functional module can be adjusted to the frequency required by the functional module. Therefore, in the possible establishment of the correspondence, the functional clock and the functional module can maintain a fixed correspondence.

[0072] In an embodiment of the present application, the first clock generation logic can generate multiple functional clocks with adaptive frequencies based on the clock frequencies used by the first functional module and the second functional module respectively, and the multiple functional clocks have the same phase but different frequencies; in some embodiments, the number of the multiple functional clocks generated by the first clock generation logic may correspond to the number of clock frequencies used by the first functional module and the second functional module.

[0073] In some embodiments, since the first functional module corresponds to the functional module of the first case above, when the number of first functional modules is multiple, each first functional module needs to use a clock of a corresponding frequency based on its own performance requirements; based on this, the embodiment of the present application can adjust the frequency of the functional clock corresponding to each first functional module to the clock frequency required by each first functional module, and configure it to each first functional module respectively. As an optional implementation, a functional clock generated by the first clock generation logic can be used for one or more first functional modules. For example, the clock frequencies used by multiple first functional modules may be the same or different; when the frequencies of the clocks used by multiple second functional modules are the same, a functional clock generated by the first clock generation logic can be used for multiple second functional modules with the same frequency. When the clock frequencies used by multiple first functional modules are different, the clock frequencies used by each first functional module may be different, or the clock frequencies used by some first functional modules may be the same, and the clock frequencies used by some first functional modules may be different. At this time, the first clock generation logic can generate multiple functional clocks for multiple first functional modules, and one functional clock can be used for one or more first functional modules with the same clock frequency.

[0074] Since the second functional module uses a clock of a specific frequency, the embodiment of the present application can set the frequency of the functional clock corresponding to the second functional module to the specific frequency used by the second functional module, and configure the functional clock of the specific frequency to the second functional module.

[0075] In some embodiments, the clock design scheme provided in the embodiments of the present application is described below with reference to examples. Figure 1 Based on the example, Figure 3A Another example diagram of the clock design of the chip is shown as an example; Figure 3A As shown, the function modules 110 and 120 are examples of the first function module, which correspond to the function module of the first case; the function module 130 is an example of the second function module, which corresponds to the function module of the second case. When the functional modules 110 and 120 use clocks of different frequencies based on their own performance requirements, and the functional module 130 uses a clock of a specific frequency based on a rigid requirement, the embodiment of the present application may design the first clock generation logic 300 to generate multiple functional clocks 310, 320 and 330 of the same phase but different frequencies; wherein the frequency of the functional clock 310 is the same as the clock frequency used by the functional module 110, the frequency of the functional clock 320 is the same as the clock frequency used by the functional module 120, and the frequency of the functional clock 330 is the same as the specific frequency used by the functional module 130; thus, the embodiment of the present application may configure the functional clock 310 for the functional module 110, configure the functional clock 320 for the functional module 120, and configure the functional clock 330 for the functional module 130, so as to realize the design of clocks for the functional modules corresponding to the first case and the second case using different clock frequencies through multiple synchronous clocks, thereby reducing the number of asynchronous clocks in the chip.

[0076] Among other possible examples, Figure 3A The first clock generation logic 300 shown may also be Figure 1 The exemplary functional module 140 generates a functional clock, or Figure 3A In the example, the first clock generation logic 300 generates a functional clock for the functional module 130 , and is replaced by generating a functional clock for the functional module 140 .

[0077] It can be seen that the embodiments of the present application can provide synchronous clocks with the same phase but different frequencies for the functional modules in various situations on the basis of comprehensively considering the clock frequencies of the functional modules in various situations mentioned above, so as to realize clock design for the functional modules in various situations and reduce the number of asynchronous clocks designed in the chip.

[0078] In another possible implementation, the multiple functional modules using different clock frequencies may also be the multiple functional modules in the first case, for example Figure 3A The functional modules 110 and 120 are shown. The embodiment of the present application can also achieve the effect of reducing the number of asynchronous clocks by only providing multiple functional clocks with the same phase but different frequencies for multiple functional modules in the first case.

[0079] The clock design method provided in the embodiment of the present application can design a first clock generation logic when designing a clock for the first functional module and the second functional module in the chip; based on the fact that the first functional module uses a clock with a frequency corresponding to its own performance requirements and the second functional module uses a clock with a specific frequency, the embodiment of the present application can design a first clock generation logic for generating multiple functional clocks with the same phase and different frequencies according to the clock frequencies used by the first functional module and the second functional module; and design a corresponding relationship between multiple functional clocks and the first functional module and the second functional module, so that the functional clocks adapted to the clock frequencies of the first functional module and the second functional module are respectively configured to the first functional module and the second functional module, so as to realize the design of clocks for the first functional module and the second functional module using different clock frequencies. Since the multiple functional clocks generated by the first clock generation logic are of the same phase and different frequencies, the multiple functional clocks are synchronous clocks. The embodiment of the present application can avoid designing asynchronous clocks for the first functional module and the second functional module using different clock frequencies, which can reduce the number of asynchronous clocks in the chip, thereby reducing the negative impact of asynchronous clocks on the performance, power consumption and area of ​​the chip. At the same time, reducing the workload of adding the timing constraints of asynchronous signals provides a basis for ensuring the correctness of the timing constraints of asynchronous signals.

[0080] In some embodiments, the frequencies of the multiple functional clocks generated by the first clock generation logic may be in a multiple relationship (eg, an integer multiple relationship). In one example, Figure 3B The waveform example diagram of two clocks A1 and A2 with the same phase and multiple frequencies is shown as an example, which can be used for reference. In other embodiments, the frequencies of the multiple functional clocks generated by the first clock generation logic can also be non-multiple relations (such as non-integer multiple relations). In one example, Figure 3C The waveform example diagram of two clocks B1 and B2 with the same phase and non-multiple frequency is shown as an example, which can be used for reference.

[0081] It should be noted that the embodiment of the present application does not limit whether there is a multiple relationship between the frequencies of the functional clocks, as long as the frequencies of the multiple functional clocks generated by the first clock generation logic can match the clock frequencies used by the corresponding functional modules.

[0082] In some further embodiments, the embodiment of the present application may also design the first clock generation logic to generate a reference clock, and the frequency of the reference clock may be a common divisor of the frequencies of multiple functional clocks. As an optional implementation, the embodiment of the present application may provide a reference clock for the first clock generation logic, amplify the frequency of the reference clock, and perform multiple frequency division processing on the high-frequency clock of the amplified frequency to obtain a reference clock and multiple functional clocks; wherein, after the high-frequency clock is divided once, a clock (such as a reference clock or a functional clock) output by the first clock generation logic is obtained. Based on this idea, Figure 4A The flowchart of an optional method for designing the first clock generation logic provided by the embodiment of the present application is exemplarily shown. Figure 4A The method flow may include the following steps.

[0083] In step S410, a frequency amplification circuit is designed, wherein the frequency amplification circuit is used to perform frequency amplification processing on a provided reference clock to obtain a high-frequency clock.

[0084] In step S411, a plurality of frequency dividing circuits connected to the frequency amplifying circuit are designed, and the plurality of frequency dividing circuits are used to divide the high frequency clock according to their respective frequency dividing configurations to obtain a reference clock and a plurality of functional clocks; wherein one frequency dividing circuit outputs one clock based on its own frequency dividing configuration.

[0085] As an optional implementation, the frequency of the reference clock is a common divisor of the frequencies of the multiple functional clocks, and the frequency of the reference clock is the same as the frequency of the reference clock.

[0086] based on Figure 4A The idea of ​​the method flow shown is Figure 4B The structure example diagram of the first clock generation logic designed is shown as an example. Figure 4B As shown, a first clock generation logic takes a reference clock as input, and simultaneously outputs a reference clock and multiple functional clocks with the same phase but different frequencies, and the functional clock has the same phase as the reference clock; a first clock generation logic may include: a frequency amplification circuit 421 and multiple frequency division circuits 422.

[0087] The frequency amplifier circuit is used to perform frequency amplification processing on the reference clock to obtain a high-frequency clock; as an optional implementation, the frequency amplifier circuit can be configured with a frequency multiplication factor to generate a high-frequency clock by multiplying the reference clock by the frequency multiplication factor.

[0088] A frequency division circuit can be used to perform a frequency division process on a high-frequency clock to obtain a clock (such as a reference clock or a functional clock) generated by the first clock generation logic; as an optional implementation, each frequency division circuit can set a frequency division configuration (frequency division multiple or expected frequency after division), so that a frequency division circuit can divide the high-frequency clock according to its own frequency division configuration to output a clock generated by the first clock generation logic.

[0089] In some embodiments, for multiple functional modules using different clock frequencies, the functional modules using the same clock frequency may correspond to one frequency division circuit, and one frequency division circuit outputs one clock based on its own frequency division configuration and provides it to the corresponding functional module.

[0090] As an optional implementation, in the first clock generation logic, the reference clock may correspond to a frequency division circuit, and a functional clock may correspond to a frequency division circuit. In some embodiments in which the frequency division circuit implements the frequency division processing, the embodiment of the present application may set a frequency division configuration (the expected frequency or frequency division multiple corresponding to the reference clock) for the frequency division circuit corresponding to the reference clock, thereby performing frequency division processing on the high-frequency clock to obtain the reference clock. For the frequency division circuit corresponding to any functional clock, the embodiment of the present application may set a frequency division configuration (the expected frequency or frequency division multiple corresponding to the functional clock) for the frequency division circuit, thereby performing frequency division processing on the high-frequency clock to obtain the corresponding functional clock.

[0091] In terms of the frequency division configuration of the frequency division circuit, the embodiments of the present application can determine the frequency division configuration of the frequency division circuit corresponding to each functional clock according to the clock frequency required by the functional module corresponding to each functional clock (that is, the expected frequency of each functional clock); and the frequency of the reference clock, the frequency of the high-frequency clock, and the frequency of the reference clock are determined on the basis of the frequencies of each functional clock, in a manner that the frequency of the reference clock is a common divisor of the frequencies of multiple functional clocks; the frequency of the high-frequency clock is determined in a manner that the frequency of the high-frequency clock is a preset multiple of the frequency of the reference clock; and the frequency of the reference clock is determined in a manner that the frequency of the reference clock is the same as the frequency of the reference clock.

[0092] As an optional implementation, the frequency of the reference clock can be a common divisor of the frequencies of multiple functional clocks, and the frequency of the functional clock is a multiple of the frequency of the reference clock. In this case, the embodiment of the present application can set a frequency division configuration for the frequency division circuit corresponding to each functional clock according to the common divisor of the frequencies of multiple functional clocks being the frequency of the reference clock, the frequency of each functional clock being a multiple of the frequency of the reference clock, and the expected frequency of each functional clock. Furthermore, in addition to satisfying the same phase, the frequencies between the functional clocks can be a multiple or a non-multiple relationship; for example, among the multiple functional clocks, the frequencies between some functional clocks are multiples, and the frequencies between some functional clocks are non-multiples.

[0093] Furthermore, the frequency of the base clock may be the same as that of the reference clock, and the frequency of the high-frequency clock may be a preset multiple of the frequency of the reference clock (the preset multiple corresponds to the multiplication multiple configured by the frequency amplification circuit); in one example, the frequency of the high-frequency clock may be 35 times the frequency of the reference clock, and the frequency amplification circuit may multiply the reference clock to a high-frequency clock by a preset multiple of 35, and the frequency division circuit corresponding to the reference clock may divide the high-frequency clock by a multiple of 35 to obtain a reference clock.

[0094] It can be seen that the inputs of multiple frequency division circuits are the same (i.e., each frequency division circuit inputs a high-frequency clock), but the frequency of the clock output by each frequency division circuit is different, and the reference clocks and multiple functional clocks output by the multiple frequency division circuits need to maintain the same phase as the input high-frequency clock. As an optional implementation, the embodiment of the present application can use the principle of a phase-locked loop to ensure that multiple frequency division circuits output the same-phase reference clock and multiple functional clocks. A phase-locked loop (PLL) is a negative feedback control system that uses a voltage generated by phase synchronization to tune a voltage-controlled oscillator to generate a target frequency.

[0095] In a further optional implementation, Figure 4C Another structural example diagram of the first clock generation logic is shown exemplarily, combined with Figure 4B and Figure 4C As shown, Figure 4B The frequency amplifier circuit 421 shown may be Figure 4C The phase-locked loop 431 shown, Figure 4B The frequency divider circuit 422 shown may be Figure 4C The digital frequency division unit 432 shown. The specific functions of the phase-locked loop 431 and each digital frequency division unit 432 can be referred to the related description above, and will not be repeated here. For ease of understanding, the relationship between the intermediate high-frequency clock generated by the first clock generation logic for the input reference clock, the output reference clock, and the functional clock is: Figure 4DTaking the first clock generation logic outputting a reference clock and three functional clocks as an example, corresponding waveform examples are exemplarily shown for reference.

[0096] In some further embodiments, the embodiments of the present application may also design a second clock generation logic in the chip to generate a clock for a third functional module, and the third functional module may be a functional module that uses a different specific frequency from the second functional module described above. Based on this, the clock generated by the second clock generation logic and the clock generated by the first clock generation logic (e.g., a reference clock and a functional clock) may be in an asynchronous clock relationship. In a possible example, the third functional module corresponds to the functional module of the second case above, for example, the second functional module and the third functional module both need to use a clock of a specific frequency based on a hard requirement, but the specific frequency used by the clock of the third functional module is different from the specific frequency used by the clock of the second functional module.

[0097] As an optional implementation, Figure 5 Another example of a clock design of a chip is shown in FIG. Figure 3A and Figure 5 As shown, Figure 5 The chip shown also includes: a second clock generation logic 510 and a functional module 520; both the functional module 520 and the functional module 130 are functional modules corresponding to the second case, and need to use a clock of a specific frequency based on the hard requirements of the protocol, standard or third IP, and the specific frequency used by the clock of the functional module 520 is different from the specific frequency used by the clock of the functional module 130. When the first clock generation logic provides the functional clock 330 for the functional module 130, the second clock generation logic 510 can generate a clock 511 according to the specific frequency required by the functional module 520; and the clock 511 and the clock generated by the first clock generation logic are asynchronous clocks. Thus, the second clock generation logic 510 can configure the clock 511 for use by the functional module 520 to meet the specific frequency of the clock required by the functional module 520 under the hard requirements. Figure 5 In the example, the clock 511 and the functional clocks 310 , 320 and 330 do not have a fixed phase relationship, that is, they are asynchronous clock relationships.

[0098] It can be seen that when the clock requirements of the chip are divided into the first case, the second case and the third case described above, the embodiment of the present application can comprehensively consider multiple functional modules using different clock frequencies in various cases. The embodiment of the present application can generate multiple functional clocks (belonging to synchronous clocks) with the same phase but different frequencies through the first clock generation logic to meet the clock frequency usage requirements of the multiple functional modules, thereby reducing the number of asynchronous clocks in the chip.

[0099] It should be further explained that the signal needs to be time-constrained when crossing the clock. The timing constraints of the signal across the clock are generally divided into two categories, one is not to perform timing checks, and the other is to perform additional constraints on the transmission delay alone. At present, when additional constraints are performed on the transmission delay, a synchronizer or an asynchronous FIFO (First Input First Output) cache can be used to perform cross-clock signal processing; however, as the chip manufacturing process enters the deep submicron era, the transmission delay caused by processing the signal across the clock through a synchronizer or an asynchronous FIFO cache will have an increasingly greater impact on chip performance, thereby seriously restricting the improvement of chip performance; at the same time, the design of the synchronizer requires a large amount of logic resources, which will lead to an increase in the area and power consumption of the chip. Based on this, the embodiment of the present application further performs timing constraint design and cross-clock signal processing design for the chip.

[0100] In the embodiment of the present application, a reference clock generated by a first clock generation logic and multiple functional clocks can be defined in a clock group, and the clocks in a clock group need to meet the synchronization timing requirements. When clock constraints are applied to the clocks in a clock group, Fig. 6A An exemplary flowchart of an optional method for designing timing constraints is shown, referring to Fig. 6A The method flow may include the following steps.

[0101] In step S610, when the design signal is transmitted between the functional clock and the reference clock, timing constraints are performed according to the frequency of the functional clock.

[0102] For the functional clock and the reference clock in a clock group, when a signal is transmitted between the functional clock and the reference clock (for example, a signal is transmitted from a functional clock to a reference clock, or a signal is transmitted from a reference clock to a functional clock), since the frequency of the functional clock is a multiple of the frequency of the reference clock, the embodiment of the present application can design the signal between the functional clock and the reference clock to be timing constrained according to the frequency of the functional clock.

[0103] In step S611, when the design signal is transmitted between two functional clocks whose frequencies do not have a multiple relationship, timing constraints are performed according to the greatest common divisor of the clock periods of the two functional clocks.

[0104] For two functional clocks in a clock group, since there is not necessarily a multiple relationship between the functional clocks in frequency, the frequencies of the two functional clocks may or may not be in a multiple relationship. For two functional clocks whose frequencies are not in a multiple relationship, if a signal is transmitted between the two functional clocks (for example, a signal is transmitted from one functional clock to another functional clock), the embodiment of the present application can design the signal to be time-constrained according to the greatest common divisor of the clock periods of the two functional clocks.

[0105] In step S612, when the design signal is transmitted between two functional clocks whose frequencies are multiples of each other, timing constraints are performed based on the clock period of the functional clock with a faster frequency, and the deviation and jitter between the two functional clocks.

[0106] For two functional clocks whose frequencies are in a multiple relationship, if a signal is transmitted between the two functional clocks, then in some embodiments, the embodiments of the present application may add the clock period of the functional clock with the faster frequency to the deviation and jitter between the two functional clocks to design the timing constraints for the signal.

[0107] In some further embodiments, the clocks generated by different clock generation logics can be defined as asynchronous clocks (for example, the first clock generation logic and the second clock generation logic are different clock generation logics, and different second clock generation logics are different clock generation logics); for the signal between two asynchronous clocks, the embodiments of the present application can be designed not to perform timing checks.

[0108] In some further embodiments, the present application embodiment can also design a signal processing logic for a chip across clocks, that is, design a processing logic for a signal across clocks. As an optional implementation, Figure 6B The flowchart of an optional method for designing cross-clock signal processing logic is shown as an example. Figure 6B The method flow may include the following steps.

[0109] In step S620, if the two clocks are generated by different clock generation logics, the signal across the two clocks is designed to be synchronously processed according to an asynchronous timing processing method.

[0110] The two clocks may be generated by different clock generation logics, that is, the two clocks are generated by a first clock generation logic and a second clock generation logic, respectively, or by two different second clock generation logics, etc. If the two clocks are generated by different clock generation logics, the two clocks are asynchronous clocks. In the embodiment of the present application, a signal across asynchronous clocks may be designed, and the signal synchronization processing may be performed according to an asynchronous timing processing method.

[0111] In step S621, if the two clocks are asynchronous clocks generated by the same clock generation logic, the signal across the two clocks is designed to be synchronously processed according to the asynchronous timing processing method.

[0112] If two clocks are generated by the same clock generation logic, but the phase relationship between the two clocks is not fixed (for example, the phase relationship between the two clocks is unconstrained), then the two clocks are asynchronous clocks. The embodiment of the present application can design a signal that crosses the asynchronous clock and perform signal synchronization processing according to the asynchronous timing processing method.

[0113] That is, if the two clocks are asynchronous clocks generated by different clock generation logics, or asynchronous clocks generated by the same clock generation logic, then the signal across the two clocks is designed to be synchronously processed according to the asynchronous timing processing method.

[0114] In step S622, if the two clocks are synchronous clocks generated by the same clock generation logic and the frequencies of the two clocks are in a multiple relationship, a signal spanning the two clocks is designed and processed as a synchronous signal.

[0115] If two clocks are generated by the same clock generation logic, and the two clocks have the same phase and a multiple relationship of frequencies (e.g., an integer multiple relationship), then the two clocks are synchronous clocks, and the embodiments of the present application can design a signal across the two clocks and process it as a synchronous signal. In some embodiments, two clocks with the same phase and a multiple relationship of frequencies generated by the same clock generation logic are, for example: a reference clock and a functional clock generated by a first clock generation logic, or two functional clocks with a multiple relationship of frequencies generated by a first clock generation logic.

[0116] In step S623, if the two clocks are synchronous clocks generated by the same clock generation logic and the frequencies of the two clocks are non-multiples, the signals across the two clocks are designed for asynchronous timing processing by fixing the relative position relationship between the read pointer and the write pointer of the FIFO cache.

[0117] If two clocks are generated by the same clock generation logic, and the two clocks have the same phase and a non-multiple relationship in frequency (for example, not an integer multiple relationship), then the two clocks are synchronous clocks. Based on the characteristics of the same phase but different frequencies of the two synchronous clocks, the embodiments of the present application can simplify the design of the FIFIO cache and implement low-latency asynchronous timing processing of the signals across the two clocks. In some embodiments, based on the characteristics of the same phase but different frequencies of the two synchronous clocks, the embodiments of the present application can perform asynchronous timing processing on the signals across the two clocks by fixing the relative position relationship between the read pointer and the write pointer of the FIFO cache.

[0118] The clock design scheme of the chip provided in the embodiment of the present application, by analyzing the clock requirements of the functional modules, uniformly configures multiple functional modules using different clock frequencies to be provided with clocks by the first clock generation logic; generates multiple functional clocks of the same phase but different frequencies by the first clock generation logic, and designs clocks for the multiple functional modules, which can reduce the number of asynchronous clocks designed in the chip, reduce the negative impact of the asynchronous clock on the performance, power consumption and area of ​​the chip, and reduce the difficulty of timing analysis of the chip. At the same time, it reduces the workload of timing constraints of asynchronous signals, and provides a basis for ensuring the correctness of timing constraints of asynchronous signals. Furthermore, on the basis of providing multiple functional clocks of the same phase but different frequencies for the first functional module and the second functional module, the embodiment of the present application provides a corresponding timing constraint design for the chip, which can ensure the correctness of the timing constraints of the signals in the chip; and optimizes the processing logic design of cross-clock signals, which can achieve the effect of reducing the system delay of the chip and reducing the logic units.

[0119] The clock design device of the chip provided in the embodiment of the present application is introduced below. The clock design device of the chip described below can be considered as a software device required to be set by a computer device used for chip design to implement the clock design method provided in the embodiment of the present application. For example, a software device required to be set by the chip design software running on the computer device. The content described below can be referenced to the content described above.

[0120] As an optional implementation, Figure 7 An optional block diagram of a clock design device is shown exemplarily, and the device can be applied to a computer device for chip design, referring to Figure 7 , the device may include:

[0121] A clock generation logic design unit 711, configured to design a first clock generation logic for providing clocks for multiple functional modules of the chip, wherein the first clock generation logic is configured to generate multiple functional clocks with the same phase but different frequencies according to the clock frequencies used by the multiple functional modules;

[0122] The relationship design unit 712 is used to design the corresponding relationship between the multiple functional clocks and the multiple functional modules, where one functional clock corresponds to at least one functional module using the frequency of the functional clock.

[0123] In some embodiments, the multiple functional modules include: a first functional module and a second functional module; wherein the first functional module uses a clock with a frequency corresponding to its own performance requirements, and the second functional module uses a clock with a specific frequency.

[0124] In some embodiments, the first clock generation logic is configured to generate multiple functional clocks with the same phase but different frequencies according to the clock frequencies used by the multiple functional modules, including: generating multiple functional clocks with the same phase but different frequencies according to the clock frequencies used by the first functional module and the second functional module.

[0125] In some embodiments, the relationship design unit 712 is used to design the correspondence between the multiple functional clocks and the multiple functional modules, including: designing a functional clock that adapts to the clock frequency of the first functional module, and the correspondence between the first functional module; and, designing a functional clock that adapts to the specific frequency, and the correspondence between the second functional module.

[0126] In some embodiments, the second functional module uses a clock of a specific frequency based on a rigid requirement, or the second functional module has no clock requirement; when the second functional module has no clock requirement, a fixed clock of a specific frequency is used based on the overall performance requirements and process conditions of the chip.

[0127] In some further embodiments, the clock generation logic design unit 711 is also used to design a second clock generation logic, wherein the second clock generation logic is used to generate a clock for a third functional module, and the clock is asynchronous with the clock generated by the first clock generation logic; the third functional module uses a clock of a specific frequency based on a hard requirement, and the specific frequency used by the clock of the third functional module is different from the specific frequency used by the clock of the second functional module.

[0128] In some further embodiments, the clock generation logic design unit 711 is further configured to design a first clock generation logic to generate a reference clock, wherein the reference clock is in phase with the multiple functional clocks.

[0129] In some embodiments, the clock generation logic design unit 711, for designing a first clock generation logic for providing clocks for the plurality of functional modules, includes:

[0130] Designing a frequency amplification circuit, wherein the frequency amplification circuit is configured to perform frequency amplification processing on a reference clock to obtain a high-frequency clock;

[0131] A plurality of frequency-dividing circuits connected to the frequency-amplifying circuit are designed, and the plurality of frequency-dividing circuits are configured to perform frequency-dividing processing on the high-frequency clock according to respective frequency-dividing configurations, so as to obtain the reference clock and the plurality of functional clocks; wherein, a functional module among the plurality of functional modules that uses the same clock frequency corresponds to one frequency-dividing circuit, and one frequency-dividing circuit outputs one clock based on its own frequency-dividing configuration and provides it to the corresponding functional module.

[0132] In some embodiments, the common divisor of the frequencies of the multiple functional clocks is the frequency of the reference clock, the frequency of the reference clock is the same as the frequency of the reference clock, and the frequency of the high-frequency clock is a preset multiple of the frequency of the reference clock; the frequencies of the functional clocks are in a multiple relationship or a non-multiple relationship.

[0133] In some further embodiments, the clock design device provided in the embodiments of the present application is also used for:

[0134] When the design signal is transmitted between the functional clock and the reference clock, the timing constraints are performed according to the frequency of the functional clock;

[0135] When the design signal is transmitted between two functional clocks whose frequencies are not multiples of each other, the timing constraints are performed according to the greatest common divisor of the clock periods of the two functional clocks.

[0136] When a design signal is transmitted between two functional clocks whose frequencies are multiples of each other, timing constraints are performed based on the clock period of the faster functional clock and the deviation and jitter between the two functional clocks.

[0137] In some further embodiments, the clock design device provided in the embodiments of the present application is also used for:

[0138] If the two clocks are asynchronous clocks generated by different clock generation logics, or asynchronous clocks generated by the same clock generation logic, then the signal across the two clocks is designed to be synchronously processed according to the asynchronous timing processing method;

[0139] If two clocks are synchronous clocks generated by the same clock generation logic and the frequencies of the two clocks are multiples, the signal across the two clocks is designed to be processed as a synchronous signal;

[0140] If two clocks are synchronous clocks generated by the same clock generation logic and the frequencies of the two clocks are non-multiples, the signals across the two clocks are designed for asynchronous timing processing by fixing the relative position relationship between the read pointer and the write pointer of the FIFO cache.

[0141] The embodiment of the present application also provides a computer device for chip design, which can implement the clock design method provided by the embodiment of the present application by setting the clock design device described above. In some embodiments, the computer device may include: at least one memory and at least one processor, the at least one memory stores one or more computer executable instructions, and the at least one processor calls the one or more computer executable instructions to execute the clock design method provided by the embodiment of the present application.

[0142] An embodiment of the present application also provides a storage medium, which can store one or more computer-executable instructions. When the one or more computer-executable instructions are executed, the clock design method provided in the embodiment of the present application is implemented.

[0143] Based on the clock design scheme of the chip provided in the embodiment of the present application, the embodiment of the present application can provide a corresponding chip product after design. The chip provided in the embodiment of the present application is, for example, a SOC (System-on-a-Chip) chip, etc. The content described below can be referenced to the content described above.

[0144] As an optional implementation, Fig. 8A The following is an exemplary diagram showing the structure of the chip provided in the embodiment of the present application. Fig. 8A As shown, the chip provided by the embodiment of the present application may include: multiple functional modules 810, and a first clock generation logic 820, wherein the clock frequencies used by the multiple functional modules 810 are different.

[0145] In an embodiment of the present application, the first clock generation logic 820 is used to generate multiple functional clocks with the same phase but different frequencies according to the clock frequency used by the multiple functional modules; and provide the functional clocks to the corresponding functional modules, wherein one functional clock corresponds to at least one functional module using the frequency of the functional clock.

[0146] For the introduction of the first clock generation logic 820 and the multiple functional modules 810, please refer to the description of the corresponding parts in the previous text, which will not be expanded here.

[0147] As a further optional implementation, Figure 8B Another structural example diagram of the chip provided in the embodiment of the present application is shown exemplarily. Fig. 8A and Figure 8B As shown, the multiple functional modules 810 may include: a first functional module 811 and a second functional module 812. The number of the first functional modules 811 may be one or more. For the introduction of the first functional module and the second functional module, please refer to the description of the corresponding part of the previous text, which will not be expanded here.

[0148] exist Figure 8B As shown, the first clock generation logic 820 can be specifically used to generate multiple functional clocks with the same phase but different frequencies according to the clock frequencies used by the first functional module and the second functional module; provide the functional clock corresponding to the first functional module to the first functional module, and provide the functional clock corresponding to the second functional module to the second functional module.

[0149] In some embodiments, a functional clock adapted to a clock frequency of a first functional module has a corresponding relationship with the design of the first functional module; a functional clock adapted to a specific frequency of a second functional module has a corresponding relationship with the design of the second functional module.

[0150] As an optional implementation, Figure 8B The operation example of the chip structure shown can be found in the description of the relevant part above, which will not be expanded here.

[0151] In some further embodiments, the first clock generation logic 820 may be further configured to generate a reference clock, wherein the reference clock is in phase with the plurality of functional clocks.

[0152] The manner in which the first clock generation logic 820 generates the reference clock and multiple functional clocks can refer to the description of the corresponding part above, which will not be expanded here. The optional structure of the first clock generation logic 820 can refer to the description of the corresponding part above, which will not be expanded here.

[0153] In some further embodiments, Figure 8C Another structural example diagram of the chip provided in the embodiment of the present application is shown as an example. Figure 8B and Figure 8C As shown, the chip provided in the embodiment of the present application may also include: a second clock generation logic 830 and a third functional module 840; the introduction of the third functional module 840 can refer to the description of the corresponding part of the previous text, which will not be expanded here.

[0154] In the embodiment of the present application, the second clock generation logic 830 is used to generate a clock for the third functional module, and the clock is an asynchronous clock with the clock generated by the first clock generation logic.

[0155] In some further embodiments, Fig.8D Another structural example diagram of the chip provided in the embodiment of the present application is shown as an example. Figure 8C and Fig.8D As shown, the chip provided by the embodiment of the present application may also include: multiple cross-clock processing logics 850.

[0156] Among them, the cross-clock processing logic is located between the cross-clock functional modules, and the cross-clock processing logic is used to obtain a signal across two clocks; if the two clocks are asynchronous clocks generated by different clock generation logics, or asynchronous clocks generated by the same clock generation logic, the signal is synchronously processed according to an asynchronous timing processing method; if the two clocks are synchronous clocks generated by the same clock generation logic, and the frequencies of the two clocks are in a multiple relationship, the signal is processed as a synchronous signal; if the two clocks are synchronous clocks generated by the same clock generation logic, and the frequencies of the two clocks are in a non-multiple relationship, the signal is asynchronously processed by fixing the relative position relationship between the read pointer and the write pointer of the FIFO cache.

[0157] In some further embodiments, the chip provided in the embodiments of the present application may also include timing constraint logic. The timing constraint logic is used to obtain a signal; if the signal is transmitted between a functional clock and a reference clock, the timing constraint is performed according to the frequency of the functional clock; if the signal is transmitted between two functional clocks whose frequencies are not in a multiple relationship, the timing constraint is performed according to the greatest common divisor of the clock periods of the two functional clocks; if the signal is transmitted between two functional clocks whose frequencies are in a multiple relationship, the timing constraint is performed based on the clock period of the functional clock with a faster frequency, and the deviation and jitter between the two functional clocks.

[0158] For the relevant contents of cross-clock signal processing and timing constraint, please refer to the introduction of the corresponding parts in the previous text, which will not be expanded here. In some embodiments, the cross-clock signal processing logic and the timing constraint logic can also be implemented selectively.

[0159] In one implementation example of the chip, Fig. 9 The following is an exemplary diagram showing an implementation example of the chip provided in the embodiment of the present application, combined with Fig. 9 As shown, the functional modules in the chip (such as SOC chip) may include high-speed serial PHY, DDR PHY, CPU, bus 1 and bus 2, etc. Among them, the high-speed serial PHY and DDR PHY use clocks of specific frequencies based on the rigid requirements of the standard protocol, that is, the high-speed serial PHY and DDR PHY correspond to the functional modules in the second case above, and use clocks of different specific frequencies under their respective rigid requirements; the clock frequencies of the CPU, bus 1 and bus 2 are mainly determined based on their own performance requirements, that is, the CPU, bus 1 and bus 2 correspond to the functional modules in the first case above, and use different clock frequencies under their respective performance requirements.

[0160] When comprehensively considering the clock frequencies used by the functional modules in the first and second cases, the clock frequencies of the CPU, bus 1, and bus 2 only need to consider their own performance requirements and do not need to be fixed at a specific frequency. Therefore, they can be comprehensively planned when the DDR PHY requires the use of a clock with a specific frequency; and the clock of the high-speed serial PHY has a specific frequency requirement and is different from the DDR PHY, so the clock frequency of the high-speed serial PHY can be planned separately. That is to say, under the solution ideas provided in the embodiments of the present application, Fig. 9 Among the functional modules shown, the CPU, bus 1 and bus 2 can be regarded as an example of a first functional module, the DDR PHY can be regarded as an example of a second functional module, and the high-speed serial PHY can be regarded as an example of a third functional module.

[0161] like Fig. 9 As shown, the clock generation logic 910 (an example of the first clock generation logic) generates clocks 911, 912, 913 and 914 with the same phase but different frequencies, and provides clock 911 to bus 1, clock 912 to the CPU, clock 913 to bus 2, and clock 914 to DDR PHY; at the same time, the clock generation logic module 910 sends the reference clock to bus 1, CPU, bus 2 and DDR PHY respectively, wherein the reference clock is mainly provided to the simplified FIFO cache in the functional module for aligning the clock phase of the functional module. In this example, clocks 911, 912, 913 and 914 all satisfy the same phase relationship with the reference clock.

[0162] Further, if Fig. 9 As shown, the chip is also provided with a clock generation logic 920 (an example of a second clock generation logic), which can generate a clock 921 and provide it to the high-speed serial PHY. The clock 921 and the clocks 911, 912, 913 and 914 are all asynchronous clocks.

[0163] Further, such as Fig. 9 As shown, the chip is also provided with a plurality of cross-clock processing logics, namely, cross-clock processing logics 931, 932, 933, 934 and 935. Among them, the cross-clock processing logic 931 is used to process the signal across the clock 921 and the clock 911. Since the clock 921 and the clock 911 are asynchronous clocks, the cross-clock processing logic 931 can use an asynchronous FIFO buffer for cross-clock processing. Fig. 9 As shown, since clocks 911, 912, 913 and 914 are all in phase with the reference clock, the cross-clock processing logics 932, 933, 934 and 935 can all adopt the same-phase simplified FIFO buffer design to perform cross-clock signal processing.

[0164] Furthermore, during the physical implementation process, the cross-clock processing logic 932, 933, 934 and 935 can additionally consider the relative delay differences of the read clock, write clock and reference clock of the FIFO cache when performing timing checks. For example, when calculating the setup time of the FIFO write pointer, the above cross-clock processing logic requires that the setup time margin is greater than the relative delay size of the write clock and the reference clock; when calculating the setup time of the FIFO read pointer, the setup time margin is required to be greater than the relative delay size of the read clock and the reference clock; when calculating the setup time of the FIFO read data, the setup time margin is required to be greater than a certain value, which can be the relative delay size of the read clock and the reference clock, plus the relative delay size of the write clock and the reference clock.

[0165] The embodiment of the present application also provides an electronic device, such as a server device or a terminal device. The electronic device may include the chip provided in the embodiment of the present application.

[0166] The above describes multiple implementation schemes provided by the embodiments of the present application. The various optional methods introduced in each implementation scheme can be combined and cross-referenced with each other without conflict, thereby extending a variety of possible implementation schemes, which can all be considered as implementation schemes disclosed and open in the embodiments of the present application.

[0167] Although the embodiments of the present application are disclosed above, the present application is not limited thereto. Any person skilled in the art may make various changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be subject to the scope defined by the claims.

Claims

1. A chip clock design method, characterized in that: include: A first clock generation logic designed to provide clocks for multiple functional modules of the chip, wherein the first clock generation logic is configured to generate multiple functional clocks with the same phase but different frequencies according to the clock frequencies used by the multiple functional modules; the multiple functional clocks are synchronous clocks; and designing a correspondence between the plurality of functional clocks and the plurality of functional modules, wherein one functional clock corresponds to at least one functional module, and the functional module uses the frequency of its corresponding functional clock; If two clocks are synchronous clocks generated by the same clock generation logic and the frequencies of the two clocks are multiples, the signal across the two clocks is designed to be processed as a synchronous signal; If two clocks are synchronous clocks generated by the same clock generation logic and the frequencies of the two clocks are non-multiples, the signals across the two clocks are designed for asynchronous timing processing by fixing the relative position relationship between the read pointer and the write pointer of the FIFO cache.

2. The method according to claim 1, characterized in that The multiple functional modules include: a first functional module and a second functional module; wherein the first functional module uses a clock with a frequency corresponding to its own performance requirements, and the second functional module uses a clock with a specific frequency.

3. The method according to claim 2, characterized in that The first clock generation logic is configured to generate a plurality of functional clocks with the same phase but different frequencies according to the clock frequencies used by the plurality of functional modules, including: generating a plurality of functional clocks with the same phase but different frequencies according to the clock frequencies used by the first functional module and the second functional module; The design of the correspondence between the multiple functional clocks and the multiple functional modules includes: designing a functional clock that adapts to the clock frequency of the first functional module, and its correspondence with the first functional module; and designing a functional clock that adapts to the specific frequency, and its correspondence with the second functional module.

4. The method according to claim 2, characterized in that: The second functional module uses a clock of a specific frequency based on a rigid requirement, or the second functional module has no clock requirement; when the second functional module has no clock requirement, a fixed clock of a specific frequency is used based on the overall performance requirements and process conditions of the chip.

5. The method according to claim 4, characterized in that Also includes: Design a second clock generation logic, where the second clock generation logic is used to generate a clock for the third functional module, and the clock is asynchronous with the clock generated by the first clock generation logic; The third functional module uses a clock of a specific frequency based on a rigid requirement, and the specific frequency used by the clock of the third functional module is different from the specific frequency used by the clock of the second functional module.

6. The method according to claim 1, characterized in that Also includes: The first clock generation logic is designed to generate a reference clock, wherein the reference clock is in phase with the plurality of functional clocks.

7. The method according to claim 6, characterized in that The first clock generation logic designed to provide clocks for the plurality of functional modules includes: Designing a frequency amplification circuit, wherein the frequency amplification circuit is configured to perform frequency amplification processing on a reference clock to obtain a high-frequency clock; A plurality of frequency-dividing circuits connected to the frequency-amplifying circuit are designed, and the plurality of frequency-dividing circuits are configured to perform frequency-dividing processing on the high-frequency clock according to respective frequency-dividing configurations, so as to obtain the reference clock and the plurality of functional clocks; wherein, a functional module among the plurality of functional modules that uses the same clock frequency corresponds to one frequency-dividing circuit, and one frequency-dividing circuit outputs one clock based on its own frequency-dividing configuration and provides it to the corresponding functional module.

8. The method according to claim 7, characterized in that The common divisor of the frequencies of the multiple functional clocks is the frequency of the reference clock, the frequency of the reference clock is the same as the frequency of the reference clock, and the frequency of the high-frequency clock is a preset multiple of the frequency of the reference clock; the frequencies of the functional clocks are in a multiple relationship or a non-multiple relationship.

9. The method according to any one of claims 1 to 8, characterized in that: Also includes: When the design signal is transmitted between the functional clock and the reference clock, the timing constraints are performed according to the frequency of the functional clock; When the design signal is transmitted between two functional clocks whose frequencies are not multiples of each other, the timing constraints are performed according to the greatest common divisor of the clock periods of the two functional clocks. When a design signal is transmitted between two functional clocks whose frequencies are multiples of each other, timing constraints are performed based on the clock period of the faster functional clock and the deviation and jitter between the two functional clocks.

10. The method according to any one of claims 1 to 8, characterized in that: Also includes: If the two clocks are asynchronous clocks generated by different clock generation logics, or asynchronous clocks generated by the same clock generation logic, then the signals across the two clocks are designed to be synchronously processed according to the asynchronous timing processing method.

11. A chip, characterized in that: include: A plurality of functional modules, and a first clock generation logic; The first clock generation logic is used to generate a plurality of functional clocks with the same phase but different frequencies according to the clock frequencies used by the plurality of functional modules; the plurality of functional clocks are synchronous clocks; and providing the functional clock to the corresponding functional module, wherein one functional clock corresponds to at least one functional module, and the functional module uses the frequency of its corresponding functional clock; If two clocks are synchronous clocks generated by the same clock generation logic and the frequencies of the two clocks are multiples, the signal across the two clocks is designed to be processed as a synchronous signal; If two clocks are synchronous clocks generated by the same clock generation logic and the frequencies of the two clocks are non-multiples, the signals across the two clocks are designed for asynchronous timing processing by fixing the relative position relationship between the read pointer and the write pointer of the FIFO cache.

12. The chip according to claim 11, characterized in that: The multiple functional modules include a first functional module and a second functional module; wherein the first functional module uses a clock with a frequency corresponding to its own performance requirements, and the second functional module uses a clock with a specific frequency.

13. The chip according to claim 12, characterized in that: The first clock generation logic is used to generate multiple functional clocks with the same phase but different frequencies according to the clock frequencies used by the multiple functional modules, including: generating multiple functional clocks with the same phase but different frequencies according to the clock frequencies used by the first functional module and the second functional module; The first clock generation logic is used to provide the function clock to the corresponding function module, including: providing the function clock corresponding to the first function module to the first function module, and providing the function clock corresponding to the second function module to the second function module; Among them, the functional clock that adapts to the clock frequency of the first functional module has a corresponding relationship with the design of the first functional module; the functional clock that adapts to the specific frequency of the second functional module has a corresponding relationship with the design of the second functional module.

14. The chip according to claim 12, characterized in that: The second functional module uses a clock of a specific frequency based on a rigid requirement, or the second functional module has no clock requirement; when the second functional module has no clock requirement, a fixed clock of a specific frequency is used based on the overall performance requirements and process conditions of the chip.

15. The chip according to claim 14, characterized in that: Also includes: a second clock generation logic, wherein the second clock generation logic is used to generate a clock for the third functional module, and the clock is an asynchronous clock with the clock generated by the first clock generation logic; The third functional module uses a clock of a specific frequency based on a rigid requirement, and the specific frequency used by the clock of the third functional module is different from the specific frequency used by the clock of the second functional module.

16. The chip according to claim 11, characterized in that: The first clock generation logic is further used to generate a reference clock, and the reference clock is in phase with the multiple functional clocks.

17. The chip according to claim 16, characterized in that: The first clock generation logic includes: A frequency amplification circuit, wherein the frequency amplification circuit is used to perform frequency amplification processing on the reference clock to obtain a high-frequency clock; Multiple frequency division circuits are connected to the frequency amplification circuit, and the multiple frequency division circuits are used to divide the high-frequency clock according to their respective frequency division configurations to obtain the reference clock and the multiple functional clocks; wherein, among the multiple functional modules, a functional module using the same clock frequency corresponds to one frequency division circuit, and one frequency division circuit outputs one clock based on its own frequency division configuration and provides it to the corresponding functional module.

18. The chip according to claim 17, characterized in that: The common divisor of the frequencies of the multiple functional clocks is the frequency of the reference clock, the frequency of the reference clock is the same as the frequency of the reference clock, and the frequency of the high-frequency clock is a preset multiple of the frequency of the reference clock; the frequencies of the functional clocks are in a multiple relationship or a non-multiple relationship.

19. The chip according to any one of claims 11 to 18, characterized in that: Also includes: Multiple cross-clock processing logics and / or timing constraint logics; The cross-clock processing logic is located between the cross-clock functional modules, and the cross-clock processing logic is used to obtain a signal across two clocks; If the two clocks are asynchronous clocks generated by different clock generation logics, or asynchronous clocks generated by the same clock generation logic, the signals are synchronously processed according to an asynchronous timing processing method; If the two clocks are synchronous clocks generated by the same clock generation logic, and the frequencies of the two clocks are in a multiple relationship, the signal is processed as a synchronous signal; If the two clocks are synchronous clocks generated by the same clock generation logic and the frequencies of the two clocks are non-multiple relationships, the signals are asynchronously timed by fixing the relative position relationship between the read pointer and the write pointer of the FIFO buffer; The timing constraint logic is used to obtain a signal; if the signal is transmitted between a functional clock and a reference clock, timing constraints are performed according to the frequency of the functional clock; if the signal is transmitted between two functional clocks whose frequencies are not in a multiple relationship, timing constraints are performed according to the greatest common divisor of the clock periods of the two functional clocks; if the signal is transmitted between two functional clocks whose frequencies are in a multiple relationship, timing constraints are performed based on the clock period of the functional clock with a faster frequency, and the deviation and jitter between the two functional clocks.

20. A clock design device, characterized in that: include: A clock generation logic design unit, used for designing a first clock generation logic for providing clocks for multiple functional modules of the chip, wherein the first clock generation logic is configured to generate multiple functional clocks with the same phase but different frequencies according to the clock frequencies used by the multiple functional modules; the multiple functional clocks are synchronous clocks; A relationship design unit, used for designing a corresponding relationship between the plurality of functional clocks and the plurality of functional modules, wherein one functional clock corresponds to at least one functional module, and the functional module uses the frequency of its corresponding functional clock; If two clocks are synchronous clocks generated by the same clock generation logic and the frequencies of the two clocks are multiples, the signal across the two clocks is designed to be processed as a synchronous signal; If two clocks are synchronous clocks generated by the same clock generation logic and the frequencies of the two clocks are non-multiples, the signals across the two clocks are designed for asynchronous timing processing by fixing the relative position relationship between the read pointer and the write pointer of the FIFO cache.

21. A computer device, characterized in that: It comprises at least one memory and at least one processor, wherein the at least one memory stores one or more computer executable instructions, and the at least one processor calls the one or more computer executable instructions to execute the clock design method of the chip as described in any one of claims 1-10.

22. A storage medium, characterized in that: The storage medium stores one or more computer executable instructions, and when the one or more computer executable instructions are executed, the clock design method of the chip as described in any one of claims 1-10 is implemented.

23. An electronic device, characterized in that: Comprising a chip as described in any one of claims 11-19.