Efficient Random Number Generation

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
User avatar
shawn
XCore Addict
Posts: 238
Joined: Thu Dec 17, 2009 5:15 am

Re: Efficient Random Number Generation

Postby shawn » Thu Feb 11, 2010 8:41 am

You could use if to seed a boat load of other sic's.
User avatar
oar_some
Member
Posts: 8
Joined: Thu Feb 11, 2010 7:46 pm

Postby oar_some » Thu Feb 18, 2010 8:47 pm

use the provided functions?!
User avatar
jonathan
Respected Member
Posts: 377
Joined: Thu Dec 10, 2009 6:07 pm

Postby jonathan » Thu Feb 18, 2010 8:51 pm

oar_some wrote:use the provided functions?!
What provided functions, where?

Not helpful.
Image
User avatar
that_awesome_guy
Member
Posts: 10
Joined: Mon Dec 14, 2009 7:06 pm

Postby that_awesome_guy » Thu Feb 18, 2010 9:03 pm

um...

Code: Select all

#include <xs1.h>
#include <math.h>
#include <print.h>
#include <stdlib.h>

int main()
{
	printuintln(rand());
	return 0;
}
:?: :?: :?: :?: :?: :?: :?: :?:
User avatar
jonathan
Respected Member
Posts: 377
Joined: Thu Dec 10, 2009 6:07 pm

Postby jonathan » Thu Feb 18, 2010 9:18 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?
Image
User avatar
that_awesome_guy
Member
Posts: 10
Joined: Mon Dec 14, 2009 7:06 pm

Postby that_awesome_guy » Thu Feb 18, 2010 10:01 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
User avatar
jonathan
Respected Member
Posts: 377
Joined: Thu Dec 10, 2009 6:07 pm

Postby jonathan » Thu Feb 18, 2010 10:03 pm

Thank you. Much more helpful and not in the least bit patronizing. :-)
Image
User avatar
dan
Experienced Member
Posts: 102
Joined: Mon Feb 22, 2010 2:30 pm

Postby dan » Wed Feb 24, 2010 6:20 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?
User avatar
otitov
XCore Addict
Posts: 207
Joined: Thu Dec 10, 2009 11:00 pm
Location: Mexico

Postby otitov » Fri Feb 26, 2010 11:10 pm

anyway it would be very interesting to try them!
User avatar
shawn
XCore Addict
Posts: 238
Joined: Thu Dec 17, 2009 5:15 am

Postby shawn » Sat Feb 27, 2010 12:47 am

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?
This is interesting, I wonder what other eggs we may find. perhaps useful for simulation.

Who is online

Users browsing this forum: No registered users and 1 guest