I am generating a random number of gaussian distribution for my output voltage. I need to be able to do this and still output speeds of 10MHz. However it seems that this formula takes roughly 100-200us to calculate, no where near the speed at which I need.
Would it be possible to generate all my possible data points into an absolutely massive array before hand? I would need the write the program to the SD card so that I can have a multiple gigabyte array.
Is this possible? And how would I go about programming to the SD card such that the program runs on power up?
I see there is a jumper pin for QSPI/SD/JTAG but I am relatively unfamiliar with these kinds of things, so I am not certain how to program to the SD card (like would I have to call memory addresses there and just further complicate the system?)
Question
atown622
So I'm running into an issue with processing speeds of the following function:
value[i] = sqrt(-2*log((rand() % MAX_RAND_VAL)/(MAX_RAND_VAL+1.0)))*cos(TAU*(rand() % MAX_RAND_VAL)/(MAX_RAND_VAL+1.0)) * sigma;
I am generating a random number of gaussian distribution for my output voltage. I need to be able to do this and still output speeds of 10MHz. However it seems that this formula takes roughly 100-200us to calculate, no where near the speed at which I need.
Would it be possible to generate all my possible data points into an absolutely massive array before hand? I would need the write the program to the SD card so that I can have a multiple gigabyte array.
Is this possible? And how would I go about programming to the SD card such that the program runs on power up?
I see there is a jumper pin for QSPI/SD/JTAG but I am relatively unfamiliar with these kinds of things, so I am not certain how to program to the SD card (like would I have to call memory addresses there and just further complicate the system?)
Edited by atown622Tags
Link to comment
Share on other sites
9 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now