Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion ARM.AVH_FVP.pdsc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package schemaVersion="1.7.56" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="https://raw.githubusercontent.com/Open-CMSIS-Pack/Open-CMSIS-Pack-Spec/v1.7.56/schema/PACK.xsd">
<name>AVH_FVP</name>
<vendor>ARM</vendor>
<description>Virtual Interfaces for Arm FVPs</description>
<description overview="Overview/Overview.md">Virtual Interfaces and Developer Resources for Arm FVP Simulation Models</description>
<url>https://github.com/ARM-software/AVH/</url>
<repository type="git">https://github.com/ARM-software/AVH.git</repository>
<license>LICENSE</license>
Expand All @@ -16,6 +16,12 @@
</release>
</releases>

<requirements>
<packages>
<package vendor="ARM" name="CMSIS" version="5.9.0-0"/>
</packages>
</requirements>

<conditions>
<condition id="VIO">
<description>Virtual I/O</description>
Expand Down
15 changes: 15 additions & 0 deletions DoxyGen/overview/src/images/camara.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions DoxyGen/overview/src/images/datafile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DoxyGen/overview/src/images/img_src.pptx
Binary file not shown.
11 changes: 11 additions & 0 deletions DoxyGen/overview/src/images/microphone.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions DoxyGen/overview/src/images/screen.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions DoxyGen/overview/src/images/speaker.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Overview/Examples.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions Overview/Overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Introduction

