========================= QGen Toolset Presentation ========================= QGen is a Code Generation toolsuite for Simulink® and Stateflow®. Its primary function is code generation from Simulink® and Stateflow® model to C or Ada/SPARK code. The toolset also includes model-level and S-Function debugging with the QGen Debugger add-on. .. image:: ../img/qgen_toolset.png QGen is officially supported for MATLAB® R2015b up to R2020b. The toolset most likely works on older and more recent versions of MATLAB but there is no guarantee. We continue to support new MATLAB versions as they come out. The :ref:`qgen_code_generator` section presents and details the usage of the QGen Code Generator. The QGen Code Generator is being qualified at *Tool Qualification Level 1*, which is the highest level of qualification recognized by the FAA and *DO-178C* standard. For more information about the credits that can be claimed by a project using the Qualified tool and pricing information please visit the https://www.adacore.com/qgen/enterprise webpage or contact us through the ticket system within GNATtracker or by sending an email with your account number in the subject #XXXX to qgen@adacore.com. The supported subset of QGen is made of 120 Simulink blocks with the majority of the settings available for each block, and a set of Stateflow features that are essential for embedded software. A variety of mechanisms for refining the model and tuning code generation is supported such as Simulink.Signal, Parameters, workspace containers (data dictionaries, model workspace), masks, Storage classes ... The detail of the QGen supported subset can be found in the :ref:`constraints` section. QGen also comes with full IDE integration, with GNATStudio being used to provide a unique model level debugger, allowing to quickly compile the generated code and analyze its behavior in order to find modeling issues, see the :ref:`debugger_doc` and :ref:`debugger_tutorial` sections. This also comes with the capability to build and debug S-Functions for C and Ada as well as debugging them while they are simulated in Simulink, see :ref:`qgen_sfun_block`. .. Finally, the *QGen Model Verifier* is part of the QGen Toolset, .. relying on AdaCore static analysis technology. It automatically generates and .. analyzes Ada source code and propagates potential violations like division by .. zero or overflow to the model in Simulink. This technology .. is still maturing and requires the experimental flags to be activated before .. being visible in MATLAB. This is detailed under the .. :ref:`qgen_verifier` section.