![]() |
NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
|
Find prime numbers by combining the power of both CPU cores. More...
#include <neorv32.h>
Macros | |
#define | BAUD_RATE 19200 |
#define | NUM_MAX 100 |
Functions | |
uint32_t | is_prime (uint32_t n) |
uint32_t | count_primes (uint32_t beg, uint32_t end) |
int | core1_entry (void) |
int | main (void) |
Variables | |
volatile uint8_t | core1_stack [2048] |
Find prime numbers by combining the power of both CPU cores.
#define BAUD_RATE 19200 |
User configuration
int core1_entry | ( | void | ) |
Main function for core 1 (secondary core).
uint32_t count_primes | ( | uint32_t | beg, |
uint32_t | end ) |
Count all prime numbers in range.
[in] | beg | Start of number range. |
[in] | end | End of number range. |
uint32_t is_prime | ( | uint32_t | n | ) |
Check if number is prime.
[in] | n | Number to check. |
int main | ( | void | ) |
Find prime numbers by combining the power of both CPU cores.
volatile uint8_t core1_stack[2048] |
Global variables