API Documentation
OpTiMSoC system functions¶
-
group
system
Typedefs
-
typedef struct optimsoc_conf
optimsoc_conf
¶
Functions
-
void
optimsoc_init
(optimsoc_conf *config)¶
-
uint32_t
optimsoc_get_tileid
(void)¶ Get the tile identifier
- Return
Identifier of this tile, which is the rank inside all tiles
-
uint32_t
optimsoc_get_numtiles
(void)¶ Get the total number of tiles
- Return
Number of tiles in this system
-
uint32_t
optimsoc_get_numct
(void)¶ Get the number of compute tiles
- Return
Number of compute tiles
-
int
optimsoc_get_ctrank
(void)¶ Generate rank of this compute tile in all compute tiles
This gives the rank in the set of compute tiles. For example in a system where a compute tile is at position 0 and one at position 3, they will get this output tile 0 -> ctrank 0 tile 3 -> ctrank 1
- Return
rank of this tile
-
int
optimsoc_get_tilerank
(unsigned int tile)¶ Generate rank of given compute tile in all compute tiles
This gives the rank in the set of compute tiles. For example in a system where a compute tile is at position 0 and one at position 3, they will get this output tile 0 -> ctrank 0 tile 3 -> ctrank 1
- Return
rank of this tile
- Parameters
tile
: Tile to look up
-
int
optimsoc_get_ranktile
(unsigned int rank)¶ Get the tile that has the given rank
This is the reverse of optimsoc_tilerank and generates the tile identifier for the given rank.
- Parameters
rank
: The rank to lookup
-
unsigned int
optimsoc_get_relcoreid
(void)¶ Get the core id, relative in this tile
- Return
relative core identifier
-
unsigned int
optimsoc_get_tilenumcores
(void)¶ Get the number of cores in this tile
- Return
Number of cores in this tile
-
unsigned int
optimsoc_get_abscoreid
(void)¶ Get the absolute core id of this core
The absolute core id in the whole system is started from the first compute tile, core 0 and counted up. This may be useful in shared memory systems.
- Return
Absolute core id
-
uint32_t
optimsoc_get_mainmem_size
()¶ Get the size of global memory (if any)
Return the size of globally accessible memory. This memory is not directly accessed, but can only be accessed with DMA transfers. If the system has no global memory, return 0.
- Return
Size of memory (or 0, if no memory)
-
uint32_t
optimsoc_get_mainmem_tile
()¶ Get the tile ID of the global memory
If the system has global memory (optimsoc_get_mainmem_size() > 0), this function returns the tile identifier, where the memory is installed.
- Return
Main memory tile identifier
-
uint32_t
optimsoc_get_localmem_size
()¶ Get size of local memory
Get the size of memory available (and addressed) in this tile.
- Return
Size of local memory
-
struct
optimsoc_conf
-
typedef struct optimsoc_conf