• 沒有找到結果。

Calculation of Error-compensation bias

Chapter 1 Introduction

3.1 Calculation of Error-compensation bias

Fig 3-1 shows the partial product of 8-bit Booth multiplier and the partial product is divided into two parts, low part (LP) and high part (HP). The LP can be further divided into two parts, the first column of LP is LP_major and the remaining columns of LP are LP_minor. The carry-out bit from LP to HP is written as equation (3.1), where β the sum of LP_major and λ is the sum of LP_minor.

7

1

Carry =⎢⎣2β λ+ ⎥⎦ (3.1)

22

In order to find the error-compensation bias, LP_major index, θ, is defined as equation follow.

θ =P0 _ 7+21iP1_ 5+22iP2 _ 3+23iP3_1 (3.4)

the values of θ for different values of LP_major are shown in Table 3-1.

Table 3-1: The values of θ for different values of P3_0P2_2P1_4P0_6

Fig 3-1: Partial product of 8-bit Booth multiplier

23

-It is obviously that if one value of θ is selected, the value of β is fixed. For example, if the value of θ is equal to 7, the value of β must be equal to 3. We can obtain the average carry for each value of θ by using full search simulation. Because the value of β is fixed, we only need to calculate the average carry from LP_minor to HP (λ). The results of full search simulation for n = 8 are represented in Table 3-2.

Table 3-2: The average carry for each value of θ

Now, we can get the error-compensation bias by using look-up table method. The input of table is the four elements of LP_major and three approximate carry signals are needed to represent the values of error-compensation bias. The block diagram of error-compensation bias is illustrated in Fig 3-2.

Fig 3-2: The error-compensation table for n = 8

24

-As mentioned in former discussion, the values of approximate carry signals are obtained by looking up table. But the area of error-compensation table will increase when n is large.

Hence, it is unwise to obtain the error-compensation bias by this method. The new approach should be proposed to improve the hardware complexity of look-up table method.

In order to find the new approach, we try to find the rule between average carry and θ.

Fortunately, the average carry is related to the number of “1” in LP_major which is the value of β. If the values of θ have the same number of “1” in LP_major, the values of average carry for these θ will be all equally. For example, the values of average carry are all equal to 1 for θ

= 1, 2, 4, and 8 in which the number of “1” in LP_major is all equal to 1. The relation between average carry and the number of “1” in LP_major is shown in Table 3-3 for n= 8.

Table 3-3: The values of Average carry for each β for n = 8

From Table 3-3, we can derive a carry-estimation equation which can computed the average carry for n = 8. The carry-estimation equation is written as

7 1

Carry ⎢ ⎥β2

=⎢ ⎥⎣ ⎦+ (3.5)

The results of this equation are the error-compensation bias for n = 8. Table 3-4 shows the results of carry-estimation equation for n = 8.

25

-Table 3-4: The results of carry-estimation equation for n = 8

As seen in Table 3-4, the results of carry-estimation equation are all equal to the values of average carry which are obtain by full search simulation. Hence, we can calculate the error-compensation bias by equation (3.5). The carry-estimation equations for different width

“n” can be obtained by similarly process. Equation (3.6) and equation (3.7) show the carry-estimation equations for n = 10 to n = 16. And the results of these carry-calculate equations are represented in Table 3-5.

1

However, the values of carry-estimation equations do not always match the values of average carry. For example, the result of carry-estimation equation is equal to 2 for n = 10 and β = 1. But the value of average carry is equal to 1. In order to derive the influence of the truncation error caused by this inequality situation, the probability of the mismatch situation is calculated. First, the number of cases for each value of β is computed. Equation (3.8) shows the equation which can calculate the number of cases for each β.

Nβ =Cβn2 (3.8)

26

-Table 3-5: The results of carry-estimation equation for (a) n = 10 (b) n = 12 (c) n = 14 (d) n = 16

Table 3-6 shows the numbers of cases for each β with n = 10. It is obviously that, the probability of β equaling “1” is only 532 . In other words, the probability of the mismatch condition is only 532 (15%) for n = 10. Thus, the increase of the truncation error caused by the mismatch situation will be few.

27

-Table 3-6: The numbers of cases for each β with n = 10

Similarly, the mismatch condition occurs for β = 6 and n = 14. We can also find the number of cases for each β by using equation (3.8). Table 3-7 shows the numbers of cases for each β with n = 14.

In Table 3-7, we can see that the probability of β equaling “6” is only 7128. That is, the

probability of the mismatch condition is only 7128 (5.4%). Hence, the increase of the truncation error caused by inequality condition is also very little for n = 14.

Table 3-7: The numbers of cases for each β with n = 14

The inequality situation is also occurred for n = 16. There are two conditions, β = 0 and β = 2, that the results of carry-estimation equation are not equal to average carry. By using equation (3.8), the numbers of cases for each β with n = 16 can be obtained from Table 3-8.

Table 3-8: The numbers of cases for each β with n = 16

The probability of the inequality condition is only 11%. Hence, the increase of the truncation error for n =16 is still very little.

In former discussion, we can know that the error-compensation bias can be obtained by using the carry-estimation equations for n = 8 to n = 16. And the results of the

28

-carry-estimation equations are almost the same as average carry which is obtained by full search simulation.

相關文件