The AVH_FVP software pack delivers comprehensive developer resources, examples, and reference implementations for [Arm Fixed Virtual Platforms (FVP)](https://www.arm.com/products/development-tools/simulation/fixed-virtual-platforms) with **Virtual Interfaces**.

FVP simulation models of [Arm Cortex-M reference platforms](https://arm-software.github.io/AVH/main/simulation/html/index.html) run directly on your host system (Windows or Linux), providing accurate virtual hardware targets for firmware validation. FVP simulation models are included in [Keil MDK](https://www.keil.arm.com/) and integrate seamlessly with Keil Studio, command-line environments, and [CI/CD workflows](https://github.com/Arm-Examples/.github/blob/main/profile/CICD.md).

## Virtual Interfaces

[**Virtual Interfaces**](https://arm-software.github.io/AVH/main/simulation/html/index.html#Virtual_Interfaces) bridge your firmware's I/O with host system resources, enabling powerful test automation and flexible development workflows:

- **VIO** - Virtual I/O for LEDs, switches, and simple peripheral controls.
- **VSI** - Virtual Streaming Interface for high-throughput data streaming.
- **VSocket** - BSD socket connectivity for network protocol testing.

## VSI Implementations

The **Virtual Streaming Interface (VSI)** provides **8 independent channels** (VSI0 - VSI7) for flexible data streaming between firmware and host system. Each channel connects to a Python script that implements the host-side peripheral behavior. The AVH-FVP software pack contains reference implementations for firmware drivers (using the [CMSIS-Driver vStream](https://arm-software.github.io/CMSIS_6/latest/Driver/group__vstream__interface__gr.html) API) and corresponding Python scripts.

- **VSI0-1**: Audio streaming (input/output) with support for multiple formats and sample rates.
- **VSI2**: Sensor data streaming (accelerometer, gyroscope, temperature, and more).
- **VSI3**: Used in [SDS Framework](https://www.keil.arm.com/packs/sds-arm/overview/) for data streaming.
- **VSI4-7**: Video streaming channels supporting various color formats and frame rates.

The Python-based peripheral scripts enable rapid prototyping and testing without physical hardware. Applications can use multiple VSI channels simultaneously to simulate complex multi-peripheral systems, making it ideal for ML model validation, sensor fusion testing, and signal processing application development.

## Examples

The AVH-FVP pack includes ready-to-run examples:

- **Hello** - Simple application that demonstrates FVP setup and debug output. Ideal starting point for new projects.
- **vStream_Audio** - Audio streaming demonstration using vStream API for audio input/output (VSI0-1). Captures audio samples and streams them through the audio output with configurable sample rates, bit depths, and channels. I/O via data files or host system peripherals.
- **vStream_Video** - Video streaming demonstration using vStream API for video input/output (VSI4-5). Captures video frames and displays them with configurable resolution and color formats. I/O via data files or host system peripherals.

These examples are configured for the [FVP Corstone platforms (SSE-300, SSE-310, SSE-315, SSE-320)](https://arm-software.github.io/AVH/main/simulation/html/index.html) and work out-of-the-box with pre-configured FVP simulation settings. They can be built using CMSIS-Toolbox or Keil Studio.

With a [compatible Software Layer: Board)](https://open-cmsis-pack.github.io/cmsis-toolbox/build-overview/#software-layers) the examples can be tested on FVP simulation models or physical hardware boards.

![vStream Examples](Examples.png "vStream Audio and Video Example")
## Getting Started

1. **Install the pack**: Add the pack `ARM::AVH_FVP` to your development environment.
2. **Run Hello example**: Build and run the Hello example on your chosen FVP Corstone platform to verify setup.
3. **Explore vStream examples**: Try vStream_Audio or vStream_Video example to experience Virtual Interfaces in action.

## Additional Resources

- [**Documentation**](https://arm-software.github.io/AVH)
- [**Arm-Examples that use FVP simulation**](https://github.com/search?q=topic%3Afvp+org%3AArm-Examples+fork%3Atrue&type=repositories)
91 changes: 91 additions & 0 deletions interface/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Virtual Interfaces

**Virtual Interfaces** enable the firmware application that runs on the FVP simulation model to interact with external resources on the host computer.

The FVP simulation models support the following Virtual Interface types:

- **VIO** interface controls simple binary state I/O, such as LEDs and switches (maps to [CMSIS-Driver VIO](https://arm-software.github.io/CMSIS_6/latest/Driver/group__vio__interface__gr.html)).
- **VSocket** interface for IP socket connectivity (maps to [IOT-Socket](https://www.keil.arm.com/packs/iot_socket-mdk-packs)).
- **VSI** interface for 8 independent data streaming channels (maps to [CMSIS-Driver vStream](https://arm-software.github.io/CMSIS_6/latest/Driver/group__vstream__interface__gr.html)).

The folder `interface` contains:

```txt
interface/
├── include/ # C header files for firmware (arm_vio.h, arm_vsi.h, arm_vsocket.h)
├── python/ # VSI Python template scripts to implement host-side peripheral behavior for VSI
├── audio/ # VSI Audio interface implementation (legacy, use vstream_audio instead)
├── video/ # VSI Video interface implementation (legacy, use vstream_video instead)
├── sensor/ # VSI Sensor interface templates and examples
├── vio/ # VIO implementation for FVPs
├── vsocket/ # VSocket implementation
└── vstream/ # VSI VStream interface for data streaming
```

## VSI Channel Mapping

The VSI channels (VSI0 .. VSI7) for data streaming use Python scripts to interact with external resources.

The folder `python` contains vanilla VSI Python template scripts that provide the basic framework for implementing peripheral behavior.
These templates serve as starting points for creating custom VSI peripheral implementations.

- `arm_vsi0.py` - `arm_vsi7.py`: Template implementations for all 8 VSI channels
- `arm_vio.py`: Template for Virtual I/O interface

The following table shows how VSI channels are assigned in the provided implementations:

| VSI | Folder | Purpose | Description | Port |
|:---:|-----------|------------------------|------------------------------------------------------|------|
| 0 | `vstream` | Audio Input | vStream Audio In - streams audio data into FVP | 6000 |
| 1 | `vstream` | Audio Output | vStream Audio Out - streams audio data from FVP | 6001 |
| 2 | `sensor` | Sensor Interface | Generic sensor data streaming (accelerometer, etc.) | - |
| 3 | - | Available | Used in SDS Framework for data streaming | - |
| 4 | `vstream` | Video Input | vStream Video In - streams video frames into FVP | 6004 |
| 5 | `vstream` | Video Output | vStream Video Out - streams video frames from FVP | 6005 |
| 6 | `vstream` | Video (Additional) | Additional video channel for multi-stream scenarios | 6006 |
| 7 | `vstream` | Video (Additional) | Additional video channel for multi-stream scenarios | 6007 |

### Implementation Details

**vStream Implementations** (`vstream/` folder):
- **Audio Channels (VSI 0-1)**: Implement CMSIS-Driver vStream_AudioIn and vStream_AudioOut interfaces
- Support various audio formats (8/16/24/32-bit samples, mono/stereo, multiple sample rates)
- Connect to system audio devices or audio files (WAV format)
- Use audio servers for inter-process communication with the FVP

- **Video Channels (VSI 4-7)**: Implement CMSIS-Driver vStream_VideoIn and vStream_VideoOut interfaces
- Support multiple color formats (Grayscale, RGB888, BGR565)
- Configurable frame dimensions and frame rates
- Connect to system cameras, video files, or display windows
- Use video servers for efficient frame data transfer

**Sensor Implementation** (`sensor/` folder):
- **VSI 2**: Generic sensor interface with templates for various sensor types
- Supports accelerometer, gyroscope, temperature, and other sensor data
- Flexible data injection from files or algorithmic generation
- Configurable sampling rates and data formats

**Legacy Implementations**:
- `audio/` folder contains legacy audio implementations (replaced by vstream)
- `video/` folder contains legacy video implementations (replaced by vstream)

### Usage Guidelines

When developing applications using VSI channels:

1. **Choose the appropriate channel** based on your peripheral type
2. **Start from templates** in the `python/` folder for new custom peripherals
3. **Multiple instances**: Applications can use multiple VSI channels simultaneously for complex system simulations

### Custom Implementations

For custom peripherals, you can reassign VSI channels as needed:

- Copy and modify template scripts from `python/` folder.
- Configure the firmware to use the corresponding VSI base address.
- Implement custom peripheral behavior in the Python script.

This flexibility allows you to simulate virtually any memory-mapped peripheral with streaming data requirements.



Loading