Floating Point to Fixed Point Conversion of C Code

  • Andrea G. M. Cilio
  • Henk Corporaal
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1575)


In processors that do not support floating-point instructions, using fixed-point arithmetic instead of floating-point emulation trades off computation accuracy for execution speed. This trade-off is often profitable. In many cases, like embedded systems, low-cost and speed bounds make it the only acceptable option. We present an environment supporting fixed-point code generation from C programs. It allows the user to specify the position of the binary point in the source code and let the converter automatically transform floating-point variables and operations. We demonstrate the validity of our approach on a series of experiments. The results show that, compared to floating-point, fixed-point arithmetic executed on an integer datapath has a limited impact on the accuracy. In the same time the fixed-point code is 3 to 8 times faster than its equivalent floating-point emulation on an integer datapath.


  1. 1.
    Cilio, A.G.M.: Efficient Code Generation for ASIPs with Different Word Sizes. In: proceedings of the third conference of the Advanced School for Computing and Imaging (June 1997)Google Scholar
  2. 2.
    Corporaal, H.: Microprocessor Architectures; from VLIW to TTA. John Wiley, Chichester (1997) ISBN 0-471-97157-XGoogle Scholar
  3. 3.
    Embree, P.M.: C Algorithms for Real-Time DSP. Prentice Hall, Englewood Cliffs (1995)zbMATHGoogle Scholar
  4. 4.
    Stanford Compiler Group. The SUIF Library. Stanford University (1994) Google Scholar
  5. 5.
    Hoogerbrugge, J.: Code Generation for Transport Triggered Architectures. PhD thesis, Technical University of Delft (February 1996)Google Scholar
  6. 6.
    Loughborough Sound Images. Evaluation of the performance of the c6201 processor & compiler (1997), Internal paper:
  7. 7.
    International Telegraph and Telephone Consultative Committee. General Aspects of Digital Transmission Systems. Terminal Equipments Recommendations G.700– G.795. International standard, CCITT, Melbourne (November 1988)Google Scholar
  8. 8.
    Kang, W.S.J.: Fixed-point C compiler for TMS320C50 digital signal processor. In: Proceedings of ICASSP 1997 (1997)Google Scholar
  9. 9.
    Joint Technical Committee ISO/IEC JTC1/SC29/WG11. ISO/IEC 13818 Information technology – Generic coding of moving pictures and associated audio. International standard, ISO/IEC (June 1995)Google Scholar
  10. 10.
    Lippman, S.B.: Inside the C++ Object Model. Addison-Wesley, Reading (1996)Google Scholar
  11. 11.
    Willems, T.G.M., Bürsgens, V., Meyr, H.: FRIDGE: An Interactive Fixed-point Code Generator Environment for HW/SW CoDesign. In: proceedings of the IEEE International conference on Acoustic, Speech and Signal Processing, München, April 1997, pp. 687–690 (1997)Google Scholar
  12. 12.
    Kim, K.-I.K.S., Sung, W.: Fixed-point Optimization Utility for C and C++ Based Digital Signal processing Programs. In: proceedings of IEEE Workshop on VLSI Signal Processing (October 1995)Google Scholar
  13. 13.
    Sung, W., Kang, J.: Fixed-Point C Language for Digital Signal Processing. In: Twenty-Ninth Annual Asilomar Conference on Signals, Systems and Computers (October 1995)Google Scholar
  14. 14.
    Willems, M., Bürsgens, V., Keding, H., Grötker, T., Meyr, H.: System Level Fixed-point Design Based on an Interpolative Approach. In: Design Automation Conference (1997)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1999

Authors and Affiliations

  • Andrea G. M. Cilio
    • 1
  • Henk Corporaal
    • 1
  1. 1.Delft University of Technology Computer Architecture and Digital Techniques Dept.DelftThe Netherlands

Personalised recommendations