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 #246 background imageLoading...
Page #246 background image
Stackable Devices
7-16
7.4 Stackable Devices
The capabilities of the SIO module play an important role in fostering device-
independence within DSP/BIOS in that logical devices insulate your
application programs from the details of designating a particular device. For
example, /dac is a logical device name that does not imply any particular DAC
hardware. The device-naming convention adds another dimension to device-
independent I/O that is unique to DSP/BIOS—the ability to use a single name
to denote a stack of devices.
Note:
By stacking certain data streaming or message passing devices atop one
another, you can create virtual I/O devices that further insulate your
applications from the underlying system hardware.
Consider, as an example, a program implementing an algorithm that inputs
and outputs a stream of fixed-point data using a pair of A/D-D/A converters.
However, the A/D-D/A device can take only the 14 most significant bits of
data, and the other two bits have to be 0 if you want to scale up the input data.
Instead of cluttering the program with excess code for data conversion and
buffering to satisfy the algorithm’s needs, we can open a pair of virtual
devices that implicitly perform a series of transformations on the data
produced and consumed by the underlying real devices as shown in
Example 7-8.
Example 7-8. Opening a Pair of Virtual Devices
SIO_Handle input;
SIO_Handle output;
Ptr buf;
Int n;
buf = MEM_alloc(0, MAXSIZE, 0);
input = SIO_create("/scale2/a2d", SIO_INPUT, MAXSIZE, NULL);
output = SIO_create("/mask2/d2a", SIO_OUTPUT, MAXSIZE, NULL);
while (n = SIO_get(input, &buf)) {
`apply algorithm to contents of buf`
SIO_put(output, &buf, n);
}
SIO_delete(input);
SIO_delete(output);

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