Automotive Code Generation

Production code generation converts models into production code for electronic control units (ECUs) in seconds or minutes instead of weeks or months, which has enabled OEMs and suppliers to complete complex ECU projects in 18 months, and deliver AUTOSAR and ISO 26262 compliant software on-time.

With millions of lines of code generated from Embedded Coder® in ECUs today, MathWorks continues to develop technologies that production organizations use for:

  • Software architecture and design, including AUTOSAR
  • Production code generation  
  • Production code verification, including software-in-the-loop and processor-in-the-loop tests
  • ISO 26262 certification

“The Two-Mode Hybrid powertrain took Model-Based Design to a new level within GM. This project provided the confidence and experience we needed to apply MathWorks tools for Model-Based Design on other large-scale global engineering programs.”

Kent Helfrich, General Motors

Software Architecture and Design

Simulink® and Stateflow® are used by OEMs and suppliers to develop propulsion, body, automated driving, and other automotive system designs. Using executable specifications instead of static diagrams accelerates design and enables early verification and validation. Key architecture and design features supported include AUTOSAR modeling and floating- to fixed-point data conversion using Fixed-Point Designer.

Model and simulate software applications.

SIMD code generation from Simulink model.

Code Generation and Integration

Embedded Coder generates embedded code from design models. ANSI/ISO C or C++ is generated by default for any device. In addition, code is easily optimized for specific MCUs and DSPs using flexible APIs. Integrating handwritten code during simulation or code generation is supported.

Production Code Verification

Software-in-the-loop (SIL) and processor-in-the-loop (PIL) testing form the cornerstone of production code verification by automating execution and comparison of code results with reference model behavior. Creating an environment to test your specific ECU is supported using PIL APIs. Bidirectional linking of model and code allows you to trace each line to every block and state in the model, aiding debugging and verification. You can author, execute, review, and organize tests and test suites using Simulink Test. You can calculate structural coverage of the generated code using Simulink Coverage to measure testing completeness. 

ISO 26262 Certification

ISO 26262 is the primary automotive functional safety standard. TÜV SÜD has certified Embedded Coder to ISO 26262, including ASIL D. The TÜV SÜD certificates and certification reports are available in the IEC Certification Kit. TÜV SÜD certifications are based on application-specific verification and validation workflows that are also provided in the IEC Certification Kit.