NEORV32 - Software Framework Documentation
|
Test program for the NEORV32 'A' ISA extension - check the emulation of the AMO (read-modify-write) operations. More...
#include <neorv32.h>
Functions | |
int | main () |
User configuration | |
#define | BAUD_RATE (19200) |
#define | NUM_TEST_CASES (10000) |
#define | SILENT_MODE (1) |
volatile uint32_t | amo_var |
uint32_t | xorshift32 (void) |
uint32_t | check_result (uint32_t num, uint32_t amo_var_old, uint32_t amo_var_pre, uint32_t amo_var_new, uint32_t amo_var) |
void | print_report (int num_err, int num_tests) |
static int32_t | MAX (int32_t a, int32_t b) |
static int32_t | MIN (int32_t a, int32_t b) |
static int32_t | MAXU (uint32_t a, uint32_t b) |
static int32_t | MINU (uint32_t a, uint32_t b) |
Test program for the NEORV32 'A' ISA extension - check the emulation of the AMO (read-modify-write) operations.
#define BAUD_RATE (19200) |
UART BAUD rate
#define NUM_TEST_CASES (10000) |
UART BAUD rate
#define SILENT_MODE (1) |
UART BAUD rate
uint32_t check_result | ( | uint32_t | num, |
uint32_t | amo_var_old, | ||
uint32_t | amo_var_pre, | ||
uint32_t | amo_var_new, | ||
uint32_t | amo_var ) |
Check results (reference (SW) vs actual hardware).
[in] | num | Test case number |
[in] | amo_var_old | Initial value of atomic variable. |
[in] | amo_var_pre | Value of atomic variable read from memory (before operation). |
[in] | amo_var_new | Expected new value of atomic variable. |
[in] | amo_var | Actual new value of atomic variable. |
int main | ( | void | ) |
Main function; test all provided AMO emulation functions.
|
inlinestatic |
MIN/MAX helpers.
|
inlinestatic |
UART BAUD rate
|
inlinestatic |
UART BAUD rate
|
inlinestatic |
UART BAUD rate
void print_report | ( | int | num_err, |
int | num_tests ) |
Print test report.
[in] | num_err | Number or errors in this test. |
[in] | num_tests | Total number of conducted tests. |
uint32_t xorshift32 | ( | void | ) |
Pseudo-Random Number Generator (to generate deterministic test vectors).
Simple pseudo random number generator.
PSEUDO-RANDOM number generator.
volatile uint32_t amo_var |
UART BAUD rate