@techreport{cha-vor-pue-hon-04-aa-fixpt, author = {Chang, Lawrence J. and Voronenko, Yevgen and Pueschel, Markus and Hong, Inpyo}, title = {Adaptive Mapping of Linear {DSP} Algorithms to Fixed-Point Arithmetic}, Institution = {Carnegie-Mellon University}, year = 2004, month = sep, pages = {25}, comment = {Uses AA to determine number of bits needed}, abstract = {Embedded DSP digital signal processing applications are typically implemented using fixed point arithmetic -- in hardware to reduce area requirements and increase throughput, but also in software since most embedded processors do not provide floating point arithmetic. Consequently, the developer is confronted with the difficult task of deciding on the fixed point format, i.e., the number of integer and fractional bits to avoid overflow and ensure sufficient accuracy. For software implementations, the entire bitwidth is fixed, typically at 32, which means that increasing the representable range number of integer bits reduces the available accuracy number of fractional bits and vice-versa. In this paper we present a compiler that translates a floating point C implementation of a linear DSP kernel, such as a discrete Fourier or wavelet transform, into a high accuracy fixed point C implementation. The inputs to the compiler are a floating point arithmetic C program and the range of the input vector elements. First, the compiler statically analyzes the program in a single pass using a recently developed tool that uses affine arithmetic modeling. Then, in the global mode, the compiler determines the global fixed point format with the least number of integer bits and thus the highest accuracy that guarantees to avoid overflow and outputs the corresponding code. More interesting is the local mode, in which the compiler determines the best format independently for each variable, thus further pushing the possible accuracy. The compiler is currently limited to straightline code an extension to loop code is in development.} }