Skip to content

Improvement of the TASTE QGen integration

Angel Perez Muñoz requested to merge feature_qgen_integration into feature_bullseye

These changes fix the issues detected while creating projects using QGenC and C TASTE functions. I do not see any tests for qgen functions, I guess that it is because the machine that runs the tests does not have qgen installed. However, I have tested it in my local machine and it passes all the other tests, consequently, I would say that I have not broken anything 😄 .

The issues detected and fixed are described below:

1. Issues with MATLAB script that creates Simulink models

The autogenerated MATLAB script that creates the Simulink models with the input and output ports (i.e., PIs and RIs, respectively) had syntax problems and used deprecated commands producing warnings and errors while creating the Simulink models. The following is a list of the errors encountered:

  1. The find_system function was called with operate_lift as the actual argument of the system name parameter. Obviously, this function had to be invoked with the name of the system being analyzed.

  2. The block parameters ‘DataType’ and ́OutDataType ́ have been deprecated (OutDataType since MATLAB R2007B) and it is used with the set_param function, producing warnings when the script is executed.

  3. The index used to iterate over the output ports does not start with 0, producing sometimes out of bound accesses to an array, which in turn stops script execution.

The solution from this branch creates the script which generates the Simulink models’ skeletons without errors. This way, the user will be able to edit the models with no problems and won’t have to analyze the script and fix it manually.

2. Automatic source code generation from QGen[C/Ada] TASTE functions

The objective of this improvement is to automate source code generation from QGenC and QGenAda Simulink models, hiding the code generation process from the user and preventing them to the invoke qgen command.

3. Support for multiple PIs in QGen[C/Ada] TASTE functions

QGen[C/Ada] and Simulink TASTE functions’ component models are limited compared to other types of TASTE functions. The objective is to extend the component model of Simulink or QGen[C/Ada] functions, currently these only support one synchronous PI (protected or unprotected).

4. Limited number of input and output parameters of Simulink and QGen[C/Ada] TASTE functions

The autogenerated MATLAB script that creates the Simulink models only support four input and four output ports. The objective from this improvement is to generate the skeletons independently of the number of input or output parameters and to allow the user to create Simulink/Qgen components with no restrictions on the number of parameters.

Merge request reports

Loading