1# CMSIS-Stream {#mainpage}
2
3**CMSIS-Stream** is a Python package that provides methods, interfaces, and tools to optimize data block streaming between processing steps of a DSP/ML application.
4
5## Access to CMSIS-Stream
6
7 - [**CMSIS-Stream GitHub Repo**](https://github.com/ARM-software/cmsis-stream) - provides templates, usage examples, and access to documentation.
8 - [**CMSIS-Stream Python package**](https://pypi.org/project/cmsis-stream/) - provides easy access to tools via standard Python delivery system.
9
10## Benefits
11
12 - CMSIS-Stream enables a modular design that makes it easier to develop and maintain DSP pipelines.
13 - The provided tools generate at build time an optimized scheduling of the processing nodes with minimized memory overhead.
14 - Creates an easy to understand representation of the design visualized with a compute graph.
15
16## Components
17
18The components of CMSIS-Stream are:
19
20 - **Compute Graph** is the decomposition of the application in a directed graph that shows the data flow between processing nodes. It describes the data formats, FIFO buffers, data streams, and processing steps using a Python script file.
21 - **Tools** convert the Compute Graph with Python into processing steps at build-time with optimized schedule and memory usage.
22 - **Interfaces** header files, templates, and methods for data management (that works also on AMP systems).
23 - **Usage Examples** that help a software developer to get started.
24
25## Example Compute Graph
26
27The diagram below shows a Compute Graph with four nodes:
28
29 - A source generating 5 values in with data type `q15` each time it is run.
30 - A processing node (Filter) consuming and producing 7 values with data type `q15` each time it is run.
31 - A processing node (Detector) consuming 5 values with data type `q15` and producing 2 values with data type `f32` each it is run.
32 - A sink consuming 10 values with data type `f32` each time it is run.
33
34![Sample Compute Graph](./images/Compute-Graph-Sample.png)
35
36This Compute Graph is described with a Python script file that defines the nodes and their connections. This Python script computes a C++ implementation with static schedule and correctly sized memory buffers between each node. Nodes that are implemented in C are integrated using C++ wrappers.
37
38## Complex DSP Pipelines
39
40CMSIS-Stream gives the developer a toolbox that allows to create optimized DSP pipelines, that are for example required to optimize machine learning (ML) software stacks. With a Compute Graph complex DSP pipelines like shown in the diagram below can be described.
41
42By optimizing signal conditioning and feature extraction, the complexity of the ML classifier. More DSP pre-processing helps therefore lowering the overall performance that is required for a ML application.
43
44![Example Machine Learning Stack](./images/ML-Stack.png)
45
46