NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
|
Verification program for the NEORV32 'Zfinx' extension (floating-point in x registers) using pseudo-random data as input; compares results from hardware against pure-sw reference functions. More...
#include <neorv32.h>
#include <float.h>
#include <math.h>
#include "neorv32_zfinx_extension_intrinsics.h"
Macros | |
User configuration | |
#define | BAUD_RATE (19200) |
#define | NUM_TEST_CASES (1000000) |
#define | SILENT_MODE (1) |
#define | RUN_CONV_TESTS (1) |
#define | RUN_ADDSUB_TESTS (1) |
#define | RUN_MUL_TESTS (1) |
#define | RUN_MINMAX_TESTS (1) |
#define | RUN_COMPARE_TESTS (1) |
#define | RUN_SGNINJ_TESTS (1) |
#define | RUN_CLASSIFY_TESTS (1) |
#define | RUN_UNAVAIL_TESTS (1) |
#define | RUN_TIMING_TESTS (0) |
Functions | |
uint32_t | get_test_vector (void) |
uint32_t | verify_result (uint32_t num, uint32_t opa, uint32_t opb, uint32_t ref, uint32_t res) |
void | print_report (uint32_t num_err) |
int | main () |
Verification program for the NEORV32 'Zfinx' extension (floating-point in x registers) using pseudo-random data as input; compares results from hardware against pure-sw reference functions.
#define BAUD_RATE (19200) |
UART BAUD rate
#define NUM_TEST_CASES (1000000) |
UART BAUD rate
#define RUN_ADDSUB_TESTS (1) |
UART BAUD rate
#define RUN_CLASSIFY_TESTS (1) |
UART BAUD rate
#define RUN_COMPARE_TESTS (1) |
UART BAUD rate
#define RUN_CONV_TESTS (1) |
UART BAUD rate
#define RUN_MINMAX_TESTS (1) |
UART BAUD rate
#define RUN_MUL_TESTS (1) |
UART BAUD rate
#define RUN_SGNINJ_TESTS (1) |
UART BAUD rate
#define RUN_TIMING_TESTS (0) |
UART BAUD rate
#define RUN_UNAVAIL_TESTS (1) |
UART BAUD rate
#define SILENT_MODE (1) |
UART BAUD rate
uint32_t get_test_vector | ( | void | ) |
Generate 32-bit test data (including special values like INFINITY every now and then).
int main | ( | void | ) |
Main function; test all available operations of the NEORV32 'Zfinx' extensions using bit floating-point hardware intrinsics and software-only reference functions (emulation).
void print_report | ( | uint32_t | num_err | ) |
Print test report.
[in] | num_err | Number or errors in this test. |
uint32_t verify_result | ( | uint32_t | num, |
uint32_t | opa, | ||
uint32_t | opb, | ||
uint32_t | ref, | ||
uint32_t | res ) |
Verify results (software reference vs. actual hardware).
[in] | num | Test case number |
[in] | opa | Operand 1 |
[in] | opb | Operand 2 |
[in] | ref | Software reference |
[in] | res | Actual results from hardware |