NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
|
Test program for the NEORV32 'A' ISA extension - check the emulation of the AMO (read-modify-write) operations. More...
#include <neorv32.h>
User configuration | |
#define | BAUD_RATE (19200) |
#define | NUM_TEST_CASES (1000) |
#define | SILENT_MODE (1) |
volatile uint32_t | amo_var |
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) |
void | trap_handler_emulate_amo (void) |
int | main () |
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 (1000) |
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.
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. |
void trap_handler_emulate_amo | ( | void | ) |
Emulate atomic memory operation.
volatile uint32_t amo_var |
UART BAUD rate