<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: 1 million Random Numbers in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/1-million-Random-Numbers/m-p/355476#M49723</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am waiting for the job ring to complete its job in rng_desc.c. as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Wait for job ring to complete the job: completed job expected */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(reg32_read(CAAM_ORSFR0) != 1);&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Isn't it sufficient for waiting or I have to write some command in the descriptor for the same?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Apoorva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Jan 2015 09:49:47 GMT</pubDate>
    <dc:creator>apoorvabhatia</dc:creator>
    <dc:date>2015-01-26T09:49:47Z</dc:date>
    <item>
      <title>1 million Random Numbers</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/1-million-Random-Numbers/m-p/355473#M49720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to generate 1 million random numbers. I was earlier trying to do it using looping within the descriptor but my subtraction was not taking place and I couldn't figure out the error (the thread related to it is :&lt;A _jive_internal="true" data-containerid="2004" data-containertype="14" data-objectid="338073" data-objecttype="1" href="https://community.nxp.com/thread/338073"&gt;Math Operation(Subtraction CAAM)&lt;/A&gt; ). So I have now implemented the same without using the loops as follows:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have taken one descriptor to produce N random numbers (total size of descriptor N+3) and then it jumps to another similar (actually same) descriptor. I have created an array of similar descriptors (size= S). Finally when the total number of random numbers is close to 1 million (N*S=1000000) then I make it jump to another similar descriptor which is the last descriptor of the code and doesn't jump further. I have a couple of doubts. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. It seems I cannot produce random numbers more than something around 1900. Irrespective of the value of N and S, it starts giving me errors when (N*S) reaches somewhere around 1900. Why is that happening?&lt;/P&gt;&lt;P&gt; In order to generate 1 million random numbers, after every 1500 random number generation, I brought the control back to software and then again assigned the descriptor which jumped through some N descriptors before again coming back to the software. This is continued till 1 million random numbers are produced. This seems to be working fine and also giving significant time improvement as compared to random number generation using software. But I wanted to produce all 1 million random numbers without coming back to software. Why is that creating a problem when (N*S) exceed 1900?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. When I try to store the Random numbers using FIFO store by the following descriptor command:&lt;/P&gt;&lt;P&gt;#define RNG_DESC54 0x60300010&lt;/P&gt;&lt;P&gt;#define RNG_DESC55 0x00000000 // assign the memory address to this in the main program where you call it&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It stores the value once but when I try to use it again and again to store all random numbers , the code seems to stall infinitely when it is used the second time. Why is such error arising? (because of this I am able to store only 4 random numbers which are present in the Output FIFO at the end of the program.)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am attaching the descriptor file that I have written (rng_desc.h). I am also attaching the C code that is finally making the descriptors and handing it over to CAAM.&lt;/P&gt;&lt;P&gt;I hope I have made my doubts clear.&lt;/P&gt;&lt;P&gt;Thanks. &lt;SPAN aria-label="Happy" class="emoticon_happy emoticon-inline" style="height:16px;width:16px;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-335884"&gt;rng_desc.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-335884"&gt;rng_desc.h.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 10:02:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/1-million-Random-Numbers/m-p/355473#M49720</guid>
      <dc:creator>apoorvabhatia</dc:creator>
      <dc:date>2015-01-19T10:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: 1 million Random Numbers</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/1-million-Random-Numbers/m-p/355474#M49721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any suggestions would be helpful. :smileyhappy:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 08:38:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/1-million-Random-Numbers/m-p/355474#M49721</guid>
      <dc:creator>apoorvabhatia</dc:creator>
      <dc:date>2015-01-22T08:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: 1 million Random Numbers</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/1-million-Random-Numbers/m-p/355475#M49722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is needed to wait for job ring to complete the job, before next job starts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Yuri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2015 09:42:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/1-million-Random-Numbers/m-p/355475#M49722</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2015-01-26T09:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: 1 million Random Numbers</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/1-million-Random-Numbers/m-p/355476#M49723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am waiting for the job ring to complete its job in rng_desc.c. as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Wait for job ring to complete the job: completed job expected */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(reg32_read(CAAM_ORSFR0) != 1);&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Isn't it sufficient for waiting or I have to write some command in the descriptor for the same?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Apoorva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2015 09:49:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/1-million-Random-Numbers/m-p/355476#M49723</guid>
      <dc:creator>apoorvabhatia</dc:creator>
      <dc:date>2015-01-26T09:49:47Z</dc:date>
    </item>
  </channel>
</rss>

