4.0.0
ST Edge AI Core for ISPU


ST Edge AI Core

ST Edge AI Core for ISPU


for ISPU target, based on ST Edge AI Core Technology 4.0.0



r1.3

Overview

ST Edge AI Core supports the ISPU, an ultralow-power, high-performance programmable core embedded inside ST’s sensors (https://www.st.com/content/st_com/en/ecosystems/MEMS-Sensors-Ecosystem-for-Machine-Learning.html).

For most topics on how to use ST Edge AI Core, you can refer to the common (not target specific) articles in this documentation. In addition, you can find some articles specific for the ISPU:

In the remainder of this article, some ISPU specific extensions to the command line of ST Edge AI Core are described.

All commands extension

Specific options

--device

The option is mandatory (except for the supported-ops command) and takes as argument the name of the sensor embedding the ISPU to target. Possible values are:

  • ism330is
  • lsm6dso16is
  • imu_22
  • iis3dwb10is

The name imu_22 is a special name that can used for both ISM330IS and LSM6DSO16IS sensors.

Validate command extension

Specific options

--ispu-conf

The option takes as argument the path to the ISPU configuration file (JSON format) of the model to validate when performing validation on target ('validate --mode target' command). The ISPU configuration file must contain the program to load to the ISPU to perform the validation. For how to generate the ISPU configuration file, refer to On-target ISPU validation flow.

If option --ispu-conf is not specified, the tool will automatically generate the ISPU configuration file in JSON format (the ISPU toolchain must be installed and available in the environment PATH). This means that the 'validate --mode target' command can be executed directly without the need to execute the generate command first. For details, refer to On-target ISPU validation flow.

Generate command extension

Description

The generate command for ISPU generates both the files of the runtime library and the files of the specific converted model. The files are structured in inc, lib and src subfolders. This structure allows the generated code to be directly used in the validation and integration templates described in the articles “On-target ISPU validation flow” and “How to integrate generated code”.

$ stedgeai generate -m <model_file_path> --target ispu --device <sensor_name> -o <output-directory-path>
...
 Copied runtime header files (97) to <output-directory-path>/inc/ai
 Copied runtime library files (1) to <output-directory-path>/lib/ai

 Generated files (5)
 ----------------------------------------------------------------------------------
 <output-directory-path>/inc/network_data.h
 <output-directory-path>/src/network_data.c
 <output-directory-path>/inc/network.h
 <output-directory-path>/src/network.c
 <output-directory-path>/inc/network_details.h

Creating txt report file <output-directory-path>/network_generate_report.txt
...

Additional resources

For additional resources, refer to ST’s GitHub repository for ISPU: https://github.com/STMicroelectronics/st-mems-ispu.