Switching Activity And The Unknown

Switching activity is an essential part of the power equation and optimization. Quality of switching activity information can have a direct effect on quality of results.

popularity

Switching activity is essential to measuring power in digital circuits, and it is also important for optimizing digital designs. Power can be static, caused by leakage, or dynamic, caused by switching. Switching activity is crucial because dynamic power is, after all, proportional to the switching activity in the design.

Definition
Switching activity is the measurement of changes of signal values. It has two parts: probability and toggle density.

Probability in this context is the likelihood that a signal will have the logic value of ‘1’. A zero probability indicates that the signal is always low.

Toggle density is the number of switches per unit time. That unit is generally one clock cycle. Toggle density is the ‘f’ in the formula for dynamic power in CMOS circuits: P(dynamic) = ½ C V² f. It is the toggle density that is primarily used for power analysis and optimization.

Switching activity information is obtained from digital simulation(s) of the design. Simulators can write out files with waveforms (generally in VCD or FSDB format). Switching activity can be readily extracted from the waveforms. There is a great deal of information present in the waveform file, and this can be reduced to a smaller data set for average power estimation and for power optimization. The SAIF file format is used for this purpose.

Role in power analysis
In digital power analysis, we are computing the power dissipation in a digital circuit. In a standard cell-based design flow, power is computed from information supplied. The liberty file contains information about the power dissipation for each cell. This includes leakage power and dynamic power data. It also has a wire load model, which is used to compute the capacitance on the standard cell output. Most of the information needed is in that liberty file, except for the switching activity (toggle density). The switching activity completes the picture and enables the power computation.

Role in optimization
In power optimization, specifically in clock and memory gating, the design is scanned for possible changes that could be used to prevent flip flops and memories from switching when switching is not necessary for the correct operation of the circuit. Some of these changes (moves) will be beneficial, but others may not be due to other factors, such as increased area.

Some moves are more important than others. Consider a case where a register only infrequently changes state. In this case its data inputs have a low toggle density. For this register, we can gate the clock and reduce the frequency of its switching. Switching activity is used to identify which moves are best.

Quality of switching activity
We have all heard the phrase “garbage in … garbage out”. The quality of the results of power analysis and power optimization is strongly influenced by the quality of the switching activity data.

In this case, quality of switching activity data refers to two issues: matching the design’s workflow and unknown states.

The simulation(s) used to create switching activity information should be representative of the way that data will be used. For power analysis, the estimated dynamic power is calculated from the switching activity data. The result is the estimated power consumed by that circuit when used in that way. If this is not representative, then the results will not be representative. Similarly, for power optimization, the resulting power savings will not be as good as they could be. Some power will be wasted.

Impact of unknown states (i.e., Xs)
The unknown states in the simulation have a negative impact on the power analysis and optimization processes. Xs represent a lack of information: the signal state is unknown.

What is also unknown in an X is whether the signal is switching or stable. The switching activity is also an unknown.

For power analysis, the analysis tool will need to make a guess. It might guess that the signal is stable, or it might apply a different arbitrary value – but it will be only a guess. So power analysis accuracy is lost.

For power optimization, again the tool will have to guess as to the activity. The result can be that optimization moves may be performed that should not be, or another optimization that should have been used was not. Note that no functional bug is introduced here as a result. The optimization will be somewhat less optimal.

About propagation
Another important consideration is the ability to propagate switching activity through the design. There are situations where the switching activity is incomplete. One example is a complex expression in RTL, where there are nodes that are not named because they are internal to the expression. For example, the expression (A x B) + C has an embedded result of A x B. This result has no name, so there is no way to get the switching activity for it.

In power analysis or optimization, the tool will propagate switching activity information from annotated signals through the logic, making calculations as it moves through the logic. In this case, a sequential analysis (one which reaches beyond register boundaries) will produce more accurate results than a simple Boolean approach.

Summary
Switching activity is a critical element of power analysis and power optimization. For power analysis, switching activity provides a key piece of the power equation. For optimization, switching activity helps to identify which optimizations are most useful. The quality of the switching activity information has a direct effect on the quality of results.


Tags:

Leave a Reply


(Note: This name will be displayed publicly)