atown622 Posted June 6, 2022 Share Posted June 6, 2022 The eclypse z7 has a built in random number generator and I was wondering how I can access this for use in a c++ code. Link to comment Share on other sites More sharing options...
0 artvvb Posted June 8, 2022 Share Posted June 8, 2022 I'm assuming you're referring to the "factory programmed 128-bit random number" placed in the OTP region of the Eclypse's SPI Flash, please correct me if I'm wrong. This is not a random number generator, but rather a unique identifier programmed into the flash chip by Spansion, which is intended as a security feature. It allows a host board to compare an expected ID against one read out from the flash to detect if someone has switched out the flash chip. None of Digilent's demos use it. Thanks, Arthur Link to comment Share on other sites More sharing options...
0 atown622 Posted June 9, 2022 Author Share Posted June 9, 2022 17 hours ago, artvvb said: I'm assuming you're referring to the "factory programmed 128-bit random number" placed in the OTP region of the Eclypse's SPI Flash, please correct me if I'm wrong. This is not a random number generator, but rather a unique identifier programmed into the flash chip by Spansion, which is intended as a security feature. It allows a host board to compare an expected ID against one read out from the flash to detect if someone has switched out the flash chip. None of Digilent's demos use it. Thanks, Arthur Well that seems like a misleading feature... Rand() function in c probably doesn't work then on the controller I'd assume. Does this mean Ill have to make a LSFR for that then?? Because I do need to generate a random number so that I can then make it into a gaussian distribution. Link to comment Share on other sites More sharing options...
0 zygot Posted June 9, 2022 Share Posted June 9, 2022 (edited) 2 hours ago, atown622 said: Does this mean Ill have to make a LSFR for that then?? It means that you get to create your own pseudo-random number generator. Creating an LFSR in logic is fairly trivial. Creating the proper LFSR for a particular application is not so trivial. Blindly relying on a rand() function in hardware or software to be appropriate is risky. There are only a few hardware number generators that claim to be random. The rest are pseudo-random at best and not necessarily appropriate for every application. I (think) that the Xilinx standalone OS has a C/C++ version of rand() if you don't want to create the ideal one in hardware. If you are running Linux on your Eclypse-Z7 then you have more software options. Advertisement claims about products and device capabilities are frequently optimistic and sometimes just plain incorrect. Even when correct in a particular context they can be open to misinterpretation by customer, whether intentional or not. Users can't make assumptions. This is true for everything that can be purchased. Some markets are worse than others; ADC/DAC devices, low cost FPGA boards, storage devices, etc. Edited June 9, 2022 by zygot atown622 1 Link to comment Share on other sites More sharing options...
0 artvvb Posted June 9, 2022 Share Posted June 9, 2022 I've suggested to our web team that we cut this from all applicable feature lists. Thanks, Arthur atown622 1 Link to comment Share on other sites More sharing options...
Question
atown622
The eclypse z7 has a built in random number generator and I was wondering how I can access this for use in a c++ code.
Link to comment
Share on other sites
4 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