Efficient Random Number Generation
-
- XCore Addict
- Posts: 238
- Joined: Thu Dec 17, 2009 5:15 am
You could use if to seed a boat load of other sic's.
-
- Member
- Posts: 8
- Joined: Thu Feb 11, 2010 7:46 pm
use the provided functions?!
-
- Respected Member
- Posts: 377
- Joined: Thu Dec 10, 2009 6:07 pm
What provided functions, where?oar_some wrote:use the provided functions?!
Not helpful.
-
- Member
- Posts: 10
- Joined: Mon Dec 14, 2009 7:06 pm
um...
:?: :?: :?: :?: :?: :?: :?: :?:
Code: Select all
#include <xs1.h>
#include <math.h>
#include <print.h>
#include <stdlib.h>
int main()
{
printuintln(rand());
return 0;
}
-
- Respected Member
- Posts: 377
- Joined: Thu Dec 10, 2009 6:07 pm
Thanks, but the sarcasm wasn't needed. Where are these documented?
Don't you work for XMOS? I thought XMOS staff were supposed to be helpful! It feels like you are trying to make me out to be an idiot. That isn't what this site is about. Or so I thought?
Don't you work for XMOS? I thought XMOS staff were supposed to be helpful! It feels like you are trying to make me out to be an idiot. That isn't what this site is about. Or so I thought?
-
- Member
- Posts: 10
- Joined: Mon Dec 14, 2009 7:06 pm
I thought it was a helpful pointer, sorry you didn't feel that way.
These are standard C functions, they are not xmos specific. If XMOS supports standard C then I would personally expect it to support standard library functions such as these. Standard library documentation can be found here - http://en.wikipedia.org/wiki/Stdlib.h
These are standard C functions, they are not xmos specific. If XMOS supports standard C then I would personally expect it to support standard library functions such as these. Standard library documentation can be found here - http://en.wikipedia.org/wiki/Stdlib.h
-
- Respected Member
- Posts: 377
- Joined: Thu Dec 10, 2009 6:07 pm
Thank you. Much more helpful and not in the least bit patronizing. :-)
-
- Experienced Member
- Posts: 102
- Joined: Mon Feb 22, 2010 2:30 pm
The L1 series has some ring oscillators which were put in for our characterisation purposes. They are free running counters that have no relationship with any other clocks and oscillate with a PVT dependant frequency between 300 and 700 mhz, if you enable them.
They can be read in software with a GETPS, but are not documented AFAIK.
Would these be of any use?
They can be read in software with a GETPS, but are not documented AFAIK.
Would these be of any use?
-
- XCore Addict
- Posts: 207
- Joined: Thu Dec 10, 2009 11:00 pm
- Location: Mexico
anyway it would be very interesting to try them!
-
- XCore Addict
- Posts: 238
- Joined: Thu Dec 17, 2009 5:15 am
This is interesting, I wonder what other eggs we may find. perhaps useful for simulation.dan wrote:The L1 series has some ring oscillators which were put in for our characterisation purposes. They are free running counters that have no relationship with any other clocks and oscillate with a PVT dependant frequency between 300 and 700 mhz, if you enable them.
They can be read in software with a GETPS, but are not documented AFAI?