Symmetric multiprocessing (SMP) library header file.
More...
Go to the source code of this file.
Symmetric multiprocessing (SMP) library header file.
◆ neorv32_smp_icc_avail()
int neorv32_smp_icc_avail |
( |
void | | ) |
|
|
inline |
Check if ICC link data is available.
- Returns
- 0 = no data available, nonzero = data available.
◆ neorv32_smp_icc_free()
int neorv32_smp_icc_free |
( |
void | | ) |
|
|
inline |
Check if free space in ICC link.
- Returns
- 0 = no free space available, nonzero = free space available.
◆ neorv32_smp_icc_get()
uint32_t neorv32_smp_icc_get |
( |
void | | ) |
|
|
inline |
Get data from other core via ICC link. Check link status before neorv32_smp_icc_avail().
- Returns
- Data word (32-bit) received from other core.
◆ neorv32_smp_icc_pop()
uint32_t neorv32_smp_icc_pop |
( |
void | | ) |
|
Get data from other core via ICC link (blocking).
- Warning
- This functions is blocking until data has been received.
- Returns
- Data word (32-bit) received from other core.
◆ neorv32_smp_icc_push()
void neorv32_smp_icc_push |
( |
uint32_t | data | ) |
|
Send data to other core via ICC link (blocking).
- Warning
- This functions is blocking until data has been send.
- Parameters
-
[in] | data | Data word (32-bit) to be send to other core. |
◆ neorv32_smp_icc_put()
void neorv32_smp_icc_put |
( |
uint32_t | data | ) |
|
|
inline |
Send data to other core via ICC link. Check link status before neorv32_smp_icc_free().
- Parameters
-
[in] | data | Data word (32-bit) to be send to other core. |
◆ neorv32_smp_launch()
int neorv32_smp_launch |
( |
int(* | entry_point )(void), |
|
|
uint8_t * | stack_memory, |
|
|
size_t | stack_size_bytes ) |
Configure and start SMP core 1.
- Warning
- This function can be executed on core 0 only.
- Parameters
-
[in] | entry_point | Core1's main function; must be of type "int entry_point(void)". |
[in] | stack_memory | Pointer to beginning of core1's stack memory array. Should be at least 512 bytes. |
[in] | stack_size_bytes | Core1's stack size in bytes. |
- Returns
- 0 if launching succeeded. -1 if invalid hart ID or CLINT not available. -2 if core1 is not responding.
◆ neorv32_smp_whoami()
uint32_t neorv32_smp_whoami |
( |
void | | ) |
|
|
inline |
Get core/hart ID of the CPU that is executing this function.
- Returns
- Core ID from mhartid CSR.