This section gives an overview on how to use the Arm Fixed Virtual Platforms (FVPs) in AVH context.
The FVP simulation models in AVH correspond to a subset of Arm Fast Models Fixed Virtual Platforms with extensions for Virtual Interfaces. They can be accessed in cloud-native and desktop environments as explained in Infrastructure chapter. The table below lists the available models:
Additionally following FVP models are provided without support of Virtual Peripherals:
Simulation Model | Processor Core | Overview Description |
---|---|---|
FVP_Corstone-1000 | Cortex-A35, Cortex-M0+, Cortex-M3 | Arm Corstone-1000 for MPS3 (AppNote AN550) |
The FVP models can be executed from command prompt by using the model name followed by the model options. Development tools may abstract the execution with GUI, but the underlying approach stays the same.
Below is an example of the command for running a program on the FVP model for Corstone-300 with Ethos-U55 in Linux environment:
Where:
VHT_Corstone_SSE-300_Ethos-U55
is the simulation model name. Note that on Windows the executable files shall be used, for example VHT_Corestone_SSE-300_Ethos-U55.exe
.-a
(or --application
) option specifies the application binary file to run on the model (Objects\microspeech.axf
in this example).-f
(or --config-file
) specifies the configuration file for the simulation model (fvp_config.txt
in this case). See Model Configuration.-V
(or --v_path
) specifies the path to python scripts for Virtual Interfaces ("..\VSI\audio\python"
here).--stat
instructs to print run statistics on simulation exit.--simlimit
specifies the maximum number of seconds to simulate.The availalable command options can be listed using the --help
option. See chapter FVP-command-line-options in the FVP Reference Guide for additional documentations.
The operation of the FVP models can be configured at start-time by providing following command-line options:
-C
(or --parameter
) option to configure individual parameters.-f
(or --config-file
) followed by path to the text file with configuration parameters.The configuration parameters are model-specific and follow syntax instance.parameter= <value>
, where instance
specifies a simulated instance, such as CPU, interface, bus, memory, peripheral, etc. and can be also hierarchical.
All parameters available for a target model including default setting and brief description can be obtained with the command option -l
(or --list-params
). Because of the large number of parameters, it is convinient to print them into a text file. For example:
In a simple case the content of the configuration file could be as shown below for VHT_Corstone_SSE-300 targets:
Where:
Note that instances implemented in the model can be obtained with the command option --list-instances
that returns instance names and corresponding Fast Model component type, version and brief description. Section Fast Models components explains all the components available with FastModel technology and can be used for finding more information about a specific instance in the FVP.
For additional details also see chapter Configuring the model in the Getting Started with Fixed Virtual Platforms Guide.
Below are some useful tips for using FVP models in common AVH scenarios.
Embedded applications typically run with an infinite loop that ensures continuous program execution. But for executing regression tests as part of Continuous Integration (CI) workflows it is often required that program execution is stopped after a test is completed, so that the next test can be started.
FVP models have shutdown_on_eot
parameter that enables simple implementation of such program exit. The parameter should be set in the Model Configuration, for example for VHT_Corstone_SSE-300:
And then to trigger the shutdown, a EOT (ASCII 4) symbol can be transmitted to the corresponding serial interface from the program. The code below demonstrates an example, where the execution is stopped after target execution count is achieved. In this implementation the STDIO is assumed to be retargeted to the UART0:
FVP simulation models are targeted to software development and functional testing, and are not suitable for accurate performance comparisons on the CPU level. However, they can be well used to analyze timing on the program level, such as for scheduling RTOS tasks, detecting deadlocks, but also identifying overall performance trends.
Following mechanisms and settings can be used for timing control and measurements:
--stat
to print the execution statistics on simulation exit. Here is an example of such statistics output: cpi_div
and cpi_mul
.core_clk.mul
on Corstone-300.FASTSIM_DISABLE_TA
set to 0).Semihosting is a mechanism that enables code running on an FVP model to directly access the Input/Output facilities on a host computer, such as console I/O and file I/O.
This is often useful for testing and debugging your software when use of HW I/O interfaces in the model is not strictly required or would unnecessary complicate the program.
By default semihosting is disabled in FVPs and can be enabled with semihosting-enable
configuration parameter on the CPU instance . For example for VHT_Corstone_SSE-300/310:
and for VHT_MPS2_Cortex-M4:
Semihosting can be useful in various scenarios with some of them listed below:
stdio.h
functions. This for example allows to bypass message redirection via UART.