Model-Based Design abstracts integrated software development: Q&A with Jim Tung, MathWorks Fellow
Jim Tung describes how Model-Based Design (MBD) brings a higher level of abstraction to Integrated Development Environments (IDEs).
Integrated Development Environments (IDEs) have become de facto tools for software development, leading to new approaches that provide programmers with higher levels of abstraction. Jim Tung, MathWorks Fellow, details how the company’s Simulink tools can integrate with traditional code-based IDEs for optimized code development and analysis from a high-level, Model-Based Design (MBD) environment.
What is the state of the Integrated Development Environments (IDEs) market right now, and what are the potential growth areas?
TUNG: An area that continues to grow rapidly – both in capabilities and in market adoption – is the development environment for Model-Based Design (MBD). Unlike traditional IDEs that operate at the code level, this IDE leverages models and automatic code generation to enable the algorithm and software developers to work at a higher level of abstraction. At the same time, the model-based IDE should integrate tightly with code-based IDEs to enable developers to analyze and optimize on-target code performance while maintaining design information in higher level models.
In terms of MBD, the earliest adopters, even in the late 1990s, were for control system design. Graphical block diagrams for closed-loop controls were very familiar to many embedded system engineers using closed-loop control systems (Figure 1). With the introduction of finite state machines and related concepts, model usage has expanded to new areas requiring the use of complex logic, such as displays, communications, and audio signal processing.
Fundamentally, [MBD] models execute on the host and thus serve as functional specifications, not embedded implementation. Execution timing, stack usage, memory access, and the like, are only provided by on-target execution or perhaps via emerging, highly accurate host-based target simulators.
What is MathWorks’ play in the IDE space?
TUNG: The Simulink product family from MathWorks provides a comprehensive and integrated development environment for MBD, including modeling, simulation, analysis, automatic code generation, profiling, and verification tools. It includes functionality similar to that of code-based IDEs, except the tools operate on high-level models rather than low-level code. For example:
- Debugging tools, including setting breakpoints and static analysis
- Profiling tools
- Design advisors
- Tools to enforce modeling conventions similar to coding conventions
- Integration with source control and version control systems, but for model files rather than source-code files
- Support for certification standards, such as DO-178C/DO-331 for aircraft; ISO 26262 for automotive; IEC 61508 for electrical/electronic/programmable systems (including its derivatives such as EN 50128 for railway and IEC 62304 for medical devices); and MISRA C
In addition, the Simulink product family integrates with traditional code-based IDEs for on-target debugging and profiling, compiler optimization, project management, and other functionality (Figure 2). Integration is provided via a flexible Application Programming Interface (API) to support custom toolchains:
Custom toolchains can include compiler, linker, archiver, and other prebuild or post-build tools that download and run the executable on the target hardware.
Simulink can leverage the IDE for program management and interaction and debugging the running code. For example:
Simulink integrates with code-based IDEs for Processor-in-the-Loop (PIL) execution to analyze the generated code running on the target processor. In addition, this integration enables the developer to collect execution time and stack usage metrics from the processor and analyze it directly in MATLAB, including:
Being that MATLAB is considered a high-level language itself, how does it integrate with multiple other languages, or IDEs such as Eclipse?
TUNG: MATLAB and Simulink are high-level languages, and they include IDE features to support that high-level analysis, design, and modeling. At the same time, since MATLAB and Simulink are used to design functionality that will be implemented in embedded systems, they generate and integrate implementation languages such as C/C++, VHDL/Verilog, and IEC 61131 structured text, hence providing development and verification support for a broad range of microcontrollers (MCUs), DSP chips, FPGAs, and industrial controllers.
Code generated from Simulink and Embedded Coder can compile and execute smoothly with the Eclipse C IDE. This enables the developer to design, simulate, and automatically generate code from the high-level Simulink environment while using the Eclipse IDE to build, interact with, and debug the executable program running on the target processor, including execution time profiling and stack profiling.
The Simulink product family supports automatic code generation for:
- VHDL and Verilog hardware description languages for FPGA and ASIC synthesis
- IEC 61131-3 Structured Text for Programmable Logic Controllers (PLCs)
In addition, existing C/C++ can be integrated in the Simulink model as well as the generated code. Furthermore, the developer may specify code replacement libraries so that the code generator leverages application-specific implementations of functions and operators.
https://twitter.com/MATLAB www.linkedin.com/company/the-mathworks_2 https://plus.google.com/+matlab/posts