The QGen Debugger

QGen Debugger is a unique tool that supports the execution of code generated using Simulink models, either on the host (SIL) or on an embedded target machine (PIL), while providing full programmer control through model-level breakpoints and signal-value displays. The tool can help bridge the gap between control engineering and software engineering.

The code generated by QGen can be interfaced with hand-written code. Both generated and hand-written code can be debugged together and QGen Debugger will display the model and its signal values whenever it reaches sections of generated code..

QGen debugger also offers means to alter the values of signals and provides easy ways to alter the execution of the program and force the model to reach a certain state at any point of the execution.

All signal values can be logged and traced back to the original Simulink block inside Matlab to help system engineers resolve unexpected behaviors.



Observe the evolution of model behavior at code level granularity

The Simulink model execution is kept in sync with the code execution using the traceability information built by QGen to link the generated code and the original model constructs. This means that it is possible to analyze the model behavior while stepping through Ada/C code or even assembly code.

Debug code running on the host, remote target or a local emulator

Using GPS’s built-in toolchain and target capabilities you can directly (cross-)compile and run the code on a supported platform while debugging the model using the execution behavior on the target.

Display a model and browse it within GPS

The Simulink model can be displayed within its own GPS tab, as a read-only view showing all Simulink blocks, subsystems and references. The GPS Outline view allows to browse the model using a tree view of all subsystems and references or by directly clicking on blocks.

Generate the debugging environment from Matlab using Simulink signal generator blocks

It is possible to define the inputs provided to the model from Matlab using any Simulink block or even other Simulink models. QGen Debugger will record all inputs provided to the model and will create a debugging session where the same inputs are fed to the generated code. The behavior of the model and the generated code with these inputs can then be observed and debugged in sync.

Insert a breakpoint on a given block or model reference

Just as you can insert a breakpoint in the source code, QGen Debugger gives you the possibility to insert a breakpoint directly from the model view by clicking a particular block of interest. The execution will subsequently pause when reaching the code corresponding to that block.

Display values for signals dynamically

By keeping exact traceability between code variables and their corresponding signals in the Simulink model QGen Debugger can show signal values as they are updated. Blocks that have been executed will be greyed out to help determine which signal have been updated and which still have the values of the previous computation cycle.

Change signal values during the execution

QGen Debugger is a powerful tool to analyze a specific behavior for a given Simulink Model. By changing signal values for one or more iterations it is easy to force the model into a desired state of interest to the debugging session.

Log values in a table, and highlight corresponding blocks in Simulink

All or a portion of signal values obtained during a debug session can be stored in an html file. When opening this file in Matlab, it provides links to the corresponding source block of each signal. This helps trace problems identified at the code level to corresponding model-level blocks and investigate them in Simulink.

Analyze model behavior when interfaced with handwritten code or code generated from other models

The QGen Debugger is a unique solution to study the way a Simulink model behaves when connected to other pieces of code. It is possible to debug an entire program comprising various handwritten and auto-generated codebases. QGen Debugger will automatically display the model view each time a code section generated by QGen is reached.