AnsweredAssumed Answered

Random Number Descriptor

Question asked by Apoorva Bhatia on Dec 28, 2014
Latest reply on Dec 28, 2014 by Apoorva Bhatia

Hi,

 

This is the RNG descriptor that I have written:

/*****************************************

*----- Random Number descriptor -----*

*****************************************/

/* Header

*  1011 0000 1000 0000 0000 0000 0000 0111

*  ++++-+-- Header                    +-- 7 words in descriptor

*/ 

#define RNG_DESC1  0xB0800006

 

/* Load Data size register

*  0001 0010 1000 0010 0000 0000 0000 0100

*  Data: 0x0000 0010

* Loading the data size register with the size of the key to be generated

* Length : 16 bytes

*/

#define RNG_DESC2 0x12820004

#define RNG_DESC3 0x00000010

 

/* operation

*  1000 0010 0101 0000 1000 0000 0000 0000

* operation: class1-op rng (SH0) generate random, state handle: 0, normal (non-deterministic mode)

*/

#define RNG_DESC4 0x82500800

 

// Wait for Class 1 done

#define RNG_DESC5 0xA3000201

 

/* FIFO Store

*  0110 0000 0011 0000 0000 0000 0001 0000

* fifostore: msg len=16

*/

#define RNG_DESC6 0x60300010

#define RNG_DESC7 0x00000000 // assign the memory address to this in the main program where you call it

 

/***************MY CODE*************************************/

 

 

Now, it shows an error in the output ring: 0x40000504
which means that the fifth descriptor (#define RNG_DESC5 0xA3000201) is wrong. Basically i want to wait till the random number has been generated.

 

Can someone please help me with this? (i also tried 0xA2000001 which has been used in the SDK during instatntiation for similar purpose but still the same error is given)

 

Thanks.

Outcomes