Note: The following post was originally posted at: https://blogs.oracle.com/startup/post/developing-iot-arm
In an increasingly connected world, technologies like Internet of Things (IoT), 5G, Machine learning (ML) and Artificial Intelligence (AI) are redefining the industry and the way we work and live.
How it works
Arm Virtual Hardware provides models of Arm-based processors, systems, third party hardware in the cloud. The AVH model now featured on OCI incorporates the ArmCortex-M55, Arm’s most AI-capable Cortex-M processor, and Arm Ethos-U55, a configurable and efficient microNPU. It runs as an application on OCI, including the simulation of memory and peripherals.
It is available on OCI Free Tier, where you can deploy up to
4 cores and
24GB RAM in a single virtual machine.
One of the things that makes Cortex-M55 processor unique is that it provides a unified software development flow. Developers can write traditional embedded code and mix it with DSP code as well as machine learning code. By adding the scalability of the cloud, embedded developers can now adopt more modern and agile development methodologies, like continuous integration – continuous delivery (CI/CD) and use MLOps to simplify the model evaluation and the system validation.
Let’s get started
Follow these steps to launch an Arm instance on Oracle Cloud Infrastructure by using the AVH community image:
Step 1. Deploy Arm Community Image
1. Log in to the Oracle Cloud Infrastructure Console.
2. From the navigation menu, select Compute tab, and then select Instances.
2. Choose a compartment in which you have permission to work.
4. In the Create Instance dialog box, provide the following information:
- Enter a name for the instance:
- Choose an availability domain:
- Change Image, and select
Community Imagefrom the
- Select the
AVHimage to use.
Change Shape. Select
Virtual Machineas the shape type. Choose Ampere A1 instances:
- Select the number of
memory. In our case
- Choose a
- Choose a
Public IP address.
- Choose to upload or paste SSH keys (public keys).
After the instance is launched, it appears in the Console.
6. Click the instance name to see the public IP address of the instance. The
Image field on the right side shows that this instance is based on the AVH custom image.
Step 2. Connect to the AVH custom image instance
Connect to the new instance by using its public IP address. For example:
$ssh -i <private_SSH_Key> ubuntu@<public_IP_AVH_Instance>
Step 3. Verify that AVH is installed on the new instance.
Arm VHT, Arm Compiler and
build utilities files are available in the
/opt directory, reserved for the installation of external or third party application software packages. The CMSIS packs are installed at
Step 4. Test AVH is working.
We will run a program that analyzes an audio input with a voice recognition model implemented with TensorFlow Lite for Microcontrollers. The model will detect 2 keywords – yes and no and will print them into a serial interface with their time stamps in the audio stream. Additional info, like CPU stats will be provided.
For setup, please follow the instructions from GitHub.
1. Clone the Arm Git repository using your github personal access token.
$git clone https://<github_user>:<github_token> @github.com/ARM-software/AVH-TFLmicrospeech
2. Access the Corstone FVP folder and install the packlist that contains Arm drivers, the CMSIS build, and Tensorflow packages:
$ cd VHT-TFLmicrospeech/Platform_FVP_Corstone_SSE-300_Ethos-U55/
$ cp_install.sh packlist
3. Compile with CMSIS-Build using microspeech.Example.cprj project.
$ cbuild.sh microspeech.Example.cprj
4. Run the example. You will see it takes less than one minute and will exit:
Fast Models [11.16.14 (Sep 29 2021)]
Copyright 2000-2021 ARM Limited.
All Rights Reserved.
telnetterminal0: Listening for serial connection on port 5000
telnetterminal1: Listening for serial connection on port 5001
telnetterminal2: Listening for serial connection on port 5002
telnetterminal5: Listening for serial connection on port 5003
Ethos-U rev afc78a99 --- Aug 31 2021 22:36:26
(C) COPYRIGHT 2019-2021 Arm Limited
ALL RIGHTS RESERVED
WARNING: This run of FastModels is using a prototype translator that is for evaluation purposes only.
Heard yes (146) @1000ms
Heard no (145) @5600ms
Info: Simulation is stopping. Reason: Cycle limit has been exceeded.
Info: /OSCI/SystemC: Simulation stopped by user.
[warning ][main@0][01 ns] Simulation stopped by user
--- cpu_core statistics: ---------------------------------------------------
Simulated time : 7.680001s
User time : 53.521364s
System time : 0.003727s
Wall time : 53.523797s
Performance index : 0.14
cpu_core.cpu0 : 14.35 MIPS ( 768000000 Inst)
Combining OCI Ampere A1 compute instances with Arm Virtual Hardware, developers have the opportunity for rapid IoT device development, leveraging the level of innovation and diversity while still preserving and embracing software development.
If you want to learn more about OCI Ampere instances and AVH, sign up for an Oracle Cloud Infrastructure FREE tier account and start testing today. To find out more, please check the following resources: