Chapter 3 Gate-Level Power Model with 1-D LUT 50
3.3 Dynamic Grouping
Using the CDC values of pattern pairs to be the index of a lookup table may still require huge table size if we set a table entry for each different CDC value. Although the table size will be much smaller than 2n+n, where n is the number of primary inputs of the circuit, it is still very huge. In order to reduce the table size, we can collect those pattern pairs with similar CDC values to be a group and only set one entry in the lookup table for each group. A
similar grouping method was used in pattern compaction techniques for power estimation [39][44]. They calculate the CDC values of the pattern pairs in the input sequence by a logic-level simulator such that they can collect those pattern pairs with similar CDC values as a group. Then, the pattern compaction can be done by selecting some pattern pairs as representatives from each group because those pattern pairs in the same group have similar power consumptions. In [40][76], however, the compacted sequence is generated for a specific input sequence. In other words, the input sequence is deterministic and the distribution of CDC values is deterministic, too. Therefore, they can separate the pattern pairs into finite groups in their grouping algorithm. Unfortunately, when we build the lookup table for the proposed power model in our work, the CDC distribution is non-deterministic until we simulate all pattern pairs, which is almost impossible for large circuits even using a logic-level simulator.
In order to handle this situation without simulating all possible cases, we propose a method to dynamically increase the entries of the lookup tables to cover the current CDC distribution of designs when we characterize the average power of each entry in the table. As illustrated in Figure 3-2, the CDC values of pattern-pairs have been sorted before grouping.
The X-coordinate is the number of pattern pairs and the Y-coordinate is the CDC value of each pattern pair. In the first iteration, we randomly generate several pattern pairs and the dynamic grouping in this step is similar to the grouping process in [40][76] as shown in Figure 3-2(a). Each group is defined with an interval of CDC values and the neighborhood groups have continuous CDC values. This is different to the grouping process [40][76] which defines a group with the CDC values of two boundary pattern pairs and the neighborhood
groups may not have continuous CDC values. With continuous interval definition, we can easily find the corresponding groups for the pattern pairs with CDC values between existing ranges in the following iterations.
Figure 3-2(a). The dynamic grouping process after the first iteration
Figure 3-2(b). The dynamic grouping process after the second iteration
In the second iteration, we generate more random patterns and the number of group is spread because the CDC distribution area is increased as shown in Figure 3-2(b). The range of each group in Figure 3-2(a) is not changed but new groups are generated from the boundaries of the first and last groups in Figure 3-2(a). It implies that the size of the lookup
table in our power model is determined by the number of groups in the dynamic grouping process, which can be controlled by the user-defined group interval. The larger group interval will lead to fewer table entries. This group interval is defined by a percentage of the range from the maximum CDC value to the minimum CDC value of each group and set as 5% of the maximum CDC value in this work. If the interval is smaller than the minimum load capacitance of the nodes, the interval will be set as the minimum load capacitance of nodes because it is impossible to have such CDC values. If the group interval is defined as 5% of the maximum CDC value in the group, the table will only increase 45 entries when the CDC distribution region is spread 10 times to the previous distribution region. Therefore, even the circuit size are increased, the table entries are only increased linearly.
In order to explain the dynamic grouping process more clearly, the pseudo code of the proposed algorithm is shown in Figure 3-3. In the first iteration, the grouping process is performed according to the CDC range of the first random sequence. Those groups are defined one by one from the minimum CDC value of the input sequence until the range of groups cover the maximum CDC value of the input sequence. Note that the interval of each group, which is defined by its minimum CDC value and maximum CDC value, cannot be smaller than the parameter MIN_NODE_CDC in the circuit. After all groups are defined, the allocate() function allocates each pattern pair in the input sequence into the corresponding
group. In the following iterations, the number of groups may be increased by insert_group() or expand_group() functions if their CDC distribution is out of the range of current groups.
The insert_group() and expand_group() functions will perform similar operations like the process in the first iteration to cover the CDC distribution of new input sequence. The only
difference is that the two functions start with the boundary values of the previous iteration.
The allocate() function will again allocate those pattern pairs in the new input sequence into corresponding groups as in the first iteration. After each iteration, the group information of each pattern pair can be obtained for the following power characterization process.
Dynamic_grouping(group[], seq[], iteration, p_n, group_num) {
if(iteration == 1) /*Grouping for initial CDC distribution*/
{
max_cdc = Max(seq[]); min_cdc = Min(seq[]);
/*max_cdc and min_cdc define the range of CDC distribution of current input sequence*/
group_num=0;
group[group_num].max_cdc = min_cdc + MIN_NODE_CDC;
} else
} else /*Group increasing if CDC distribution spread*/
{
max_cdc = Max(seq[]); min_cdc = Min(seq[]);
if (max_cdc > group[group_num-1].max_cdc) {
group_num=expand_group(group[], group_num, max_cdc);
} elseif (min_cdc < group[0].min_cdc) {
Figure 3-3. The pseudo code of dynamic grouping process