Snitch Runtime
Loading...
Searching...
No Matches
team.h File Reference

This file contains functions and macros related to Snitch team management. More...

Go to the source code of this file.

Functions

uint32_t snrt_hartid ()
 Get the RISC-V hardware thread ID (hartid).
 
uint32_t snrt_cluster_num ()
 Get the number of Snitch clusters in the system.
 
uint32_t snrt_cluster_core_num ()
 Get the number of cores per cluster.
 
uint32_t snrt_global_core_base_hartid ()
 Get the hartid of the first Snitch core in the system.
 
uint32_t snrt_global_core_num ()
 Get the total number of Snitch cores in the system.
 
uint32_t snrt_global_compute_core_num ()
 Get the total number of Snitch compute cores in the system.
 
uint32_t snrt_global_core_idx ()
 Get the index (!= hartid) of the current Snitch core in the system.
 
uint32_t snrt_global_compute_core_idx ()
 Get the index of the current Snitch compute core in the system.
 
uint32_t snrt_cluster_idx ()
 Get the index of the current Snitch cluster in the system.
 
uint32_t snrt_cluster_core_idx ()
 Get the index of the current Snitch core within the cluster.
 
uint32_t snrt_cluster_dm_core_num ()
 Get the number of data mover (DM) cores per cluster.
 
uint32_t snrt_cluster_compute_core_num ()
 Get the number of compute cores per cluster.
 
int snrt_is_compute_core ()
 Check if the current core is a compute core.
 
int snrt_cluster_is_last_compute_core ()
 Check if the current core is the last compute core in the cluster.
 
int snrt_is_dm_core ()
 Check if the current core is a data mover (DM) core.
 

Detailed Description

This file contains functions and macros related to Snitch team management.

The functions in this file provide information about the Snitch hardware configuration, such as the number of clusters, cores per cluster, and the current core's index within the system. These functions can be used for team management and core-specific operations.

Function Documentation

◆ snrt_cluster_compute_core_num()

uint32_t snrt_cluster_compute_core_num ( )
inline

Get the number of compute cores per cluster.

Returns
The number of compute cores per cluster.

◆ snrt_cluster_core_idx()

uint32_t snrt_cluster_core_idx ( )
inline

Get the index of the current Snitch core within the cluster.

Returns
The index of the current core within the cluster.

◆ snrt_cluster_core_num()

uint32_t snrt_cluster_core_num ( )
inline

Get the number of cores per cluster.

Returns
The number of cores per cluster.

◆ snrt_cluster_dm_core_num()

uint32_t snrt_cluster_dm_core_num ( )
inline

Get the number of data mover (DM) cores per cluster.

Returns
The number of DM cores per cluster.

◆ snrt_cluster_idx()

uint32_t snrt_cluster_idx ( )
inline

Get the index of the current Snitch cluster in the system.

Returns
The index of the current cluster.

◆ snrt_cluster_is_last_compute_core()

int snrt_cluster_is_last_compute_core ( )
inline

Check if the current core is the last compute core in the cluster.

Returns
True if the current core is the last compute core, false otherwise.

◆ snrt_cluster_num()

uint32_t snrt_cluster_num ( )
inline

Get the number of Snitch clusters in the system.

Returns
The number of clusters.

◆ snrt_global_compute_core_idx()

uint32_t snrt_global_compute_core_idx ( )
inline

Get the index of the current Snitch compute core in the system.

Returns
The index of the current Snitch compute core.

◆ snrt_global_compute_core_num()

uint32_t snrt_global_compute_core_num ( )
inline

Get the total number of Snitch compute cores in the system.

Returns
The total number of compute cores.

◆ snrt_global_core_base_hartid()

uint32_t snrt_global_core_base_hartid ( )
inline

Get the hartid of the first Snitch core in the system.

Returns
The hartid of the first Snitch core in the system.

◆ snrt_global_core_idx()

uint32_t snrt_global_core_idx ( )
inline

Get the index (!= hartid) of the current Snitch core in the system.

Returns
The index of the current Snitch core.

◆ snrt_global_core_num()

uint32_t snrt_global_core_num ( )
inline

Get the total number of Snitch cores in the system.

Returns
The total number of cores.

◆ snrt_hartid()

uint32_t snrt_hartid ( )
inline

Get the RISC-V hardware thread ID (hartid).

Returns
The hardware thread ID.

◆ snrt_is_compute_core()

int snrt_is_compute_core ( )
inline

Check if the current core is a compute core.

Returns
True if the current core is a compute core, false otherwise.

◆ snrt_is_dm_core()

int snrt_is_dm_core ( )
inline

Check if the current core is a data mover (DM) core.

Returns
True if the current core is a DM core, false otherwise.