Redundant control signal detection method, computing device and computer readable storage medium
By performing simulation data analysis on the logic function code of digital chips, redundant control signals were detected and optimized, solving the problems of increased chip area and power consumption. This enabled rapid location and optimization of redundancy points, improving the reliability of chip design.
Patent Information
- Application Number
- CN202411433322.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-10-15
AI Technical Summary
In digital chip design, redundant control signals lead to increased chip area and power consumption, which are difficult to detect and optimize effectively with existing technologies.
The simulation data generated by functionally simulating the logic function code of the target chip is used to detect the relationship between the changes in the input control signals and output signals of the target register. The simulation waveform signals are analyzed in segments to determine whether each signal segment has a meaningful control effect on the register, and redundancy detection results are generated.
Quickly locate and optimize redundant points in the chip, reduce chip area and power consumption, and improve the reliability of chip design.
Smart Images

Figure CN118940689A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of chip technology, and in particular to a redundant control signal detection method, a computing device, and a computer-readable storage medium. Background Art
[0002] In the digital chip design process, after completing the design of logic function code including register transfer level (RTL), the designer verifies whether the design achieves the expected function through simulation, so as to find out the logic errors, functional errors or design defects in the design. Among them, the RTL code is converted into equivalent logic gate circuits through synthesis, and the RTL code is optimized, such as deleting unused registers, constant registers, etc., and merging multiple registers with completely equivalent inputs.
[0003] However, after simulation verification and debugging, the code that meets the design expectations will still have some redundant points after comprehensive optimization. For example, some input control signals of the register do not work at all in controlling the register and become redundant, or multiple input control signals of the register have logical relationships with each other or the register itself, which makes one or several signals become redundant signals when controlling the register. However, these redundant signals (also called redundant points) will increase the complexity of the register control circuit, thereby increasing the chip area and power consumption. Summary of the invention
[0004] The purpose of the present application is to provide a redundant control signal detection method, a computing device and a computer-readable storage medium to at least solve the problems in the related art.
[0005] To achieve the above objectives: In a first aspect, an embodiment of the present application provides a redundant control signal detection method, the method comprising: Acquire simulation data generated after functional simulation of the logic function code of the target chip; the logic function code includes at least one input control signal and an output signal of the target register, and the simulation data includes simulation waveform signals corresponding to each of the input control signal and the output signal in multiple clock cycles; Based on the simulation data, redundancy detection is performed on each of the input control signals; the redundancy detection includes detecting a change relationship between the input control signal and the output signal; Output the obtained redundant detection results.
[0006] In one embodiment, performing redundancy detection on each of the input control signals based on the simulation data includes: determining a target input control signal of the target register; Segmenting the simulation waveform signal corresponding to the target input control signal according to the flipping moment to obtain a plurality of segmented waveform signals corresponding to the target input control signal; the plurality of segmented waveforms include the segmented waveform signals of the input control signals and the segmented waveform signals of the output signal; Based on the simulation waveform signals respectively corresponding to the plurality of segmented waveform signals, detecting whether the target input control signal corresponding to each segmented waveform signal has a meaningful effect on the control of the target register; Based on the obtained detection results of each of the segmented waveform signals, a redundant detection result of the target input control signal is generated. In one implementation, the detecting whether the target input control signal corresponding to each segmented waveform signal has a meaningful effect on the control of the target register includes: Determining whether redundant detection of each segmented waveform signal of the target input control signal is meaningful; If it is meaningful, the segmented waveform signal is determined as a target segmented waveform signal, and it is detected whether the input control signal corresponding to the target segmented waveform signal is meaningful in controlling the target register.
[0007] In one embodiment, the determining whether the redundant detection of each segmented waveform signal of the target input control signal is meaningful includes: If it is detected that the number of flips of the simulation waveform signal of the target input control signal within one clock cycle is an even number, it is determined that redundant detection corresponding to the plurality of segmented waveform signals corresponding to the even number of flips is meaningless; If it is detected that the number of flips of the simulation waveform signal corresponding to the target input control signal within one clock cycle is an odd number, it is determined that the redundant detection of the last segmented waveform signal within one clock cycle is meaningful. In one embodiment, the detecting whether the input control signal corresponding to the target segmented waveform signal has a meaningful effect on the control of the target register includes: Based on the simulation waveform signal corresponding to the target segmented waveform signal, determine whether the flipping action of the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register, and / or determine whether the flipped value of the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register. In one embodiment, the determining whether the flipping action of the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register includes: Determine whether the control of the target register by the flipping of the input control signal corresponding to the target segmented waveform signal at the flipping moment satisfies a first preset condition; If it is satisfied, it is determined that the flipping action of the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register; the first preset condition is used to determine whether the target input control signal directly controls the target register or shields or opens the control channel of other control signals to the target register.
[0008] In one embodiment, it further comprises: When the control of the target register by the flipping of the input control signal corresponding to the target segmented waveform signal at the flipping moment does not satisfy the first preset condition, determining whether the control of the target register by the flipped value of the input control signal corresponding to the target segmented waveform signal satisfies the second preset condition; the second preset condition is used to determine whether the target input control signal directly controls the target register or shields or opens the control channel of other control signals to the target register; When the inverted value of the input control signal corresponding to the target segmented waveform signal satisfies a second preset condition for controlling the target register, it is determined that the inverted value of the input control signal corresponding to the target segmented waveform signal is meaningless for controlling the target register. In one embodiment, the first preset condition includes a first preset sub-condition; the determining whether the control of the target register by the flipping of the input control signal corresponding to the target segmented waveform signal at the flipping moment satisfies the first preset condition includes: Determine a target time for flipping an input control signal corresponding to the target segmented waveform signal; Determine whether the simulation waveform signal corresponding to the output signal is flipped in the next clock cycle after the target time; If it is determined that when the simulation waveform signal corresponding to the output signal is flipped, the flipping of the input control signal corresponding to the target segmented waveform signal at the target moment satisfies the first preset sub-condition for controlling the target register, then it is determined that the flipping of the input control signal corresponding to the target segmented waveform signal at the flipping moment satisfies the first preset condition for controlling the target register; The first preset sub-condition being met includes at least one of the following: The value of the output signal changes as the value of the input control signal corresponding to the target segmented waveform signal changes; When the value of the input control signal corresponding to the target segmented waveform signal is a preset value and the values of other input control signals change, the value of the output signal changes; the other input control signal is any input control signal among the at least one input control signal except the target input control signal.
[0009] In one embodiment, the first preset condition includes a second preset sub-condition; the determining whether the control of the target register by the flipping of the input control signal corresponding to the target segmented waveform signal at the flipping moment satisfies the first preset condition includes: If it is determined that the value of the simulation waveform signal corresponding to the output signal has not flipped, and the flipping of the input control signal corresponding to the target segmented waveform signal at the target moment satisfies the second preset sub-condition for controlling the target register, then it is determined that the flipping of the input control signal corresponding to the target segmented waveform signal at the flipping moment satisfies the first preset condition for controlling the target register; The second preset sub-condition is satisfied, including at least one of the following: When the value of the other input control signal is flipped, the value of the output signal remains unchanged; When the value of the input control signal corresponding to the target segmented waveform signal is reversed, the value of the output signal changes in the next clock cycle. In one implementation, the second preset condition is satisfied, including any one of the following: In the time period corresponding to the target segmented waveform signal, the value of the simulation waveform signal corresponding to no other input control signal is reversed; the other input control signal is any input control signal of the at least one input control signal except the target input control signal; In the time period corresponding to the target segmented waveform signal, the value of the simulation waveform signal corresponding to other input control signals is reversed, and when the value of the reversed other input control signal changes, the value of the output signal changes. In one embodiment, the determining whether the flipping of the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register further includes: In response to the fact that the simulation waveform signal corresponding to the target segmented waveform signal has no next flipping moment, it is determined that the flipping action of the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register.
[0010] In one embodiment, generating a redundant detection result of the target input control signal according to the obtained detection results of each of the segmented waveform signals includes: Determine the number of segmented waveform signals in the target input control signal that are meaningless to the control of the target register according to the obtained detection results of each segmented waveform signal; Determine the proportion of segmented waveforms in the target input control signal that are meaningless to the control of the target register according to the number and the total number of segmented waveform signals in the target input control signal; A redundancy detection result of the target input control signal is generated based on the proportion. In a second aspect, an embodiment of the present application provides a computing device, comprising: a processor and a memory storing a computer program, wherein when the processor runs the computer program, the redundant control signal detection method described in the first aspect is implemented.
[0011] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the redundant control signal detection method described in the first aspect is implemented.
[0012] The redundant control signal detection method, computing device and computer-readable storage medium provided in the embodiments of the present application perform redundant detection on each input control signal of the target register through simulation data generated after functional simulation of the logic function code of the target chip, so as to conveniently and quickly locate redundant points in the target chip, optimize chip timing, reduce chip area and power consumption, and improve the reliability of chip design. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 A flowchart of a redundant control signal detection method provided in Embodiment 1 of the present application.
[0014] Figure 2 This is a schematic diagram of the process of analyzing whether a segmented signal is meaningful in the second embodiment of the present application. Figure 1 .
[0015] Figure 3 This is a schematic diagram of the process of analyzing whether a segmented signal is meaningful in the second embodiment of the present application. Figure 2 .
[0016] Figure 4 It is a schematic diagram of the simulation waveform in the second embodiment of the present application.
[0017] Figure 5 A schematic diagram of the structure of the computing device provided in Example 3 of the present application. DETAILED DESCRIPTION
[0018] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0019] It should be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element. In addition, components, features, and elements with the same name in different embodiments of the present application may have the same meaning or different meanings, and their specific meanings need to be determined by their explanation in the specific embodiment or further combined with the context of the specific embodiment.
[0020] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in this article, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this article, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "at the time of..." or "when..." or "in response to determination". Furthermore, as used in this article, the singular forms "one", "one" and "the" are intended to also include plural forms, unless there is an opposite indication in the context. It should be further understood that the terms "comprising", "including" indicate that there are described features, steps, operations, elements, components, projects, kinds, and / or groups, but do not exclude the existence, occurrence or addition of one or more other features, steps, operations, elements, components, projects, kinds, and / or groups. The terms "or" and "and / or" used herein are interpreted as inclusive, or mean any one or any combination. Thus, “A, B, or C” or “A, B and / or C” means “any of the following: A; B; C; A and B; A and C; B and C; A, B, and C.” An exception to this definition will occur only when a combination of elements, functions, steps, or operations are inherently mutually exclusive in some manner.
[0021] It should be understood that, although the various steps in the flowchart in the embodiment of the present application are displayed in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and it can be performed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0022] It should be noted that, in this article, step codes such as S101, S102, etc. are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the sequence. When implementing the step, those skilled in the art may execute S102 first and then S101, etc., but these should all be within the scope of protection of this application.
[0023] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0024] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.
[0025] See also Figure 1 , is a redundant control signal detection method provided in an embodiment of the present application. The redundant control signal detection method can be performed by a redundant control signal detection device provided in an embodiment of the present application. The redundant control signal detection device can be implemented in software and / or hardware, for example, it can be specifically a computing device such as a computer or a server. The redundant control signal detection method provided in this embodiment includes: Step S101, obtaining simulation data generated after functional simulation of the logic function code of the target chip; the logic function code includes at least one input control signal and output signal of the target register, and the simulation data includes simulation waveform signals corresponding to each input control signal and output signal in multiple clock cycles.
[0026] Among them, the target chip can be any chip design to be tested, and the logic function code of the target chip is used to describe the function to be implemented by the target chip, and may include register transfer level (RTL, Register-Transfer Level) code, such as describing the input control signal and output signal of the register, and the action of the register or the condition of the action triggering. Multiple registers may be designed in the logic function code corresponding to the target chip, and the logic function code of the target chip may include the defined register and at least one input control signal and output signal of the register. The target register is the register to be tested for redundant control signals, and all registers designed by the logic function code of the target chip can be tested. Here, by performing functional simulation on the logic function code of the target chip, simulation data including the simulation waveforms corresponding to each input control signal and output signal of the target register in multiple clock cycles can be obtained. The size of the clock cycle can be set based on actual needs, such as 0.1s, etc., and is not specifically limited here.
[0027] Step S102: Based on the simulation data, perform redundancy detection on each input control signal; the redundancy detection includes detecting the change relationship between the input control signal and the output signal, so as to determine whether the input control signal is a redundant design.
[0028] In some embodiments, in the logic function code of the designed target chip, some input control signals of the designed register may not work at all in the control of the register and become redundant control signals, or multiple input control signals of the register may be logically constrained with each other, so that a certain input control signal may cause one or several other input control signals to become redundant control signals when controlling the register, and the simulation data can characterize the correlation between each input control signal and the output signal. Therefore, based on the simulation data, redundancy detection can be performed on each input control signal of the target register.
[0029] Here, when performing redundancy detection on each input control signal based on simulation data, redundancy detection can be performed on each input control signal based on the logical relationship between each input control signal determined by the logic function code of the target chip in combination with the simulation data. Among them, since whether the input control signal is redundant can be characterized by the change of the input control signal and the output signal, the change relationship between the input control signal and the output signal can be detected to perform redundancy detection.
[0030] In one implementation, based on simulation data, redundancy detection is performed on each input control signal, including: determining a target input control signal of a target register; Segmenting the simulation waveform signal corresponding to the target input control signal according to the flipping moment to obtain a plurality of segmented waveform signals corresponding to the target input control signal; the plurality of segmented waveforms include segmented waveform signals of each input control signal and segmented waveform signals of the output signal; Based on the simulation waveform signals respectively corresponding to the plurality of segmented waveforms, detecting whether the target input control signal corresponding to each segmented waveform signal has a meaningful effect on the control of the target register; Based on the obtained detection results of each segmented waveform signal, a redundant detection result of the target input control signal is generated.
[0031] Among them, the target input control signal can be any input control signal of the target register, generally the input control signal to be detected as a redundant control signal. The simulation waveform signal is segmented according to the flipping moment of the input control signal to obtain the segmented waveform signal corresponding to the time period from the current flipping moment to the next flipping moment. The segmentation of the simulation waveform signal includes the segmentation of the clock signal, the segmentation of the input control signal and the segmentation of the output signal. That is to say, the multiple segmented waveforms corresponding to the target input control signal may include the segmented waveform signal of the clock signal, the segmented waveform signals of each input control signal and the segmented waveform signal of the output signal. Whether the input control signal has a meaningful control on the target register refers to whether the input control signal can affect the output of the target register. The input control signal has a meaningful control on the target register means that the input control signal has an impact on the change of the output signal of the register. Generally, the control of the target register by the input control signal is meaningful if it meets at least one of the following detection rules: the target input control signal shields the control of the target register by other input control signals of the target register, so that in the time period corresponding to the target input control signal, no matter how other input control signals change, the output value of the target register does not change, that is, no flipping occurs; the control path of the target register by other input control signals of the target register is opened, so that in the time period corresponding to the target input control signal, the change of other input control signals affects the output value of the target register; the input control signal directly controls the output value of the target register, so that the output value of the target register changes with the change of the input control signal. Among them, the control of the target register by the input control signal is meaningless if it meets the following detection rules: the target input control signal is shielded by other input control signals of the target register, so that in the time period corresponding to the target input control signal, no matter how the target input control signal changes, it does not affect the output value of the target register.
[0032] It can be understood that whether a certain input control signal is a redundant design can be judged by analyzing whether the input control signal plays a role in the control of the target register, and whether the input control signal plays a role in the control of the target register can be detected by specifically analyzing the change relationship between different input control signals and output signals. Specifically, first, for any input control signal to be detected for redundant control signals, that is, the target input control signal, segment it according to the flipping moment of the simulation waveform signal corresponding to the target input control signal, and obtain multiple segmented waveform signals corresponding to the target input control signal; then, based on the simulation waveform signal corresponding to the logic function code and the output signal and the simulation waveform signal of other input control signals, detect whether the input control signal corresponding to the segmented waveform signal has a meaningful control on the target register, and obtain the detection results corresponding to each segmented waveform signal; finally, based on the obtained detection results of each segmented waveform signal, generate a redundant detection result for the target input control signal. Among them, the redundant detection result can be used to characterize the percentage of meaningful flips in the target input control signal to the total number of flips. The lower the percentage, the greater the probability that the target input control signal can be optimized.
[0033] In one embodiment, detecting whether the target input control signal corresponding to each segmented waveform signal has a meaningful control effect on the target register includes: Determine whether the redundant detection of each segmented waveform signal of the target input control signal is meaningful; If it is meaningful, the segmented waveform signal is determined as the target segmented waveform signal, and it is detected whether the input control signal corresponding to the target segmented waveform signal is meaningful in controlling the target register.
[0034] Among them, the detection of the target segmented waveform signal is used to detect whether the corresponding input control signal has a meaningful control on the target register. It can be understood that since the number of segmented waveform signals obtained after the target input control signal is segmented may be large, in order to improve the efficiency of redundant detection, it can be first determined whether the redundant detection of the segmented waveform signal is meaningful. If the redundant detection of the segmented waveform signal is meaningful, the segmented waveform signal is determined as the target segmented waveform signal, and the input control signal corresponding to the target segmented waveform signal is detected to be meaningful for controlling the target register; if the redundant detection of the segmented waveform signal is meaningless, it can be considered that the input control signal corresponding to the segmented waveform signal is meaningless for controlling the target register.
[0035] In one embodiment, determining whether the redundant detection of each segmented waveform signal of the target input control signal is meaningful includes: If it is detected that the number of flips of the simulation waveform signal of the target input control signal within one clock cycle is an even number, it is determined that redundant detection of multiple segmented waveform signals corresponding to the even number of flips is meaningless; If it is detected that the number of flips of the simulation waveform signal corresponding to the target input control signal within one clock cycle is an odd number, it is determined that the redundant detection of the last segmented waveform signal within one clock cycle is meaningful.
[0036] Specifically, when it is detected that the simulation waveform signal corresponding to the target input control signal flips multiple times within one clock cycle, it is determined whether the number of flips is an even number. If the number of flips is an even number, then for the next register within one clock cycle, it is equivalent to no flip. After the target input control signal is segmented according to the flipping time of the waveform signal, it is determined that the redundant detection of multiple segmented waveform signals corresponding to the even number of flips is meaningless; if the number of flips is an odd number, after the target input control signal is segmented according to the flipping time of the waveform signal, it is determined that the redundant detection of the last segmented waveform signal within one clock cycle is meaningful, and at the same time, it can be determined that the redundant detection of segmented waveform signals other than the last segmented waveform signal within the clock cycle is meaningless.
[0037] In this way, the segmentation result of the target input control signal can be determined accordingly according to the different flipping times, which is convenient and fast, and improves the efficiency and accuracy of redundant control signal detection.
[0038] In one embodiment, detecting whether the input control signal corresponding to the target segmented waveform signal has a meaningful effect on the control of the target register includes: Based on the simulation waveform signal corresponding to the target segmented waveform signal, determine whether the flipping action of the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register, and / or determine whether the flipped value of the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register.
[0039] Among them, whether the control of the target register is meaningful is used to determine whether the target input control signal directly controls the target register or shields or opens the control channel of other control signals to the target register. Here, the target input control signal directly controls the target register, which means that the target input control signal directly controls the value of the output signal of the target register, so that the value of the output signal of the target register will change with the change of the target input control signal. The target input control signal shields other control signals, which means that the target input control signal shields the control of the target register by other input control signals of the target register, so that in the time period corresponding to the target input control signal, no matter how other input control signals change, the value of the output signal of the target register will not change, that is, there will be no flip. The target input control signal opens the control path of other control signals to the target register, which means that in the time period corresponding to the target input control signal, the change of other input control signals affects the value of the output signal of the target register.
[0040] Here, whether the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register may include whether the flipping action of the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register, and whether the flipped value of the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register. In the case where the flipping action of the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register, it can be assumed that the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register. Among them, judging whether the flipping action of the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register and judging whether the flipped value of the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register can be determined based on the aforementioned detection rules for whether the input control signal is meaningful or meaningless to the control of the target register.
[0041] In one embodiment, determining whether the flipping action of the input control signal corresponding to the target segmented waveform signal has a meaningful effect on the control of the target register includes: determining whether the flipping action of the input control signal corresponding to the target segmented waveform signal at the flipping moment satisfies a first preset condition on the control of the target register; If it is satisfied, it is determined that the flipping action of the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register; the first preset condition is used to determine whether the target input control signal directly controls the target register or shields or opens the control channel of other control signals to the target register.
[0042] Specifically, for any target segmented waveform signal to be analyzed, based on the simulation waveform signal corresponding to the output signal and the simulation waveform signal corresponding to each input control signal, first determine whether the control of the target register by the flipping of the input control signal corresponding to the target segmented waveform signal at the flipping moment satisfies the first preset condition, and if the first preset condition is satisfied, determine that the flipping action of the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register. The first preset condition can be set specifically according to actual needs.
[0043] In one embodiment, it further comprises: When the control of the target register by the flipping of the input control signal corresponding to the target segmented waveform signal at the flipping moment does not satisfy the first preset condition, it is determined whether the control of the target register by the flipped value of the input control signal corresponding to the target segmented waveform signal satisfies the second preset condition; the second preset condition is used to determine whether the target input control signal cannot directly control the target register or shields or opens the control channel of other control signals to the target register; When the value after the input control signal corresponding to the target segmented waveform signal is flipped and the control of the target register meets the second preset condition, it is determined that the flipping action of the input control signal corresponding to the target segmented waveform signal is meaningless to the control of the target register.
[0044] Among them, when the value of the input control signal corresponding to the target segmented waveform signal after flipping satisfies the second preset condition for the control of the target register, it is determined that the flipping action of the input control signal corresponding to the target segmented waveform signal is meaningless to the control of the target register, and when the value of the input control signal corresponding to the target segmented waveform signal after flipping does not satisfy the second preset condition for the control of the target register, it can be determined that the flipping action of the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register. Among them, the first preset condition is used to evaluate whether the flipping of the target segmented waveform signal at the flipping moment is meaningful to the control of the target register, and the second preset condition is used to evaluate whether the flipped value in the target segmented waveform signal is meaningless to the control of the target register, which can be set according to actual needs.
[0045] In one embodiment, the first preset condition includes a first preset sub-condition; judging whether the control of the target register by the flipping of the input control signal corresponding to the target segmented waveform signal at the flipping moment satisfies the first preset condition, including: Determine a target time at which an input control signal corresponding to a target segmented waveform signal is flipped; Determine whether the value of the simulation waveform signal corresponding to the output signal is reversed in the next clock cycle after the target time; If it is determined that when the value of the simulation waveform signal corresponding to the output signal is flipped, the flipping of the input control signal corresponding to the target segmented waveform signal at the target time satisfies the first preset sub-condition for controlling the target register, then it is determined that the flipping of the input control signal corresponding to the target segmented waveform signal at the flipping time satisfies the first preset condition for controlling the target register; The first preset sub-condition is met, including at least one of the following: The value of the output signal changes with the value of the input control signal corresponding to the target segmented waveform signal; When the value of the input control signal corresponding to the target segmented waveform signal is a preset value and the values of other input control signals change, the value of the output signal changes; other input control signals are any input control signal in at least one input control signal except the target input control signal.
[0046] It can be understood that when a certain segmented waveform signal of an input control signal is flipped and other input control signals are not flipped, if the output signal is also flipped accordingly, it means that the change of the input control signal affects the output of the target register, that is, the flip of the segmented waveform signal at the flipping moment is meaningful to the control of the target register, and if the output signal is not flipped accordingly, it means that the change of the input control signal does not affect the output of the target register, that is, the flip of the segmented waveform signal at the flipping moment is meaningless to the control of the target register. Based on this, it can be judged whether the flipping of the input control signal corresponding to the target segmented waveform signal at the flipping moment satisfies the first preset condition for the control of the target register. Specifically, for any target segmented waveform signal to be analyzed, first determine the target moment at which the input control signal corresponding to the target segmented waveform signal is flipped. Then, judge whether the value of the simulation waveform signal corresponding to the output signal is flipped in the next clock cycle after the target moment, that is, judge whether the value of the simulation waveform signal corresponding to the output signal is flipped within the time range of the target moment plus one clock cycle. Next, when it is determined that the value of the simulation waveform signal corresponding to the output signal is flipped, it means that the value of the simulation waveform signal corresponding to the output signal is flipped corresponding to the flip of the input control signal corresponding to the target segmented waveform signal. At this time, it is further determined whether the flip of the input control signal corresponding to the target segmented waveform signal at the target time satisfies the first preset sub-condition for the control of the target register. If the first preset sub-condition is met, it means that the flip of the input control signal corresponding to the target segmented waveform signal at the target time is meaningful to the output signal, and then it is determined that the flip of the input control signal corresponding to the target segmented waveform signal at the flipping time satisfies the first preset condition for the control of the target register; if the first preset sub-condition is not met, it means that the flip of the input control signal corresponding to the target segmented waveform signal at the target time is meaningless to the output signal, and then it is determined that the flip of the input control signal corresponding to the target segmented waveform signal at the flipping time does not satisfy the first preset condition for the control of the target register.
[0047] Here, when the value of the output signal changes with the value of the input control signal corresponding to the target segmented waveform signal, it means that the input control signal corresponding to the target segmented waveform signal directly controls the output value of the target register, so that the output value of the target register will change with the change of the input control signal corresponding to the target segmented waveform signal. When the value of the input control signal corresponding to the target segmented waveform signal is the preset value, and the values of other input control signals change, the value of the output signal changes, indicating that the input control signal corresponding to the target segmented waveform signal opens the control path of other input control signals of the target register to the target register. Among them, the preset value can be specifically determined in combination with the association between different input control signals and output signals. For example, when the output signal is determined after performing a logical AND operation on the target input control signal and other input control signals, the preset value can be a binary number 1, etc.
[0048] In one embodiment, the first preset condition includes a second preset sub-condition; judging whether the control of the target register by the flipping of the input control signal corresponding to the target segmented waveform signal at the flipping moment satisfies the first preset condition, including: If it is determined that the value of the simulation waveform signal corresponding to the output signal has not flipped, the flipping of the input control signal corresponding to the target segmented waveform signal at the target time controls the target register to meet the second preset sub-condition, then it is determined that the flipping of the input control signal corresponding to the target segmented waveform signal at the flipping time controls the target register to meet the first preset condition; The second preset sub-condition is met, including at least one of the following: When the values of other input control signals are flipped, the value of the output signal remains unchanged; When the value of the input control signal corresponding to the target segmented waveform signal is flipped, the value of the output signal changes in the next clock cycle.
[0049] Specifically, when it is determined that the value of the simulation waveform signal corresponding to the output signal has not been reversed, it means that the value of the simulation waveform signal corresponding to the output signal has not been reversed corresponding to the reverse of the input control signal corresponding to the target segmented waveform signal. At this time, it is further determined whether the reverse of the input control signal corresponding to the target segmented waveform signal at the target time satisfies the second preset sub-condition for the control of the target register. If the second preset sub-condition is met, it means that the reverse of the input control signal corresponding to the target segmented waveform signal at the target time is meaningful to the output signal, and it is determined that the reverse of the input control signal corresponding to the target segmented waveform signal at the reverse time satisfies the first preset condition for the control of the target register; if the second preset sub-condition is not met, it means that the reverse of the input control signal corresponding to the target segmented waveform signal at the target time is meaningless to the output signal, and it is determined that the reverse of the input control signal corresponding to the target segmented waveform signal at the reverse time does not satisfy the first preset condition for the control of the target register. Wherein, when the value of other input control signals is reversed, the value of the output signal remains unchanged, that is, the value of the output signal does not change in the next clock cycle, which means that the input control signal corresponding to the target segmented waveform signal shields the control of the target register by other input control signals of the target register. When the value of the input control signal corresponding to the target segmented waveform signal flips, the value of the output signal changes in the next clock cycle, indicating that the input control signal corresponding to the target segmented waveform signal is not shielded by other input control signals of the target register.
[0050] In one embodiment, satisfying the second preset condition includes any one of the following: In the time period corresponding to the target segmented waveform signal, the value of the simulation waveform signal corresponding to no other input control signal is reversed; the other input control signal is any input control signal other than the target input control signal among the at least one input control signal; In the time period corresponding to the target segmented waveform signal, the value of the simulation waveform signal corresponding to other input control signals is reversed, and when the value of the other input control signal that is reversed changes, the value of the output signal changes.
[0051] Among them, in the time period corresponding to the target segmented waveform signal, the value of the simulation waveform signal corresponding to no other input control signal is flipped, and there is no effect of opening or shielding other signals. It can be directly determined that the input control signal corresponding to the target segmented waveform signal has no meaning for controlling the target register. In the time period corresponding to the target segmented waveform signal, the value of the simulation waveform signal corresponding to other input control signals is flipped, and when the value of the flipped other input control signal changes, the value of the output signal changes, indicating that in the time period corresponding to the target segmented waveform signal, the flipping of the other input control signal is not shielded by the input control signal corresponding to the target segmented waveform signal, so that in the time period corresponding to the target segmented waveform signal, the change of other input control signals affects the output value of the target register.
[0052] In one embodiment, determining whether the flipping action of the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register further includes: In response to the fact that the simulation waveform signal corresponding to the target segmented waveform signal has no next flipping moment, determining that the flipping action of the input signal corresponding to the target segmented waveform signal is meaningful to the control of the target register.
[0053] Among them, when the simulation waveform signal corresponding to the target segmented waveform signal has no next flipping moment, it means that the analysis end time of the target segmented waveform signal has been reached, and the input control signal corresponding to the signal has not yet performed the next flipping, then it is assumed that the input control signal corresponding to the target segmented waveform signal is meaningful for controlling the target register.
[0054] In one embodiment, generating redundant detection results of the target input control signal according to the obtained detection results of each segmented waveform signal includes: According to the obtained detection results of each segmented waveform signal, the number of segmented waveform signals in the target input control signal that are meaningless to the control of the target register is determined; Determine the proportion of segmented waveform signals in the target input control signal that are meaningless to the control of the target register according to the number and the total number of segmented waveform signals in the target input control signal; A redundant detection result of the target input control signal is generated based on the proportion.
[0055] Specifically, after obtaining the detection results of each segmented waveform signal in the target input control signal, the number of segmented waveform signals in the target input control signal that are meaningless in controlling the target register is counted based on the result of whether the corresponding segmented waveform signal contained in each detection result has meaning in controlling the target register. Then, combined with the total number of segmented waveform signals in the target input control signal, the proportion of segmented waveform signals in the target input control signal that are meaningless in controlling the target register is determined, and then a redundant detection result for the target input control signal is generated based on the proportion.
[0056] Among them, the proportion can be specifically a percentage, etc., which is not specifically limited here. In addition, according to the detection results of each segmented waveform signal obtained, the number of segmented waveform signals in the target input control signal that are meaningful to the control of the target register can be counted, and then combined with the total number of segmented waveform signals in the target input control signal, the proportion of segmented waveform signals in the target input control signal that are meaningful to the control of the target register is determined, and then based on the proportion, a redundant detection result for the target input control signal is generated. It should be noted that the redundant detection result can be used to evaluate the possibility that the target input control signal is a redundant control signal, and specifically may include information such as the proportion. Here, the redundant detection result may include the number of segmented waveform signals in the target input control signal that are meaningful to the control of the target register, and / or the number of segmented waveform signals that are meaningless to the control of the target register by the target input control signal, and / or the ratio between the number of segmented waveform signals that are meaningful to the control of the target register by the target input control signal and the total number of segmented waveform signals of the target input control signal.
[0057] In this way, the redundant detection result of the target input control signal is obtained by the number of segmented waveform signals in the target input control signal that are meaningful or meaningless to the control of the target register. The operation is convenient and accurate, which improves the efficiency and accuracy of redundant control signal detection.
[0058] Step S103: output the obtained redundancy detection result.
[0059] Specifically, after performing redundancy detection on each input control signal and obtaining the corresponding redundant detection result, the redundant detection result can be output, so as to assist in finding redundant points or conflict information in the logic function code of the target chip based on the redundant detection result. It should be noted that the redundant detection result can be used to assist in determining whether there are redundant control signals in each input control signal of the target register. Among them, when the redundant detection result includes the proportion of segmented waveform signals in the target input control signal that are meaningless to the control of the target register, the greater the proportion, the higher the probability that the target input control signal is a redundant control signal of the target register.
[0060] In summary, in the redundant control signal detection method provided in the above embodiment, redundant detection is performed on each input control signal of the target register by using the simulation data generated after functional simulation of the logic function code of the target chip, which can conveniently and quickly locate the redundant points in the target chip, optimize the chip timing, reduce the chip area and power consumption, and at the same time improve the reliability of the chip design.
[0061] Based on the same inventive concept as the above-mentioned embodiment, the above-mentioned embodiment is described in detail below through a specific example. In this example, the register to be analyzed is C (C can also be called the output signal of the register to be analyzed), and its input control signals are divided into two categories, one is the input control signal A to be analyzed, and the other is the remaining input control signal B. The redundant control signal detection method provided in this example mainly includes the following parts: 1. Detection rule definition 1) According to the simulation waveform, analyze the input control signals of the register in segments according to the flipping time. The meaning of each segment signal (each segment signal refers to the signal corresponding to the flipping time of the signal until the next flipping time) to its control register can be divided into: a. Shield the control of the other input control signals of the register to the register, so that no matter how the other input control signals change during the analysis time period, the output of the register does not change. For example, C<=A&B, when A is 0, the meaning of A to C is to shield the effect of B signal on C; if C<=A|B, when A is 1, the meaning of A to C is to shield the effect of B signal on C. b. Open the control path of the other input control signals of the register to the register, so that the change of the other input control signals of the register can affect the output of the register in time. For example, C<=A&B, when A is 1, the meaning of A to C is to open the control path from B to C; if C<=A|B, when A is 0, the meaning of A to C is to open the control path from B to C. c. As an input signal, directly control the output value of the register, and the output of the register will change with the change of the analysis signal. If C<=A&B, B value is 1, C changes with the change of A, and the meaning of A to C is to directly control the output of C as an input signal; if C<=A|B, when B is 0, C changes with the change of A. d. It is shielded by the other input control signals of the register (no matter how the analysis signal changes during the analysis time period, it will not affect the output of the register, such as C<=A&B, B value is 0, at this time A is shielded by B; if C<=A|B, when B is 1, at this time A is shielded by B) and has no meaning to the register. When performing logic analysis, the input control signal that needs to be analyzed in the logic function code can be assigned a value to observe the change of the output signal of the register to determine whether the flip or value of the input control signal is meaningful to the register.
[0062] 2) Except when it is determined through logic analysis that the flip and the value after the flip are meaningless to the controlled register, it is assumed that all flips that cannot be confirmed have meaning to the register. For example, when the input control signal of the register is analyzed in segments, if the segmentation is incomplete (for example, the signal has not flipped again at the end of the waveform analysis), it is assumed that the segment has meaning to the register, or it cannot be confirmed after logic analysis whether it has meaning to the register.
[0063] 3) Between two valid clock edges of a register, if an input control signal flips more than or equal to two times, if the input control signal flips an even number of times, all flips and their values are meaningless; if the input control signal flips an odd number of times, except for the last flip, all other flips and their values after flipping are meaningless. Whether the last flip and its value after flipping are meaningful needs to be analyzed in combination with the above rules.
[0064] 4) When a certain segment of the input control signal of a register is analyzed as meaningless to the register, the meaningless signal includes the flip of the segmentation starting point, the value after the flip, and the flip in the opposite direction of the starting point flip at the end of the segment value. All of them are meaningless (as shown in the analysis of the first flip of the state[0] signal in the following example).
[0065] 5) Analyze whether a certain segment of the input control signal is meaningful to the register, including analyzing whether the starting flip of the segment is meaningful to the register and whether the value after flipping is meaningful to the register.
[0066] 2. Analysis Principle Analyzing whether the segmented signal is meaningful mainly includes the following two parts: 1) Analyze whether the flip of each starting time has any significance for the register. The starting time of each section refers to the time F when the input control signal A flips. Figure 2 , mainly including the following steps: Step S201, determine the flipping moment F in the segmented signal of A in this analysis.
[0067] The segmented signal of A analyzed this time refers to the segmented signal currently analyzed after A is segmented.
[0068] Step S202, determine whether C flips within time F plus one clock cycle, if so, execute step S203, otherwise execute step S206.
[0069] Step S203, determine whether A is used as an input control signal to directly control the output value of the register, if so, execute step S205, otherwise execute step S204.
[0070] Step S204, determine whether A opens the control path of B to the register, if so, execute step S205, otherwise execute step S208.
[0071] Step S205: Determine whether the flip in the segmented signal of A analyzed this time is meaningful to the register.
[0072] Step S206, determine whether A shields the drive of the register by the signal in B, if so, execute step S205, otherwise execute step S207.
[0073] Step S207, determine whether A is shielded by the signal in B, if so, execute step S208, otherwise execute step S205.
[0074] Step S208: Determine whether the flip in the segmented signal of A analyzed this time is meaningless to the register.
[0075] Among them, the methods for judging whether A directly controls the output value of the register as an input control signal, judging whether A opens the control path of B to the register, judging whether A shields the driving of the register by the signal in B, and judging whether A is shielded by the signal in B can be specifically referred to the above detection rules, which will not be repeated here.
[0076] 2) If the result of the above judgment is that the flip in the segmented signal of A in this analysis is meaningless to the register, then continue to analyze whether the value after the flip of A in this time period is meaningful to the register, refer to Figure 3 , mainly including the following steps: Step S301: determine the time period of the segmented signal of A to be analyzed this time.
[0077] The segmented signal analyzed this time refers to the segmented signal currently analyzed after segmenting A. The time period of the segmented signal refers to the time range corresponding to the segmented signal, which can be specifically characterized by the position and number of clock cycles experienced by the segmented signal, such as the time range from the 3rd clock cycle to the 6th clock cycle.
[0078] Step S302, determine whether there is a signal flip in B during the time period, if so, execute step S303, otherwise execute step S306.
[0079] Step S303, determine whether A has opened the control path from the flipped signal in B to the register, if so, execute step S305, otherwise execute step S304.
[0080] Step S304, determine whether each flip of each signal of B within the time period is shielded by A, if so, execute step S305, otherwise execute step S306.
[0081] Step S305: Determine whether the flipped value of A is meaningful to the register.
[0082] Step S306: Determine that the flipped value of A is meaningless to the register.
[0083] Among them, the method for judging whether the flipped value of A is meaningful to the register can be specifically referred to the above detection rules, which will not be repeated here.
[0084] After the above two processes, if the conclusion is that A is meaningless to the register, it can be concluded that the current segmented signal of A is meaningless to the register. Finally, by analyzing whether each segmented signal of A in the simulation waveform file is meaningless to the register, the probability that the A signal is a redundant signal to the register is calculated.
[0085] The following is an explanation using a specific scenario. Figure 4 , are the simulation waveforms of the input control signals and output signals of the register being analyzed. The signals from top to bottom are the clock signal: clk, input signals: rst_n, fpga2dsp_data_shift[7], state[3:0], cnt[3:0], rd_flag[1:0], and output signal sda_out, where A is the input control signal being analyzed (for example, rst_n is A when analyzing the rst_n signal), B is the remaining input drive signals of the register (for example, when analyzing rst_n, B is fpga2dsp_data_shift[7], state[3:0], cnt[3:0] and rd_flag[1:0]), and C is the output signal of the register being analyzed (sda_out is C in this example). The specific analysis is as follows: (1) rst_n signal This signal does not flip during the entire simulation time. According to the input control analysis of sda_out, its value 1 has a meaning for sda_out (that is, it opens the control path from the remaining input drive signals to this register).
[0086] (2) fpga2dsp_data_fhift[7] signal This signal does not flip during the entire simulation time. According to the input control analysis of sda_out, its value 0 has a meaning for sda_out (in the first analysis time of state[3] and the second analysis time of cnt[0], the control path from fpga2dsp_data_shift[7] to sdsa_out is opened, so the value of fpga2dsp_data_shift[7] directly controls the value of sda_out during this time period).
[0087] (3) state[3] signal In the first analysis waveform, at the next clk valid edge of F, sda_out did not flip. After logic analysis, the flip of state[3] signal was shielded by cnt and rd_flag signals respectively, so the flip of state[3] signal has no meaning for sda_out. During the period when state[3] flips and the value is 1, cnt[3] and cnt[0] flip first. After logic analysis, state[3] neither opens the control path of these two signals to sda_out nor shields these two signals. Then cnt[0] flips. After logic analysis, state[3] value 1 opens the control path of cnt to sda_out. Therefore, this value has meaning for sda_out. Therefore, the first waveform of A is meaningful to C.
[0088] Since the second segment of the analysis waveform is incomplete (the end point cannot be determined without the next flip, and the value of sda_out cannot be determined at all times before the end of this segment of the waveform, its existence has no meaning), it is assumed to be meaningful by default.
[0089] (4) state[2] signal Since the first segment of the analysis waveform is incomplete (the end point cannot be determined without the next flip, and thus it is unclear whether it has any significance for sda_out), it is assumed to be meaningful by default.
[0090] (5) state[1] signal In the first section of the waveform analysis, sda_out did not flip at the next clk valid edge of F at the flip moment. After logical analysis, this flip was shielded by cnt, so the flip of state[1] signal has no meaning for sda_out. During the period when state[1] flips and the value is 0, cnt[3] and cnt[0] flip first. After the logical expression analysis of sda_out, state[1] neither opens the control path of these two signals to sda_out nor shields these two signals. Then cnt[0] flips. After the logical expression analysis of sda_out, state[1] value 0 opens the control path of cnt to sda_out, so this value has meaning for sda_out.
[0091] In the waveform analysis of the second section, sda_out does not flip at the next clk valid edge of F at the flip moment. According to the logical expression analysis of sda_out, this flip is shielded by cnt, so the flip of state[1] signal has no meaning for sda_out. During the period when state[1] flips and the value is 1, cnt[3:0] and rd_flag[1:0] flip successively. According to the logical expression analysis of sda_out, state[1] opens the control path from cnt to sda_out, causing sda_out to flip, so this value has meaning for sda_out.
[0092] Since the third segment analysis waveform is incomplete (the end point cannot be determined without the next flip), it is assumed to be meaningful.
[0093] (6) state[0] signal In the first analysis waveform, sda_out does not flip at the next clk valid edge of F at the flip moment. After the logical expression analysis of sda_out, this flip is shielded, so the flip of state[0] signal has no meaning for sda_out. During the period when the value of state[0] flips to 1, the other input control signals of sda_out do not flip, so the first analysis waveform of state[0] has no meaning for sda_out, including the flip of state[0] at the starting point of the analysis, the value 1 after flipping, and the subsequent flipping down.
[0094] (7) cnt[3] signal The first section analyzes the waveform. After logical analysis, its upward flip is blocked and has no meaning to sda_out. However, the flipped value blocks the flip of cnt[0] and state[3] in the logical expression of sda_out, so it has meaning to exist.
[0095] The second section analyzes the waveform. After logical analysis, its flip is blocked, but the flipped value opens the control path of cnt[2:0] to sda_out, so its value has a meaning of existence.
[0096] Similarly, the analysis waveforms from the 2nd to the 9th segment also have their own significance.
[0097] The 10th segment analysis waveform is meaningful by default because there is no next inversion.
[0098] (8) cnt[2] signal The first section of the analysis waveform, after logical analysis, its flip and flipped value are shielded, so this section of the waveform has no meaning for sda_out, including the flip at the starting point of this section, the flipped value, and the flip at the end.
[0099] The second segment of the analysis waveform is confirmed to be meaningless in the first segment because its starting point is flipped and no analysis is required.
[0100] In the third section of the waveform analysis, the initial flip is masked, but the flipped value participates in opening the control path from cnt[0] or cnt[3] to sda_out, so it has a meaning for sda_out.
[0101] Similarly, analyzing the waveforms from the 4th to the 7th segments is also meaningful.
[0102] The 8th segment of the analysis waveform, after logical analysis, its flip and the flipped value are shielded, so this segment of the waveform has no meaning for sda_out, including the flip at the starting point of this segment, the flipped value, and the flip at the end.
[0103] (9) cnt[1] signal The first section of the analysis waveform, after logical analysis, its flip and flipped value are shielded, so this section of the waveform has no meaning for sda_out, including the flip at the starting point of this section, the flipped value, and the flip at the end The second segment of the analysis waveform is confirmed to be meaningless in the first segment because its starting point is flipped and no analysis is required.
[0104] The third segment of the analysis waveform, after logical analysis, its flip and flipped value are shielded, so this segment of the waveform has no meaning for sda_out, including the flip at the starting point of this segment, the flipped value, and the flip at the end.
[0105] The waveform analyzed in the fourth segment is deemed meaningless in the third segment because its starting point is flipped and no analysis is required.
[0106] The waveform of the fifth section is analyzed. After analysis, the control path from cnt[3] or cnt[1] to sda_out is opened, so it has a reason to exist.
[0107] The sixth analysis waveform has the same meaning as the fifth analysis waveform.
[0108] The seventh segment of the analysis waveform is as meaningless as the third segment of the analysis waveform.
[0109] The 8th segment analyzed the waveform. Since its starting point was flipped in the 7th segment, it was confirmed to be meaningless and no analysis was required.
[0110] The 9th and 10th analysis waveforms are as meaningful as the 5th and 6th analysis waveforms.
[0111] The results of the 11th and 12th analysis waveforms are the same as those of the 7th and 8th analysis waveforms.
[0112] The 13th segment analyzes the waveform and finds that the control path from cnt[3] or cnt[1] to sda_out is opened, so it has a meaning.
[0113] The analysis waveforms from segments 14 to 17 are all shielded and meaningless.
[0114] (10) cnt[0] signal After analysis, it can be seen that the 1st, 2nd, 3rd, 4th, 11th, 12th, 13th, 14th, 21st, 22nd, 23rd, 24th, 31st, 32nd, 39th, and 40th analysis waveforms all have existence significance, while the 5th, 6th, 7th, 8th, 9th, 10th, 15th, 16th, 17th, 18th, 19th, 20th, 25th, 26th, 27th, 28th, 29th, 30th, 33rd, 34th, 35th, 36th, 37th, and 38th analysis waveforms have no existence significance.
[0115] (11) rd_flag[1] signal The first section of the analysis waveform has its flip masked after logic analysis. The flipped value is neither used to mask the remaining input control signals nor to open the control path from the remaining input control signals to sda_out. Therefore, rd_flag[1] has no meaning for sda_out, including the flip at the beginning of this section, the value 1 after the flip, and the subsequent flip.
[0116] (12) rd_flag[0] signal The first segment of the analysis waveform has no end point and therefore has meaning by default. From the above, we can know that all flips and values of rst_n / fpga2dsp_data_fhift[7] / state[3] / state[2] / state[1] / cnt[3] / rd_flag[0] in the entire analysis waveform are meaningful to sda_out, so it is 100% meaningful in the entire analysis; all flips of state[0] / rd_flag[1] in the entire analysis waveform are meaningless, so it is 0% meaningful in the entire analysis; cnt[2] has 4 meaningless flips out of 9 flips in the entire analysis waveform, so it is 55.56% meaningful; cnt[1] has 12 meaningless flips out of 17 flips in the entire analysis waveform, so it is 29.4% meaningful; cnt[0] has 24 meaningless flips out of 40 flips in the entire analysis waveform, so it is 40% meaningful. Here, the smaller the percentage of meaningful flips, the higher the probability that the signal is a redundant point or has a conflict in the control of the register. Whether it is a redundant point requires further confirmation by the designer.
[0117] Here, based on the analysis results, the register transfer level (RTL) code is returned to confirm that the state machine is encoded using one-hot code, state[0] is indeed a redundant signal, and rd_flag[1] and rd_flag[0] are also restricted to being 1 at the same time in the code. Therefore, rd_flag[1] is indeed a redundant signal. This redundant signal can be removed from the register transfer level (RTL) code, thereby reducing the chip area and leakage current power consumption.
[0118] In summary, by reading the register transfer level (RTL) code and its simulation waveform of the digital chip, combined with the signal simulation waveform and its logic code, each input control signal of each register is automatically analyzed for each flip and whether the value after flip is meaningful to the register, and the percentage of meaningful flips in the input control signal of each register in the waveform is statistically analyzed to determine the percentage of the total number of flips (if there is no flip, the value is analyzed to be meaningful to the register, which is 100%, otherwise it is 0%). The lower the percentage, the greater the probability that the signal can be optimized, and possible redundant points in the digital chip design can be quickly locked according to the detection results (since it is assumed that it cannot be determined whether the meaningful flips are meaningful to the register, the signals with low percentages in the detection results are suspicious points). By analyzing these suspicious points, redundant points or conflicts in the logic function code can be quickly found, which greatly reduces the time and effort required to find these points in the entire design analysis, thereby making it feasible to optimize the redundant points in the register input control signals in increasingly complex digital chips.
[0119] Based on the same inventive concept as the above embodiments, an embodiment of the present invention provides a computing device, such as Figure 5 As shown, the computing device includes: a processor 310 and a memory 311 storing a computer program; wherein, Figure 5 The processor 310 shown in the figure is not used to indicate that the number of the processor 310 is one, but is only used to indicate the positional relationship of the processor 310 relative to other devices. In actual applications, the number of the processor 310 may be one or more; similarly, Figure 5 The memory 311 shown in the figure has the same meaning, that is, it is only used to refer to the position relationship of the memory 311 relative to other devices. In practical applications, the number of memories 311 can be one or more. When the processor 310 runs the computer program, the redundant control signal detection method applied to the above computing device is implemented.
[0120] The computing device may also include: at least one network interface 312. The various components in the electronic device are coupled together via a bus system 313. It is understood that the bus system 313 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 313 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 313 is not used in the following examples. Figure 5 Various buses are labeled as bus system 313.
[0121] The memory 311 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory may be a disk memory or a tape memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAMbus random access memory (DRRAM, Direct Rambus Random Access Memory).The memory 311 described in the embodiments of the present invention is intended to include but is not limited to these and any other suitable types of memories.
[0122] The memory 311 in the embodiment of the present invention is used to store various types of data to support the operation of the computing device. Examples of these data include: any computer program used to operate on the computing device, such as an operating system and an application; contact data; phone book data; messages; pictures; videos, etc. Among them, the operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application program may include various applications, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. Here, the program that implements the method of the embodiment of the present invention may be included in the application program.
[0123] Based on the same inventive concept as the above-mentioned embodiment, this embodiment further provides a computer-readable storage medium, in which a computer program is stored. The computer-readable storage medium may be a ferromagnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); it may also be various devices including one or any combination of the above-mentioned memories, such as a mobile phone, a computer, a tablet device, a personal digital assistant, etc. When the computer program stored in the computer-readable storage medium is executed by the processor, the above-mentioned redundant control signal detection method is implemented. For the specific steps implemented when the computer program is executed by the processor, please refer to Figure 1 The description of the illustrated embodiment will not be repeated here.
[0124] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0125] In this document, the terms "comprises," "comprising," or any other variations thereof, are intended to cover a non-exclusive inclusion of elements other than those listed and may also include additional elements not expressly listed.
[0126] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A redundant control signal detection method, characterized in that: The method comprises: Acquire simulation data generated after functional simulation of the logic function code of the target chip; the logic function code includes at least one input control signal and an output signal of the target register, and the simulation data includes simulation waveform signals corresponding to each of the input control signal and the output signal in multiple clock cycles; Based on the simulation data, redundancy detection is performed on each of the input control signals; the redundancy detection includes detecting a change relationship between the input control signal and the output signal; Output the obtained redundant detection results.
2. The method according to claim 1, characterized in that The performing redundancy detection on each of the input control signals based on the simulation data includes: determining a target input control signal of the target register; Segmenting the simulation waveform signal corresponding to the target input control signal according to the flipping moment to obtain a plurality of segmented waveform signals corresponding to the target input control signal; the plurality of segmented waveforms include the segmented waveform signals of the input control signals and the segmented waveform signals of the output signal; Based on the simulation waveform signals respectively corresponding to the plurality of segmented waveform signals, detecting whether the target input control signal corresponding to each segmented waveform signal has a meaningful effect on the control of the target register; Based on the obtained detection results of each of the segmented waveform signals, a redundant detection result of the target input control signal is generated.
3. The method according to claim 2, characterized in that The detecting whether the target input control signal corresponding to each segmented waveform signal has a meaningful effect on the control of the target register includes: Determining whether redundant detection of each segmented waveform signal of the target input control signal is meaningful; If it is meaningful, the segmented waveform signal is determined as a target segmented waveform signal, and it is detected whether the input control signal corresponding to the target segmented waveform signal is meaningful in controlling the target register.
4. The method according to claim 3, characterized in that The determining whether the redundant detection of each segmented waveform signal of the target input control signal is meaningful includes: If it is detected that the number of flips of the simulation waveform signal of the target input control signal within one clock cycle is an even number, it is determined that redundant detection of the plurality of segmented waveform signals corresponding to the even number of flips is meaningless; If it is detected that the number of flips of the simulation waveform signal corresponding to the target input control signal within one clock cycle is an odd number, it is determined that the redundant detection of the last segmented waveform signal within one clock cycle is meaningful.
5. The method according to claim 3, characterized in that: The detecting whether the input control signal corresponding to the target segmented waveform signal has a meaningful effect on the control of the target register includes: Based on the simulation waveform signal corresponding to the target segmented waveform signal, determine whether the flipping action of the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register, and / or determine whether the flipped value of the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register.
6. The method according to claim 5, characterized in that The determining whether the flipping action of the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register includes: Determine whether the control of the target register by the flipping of the input control signal corresponding to the target segmented waveform signal at the flipping moment satisfies a first preset condition; If it is satisfied, it is determined that the flipping action of the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register; the first preset condition is used to determine whether the target input control signal directly controls the target register or shields or opens the control channel of other control signals to the target register.
7. The method according to claim 6, characterized in that Also includes: When the control of the target register by the flipping of the input control signal corresponding to the target segmented waveform signal at the flipping moment does not satisfy the first preset condition, determining whether the control of the target register by the flipped value of the input control signal corresponding to the target segmented waveform signal satisfies the second preset condition; the second preset condition is used to determine whether the target input control signal directly controls the target register or shields or opens the control channel of other control signals to the target register; When the inverted value of the input control signal corresponding to the target segmented waveform signal satisfies a second preset condition for controlling the target register, it is determined that the inverted value of the input control signal corresponding to the target segmented waveform signal is meaningless for controlling the target register.
8. The method according to claim 6, characterized in that The first preset condition includes a first preset sub-condition; the determining whether the control of the target register by the flipping of the input control signal corresponding to the target segmented waveform signal at the flipping moment satisfies the first preset condition includes: Determine a target time for flipping an input control signal corresponding to the target segmented waveform signal; Determine whether the value of the simulation waveform signal corresponding to the output signal is reversed in the next clock cycle after the target time; If it is determined that when the value of the simulation waveform signal corresponding to the output signal is flipped, the flipping of the input control signal corresponding to the target segmented waveform signal at the target moment satisfies the first preset sub-condition for controlling the target register, then it is determined that the flipping of the input control signal corresponding to the target segmented waveform signal at the flipping moment satisfies the first preset condition for controlling the target register; The first preset sub-condition being met includes at least one of the following: The value of the output signal changes as the value of the input control signal corresponding to the target segmented waveform signal changes; When the value of the input control signal corresponding to the target segmented waveform signal is a preset value and the values of other input control signals change, the value of the output signal changes; the other input control signal is any input control signal among the at least one input control signal except the target input control signal.
9. The method according to claim 8, characterized in that The first preset condition also includes a second preset sub-condition; the determination of whether the control of the target register by the flipping of the input control signal corresponding to the target segmented waveform signal at the flipping moment satisfies the first preset condition also includes: If it is determined that the value of the simulation waveform signal corresponding to the output signal has not flipped, and the flipping of the input control signal corresponding to the target segmented waveform signal at the target moment satisfies the second preset sub-condition for controlling the target register, then it is determined that the flipping of the input control signal corresponding to the target segmented waveform signal at the flipping moment satisfies the first preset condition for controlling the target register; The second preset sub-condition is satisfied, including at least one of the following: When the value of the other input control signal is flipped, the value of the output signal remains unchanged; When the value of the input control signal corresponding to the target segmented waveform signal is reversed, the value of the output signal changes in the next clock cycle.
10. The method according to claim 7, characterized in that The second preset condition is met, including any one of the following: In the time period corresponding to the target segmented waveform signal, the value of the simulation waveform signal corresponding to no other input control signal is reversed; the other input control signal is any input control signal among the at least one input control signal except the target input control signal; In the time period corresponding to the target segmented waveform signal, the value of the simulation waveform signal corresponding to other input control signals is reversed, and when the value of the reversed other input control signal changes, the value of the output signal changes.
11. The method according to claim 6, characterized in that The determining whether the flipping action of the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register also includes: In response to the fact that the simulation waveform signal corresponding to the target segmented waveform signal has no next flipping moment, it is determined that the flipping action of the input control signal corresponding to the target segmented waveform signal is meaningful to the control of the target register.
12. The method according to any one of claims 2 to 11, characterized in that The generating of a redundant detection result of the target input control signal according to the obtained detection result of each segmented waveform signal comprises: Determine the number of segmented waveform signals in the target input control signal that are meaningless to the control of the target register according to the obtained detection results of each segmented waveform signal; Determine the proportion of segmented waveforms in the target input control signal that are meaningless to the control of the target register according to the number and the total number of segmented waveform signals in the target input control signal; A redundancy detection result of the target input control signal is generated based on the proportion.
13. A computing device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the redundant control signal detection method according to any one of claims 1 to 12 when executing the computer program.
14. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the redundant control signal detection method according to any one of claims 1 to 12 is implemented.
Citation Information
Patent Citations
Method for verifying triplication redundancy measure
CN103530207A
Power consumption optimization method and system based on register transmission level, and related component
CN113191113A
Redundant logic circuit detection method and device and computer-readable recording medium
US20110061033A1
Method and circuit for performing error detection on a clock gated register signal
US20230384374A1
Performance check method for timing logic element, and device
WO2023245719A1
