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 #268 background imageLoading...
Page #268 background image
Real-Time I/O
7-38
7.13 Real-Time I/O
In DSP/BIOS there are two models that can be used for real-time I/O—the
DEV_STANDARD streaming model and the DEV_ISSUERECLAIM
streaming model. Each of these models is described in this section.
7.13.1 DEV_STANDARD Streaming Model
In the DEV_STANDARD streaming model, SIO_get is used to get a non-
empty buffer from an input stream. To accomplish this, SIO_get first places
an empty frame on the device->todevice queue. SIO_get then calls
Dxx_issue, which starts the I/O and then calls Dxx_reclaim pending, until a
full frame is available on the device->fromdevice queue. This blocking is
accomplished by calling SEM_pend on the device semaphore objptr->sync
that is posted whenever a buffer is filled.
Dxx_issue calls a low-level hardware function to initiate data input. When the
required amount of data has been received, the frame is transferred to
device->fromdevice. Typically, the hardware device triggers an interrupt
when a certain amount of data has been received. Dxx handles this interrupt
by means of an HWI (ISR in Figure 7-8), which accumulates the data and
determine if more data is needed for the waiting frame. If the HWI determines
that the required amount of data has been received, the HWI transfers the
frame to device->fromdevice and then call SEM_post on the device
semaphore. This allows the task, blocked in Dxx_reclaim, to continue.
Dxx_reclaim then returns to SIO_get, which will complete the input operation
as illustrated in Figure 7-8.
Figure 7-8. Flow of DEV_STANDARD Streaming Model
Application Dxx_moduleSIO_module
SIO_put(outStream, &bufp, BUFSIZE)
SIO_get(inStream, &bufp)
1) Put bufp on todevice queue.
2) Call Dxx_issue function.
3) Call Dxx_reclaim function.
4) Get next buffer from
fromdevice queue.
5) Set bufp to point to this
buffer.
1) Put bufp on todevice queue.
2) Call Dxx_issue function.
3) Call Dxx_reclaim function.
4) Get next buffer from
fromdevice queue.
5) Set bufp to point to this
buffer.
1) Get next buffer from todevice
queue and make “visible” to ISR.
2) If first “get,” enable interrupts.
3) Pend on semaphore for
non-empty buffer on fromdevice
queue.
1) Get next buffer from todevice
queue and make “visible” to ISR.
2) If first “put,” enable interrupts.
3) Pend on semaphore for empty
buffer on fromdevice queue.

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