Evaluation of Compilers for MATLAB- to C-Code Translation

University essay from Sektionen för Informationsvetenskap, Data– och Elektroteknik (IDE)

Author: Markus Muellegger; [2008]

Keywords: MATLAB; C; Automatic Translation; Compiler;

Abstract: MATLAB to C code translation is of increasing interest for science and industry. In detail two MATLAB to C compilers denoted as Matlab to C Synthesis (MCS) and Embedded MATLAB C (EMLC) have been studied. Three aspects of automatic code generation have been studied; 1) generation of reference code; 2) target code generation; 3) floating-to-fixed-point conversion. The benchmark code used aimed to cover simple up to more complex code by being viewed from a theoretical as well as practical perspective. A fixed-point filter implementation is demonstrated. EMLC and MCS offer several fixed-point design tools. MCS provides a better support for C algorithm reference generation, by covering a larger set of the MATLAB language as such. More suitable for direct target implementation is code generated from EMLC. As a result of the need to guarantee that the EMLC generated C-code allocates memory only statically, MATLAB becomes more constraint by EMLC. Functional correctness was generally achieved for each automatic translation.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)