EasyManuals Logo

Texas Instruments TMS320 User Manual

Texas Instruments TMS320
288 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #255 background imageLoading...
Page #255 background image
Streaming Data to Multiple Clients
Streaming I/O and Device Drivers 7-25
7.7 Streaming Data to Multiple Clients
A common problem in multiprocessing systems is the simultaneous
transmission of a single data buffer to multiple tasks in the system. Such
multi-cast transmission, or scattering of data, can be done easily with
DSP/BIOS SIO streams. Consider the situation in which a single processor
sends data to four client processors.
Streaming data between processors in this context is somewhat different
from streaming data to or from an acquisition device, such as an A/D
converter, in that a single buffer of data must go to one or more clients. The
DSP/BIOS SIO functions SIO_get/SIO_put are used for data I/O.
SIO_put automatically performs a buffer exchange between the buffer
already at the device level and the application buffer. As a result, the user no
longer has control over the buffer since it is enqueued for I/O, and this I/O
happens asynchronously at the interrupt level. This forces the user to copy
data in order to send it to multiple clients. This is shown in Example 7-15.
Example 7-15. Using SIO_put to Send Data to Multiple Clients
Copying the data wastes CPU cycles and requires more memory, since each
stream needs buffers. If you were double-buffering, Example 7-15 would
require eight buffers (two for each stream).
Example 7-16, illustrates the advantage of SIO_issue and SIO_reclaim in this
situation. The application performs no copying, and it uses only two buffers.
In each call, SIO_issue simply enqueues the buffer pointed to by bufA onto
outStream’s todevice queue without blocking. Since there is no copying or
blocking, this method greatly reduces the time between having a buffer of
data ready for transmission and the time the buffer can be sent to all clients.
In order to remove the buffers from the output devices, corresponding
SIO_reclaim functions must be called.
SIO_put(inStream, (Ptr)&bufA, npoints);
`fill bufA with data`
for (`all data points`) {
bufB[i] = bufC[i] = bufD[i] ... = bufA[i];
}
SIO_put(outStreamA, (Ptr)&bufA, npoints);
SIO_put(outStreamB, (Ptr)&bufB, npoints);
SIO_put(outStreamC, (Ptr)&bufC, npoints);
SIO_put(outStreamD, (Ptr)&bufD, npoints);

Table of Contents

Other manuals for Texas Instruments TMS320

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS320 and is the answer not in the manual?

Texas Instruments TMS320 Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS320
CategoryComputer Hardware
LanguageEnglish

Related product manuals