NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
Loading...
Searching...
No Matches
neorv32_smp.c File Reference

Symmetric multiprocessing (SMP) library source file. More...

#include <neorv32.h>

Functions

int neorv32_smp_launch (int(*entry_point)(void), uint8_t *stack_memory, size_t stack_size_bytes)
 
void neorv32_smp_icc_push (uint32_t data)
 
uint32_t neorv32_smp_icc_pop (void)
 

Detailed Description

Symmetric multiprocessing (SMP) library source file.

Function Documentation

◆ 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]dataData 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_pointCore1's main function; must be of type "int entry_point(void)".
[in]stack_memoryPointer to beginning of core1's stack memory array. Should be at least 512 bytes.
[in]stack_size_bytesCore1'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.