Mailboxes

The mailbox services provide a simple method of passing a single 32-bit unsigned word between processes. These services use a blocking read/write model. The mailbox is a FIFO queue with an implementation-specific depth.

Mailboxes are between a host (parent) and an accelerator process (DE id and Pid). Each mailbox has two sets of slots. One set is written to by the host and read by the accelerator process, and the other is written to by the accelerator process and read by the host. A host with a single accelerator running a single process will have one mailbox with 4 slots in each set. A host with two accelerators, each running a single process, will have two mailboxes each with 4 slots in each set. Thus the host will have 4 slots in one mailbox for mail coming from one accelerator process and 4 slots in another mailbox for mail coming from the other accelerator process.

Note: Byte-swapping is done automatically if required. A DE cannot write to its own mailbox and can only read from its own mailbox. Any attempt to do otherwise returns an error.

The mailbox depth is limited to 4 (host) and 4 (accelerator).