Message Queues
Input/Output Methods
6-25
Neither MSGQ nor the transport perform an endian conversion on the user
portion of a message. The transport performs necessary endian conversion
on the MSGQ_MsgHeader portion of the message, but not on the rest of the
message. It is up to the application to manage endian conversion of the
remainder of the message.
6.5.6
Data Transfer Module Comparison
There are several modules available in DSP/BIOS for data movement:
❏
MBX. Mailbox module.
❏
MSGQ. Message queue module
❏
PIP. Pipe module.
❏
QUE. Queue module
❏
SIO. Streaming I/O module.
Both SIO and PIP use a streaming model. Here are the differences between
streaming and messaging from a DSP/BIOS perspective:
❏
A
stream
is a continuous sequence of real-time data. Streaming is point-
to-point: one writer and one reader. It typically is performed with zero
copying.
❏
A
message
is an asynchronous piece of control information. Messaging
is generally performed with multiple writers and one reader.
There are several differences between MSGQ, QUE, and MBX. Each module
has its pros and cons. Ultimately, it is up to the application designer to decide
which one fits their application best. The following list describes issues to
consider when making a decision:
❏
Multi-Processor Support.
MSGQ offers multi-processor support.
Neither QUE nor MBX does.
❏
Message Ownership.
Once a message is sent by MSGQ_put or
QUE_put, ownership of the message is relinquished. The reader gets
ownership once the message is received. In the MBX module, once a
message is sent by MBX_post, the message is copied internally in MBX
before the call returns. So once the MBX_post returns, the sender still
controls the buffer.
❏
Message Copying.
The MBX module is copy based. QUE is zero-copy.
For MSGQ, intra-processor transfers are zero-copy actions. An inter-
processor transfer may or may not be copy based (depends on the
transport).
❏
Notification Mechanisms.
Both MSGQ and MBX offer notification
mechanisms. So the reader can block while waiting for a message.
Summary of Contents for TMS320 Series
Page 1: ...TMS320 DSP BIOS v5 40 User s Guide Literature Number SPRU423G April 2009 ...
Page 16: ...xvi ...
Page 152: ...Tasks 4 48 Figure 4 12 Trace from Example 4 7 ...
Page 168: ...Semaphores 4 64 Figure 4 14 Trace Results from Example 4 11 ...
Page 202: ...5 20 ...
Page 287: ...Index 9 Index Void 1 11 W words data memory 3 15 of code 1 5 wrapper function 2 29 ...
Page 288: ...Index 10 Index ...