Implement an example Virtual Peripheral with Arm Virtual Hardware
Introduction
Create a peripheral using Virtual Input/Output (VIO)
Next Steps
Implement an example Virtual Peripheral with Arm Virtual Hardware
Arm Virtual Hardware (AVH) supports Virtual Interfaces which can be used to simulate real world peripherals and stimuli.
Before you begin
Launch the Arm Virtual Hardware AMI in your AWS account. For full instructions refer to the Arm Virtual Hardware install guide .
The example used here makes use of the Tkinter Python interface to Tcl/Tk, and can be installed in the AVH terminal with:
sudo apt install -y python3-tk
Clone the repository
In your AVH terminal, clone the example project repository, and navigate into the leds_example directory.
git clone https://github.com/Arm-Examples/AVH-Virtual-Peripherals
cd AVH-Virtual-Peripherals/leds_example
Build and run the example
A makefile is provided to build the example project. To build the example:
make
You can now run the executable on the AVH FVP by executing the following script:
./run.sh
You can interact with the Virtual LEDs. If they’re not displayed you may need to implement a VNC connection to the AVH instance.
Understand the example
The Virtual Hardware is launched with the -V option which specifies the Python implementation of the peripheral.
The Python scripts implement the VIO Python interface to communicate with the Virtual Hardware application.
In the application, signals are passed via the VIO API to/from the virtual peripheral.