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

True random number generator demo program. More...

#include <neorv32.h>

Macros

User configuration
#define BAUD_RATE   19200
 

Functions

void print_random_data (void)
 
void repetition_count_test (void)
 
void adaptive_proportion_test (void)
 
void generate_histogram (void)
 
void compute_rate (void)
 
int main (void)
 

Detailed Description

True random number generator demo program.

Author
Stephan Nolting

Macro Definition Documentation

◆ BAUD_RATE

#define BAUD_RATE   19200

UART BAUD rate

Function Documentation

◆ adaptive_proportion_test()

void adaptive_proportion_test ( void )

Run adaptive proportion test (NIST SP 800-90B)

◆ compute_rate()

void compute_rate ( void )

Compute average random generation rate

◆ generate_histogram()

void generate_histogram ( void )

Generate and print histogram. Samples random data until a key is pressed.

◆ main()

int main ( void )

Simple true random number test/demo program.

Note
This program requires the UART and the TRNG to be synthesized.
Returns
0 if execution was successful

◆ print_random_data()

void print_random_data ( void )

Print random numbers until a key is pressed.

◆ repetition_count_test()

void repetition_count_test ( void )

Run repetition count test (NIST SP 800-90B)