Many signal processing algorithm developers use MATLAB® for algorithm development.
Once an algorithm has been validated in MATLAB, a common next step is to
implement the algorithm. During the implementation phase, the algorithm
can take many different forms:
- prototype C code, called from a MATLAB testbench
- ANSI C code running standalone on a desktop processor
- C code optimized for a particular system environment or architecture
Creating any of these deliverables from MATLAB requires translating the
original M-code into C code. Manual translation of the algorithm can
be a laborious, error-prone task. Agility MCS automatically generates
equivalent C code from MATLAB source code. By eliminating the manual
translation task, MCS lets algorithm implementers create prototypes and
implementations in minutes, not days or weeks. The automated nature
of this new process enables implementation to begin even while the algorithm
is still changing.

Create C Code Automatically
Agility MCS enables MATLAB programmers to automatically create C-code
versions of their M-code models. This benefits algorithm implementors by:
- Eliminating manual language translation
- Enabling a common MATLAB testbench for continuous algorithm validation
- Creating an algorithm model that easily integrates with existing flows
and executes on any ANSI C-code platform
- Defining a precise white-box algorithm hand-off
Agility MCS Features
Agility MCS enables users to:
- Generate ANSI C code from MATLAB algorithms Clear, readable C code
- Preserve variable and function names from original M code
- Match file structure and function hierarchy to M code
- Optionally interleave original MATLAB code as comments in generated
C code
- Include pre-developed C code
- Cross-probe MATLAB and generated C code via a graphical user interface
Broad MATLAB Support
Agility MCS supports a large subset of the MATLAB language, including
many of the commonly used features for modeling signal processing systems:
- Operators: arithmetic, matrix, logical, and bitwise operators
- Datatypes: real/complex, fixed-point, logical, structures
- Persistent and global variables
- Shapes: scalars, vectors, matrices, n-dimensional arrays
- Flow control constructs: if-then-else, for loops, while loops, switch
- Common mathematical functions (e.g. sqrt, sin, atan)
- Numerous built-in functions
- Fixed-point support: wide variety of rounding modes, saturation and
modulo arithmetic

The Agility MCS GUI lets users cross-probe M code and automatically
generate C code.