tools.h File Reference

#include "../types.h"
#include "dma_debug.h"

Go to the source code of this file.

Defines

#define mfc_get(ls, ea, size, tag, tid, rid)   mfc_get_debug(ls, ea, size, tag, tid, rid, __FILE__, __LINE__)
 Replace mfc_get by debug-version in DEBUG mode.
#define mfc_put(ls, ea, size, tag, tid, rid)   mfc_put_debug(ls, ea, size, tag, tid, rid, __FILE__, __LINE__)
 Replace mfc_put by debug-version in DEBUG mode.

Functions

void barrier (unsigned int tag_id)
 Barrier which uses direct local storage access.
void init_spe (addr64_t argp, addr64_t envp, void *globals, uint16_t globals_size, void *locals, uint16_t locals_size)
 Initialize internal values and transfer global and local data.
int get_my_id ()
 Returns the ID of this SPE.
int get_phys_id (int log_id)
 Returns the physical ID for a given logical SPE id.
int get_log_id (int phys_id)
 Returns the logical ID for a given physical SPE id.


Detailed Description

Author:
Ruben Niederhagen (ruben@polycephaly.org)

Definition in file spu/tools.h.


Define Documentation

#define mfc_get ( ls,
ea,
size,
tag,
tid,
rid   )     mfc_get_debug(ls, ea, size, tag, tid, rid, __FILE__, __LINE__)

Replace mfc_get by debug-version in DEBUG mode.

If DEBUG is defined, mfc_get is replaced by a debug-version of that function which gives additional information in case DMA parameter requirements are not satisfied.

See mfc_get_debug() for further details.

Definition at line 47 of file spu/tools.h.

#define mfc_put ( ls,
ea,
size,
tag,
tid,
rid   )     mfc_put_debug(ls, ea, size, tag, tid, rid, __FILE__, __LINE__)

Replace mfc_put by debug-version in DEBUG mode.

If DEBUG is defined, mfc_put is replaced by a debug-version of that function which gives additional information in case DMA parameter requirements are not satisfied.

See mfc_put_debug() for further details.

Definition at line 59 of file spu/tools.h.


Function Documentation

void barrier ( unsigned int  tag_id  ) 

Barrier which uses direct local storage access.

This barrier-implementation uses direct local storage access. The latency of this version increases with the number of attending SPEs.

Parameters:
tag_id This tag is used for the necessary DMA transfers. Pleas give an unused tag.

int get_log_id ( int  phys_id  ) 

Returns the logical ID for a given physical SPE id.

This function returns the logical ID of a given physical SPE ID. (See get_phys_id()).

Parameters:
phys_id The physical ID of the SPE of interest.
Returns:
The logical ID of the given SPE.

int get_my_id (  ) 

Returns the ID of this SPE.

This function returns the logical ID of this SPE thread (0...spe_threads).

Returns:
The logical ID of this thread.

int get_phys_id ( int  log_id  ) 

Returns the physical ID for a given logical SPE id.

This function returns the physical ID (in EIB-order) of a given logical SPE ID. (See get_log_id()).

Parameters:
log_id The logical ID of the SPE of interest.
Returns:
The physical ID of the given SPE.

void init_spe ( addr64_t  argp,
addr64_t  envp,
void *  globals,
uint16_t  globals_size,
void *  locals,
uint16_t  locals_size 
)

Initialize internal values and transfer global and local data.

Parameters:
argp Enter the argp parameter of the SPE-main function here.
envp Enter the envp parameter of the SPE-main function here.
globals The address, the global date should be transfered to.
globals_size The size of the global data.
locals The address, the local data should be transfered to.
locals_size The size of the local data.


Generated on Fri Aug 8 14:53:26 2008 for Iolaos by  doxygen 1.5.5