Direct Memory Access
[End-User Documentation]

Collaboration diagram for Direct Memory Access:

Detailed Description

Functions which use DMA to transfer Data.

The operations defined in this section provide simple means to use Direct Memory Access (DMA).

The MPI-standard assumes a distributed memory architecture, where active participation of the sending and the receiving processes is required. But the Cell Broadband Engine is a distributed shared memory architecture which provides a common address space and DMA-Operations enabling processes to write data directly into the memory of an remote process without active participation of the receiving process. DMA is faster than Send-Receive but more complicated to handle, and so there are some functions provided to enable the advantages of DMA and to hide as much complexity as possible. So the user doesn't have to care about the upper-limit of an DMA-transfer and in get-operations the data-size doesn't have to be a multiple of 16-byte. However the data-address should be at least 16-byte aligned and in put-operations the data-size has to be a multiple of 16-byte.

There are two kind of addresses. Local-store addresses are used on the SPUs and are only valid in context of a specific SPU. Effective addresses define a common address-space and are used on the PPU. Functions to translate between those address types are provided.

DMA-operations can be blocking or non-blocking. The status of non-blocking DMA-calls can be requested by using MOC_Test and MOC_Wait.

Note:
Every non-blocking DMA operation has to be finished using MOC_Test or MOC_Wait, otherwise resources are no freed and some data are not copied correctly.


PPU-only

int MOC_Get_data (void *target, uint32_t source, int count, MOC_Datatype datatype, int dest)
 Wrapper-function for a blocking DMA-get operation.
int MOC_Put_data (void *source, uint32_t target, int count, MOC_Datatype datatype, int src)
 Wrapper-function for a blocking DMA-put operation.
int MOC_IGet_data (void *target, uint32_t source, int count, MOC_Datatype datatype, int dest, MOC_Request *request)
 Wrapper-function for a non-blocking DMA-get operation.
int MOC_IPut_data (void *source, uint32_t target, int count, MOC_Datatype datatype, int src, MOC_Request *request)
 Wrapper-function for a non-blocking DMA-put operation.
int MOC_Translate_EA_to_LS (uint64_t ea, int rank, uint32_t *ls)
 Translates an effective-address of a SPU into the corresponding local-store address.

SPU-only

int MOC_Get_data (void *target, uint64_t source, int count, MOC_Datatype datatype)
 Wrapper-function for a blocking DMA-get operation.
int MOC_Put_data (void *source, uint64_t target, int count, MOC_Datatype datatype)
 Wrapper-function for a blocking DMA-put operation.
int MOC_IGet_data (void *target, uint64_t source, int count, MOC_Datatype datatype, MOC_Request *request)
 Wrapper-function for a non-blocking DMA-get operation.
int MOC_IPut_data (void *source, uint64_t target, int count, MOC_Datatype datatype, MOC_Request *request)
 Wrapper-function for a non-blocking DMA-put operation.
int MOC_Translate_LS_to_EA (void *ls, uint64_t *ea)
 Translates a local-store address of the calling SPU into the corresponding effective-address.

Functions

int MOC_Wait_data (MOC_Request *request)
 Waits till a MOC_IGet_data or IMOC_IPut_data is completed.
int MOC_Test_data (MOC_Request *request, int *flag)
 Tests if a MOC_IGet_data or IMOC_IPut_data is completed.


Function Documentation

int MOC_Get_data ( void *  target,
uint64_t  source,
int  count,
MOC_Datatype  datatype 
)

Wrapper-function for a blocking DMA-get operation.

Data can be of any size, constraints of low-level DMA-functions are dealt by this function. However data-addresses have to be at least 16-byte aligned.

Parameters:
target out pointer to buffer
source in ea-address of data
count in size of data in byte
datatype in Type of Elements
Return values:
MOC_SUCCESS No error; MPI routine completed successfully.
... error-code

int MOC_Get_data ( void *  target,
uint32_t  source,
int  count,
MOC_Datatype  datatype,
int  dest 
)

Wrapper-function for a blocking DMA-get operation.

Data can be of any size, constraints of low-level DMA-functions are dealt by this function. However data-addresses have to be at least 16-byte aligned.

Parameters:
target out pointer to buffer
source in local-store address of data
count in size of data in byte
datatype in Type of Elements
dest in rank of source spe
Return values:
MOC_SUCCESS No error; MPI routine completed successfully.
... error-code

int MOC_IGet_data ( void *  target,
uint64_t  source,
int  count,
MOC_Datatype  datatype,
MOC_Request *  request 
)

Wrapper-function for a non-blocking DMA-get operation.

