My basic idea is to use Arduino MKR4000 board as source of true random generator for calculation based on Monte Carlo methods. At first stage of getting familiar with this board and Quartus software I have created a simple pseudo random generator which uses linear feedback shift register. Sampled data are transmitted via UART protocol to PC. Below there is diagram which shows concept of this project:
I have created three module in Verilog:
- LFSR which is 8 bit linear-feedback shift register . As target solution I would like to replace it with something which generates true random numbers (e.g. based on ring oscillator),
- prescaler which downscale 24 MHz clock to 38.4kHz which will be a source for UART transmission,
- module responsible for transmission a data via UART protocol
I attachment there are sources for Quartus and Arduino software. Below there is video from first run: