Comparing Pipes and Streams
6-4
Reader and writer can be any
thread type or host PC.
One end must be handled by a task (TSK)
using SIO calls. The other end must be
handled by an HWI using Dxx calls.
PIP functions are non-blocking.
Program must check to make sure
a buffer is available before reading
from or writing to the pipe.
SIO_put, SIO_get, and SIO_reclaim are
blocking functions and causes a task to
wait until a buffer is available. (SIO_issue
is non-blocking.)
Uses less memory and is generally
faster.
More flexible; generally simpler to use.
Each pipe owns its own buffers. Buffers can be transferred from one stream
to another without copying. (In practice,
copying is usually necessary anyway
because the data is processed.)
Pipes must be created statically in
the configuration.
Streams can be created either at run time
or statically in the configuration. Streams
can be opened by name.
No built-in support for stacking
devices.
Support is provided for stacking devices.
Using the HST module with pipes is
an easy way to handle data transfer
between the host and target.
A number of device drivers are provided
with DSP/BIOS.
Pipes
(PIP and HST)
Streams
(SIO and DEV)