Data can be of any size, constraints of low-level DMA-functions are dealt by this function. However data-addresses have to be at least 16-byte aligned. Operation-completion can be derived with MOC_Test and MOC_Wait.

Parameters:
target out pointer to buffer
source in ea-address of data
count in size of data in byte
datatype in Type of Elements
request out communication request (handle)
Return values:
MOC_SUCCESS No error; MPI routine completed successfully.
... error-code

int MOC_IGet_data ( void *  target,
uint32_t  source,
int  count,
MOC_Datatype  datatype,
int  dest,
MOC_Request *  request 
)

Wrapper-function for a non-blocking DMA-get operation.

Data can be of any size, constraints of low-level DMA-functions are dealt by this function. However data-addresses have to be at least 16-byte aligned. Operation-completion can be derived with MOC_Test and MOC_Wait.

Parameters:
target out pointer to buffer
source in local-store address of data
count in size of data in byte
datatype in Type of Elements
dest in rank of source spe
request out communication request (handle)
Return values:
MOC_SUCCESS No error; MPI routine completed successfully.
... error-code

int MOC_IPut_data ( void *  source,
uint64_t  target,
int  count,
MOC_Datatype  datatype,
MOC_Request *  request 
)

Wrapper-function for a non-blocking DMA-put operation.

Data-size should be a multiple of 16 because of low-level constraints, but there is no upper limit of transfer-size. Data-addresses have to be at least 16-byte aligned. Operation-completion can be derived with MOC_Test and MOC_Wait.

Parameters:
source in pointer to data
target in ea-address of buffer
count in size of data in byte
datatype in Type of Elements
request out communication request (handle)
Return values:
MOC_SUCCESS No error; MPI routine completed successfully.
... error-code

int MOC_IPut_data ( void *  source,
uint32_t  target,
int  count,
MOC_Datatype  datatype,
int  src,
MOC_Request *  request 
)

Wrapper-function for a non-blocking DMA-put operation.

Data-size should be a multiple of 16 because of low-level constraints, but there is no upper limit of transfer-size. Data-addresses have to be at least 16-byte aligned. Operation-completion can be derived with MOC_Test and MOC_Wait.

Parameters:
source in pointer to data
target in local-store address of buffer
count in size of data in byte
datatype in Type of Elements
src in rank of source-SPE
request out communication request (handle)
Return values:
MOC_SUCCESS No error; MPI routine completed successfully.
... error-code

int MOC_Put_data ( void *  source,
uint64_t  target,
int  count,
MOC_Datatype  datatype 
)

Wrapper-function for a blocking DMA-put operation.

Data-size should be a multiple of 16 because of low-level constraints, but there is no upper limit of transfer-size. Data-addresses have to be at least 16-byte aligned.

Parameters:
source in pointer to data
target in ea-address of buffer
count in size of data in byte
datatype in Type of Elements
Return values:
MOC_SUCCESS No error; MPI routine completed successfully.
... error-code

int MOC_Put_data ( void *  source,
uint32_t  target,
int  count,
MOC_Datatype  datatype,
int  src 
)

Wrapper-function for a blocking DMA-put operation.

Data-size should be a multiple of 16 because of low-level constraints, but there is no upper limit of transfer-size. Data-addresses have to be at least 16-byte aligned.

Parameters:
source in pointer to data
target in local-store address of buffer
count in size of data in byte
datatype in Type of Elements
src in rank of source-SPE
Return values:
MOC_SUCCESS No error; MPI routine completed successfully.
... error-code

int MOC_Test_data ( MOC_Request *  request,
int *  flag 
)

Tests if a MOC_IGet_data or IMOC_IPut_data is completed.

Parameters:
request in request-handle
flag out true if operation is completed
Returns:
0 when success otherwise error-code

int MOC_Translate_EA_to_LS ( uint64_t  ea,
int  rank,
uint32_t *  ls 
)

Translates an effective-address of a SPU into the corresponding local-store address.

Parameters:
ea in effective-address
rank in rank of SPU
ls out local-store address

int MOC_Translate_LS_to_EA ( void *  ls,
uint64_t *  ea 
)

Translates a local-store address of the calling SPU into the corresponding effective-address.

Parameters:
ls in local-store address
ea out effective-address

int MOC_Wait_data ( MOC_Request *  request  ) 

Waits till a MOC_IGet_data or IMOC_IPut_data is completed.

Parameters:
request in request-handle
Returns:
0 when success otherwise error-code


Generated on Thu Feb 12 13:48:22 2009 for MPI On Cell (Documentation) by  doxygen 1.5.6