Skip to content

Commit 726c9f2

Browse files
author
github-actions
committed
Update documentation for branch main
1 parent 46290bd commit 726c9f2

File tree

8 files changed

+43
-8
lines changed

8 files changed

+43
-8
lines changed

main/images/SDS-Files.png

47 KB
Loading

main/images/SDS-InOut.png

51.4 KB
Loading

main/images/SDS-Out.png

54 KB
Loading

main/images/overview.pptx

30.3 KB
Binary file not shown.

main/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,5 +175,5 @@ <h2 id="revision-history">Revision History</h2>
175175

176176
<!--
177177
MkDocs version : 1.6.1
178-
Build Date UTC : 2025-03-07 12:55:56.005563+00:00
178+
Build Date UTC : 2025-03-10 12:43:51.689473+00:00
179179
-->

main/search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

main/sitemap.xml.gz

0 Bytes
Binary file not shown.

main/theory/index.html

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
<ul class="current">
4848
<li class="toctree-l1 current"><a class="reference internal current" href="#">Theory of Operation</a>
4949
<ul class="current">
50+
<li class="toctree-l2"><a class="reference internal" href="#usage">Usage</a>
51+
</li>
5052
<li class="toctree-l2"><a class="reference internal" href="#buffer-size">Buffer Size</a>
5153
</li>
5254
<li class="toctree-l2"><a class="reference internal" href="#timestamp">Timestamp</a>
@@ -96,12 +98,43 @@
9698
<h1 id="theory-of-operation">Theory of Operation</h1>
9799
<!-- markdownlint-disable MD013 -->
98100
<!-- markdownlint-disable MD036 -->
99-
<p>The core of the SDS-Framework is a circular buffer handling that is the interface between the Recorder/Playback functions and the file I/O communication as shown in the picture below. The user application may read one data streams and write another data stream.</p>
100-
<p><img alt="Theory of operation" src="../images/Theory_of_Operation.png"/></p>
101-
<p>ToDo:</p>
101+
<p>The SDS Framework enables to record and playback one or more data streams to an application that is under development as shown in the diagram below. With the SDSIO Interface the data streams are connected to SDS data files. The file storage can be either embedded within the system and access by a file system or external on a host computer and accessed by a communication interface such as Ethernet or USB.</p>
102+
<p>The DSP or ML algorithms that are tested operate on blocks and are executed periodically. This documentation uses these terms:</p>
102103
<ul>
103-
<li>When does sdsRecInit require an event handler?</li>
104+
<li><strong>Block size</strong>: is the number of bytes processed by a DSP or ML compute node.</li>
105+
<li><strong>Interval</strong>: is the periodic time interval that the compute node executes.</li>
104106
</ul>
107+
<p><img alt="SDSIO Interface for Player and Recorder" src="../images/SDS-InOut.png"/></p>
108+
<p>The core of the SDS-Framework is a circular buffer handling (<code>sds.c/h</code>) that is controlled by the Recorder/Player interface functions (<code>sdsRec.c/h</code>/<code>sdsPlay.c/h</code>). This circular buffer is the queue for the file I/O communication (<code>sdsio.c/h</code>). Using the Recorder/Player functions, the data stream under development may read and write data streams as shown in the diagram above.</p>
109+
<p><img alt="Implementation Files of SDS" src="../images/Theory_of_Operation.png"/></p>
110+
<h2 id="usage">Usage</h2>
111+
<p>The following diagram shows the usage of the SDS Recorder and Player functions. Management is a separate thread that controls the overall execution. Algorithm is a thread that executes Signal Conditioning (SC) and ML Model.</p>
112+
<div class="mermaid">sequenceDiagram
113+
participant Management
114+
participant SDS Player
115+
participant SDS Recorder
116+
participant Algorithm
117+
Management-&gt;&gt;SDS Player: sdsPlayOpen `SCinput`
118+
Management-&gt;&gt;SDS Recorder: sdsRecOpen `SCoutput`
119+
Management-&gt;&gt;SDS Recorder: sdsRecOpen `MLoutput`
120+
Management-&gt;&gt;Algorithm: Activate Algorithm
121+
Activate Algorithm
122+
loop periodic
123+
SDS Player-&gt;&gt;Algorithm: sdsPlayReads `SCinput` (with timestamp)
124+
Note over Algorithm: Execute Signal Conditioning
125+
Algorithm-&gt;&gt;SDS Recorder: sdsRecWrite `SCoutput`
126+
Note over Algorithm: Execute ML Model
127+
Algorithm-&gt;&gt;SDS Recorder: sdsRecWrite `MLoutput`
128+
end
129+
Management-&gt;&gt;Algorithm: Deactivate Algorithm
130+
Deactivate Algorithm
131+
Management-&gt;&gt;SDS Player: sdsPlayClose `SCinput`
132+
Management-&gt;&gt;SDS Recorder: sdsRecClose `SCoutput`
133+
Management-&gt;&gt;SDS Recorder: sdsRecClose `MCoutput`
134+
</div>
135+
<p>Each data stream is stored in a separate SDS data file. In the diagram below <code>SCinput.0.sds</code> is the input to Signal Conditioning, <code>SCoutput.0.sds</code> is the output of Signal Conditioning, and <code>MLoutput.0.sds</code> is the output of the ML Model. Each execution of the algorithm is represented in a data block with a <code>timestamp</code>. The <code>timestamp</code> allows to correlate the blocks of different streams. In the above example, all blocks of one algorithm execution have the same timestamp value.</p>
136+
<p><img alt="SDS Files" src="../images/SDS-Files.png"/></p>
137+
<p>ToDo When does sdsRecInit require an event handler?</p>
105138
<p><strong>Example:</strong> Recording of an accelerometer data stream</p>
106139
<p>The following code snippets show the usage of the <strong>Recorder Interface</strong>.</p>
107140
<pre><code class="language-c">// *** variable definitions ***
@@ -112,7 +145,7 @@ <h1 id="theory-of-operation">Theory of Operation</h1>
112145
} accelerometer [30]; // number of samples in one data stream record
113146

114147
sdsRecId_t *accel_id, // data stream id
115-
uint8_t accel_buf[1500]; // data stream buffer for circular buffer handling
148+
uint8_t accel_buf[1000]; // data stream buffer for circular buffer handling
116149
:
117150
// *** function calls ***
118151
sdsRecInit(NULL); // init SDS Recorder
@@ -133,9 +166,11 @@ <h2 id="buffer-size">Buffer Size</h2>
133166
<p>The size of the data stream buffer depends on several factors such as:</p>
134167
<ul>
135168
<li>the communication interface used as the technology may impose certain buffer sizes to maximize the transfer rate.</li>
136-
<li>the size of the data stream as it is recommended that the buffer is at least twice the size of a single data stream.</li>
169+
<li>the size of the data stream as it is recommended that the buffer is at least three the size of a single data stream.</li>
137170
<li>the frequency of the algorithm execution. Fast execution speeds may require a larger buffer.</li>
138171
</ul>
172+
<p>A a guideline, the buffer size should be 3 times the <strong>block size</strong>. As a minimum 0x1000 (4 KB) is recommended.</p>
173+
<p>ToDo: Threshold should be optional</p>
139174
<p><strong>Recommended Buffer Size:</strong></p>
140175
<p>The table below contains recommended buffer sizes depending on the communication technology used:</p>
141176
<p>ToDo</p>

0 commit comments

Comments
 (0)