Accelerating seismic computations using customized number representations on FPGAs |

In the first step, we apply uniform bit-width over all the variables in the design. The approach for accuracy evaluation, introduced earlier, is used to provide a value that indicates the quality of the resulted seismic image.

The original software Fortran code of the `S_G_wem` application
performs the whole computation using single-precision
floating-point. We firstly replace the original Fortran code of
function `wei_wem` with a piece of C++ code using double-precision
floating-point to generate a full-precision result for comparsion.
After that, to investigate the effect of the variables' bit-widths
in function `wei_wem` on the accuracy of the whole application, we
replace the code of function `wei_wem` with our simulation code
that can be configured with different bit-widths, and generate
results for different bit-width settings.

unu-bw
Variation of accuracy for a varying bit-width.
Figure 6. | |
---|---|

As mentioned earlier, according to their characteristics in range and operational behavior, we can also divide the variables in the design into different groups and apply a uniform bit-width in each group. In the design of function `wei_wem', the variables are divided into three groups: SQRT, the part from the beginning to the table index calculation, which includes an evaluation of the square root; SINE, the part from the end of SQRT to the evaluation of the sine and cosine functions; and WFLD, the part that multiplies the complex values of `wfld' data with a complex value consisting of the sine and cosine values (for phase modification), and a real value (for amplitude modification). To perform the accuracy investigation, we keep two of the bit-width values constant, and change the other one gradually to see its effect on the accuracy of the entire application.

Fig. 7 shows the accuracy of the generated images when we change the bit-width of the SQRT part from 6 to 20. The bit-widths of the SINE and WFLD parts are set to 20 and 30 respectively. Large bit-widths are used for these two parts so that they do not contribute much to the errors and the effect of variables' bit-width in SQRT can be extracted out. The case of SQRT bit-widths shows a clear cut at the bit-width value of 10. For bit-width values smaller than 10, the generated images show a large accuracy indicator value at the level of , which means the pattern in the generated images are highly different from the correct ones. For bit-width values equal to or larger than 10, the accuracy indicator value drops to the level of , which indicates a similar accuracy to single-precision floating-point results.

sqrt-bw
Accuracy of the generated images for different SQRT bit-widths.
The accuracy indicator value shows the difference between the pattern in the generated images and the pattern
in the full-precision image.
Figure 7. | |
---|---|

Similarly, Fig. 8 shows the case when we change the bit-width of the SINE part. The SINE bit-width changes from 6 to 20, while the bit-widths of the SQRT and WFLD parts are set to 20 and 30 respectively. There is also a fast decrease at the bit-width value of 8 (not quite evident in a logarithmic scale). The indicator value drops to the level of when the bit-width increases to 12.

sine-bw
Accuracy of the generated images for different SINE bit-widths.
The accuracy indicator value shows the difference between the pattern in the generated images
and the pattern in the full-precision image.
Figure 8. | |
---|---|

wfld-bw
Accuracy of the generated images for different WFLD bit-widths (floating-point).
The accuracy indicator value shows the difference between the pattern in the generated images
and the pattern in the full-precision image.
Figure 9. | |
---|---|

exp-bw
Accuracy of the generated images for different exponent bit-widths.
The accuracy indicator value shows the difference between the pattern in the generated images
and the pattern in the full-precision image.
Figure 10. | |
---|---|

man-bw
Accuracy of the generated images for different mantissa bit-widths (floating-point).
The accuracy indicator value shows the difference between the pattern in the generated images
and the pattern in the full-precision image.
Figure 11. | |
---|---|

Accelerating seismic computations using customized number representations on FPGAs |

2007-09-18