Signal-notification channels, or signals , are inbound
(to an SPE) registers. They can be used by other SPEs, the PPE, or other devices
to send information, such as a buffer-completion synchronization flag, to
an SPE.
Each SPE has two 32-bit signal-notification registers, each of which has
a corresponding memory-mapped I/O (MMIO) register into which the signal-notification
data is written by the sending processor. Unlike mailbox messaging, signal
senders use one of three special MFC send-signal commands to send a signal:
These are described in
MFC commands.
An SPE can only read its local signal-notification channels. The PPE or
other processors can write or read the corresponding MMIO register. This allows
the target SPE to do polling, blocking, or set up an interrupt as ways of
responding to signals. An SPE read of one of its two signal-notification channels
clears the channel atomically. An MMIO read does not clear a channel. An SPE
read from the signaling channel will be stalled when no signal is pending
at the time of the read.
A signal-notification channel can be configured by software to be in overwrite
mode or OR mode . In overwrite mode (also called one-to-one
signaling), sending a signal (writing to the MMIO address) overwrites previous
contents. In OR mode (also called many-to-one signaling), sending a signal
ORs the new 1 bits into the current contents. In the case of one-to-one signaling,
there is usually no substantial difference in performance between signaling
and using a mailbox.
The differences between mailboxes and signal-notification channels include:
- Capacity — Signal-notification channels are registers. Mailboxes
are queues.
- Direction — Each SPE supports signal-notification channels that
are only inbound (to the SPE). Their mailboxes support both outbound and inbound
communication. However, an SPE can send signals to another SPE using MFC send-signal
commands.
- Interrupts — One of the mailboxes interrupts the PPE. Signal-notification
channels have no such automatic feature.
- Many-to-One — Signal-notification channels (but not mailboxes)
can be configured as many-to-one (OR mode) or as one-to-one (overwrite mode).
- Unique Commands — Signal-notification channels have specific MFC
send-signal commands (sndsig, sndsigf, and sndsigb)
for writing to them (see MFC commands).
- Reset — Reading a signal-notification register automatically resets
(clears) its bits.
- Count — The channel counts have different meaning. Mailbox channel
counts indicate the number of available (unoccupied) entries in the mailbox
queue. The signal-notification channel count indicates whether there are any
pending (unserviced) signals.
- Number — Each SPE has two signal-notification channels versus three
mailboxes.