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 #238 background imageLoading...
Page #238 background image
Stream I/O—Reading and Writing Streams
7-8
Example 7-4. Implementing the Issue/Reclaim Streaming Model
If no buffer is available, the stream will block the task until the buffer becomes
available or the stream’s timeout has elapsed.
At a basic level, the most obvious difference between the standard and
Issue/Reclaim models is that the Issue/Reclaim model separates the
notification of a buffer’s arrival (SIO_issue) and the waiting for a buffer to
become available (SIO_reclaim). So, an SIO_issue/SIO_reclaim pair
provides the same buffer exchange as calling SIO_get or SIO_put.
The Issue/Reclaim streaming model provides greater flexibility by allowing
the stream client to control the number of outstanding buffers at runtime. A
client can send multiple buffers to a stream, without blocking, by using
SIO_issue. The buffers are returned, at the client’s request, by calling
SIO_reclaim. This allows the client to choose how deep to buffer a device and
when to block and wait for a buffer.
The Issue/Reclaim streaming model also provides greater determinism in
buffer management by guaranteeing that the client’s buffers are returned in
the order that they were issued. This allows a client to use memory from any
source for streaming. For example, if a DSP/BIOS task receives a large
buffer, that task can pass the buffer to the stream in small pieces—simply by
advancing a pointer through the larger buffer and calling SIO_issue for each
piece. This works because each piece of the buffer is guaranteed to come
back in the same order it was sent.
7.3.1 Buffer Exchange
An important part of the streaming model in DSP/BIOS is buffer exchange. To
provide efficient I/O operations with a low amount of overhead, DSP/BIOS
avoids copying data from one place to another during certain I/O operations.
Instead, DSP/BIOS uses SIO_get, SIO_put, SIO_issue, and SIO_reclaim to
move buffer pointers to and from the device. Figure 7-3 shows a conceptual
view of how SIO_get works.
Int SIO_issue(stream, pbuf, nbytes, arg)
SIO_Handle stream;
Ptr pbuf;
Uns nbytes;
Arg arg;
Int SIO_reclaim(stream, bufp, parg)
SIO_Handle stream;
Ptr *bufp;
Arg *parg;

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