Hi all
Is possible make random number generator with random first state ? (like true random)
I´m testing random routine from StartKit example projects (app_noughts_and_crosses) but not working - first value when ON StartKit is same value like before previous ON !
Second question - c++ function rand() or random() not implement in compiller ?
Thanks info
Kamil
Random number question
-
- Member++
- Posts: 18
- Joined: Fri Feb 14, 2014 11:21 am
-
Verified
- XCore Legend
- Posts: 1156
- Joined: Thu May 27, 2010 10:08 am
Yep - should be possible, depending on your definition of random!
There's a free running ring oscillator in each tile which varies based on PVT which can be used as a seed, so pretty difficult to predict without detailed knowledge of you power supply rail, die temperature and batch code of the chip. Should be random enough for gaming ;-)
https://github.com/xcore/sc_util/tree/m ... ule_random
There's a free running ring oscillator in each tile which varies based on PVT which can be used as a seed, so pretty difficult to predict without detailed knowledge of you power supply rail, die temperature and batch code of the chip. Should be random enough for gaming ;-)
https://github.com/xcore/sc_util/tree/m ... ule_random
-
- Member++
- Posts: 18
- Joined: Fri Feb 14, 2014 11:21 am
Thanks reply
nice module - this weekend test it :-)
nice module - this weekend test it :-)
-
Verified
- XCore Legend
- Posts: 1163
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
JLS wrote: Second question - c++ function rand() or random() not implement in compiller ?
FYI, rand() etc are in stdlib.h