Generating Embedded C Code for Digital Signal Processing

University essay from Chalmers tekniska högskola/Institutionen för data- och informationsteknik

Author: Mats Nyrenius; David Ramström; [2011]

Keywords: ;

Abstract: C code generation from high-level languages is an area of increasing interest. This is because manual translation from specifications to C code is both time consuming and prone to errors. In this thesis, the functional language Feldspar has been compared to MATLAB (together with MATLAB Coder) in terms of productivity and performance of generated code.

Several test programs were implemented in both languages to reveal possible differences. The set of test programs included both small programs, testing very specific properties, as well as more realistic digital signal processing algorithms for mobile communications. The generated code was run on two different platforms: an ordinary PC and a Texas Instruments C6670 simulator.Execution time and memory consumption were evaluated. For the productivity evaluation, four different areas important to software development were defined. This was followed by reasoning about the languages in each area, using test programs as examples.

The results show that MATLAB generally performs better. The problems of Feldspar observed in this thesis, however, are limited to a few details which should be possible to improve. Also, in some cases Feldspar performed better because of an optimization technique called fusion. Theproductivity evaluation showed some interesting differences between the languages, for instance regarding readability and type safety.

  CLICK HERE TO DOWNLOAD THE WHOLE ESSAY. (in PDF format)