Simulink model exported as C code =================================== In the Simulink model flow, to leverage on the automation offered by Huxelerate Utility, it is necessary to export the module from Simulink as C code, **including the generation of the HTML report**. The report called '_interface.html' is in fact used to retrieve information about: * step functions name * step functions periodicity * input/outputs type * etc... These details are used to generate the SIL wrapper (including a mock RTE) for the compilation, including example CSV files that can be generated to provide specific measures (datasets) to stimulate the execution of the step function. HPROF generation command for Simulink exported models: -------------------------------------------------------- The utility fetches the information regarding the step functions from the HTML report, that is possible to generate during the generation of the source code. In particular, the required HTML file is the one with information about the interfaces, following the name pattern `"_interface.html"`. .. code-block:: bash python hux-autosar-sil.py generate_hprof \ -is \ -I \ -I \ -c \ -c \ -v \ --aws \ -z \ -b \ -ho The HTML report is specified with the `-is` flag, while the other flags works as in the Autosar compliant scenario: `-c` and `-I` are used to specify source files, `-v` specifies the input measures and the `-\-aws` and `-b` flags are used for the generation of HPROF on AWS (see `AWS Hprof Generation`_ ) Generate a CSV template for the input stimuli --------------------------------------------------- If you want to provide stimuli for the function to be simulated, you must also submit a csv file organized as in the example below. The `-v` flag is used to specify a CSV file as input. Each column of the CSV file needs to have the variable name as first entry (header) followed by all the values, one for each timeframe. If the variable name is composite, then its name must be described as `.` as reported in the example. Example file for the analysis of the step function: .. code-block:: rtU.inport1,rtU.inport2 0.0,228.0 0.001,228.0 0.002,228.0 Template generation command: .. code-block:: bash python hux-autosar-sil.py generate_template \ -is \ -I \ -I \ -c \ -c \ -o The `-is` flag specifies the filename of the HTML module interface file to process. It is also necessary to specify the include paths and the source files required by the runnable via `-I` and `-c` flags. These are needed to let the utility infer the variables and data structures necessary for input stimulation. The generated `.csv` is the output. .. note:: Generating the template using this command is strongly recommended to avoid possible errors.