Embedding generated code
Propel your innovation by merging exploration and hardware implementation. Capture ideas in high-level MATLAB and Simulink models, mature your designs and integrate them into your production system as embedded code. From idea to concept, from MATLAB to C/C++, Cuda, HDL or PLC code. We build models and generate reliable code, using hardware resources efficiently, to meet your performance and certification requirements.
Across industries, we see increasing amounts of data used in progressively complex algorithms. This increasingly requires architecture skills that are hard to come by. With many years of experience in code generation, we live up to the challenge. We are involved in projects in Aerospace, Automotive and High-tech, focussing on fixed-point simulation and code generation, performance and integration.
On-target rapid prototyping
We quickly convert your ideas into live demos on hardware. From building models to compiling and generating code for your platform. Regardless of your purpose: from signal processing to image processing and implementation of embedded controls. Prototype on low-cost targets like Raspberry Pi or Arduino® and move to production swiftly.
For mobile platforms we prototype and deploy generated code into your own dedicated app and run it on Apple or Android devices, including accessing on-board sensors such as the video camera and accelerometer.
When your MATLAB/Simulink model is no longer just an executable specification, but becomes the source of your embedded production code, non-functional requirements like memory usage and execution speed become the highest priority.
We have extensive experience with improving execution speed while reducing the memory load of generated code, by optimizing the models without compromising functional features. Enhancing the architecture, instrumenting the model, or even allowing generation of hardware-specific code from generic blocks: we improve performance by numbers of magnitude. For example, we have helped Septentrio to level-up the performance of their AiRx2 OEM, a GNSS+SBAS receiver for precision aviation applications - check the reference story on the MathWorks website.
Integration with existing software
Integrate generated code into your application as a static- or dynamic library and run on your laptop, mobile, or embedded system. Use platform-specific libraries for maximum performance (i.e. LAPACK, FFTW or your own optimized libraries). Or generate source code for optimal readability and portability.
Adoption of a design-approach based on code generation requires explicit focus on the integration between generated and existing code. Interfacing requires careful alignment regarding data, datatypes and function prototypes. Furthermore, performance (execution speed, determinism, RAM/ROM usage) must be achieved whithin available budgets and the application may need monitoring and tuning interfaces.
We get you up to speed, from one-time integrations to fully customized building procedures. Where possible using existing Coder features, and adding additional hooks and customizations when needed. Our approach to ensure seamless integration:
- Integration of the generated-code interface
- Verification of availability of data-types and methods
- Optimization for processor speed and memory limitations
- Introduction of appropriate numerical representations (floating or fixed point)
- Incorporation of real-time data management like buffering, streaming, and pipelining
Certification & code readability
We offer support for full traceability and readability between models and generated code equivalents, by configuring correct code-generation environments, applying suitable modeling approaches, naming conventions and including review-automation of models and code.
For instance, we assisted a customer obtaining DO-178B certification for a GNSS-based precision-aviation landing system application. We used a model-based-design approach with MATLAB & Simulink to trace requirements, simulate the design, and to generate source code. As a result, the design-tests were reused in the generated C source code and key SOI-1 certification milestones were achieved.