S-function TLC coverage for Rapid Accelerator

1 Ansicht (letzte 30 Tage)
Petr75661
Petr75661 am 1 Nov. 2021
Kommentiert: Petr75661 am 9 Nov. 2021
A TLC file generated by the Legacy Code Tool contains separate sections for Rapid Accelerator and for Simulink Coder. The TLC Coverage feature allows me to measure the coverage of the TLC sections for the Simulink Coder but not the sections for the Rapid Accelerator.
How can I measure the TLC coverage for the Rapid Accelerator?

Antworten (1)

Sreeranjani Sekar
Sreeranjani Sekar am 9 Nov. 2021
Follow the steps to have tlc coverage for model simulated in rapid accelerator mode.
  • Open the required codegen compatible model
  • Set simulation mode to Rapid Accelerator
  • set_param(bdroot,'TLCDebug','on')
  • set_param(bdroot,'TLCCoverage','on')
  • Start Codegen
  • On command window debugging session will start type 'continue' to continue
  • In codegen folder (eg model_ert_rtw) you will see .log file for each of the executed tlc and execution count for each tlc line
  1 Kommentar
Petr75661
Petr75661 am 9 Nov. 2021
Codegen with "TLCCoverage" does not generate coverage info for the Rapid Accelerator sections of the TLC file.
0: %% Function: InitializeConditions =========================================
1: %function InitializeConditions (block, system) Output
2: %if IsModelReferenceSimTarget() || CodeFormat=="S-Function" || ::isRAccel
0: %assign par1 = CAST("Real",Parameter[0].Value[0])
0: %assign par2 = CAST("Real",Parameter[1].Value[0])
0: MyFuncInit_wrapper_InitializeConditions(%<par1>, %<par2>);
0: %else
2: %assign par1 = CAST("Real",Parameter[0].Value[0])
2: %assign par2 = CAST("Real",Parameter[1].Value[0])
2: MyFuncInit(%<par1>, %<par2>);
0: %endif
0: %endfunction

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Simulink Coder finden Sie in Help Center und File Exchange

Produkte


Version

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by