You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-24Lines changed: 23 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,43 +2,37 @@
2
2
3
3
The **Synchronous Data Stream (SDS) Framework** implements a data stream management, provides methods and helper tools for developing and optimizing embedded applications that integrate DSP and ML algorithms. This framework may be used stand-alone, but also in combination with [**CMSIS-Stream**](https://github.com/ARM-software/CMSIS-Stream) that allows to combine algorithms using a compute graph.
4
4
5
-
## Overview
5
+
## Features
6
6
7
-
- Implements a flexible data stream management for sensor and audio data interfaces
8
-
- Supports data streams from multiple interfaces including provisions for time drifts.
7
+
- Implements a flexible data stream management for sensor, audio, and video interfaces that process data streams.
8
+
- Supports data streams from multiple interfaces (i.e. for sensor fusion) including provisions for time drifts.
9
+
-**Record real-world data** with original data sources of the target hardware for analysis and development.
10
+
-**Playback real-world data** for algorithm validation using target hardware or [Arm Virtual Hardware - FVP](https://github.com/arm-software/avh).
9
11
10
-
- Provides methods to **record real-world data** for analysis and development
11
-
- Input to Digital Signal Processing (DSP) development tools such as filter designers
12
-
- Input to Machine Learning (ML) model classification, training, and performance optimization
13
-
- Verify execution of DSP algorithm on Cortex-M targets with off-line tools
12
+
The captured data streams are stored in SDS data files. A [YAML metadata file](./schema/README.md) can be used to describe the content. The SDS data files have several use cases such as:
14
13
15
-
-**Playback real-world data** for algorithm validation using Arm Virtual Hardware
16
-
- Input to Digital Signal Processing (DSP) development tools such as filter designers
17
-
- Input to Machine Learning (ML) model classification, training, and performance optimization
18
-
- Verify execution of DSP algorithm on Cortex-M targets with off-line tools
14
+
- Input to Digital Signal Processing (DSP) development tools such as filter designers
15
+
- Input to Machine Learning (ML) model classification, training, and performance optimization
16
+
- Verify execution of DSP algorithm on Cortex-M targets with off-line tools
19
17
20
-
- Defines binary data format with [YAML metadata file](./schema/README.md).
18
+
[Python-based utilities](./utilities/README.md) are provided for recording, playback, visualization, and data conversion
21
19
22
-
-[Python-based utilities](./utilities/README.md) for recording, playback, visualization, and data conversion
23
-
24
-
Refer to ["ML Developers Guide for Cortex-M Processors and Ethos-U NPU" - "Tool Support" - "SDS Framework Usage"](https://developer.arm.com/documentation/109267/0100/Tool-Support-for-the-Arm-Ethos-U-NPU/SDS-Framework-Usage) for more information.
25
-
26
-
## Interfaces
27
-
28
-
The [SDS Framework interfaces](./sds/README.md) implement the SDS streaming interfaces via different methods. The functions of the **sds.h Circular Buffer Handling** may be used at any level of a Compute Graph to provide inputs or capture outputs of an DSP or ML algorithm.
The SDS Framework is licensed under [](https://github.com/ARM-software/sds-framework/blob/main/LICENSE).
@@ -47,6 +41,11 @@ The SDS Framework is licensed under [](https://github.com/ARM-software/CMSIS_6/blob/main/LICENSE). Only submit contributions where you have authored all of the code.
49
43
44
+
The documentation is generated using [MKDocs](https://www.mkdocs.org/) with the following additional plugins:
45
+
46
+
-[mermaid2](https://mkdocs-mermaid2.readthedocs.io/en/latest/) for sequence diagrams.
47
+
-[mkdoxy](https://pypi.org/project/mkdoxy) for API documentation.
48
+
50
49
### Issues and Labels
51
50
52
51
Please feel free to raise an [issue on GitHub](https://github.com/ARM-software/sds-framework/issues)
## Guidelines for Stream Buffer sizing and Threshold settings
300
+
301
+
### Overview
302
+
303
+
The **SDS Recorder/Player** uses memory buffers to manage data recording and playback efficiently.
304
+
Proper buffer and threshold configurations optimize performance by balancing data production, consumption, and system resource utilization.
305
+
306
+
### Stream Buffer Size
307
+
308
+
The size of memory buffers affects the balance between data production and consumption.
309
+
310
+
The **absolute minimum stream buffer size** should be large enough to store **one maximum record along with its header (8 bytes)**.
311
+
312
+
The **recommended stream buffer size** should be large enough to store **at least two maximum records along with headers (8 bytes per record)** and
313
+
can be rounded up for convenience.
314
+
315
+
The record size generally corresponds to the data size used by the underlying technology.
316
+
For example, in typical **ML applications**, the record size should ideally match the **data slice required by the DSP process**.
317
+
318
+
If sufficient RAM is available, increasing the buffer size can improve performance.
319
+
320
+
### Threshold Settings for SDS Recorder/Player
321
+
322
+
#### **Function of Thresholds**
323
+
324
+
-**For the SDS Recorder:** Determines when data writing to the **I/O** begins.
325
+
-**For the SDS Player:** Determines when data reading from the **I/O** begins.
326
+
327
+
The **recommended threshold setting** is **half of the stream buffer size**, enabling a **double-buffering technique** where one half of the buffer is transferred while the other half continues to fill or be consumed.
328
+
329
+
A well-optimized system ensures timely data transfer over the I/O:
330
+
331
+
- For the **Recorder**: Previously acquired data must be transferred before the remaining of the buffer fills with new data.
332
+
- For the **Player**: New playback data should be transferred before the previously transferred playback data is consumed.
333
+
334
+
#### **Impact on System Performance**
335
+
336
+
The threshold setting directly affects system performance, as **I/O transfers temporarily occupy the CPU**.
337
+
During these operations, other system processes may experience limited CPU availability.
338
+
339
+
If the system requires additional CPU resources for other tasks, adjustments can be made by:
340
+
341
+
1.**Increasing the priority of critical threads**.
342
+
2.**Reducing the threshold setting**, which shortens the duration of each transfer but increases the frequency of transfers.
343
+
344
+
> **Note:** Thresholds operate based on discrete record sizes. A threshold is only triggered when a write or read operation
345
+
> surpasses (for write) or falls below (for read) the set limit.
346
+
> When handling large records, breaking them into smaller chunks may be necessary to optimize system performance.
347
+
348
+
### Additional Settings Affecting I/O Bandwidth
349
+
350
+
Several additional factors influence I/O bandwidth, including:
351
+
352
+
1.**Temporary Recorder/Player buffer size** (configured in the `sds_rec_config.h` / `sds_play_config.h` files).
353
+
2.**I/O low-level buffering**.
354
+
355
+
#### **Optimizing I/O Buffering**
356
+
357
+
For **optimal performance**, the **temporary Recorder/Player buffer size should match the I/O low-level buffer size**.
358
+
359
+
For some interfaces, the I/O low-level buffer size can be configurable, for others, it is fixed.
360
+
361
+
Example: The **USB Virtual COM interface** allows I/O low-level buffer size configuration.
362
+
It is recommended to set this buffer size as a multiple of the **bulk endpoint maximum packet size** (512 bytes for USB high-speed connections).
363
+
364
+
### Example configurations for typical ML use cases
365
+
366
+
|**ML Use Case**|**DSP slice**|**Calculation**|**Buffer Size**|**Threshold**|
0 commit comments