メインコンテンツ

Configuration for Monitor & Tune and PIL for Renesas RA Microcontrollers

Monitor and Tune (External mode)

Monitor and Tune enables you to tune model parameters and evaluate the effects of different parameter values on model results in real-time. When you change parameter values in a model, the modified parameter values are communicated to the target hardware immediately. You can monitor the effects of different parameter values by viewing the output signals on Sink blocks or in the Simulation Data Inspector (SDI). This helps you find the optimal values for performance. This process is called parameter tuning.

Monitor and Tune accelerates parameter tuning. You do not have to rerun the model each time you change the parameters. You can also use Monitor and Tune to develop and validate your model using the actual data and hardware for which it is designed. This software-hardware interaction is not available by solely simulating a model.

Processor-in-the-Loop (PIL)

Executes generated code on the Renesas RA processor while the test harness and reference model run on the host. This workflow validates numerical equivalence and timing behavior of generated code before system-level integration.

Prepare a Simulink Model for Monitor & Tune (External mode) or PIL

To prepare your model for Monitor & Tune (External mode) or PIL with serial communication.

  1. In the Simulink® model, select Modeling > Model Settings.

  2. In the Configuration Parameter dialog box, click Hardware Implementation.

  3. Set the Hardware board parameter to Renesas RA6 Based.

    The parameter values under Hardware board settings are automatically populated to their default values.

  4. Select External Mode tab.

    When Renesas RA6 Based is selected as hardware board, Communication interface is XCP on Serial.

    External mode

  5. Ensure that you select the Verbose check box to view the external mode execution progress and updates in the Diagnostic Viewer or in the Command Window.

  6. Select the Set logging buffer size automatically parameter to automatically set the number of bytes to preallocate for the buffer in the hardware during simulation. By default, the Set logging buffer size automatically parameter is selected. If you clear this parameter, Logging buffer size (in bytes) parameter becomes available, where you can manually specify the memory buffer size for XCP-based External mode simulation.

  7. Go to Connectivity and select r_sci_b_uart.

    Enter the COM Port number. To find the COM port number, check the Device Manager on your PC.

    Connectivity

  8. Use the Renesas RA Smart Configurator to link your Simulink model and enable peripheral configuration and code generation for your board. The Renesas RA Smart Configurator is a graphical desktop application that enables you to configure on-chip peripheral drivers, middleware, and board support packages for Renesas RA MCUs. Based on your configuration, it automatically generates the necessary driver code. You can create a new configuration or use an existing one. For more information on RA Smart Configurator, see RA Smart Configurator.

    For the selected UART, ensure that the required settings are configured in RASC project file.

    Go to Build options and click Browse to select an existing Renesas RA Smart Configurator project file. To create a new project, click Create..

    RASC file

  9. If creating a new project:

    RASC file

    • Specify a project name (avoid spaces).

    • Choose a folder to save the project.

    • Select the appropriate Renesas RA hardware

    • Click Apply and then OK.

  10. Click Apply and then OK to close the Model Configuration Parameters dialog box.

  11. Specify the corresponding COM port that the target hardware uses.

    To see the list of available COM ports on your computer, select Start > Control Panel > Device Manager > Ports (COM & LPT).

    COM5

See Also

Topics